Subversion Repositories planix.SVN

Rev

Rev 113 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 113 Rev 115
Line 9... Line 9...
9
#endif
9
#endif
10
 
10
 
11
#include "ex.h"
11
#include "ex.h"
12
#include "ex_tty.h"
12
#include "ex_tty.h"
13
#include "ex_vis.h"
13
#include "ex_vis.h"
14
 
-
 
15
 
-
 
16
void enddm();
-
 
17
void godm();
-
 
18
void vnpins();
-
 
19
void vneedpos();
-
 
20
void vmaktop();
-
 
21
void vgoto();
-
 
22
void vclrech();
-
 
23
void vclreol();
-
 
24
 
14
 
25
/*
15
/*
26
 * Deal with the screen, clearing, cursor positioning, putting characters
16
 * Deal with the screen, clearing, cursor positioning, putting characters
27
 * into the screen image, and deleting characters.
17
 * into the screen image, and deleting characters.
28
 * Really hard stuff here is utilizing insert character operations
18
 * Really hard stuff here is utilizing insert character operations
Line 75... Line 65...
75
}
65
}
76
 
66
 
77
/*
67
/*
78
 * Clear to the end of the current physical line
68
 * Clear to the end of the current physical line
79
 */
69
 */
80
void
-
 
81
vclreol()
70
vclreol()
82
{
71
{
83
	register int i, j;
72
	register int i, j;
84
#ifndef	BIT8
73
#ifndef	BIT8
85
	register char *tp;
74
	register char *tp;
Line 124... Line 113...
124
 * a side effect of a clear to end of display, e.g.)
113
 * a side effect of a clear to end of display, e.g.)
125
 * so just do it logically.
114
 * so just do it logically.
126
 * If work here is being held off, just remember, in
115
 * If work here is being held off, just remember, in
127
 * heldech, if work needs to be done, don't do anything.
116
 * heldech, if work needs to be done, don't do anything.
128
 */
117
 */
129
void
-
 
130
vclrech(didphys)
118
vclrech(didphys)
131
	bool didphys;
119
	bool didphys;
132
{
120
{
133
 
121
 
134
	if (Peekkey == ATTN)
122
	if (Peekkey == ATTN)
Line 300... Line 288...
300
}
288
}
301
 
289
 
302
/*
290
/*
303
 * Move cursor to line y, column x, handling wraparound and scrolling.
291
 * Move cursor to line y, column x, handling wraparound and scrolling.
304
 */
292
 */
305
void
-
 
306
vgoto(y, x)
293
vgoto(y, x)
307
	register int y, x;
294
	register int y, x;
308
{
295
{
309
#ifndef	BIT8
296
#ifndef	BIT8
310
	register char *tp;
297
	register char *tp;
Line 497... Line 484...
497
		vmaktop(LINE(vcline) + i, cp);
484
		vmaktop(LINE(vcline) + i, cp);
498
		cp += WCOLS;
485
		cp += WCOLS;
499
	}
486
	}
500
}
487
}
501
 
488
 
502
void
-
 
503
vmaktop(p, cp)
489
vmaktop(p, cp)
504
	register int p;
490
	register int p;
505
#ifndef	BIT8
491
#ifndef	BIT8
506
	char *cp;
492
	char *cp;
507
#else
493
#else
Line 530... Line 516...
530
 * Multi-character inserts occur only as a result
516
 * Multi-character inserts occur only as a result
531
 * of expansion of tabs (i.e. inssize == 1 except
517
 * of expansion of tabs (i.e. inssize == 1 except
532
 * for tabs) and code assumes this in several place
518
 * for tabs) and code assumes this in several place
533
 * to make life simpler.
519
 * to make life simpler.
534
 */
520
 */
535
void 
-
 
536
vinschar(c)
521
vinschar(c)
537
	int c;		/* mjm: char --> int */
522
	int c;		/* mjm: char --> int */
538
{
523
{
539
	register int i;
524
	register int i;
540
#ifndef	BIT8
525
#ifndef	BIT8
Line 767... Line 752...
767
 * screen rollup).
752
 * screen rollup).
768
 *
753
 *
769
 * On a dumb terminal we may infact redisplay the rest of the
754
 * On a dumb terminal we may infact redisplay the rest of the
770
 * screen here brute force to keep it pretty.
755
 * screen here brute force to keep it pretty.
771
 */
756
 */
772
void
-
 
773
vneedpos(cnt)
757
vneedpos(cnt)
774
	int cnt;
758
	int cnt;
775
{
759
{
776
	register int d = DEPTH(vcline);
760
	register int d = DEPTH(vcline);
777
	register int rmdr = d * WCOLS - linend;
761
	register int rmdr = d * WCOLS - linend;
Line 780... Line 764...
780
		return;
764
		return;
781
	endim();
765
	endim();
782
	vnpins(1);
766
	vnpins(1);
783
}
767
}
784
 
768
 
785
void
-
 
786
vnpins(dosync)
769
vnpins(dosync)
787
	int dosync;
770
	int dosync;
788
{
771
{
789
	register int d = DEPTH(vcline);
772
	register int d = DEPTH(vcline);
790
	register int e;
773
	register int e;
Line 798... Line 781...
798
	DEPTH(vcline)++;
781
	DEPTH(vcline)++;
799
	if (e < WECHO) {
782
	if (e < WECHO) {
800
		e = vglitchup(vcline, d);
783
		e = vglitchup(vcline, d);
801
		vigoto(e, 0); vclreol();
784
		vigoto(e, 0); vclreol();
802
		if (dosync) {
785
		if (dosync) {
803
			void (*Ooutchar)() = Outchar;
786
			int (*Ooutchar)() = Outchar;
804
			Outchar = vputchar;
787
			Outchar = vputchar;
805
			vsync(e + 1);
788
			vsync(e + 1);
806
			Outchar = Ooutchar;
789
			Outchar = Ooutchar;
807
		}
790
		}
808
	} else {
791
	} else {
Line 1099... Line 1082...
1099
 * Go into ``delete mode''.  If the
1082
 * Go into ``delete mode''.  If the
1100
 * sequence which goes into delete mode
1083
 * sequence which goes into delete mode
1101
 * is the same as that which goes into insert
1084
 * is the same as that which goes into insert
1102
 * mode, then we are in delete mode already.
1085
 * mode, then we are in delete mode already.
1103
 */
1086
 */
1104
void
-
 
1105
godm()
1087
godm()
1106
{
1088
{
1107
 
1089
 
1108
	if (insmode) {
1090
	if (insmode) {
1109
		if (eq(DM, IM))
1091
		if (eq(DM, IM))
Line 1119... Line 1101...
1119
 * it wins to pretend we are now in insert mode,
1101
 * it wins to pretend we are now in insert mode,
1120
 * since we will likely want to be there again soon
1102
 * since we will likely want to be there again soon
1121
 * if we just moved over to delete space from part of
1103
 * if we just moved over to delete space from part of
1122
 * a tab (above).
1104
 * a tab (above).
1123
 */
1105
 */
1124
void
-
 
1125
enddm()
1106
enddm()
1126
{
1107
{
1127
 
1108
 
1128
	if (eq(DM, IM)) {
1109
	if (eq(DM, IM)) {
1129
		insmode = 1;
1110
		insmode = 1;
Line 1164... Line 1145...
1164
 * QUOTE, QUOTE|' ', and ' ' for CONCEPT-100 like terminals, and also
1145
 * QUOTE, QUOTE|' ', and ' ' for CONCEPT-100 like terminals, and also
1165
 * code to deal with terminals which overstrike, including CRT's where
1146
 * code to deal with terminals which overstrike, including CRT's where
1166
 * you can erase overstrikes with some work.  CRT's which do underlining
1147
 * you can erase overstrikes with some work.  CRT's which do underlining
1167
 * implicitly which has to be erased (like CONCEPTS) are also handled.
1148
 * implicitly which has to be erased (like CONCEPTS) are also handled.
1168
 */
1149
 */
1169
void
-
 
1170
vputchar(c)
1150
vputchar(c)
1171
	register int c;
1151
	register int c;
1172
{
1152
{
1173
#ifndef	BIT8
1153
#ifndef	BIT8
1174
	register char *tp;
1154
	register char *tp;
Line 1396... Line 1376...
1396
 
1376
 
1397
/*
1377
/*
1398
 * Delete display positions stcol through endcol.
1378
 * Delete display positions stcol through endcol.
1399
 * Amount of use of special terminal features here is limited.
1379
 * Amount of use of special terminal features here is limited.
1400
 */
1380
 */
1401
void
-
 
1402
physdc(stcol, endcol)
1381
physdc(stcol, endcol)
1403
	int stcol, endcol;
1382
	int stcol, endcol;
1404
{
1383
{
1405
#ifndef	BIT8
1384
#ifndef	BIT8
1406
	register char *tp, *up;
1385
	register char *tp, *up;
Line 1499... Line 1478...
1499
	if (trubble || techoin)
1478
	if (trubble || techoin)
1500
		fprintf(trace, "\n");
1479
		fprintf(trace, "\n");
1501
	trubble = 0, techoin = 0;
1480
	trubble = 0, techoin = 0;
1502
}
1481
}
1503
 
1482
 
1504
void
-
 
1505
tvliny()
1483
tvliny()
1506
{
1484
{
1507
	register int i;
1485
	register int i;
1508
 
1486
 
1509
	if (!trace)
1487
	if (!trace)