File: bm_dos.c

package info (click to toggle)
bvi 1.3.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 904 kB
  • ctags: 578
  • sloc: ansic: 5,751; sh: 2,839; makefile: 104
file content (132 lines) | stat: -rwxr-xr-x 1,787 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* BM_DOS.C - DOS specific subroutines for BMORE
 *
 * 2000-05-10 V 1.3.0 alpha
 * 2000-07-07 V 1.3.0 final
 * 2001-12-07 V 1.3.1
 * 2003-07-03 V 1.3.2
 *
 * NOTE: Edit this file with tabstop=4 !
 *
 * Copyright 1996-2003 by Gerhard Buergmann
 * gerhard@puon.at
 *
 * 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");
	clearscreen();
	fseek(curr_file, screen_home, SEEK_SET);
	bytepos = screen_home;
}


void
highlight()
{
	highvideo();
}


void
normal()
{
	normvideo();
}


void
clearscreen()
{
	clrscr();
}


void
home()
{
	gotoxy(1, 1);
}


/* force clear to end of line */
cleartoeol()
{
	clreol();
}


int
vgetc()
{
	 return ((char)bioskey(0));
}