mirror of
https://github.com/vbatts/bvi.git
synced 2025-08-01 07:00:31 +00:00
bvi-1.3.0.src.tar.gz
This commit is contained in:
commit
0220b756fa
80 changed files with 17347 additions and 0 deletions
126
bm_dos.c
Executable file
126
bm_dos.c
Executable file
|
@ -0,0 +1,126 @@
|
|||
/* BM_DOS.C - DOS specific subroutines for BMORE
|
||||
*
|
||||
* 2000-05-10 V 1.3.0 alpha
|
||||
* 2000-07-07 V 1.3.0 final
|
||||
*
|
||||
* NOTE: Edit this file with tabstop=4 !
|
||||
*
|
||||
* Copyright 1996-2000 by Gerhard Buergmann
|
||||
* Gerhard.Buergmann@altavista.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* See file COPYING for information on distribution conditions.
|
||||
*/
|
||||
|
||||
/*
|
||||
#define DEBUG 1
|
||||
*/
|
||||
|
||||
#include "bmore.h"
|
||||
|
||||
#define TBUFSIZ 1024
|
||||
|
||||
|
||||
extern off_t bytepos, screen_home;
|
||||
extern FILE *curr_file;
|
||||
/*
|
||||
extern int screenlines;
|
||||
*/
|
||||
|
||||
int got_int;
|
||||
int no_intty, no_tty;
|
||||
|
||||
#ifdef DEBUG
|
||||
FILE *dbug;
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
initterm()
|
||||
{
|
||||
maxx = 80;
|
||||
maxy = 25;
|
||||
}
|
||||
|
||||
void
|
||||
set_tty ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
reset_tty ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
sig()
|
||||
{
|
||||
signal(SIGINT, sig);
|
||||
|
||||
got_int = TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* doshell() - run a command or an interactive shell
|
||||
*/
|
||||
void
|
||||
doshell(cmd)
|
||||
char *cmd;
|
||||
{
|
||||
system(cmd);
|
||||
printf("\r");
|
||||
clrscr();
|
||||
fseek(curr_file, screen_home, SEEK_SET);
|
||||
bytepos = screen_home;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
home()
|
||||
{
|
||||
/*
|
||||
tputs(Home, 1, putch);
|
||||
|
||||
screenlines = 0;
|
||||
*/
|
||||
gotoxy(1, 1);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
vgetc()
|
||||
{
|
||||
return ((char)bioskey(0));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* force clear to end of line
|
||||
*/
|
||||
cleareol()
|
||||
{
|
||||
/*
|
||||
tputs(erase_ln, 1, putch);
|
||||
*/
|
||||
clreol();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
beep(void)
|
||||
{
|
||||
putchar(7);
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue