-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathex_vis.h
145 lines (113 loc) · 2.21 KB
/
ex_vis.h
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
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
* Ex - a text editor
* Bill Joy UCB June 1977
*/
#define FS CTRL('\\')
#define NL CTRL('j')
#define CR CTRL('m')
#define INF 30000
#define DELETE 0177
#define ESCAPE 033
#ifdef VISUAL
char visual;
char *cursor, *wcursor, *tcursor;
int dir;
/* ???
int vlast;
*/
#define vputc(c) putc(c, stdout)
#define TUBELINES 150
#define TUBECOLS 400
#define TUBESIZE (TUBELINES * TUBECOLS)
int vliny[TUBELINES + 2];
int vcline, vcnt;
#define ESCAPE 033
char vch, *vtube[TUBELINES], *vtube0;
int VLINES, VCOLUMNS;
#define vlast vliny[vcnt]
char vmoving;
char vmovcol;
#endif
void vdelete(int);
extern void (*Outchar)();
void qcount(int);
void vputchar(int);
void vgoto(int, int);
void vsync(int);
void vclreol(void);
void operate(int, int);
void addtext(char *);
void killglob(void);
void setwork(char);
void setLAST(void);
#ifdef VISUAL
char vholdmove;
#define beep obeep
int vcntcol;
char holdat, splitw, hadup, *nextic;
#define VNONE 0
#define VCHNG 1
#define VMANY 2
char vundkind, *vutmp;
int vulines[TUBELINES], vylines[TUBELINES], *vresaddr;
int vrescnt, vresCNT, vdelcnt, vyancnt;
char *vrescurs;
char wdkind;
int vSCROLL;
extern void (*Pline)();
void termchar(int);
void numbline(int);
void normline(void);
#define BUFSIZE 128
char Xhadcnt;
int Xcnt;
char lasthad;
int lastcnt;
char lastcmd[5], *lastcp, workcmd[5];
char DEL[BUFSIZE], INS[BUFSIZE];
#define OVERBUF CR
char *vglobp;
char HADUP, HADZERO;
int CDCNT;
int ZERO;
char *ogcursor;
void beep(void);
void vgrabit(void);
void vyankit(void);
void vchange(void);
void vmove(void);
int *vback(int);
int vdepth(void);
int vopen(int *, int);
void vfixopen(int);
int vreopen(int, int);
int vfit(int, int *);
void vroll(int);
void vrollup(int *);
void vscrap(void);
void vopenup(int);
void vredraw(int);
void velide(int, int);
void vup1(void);
void vclear(void);
void vclrbyte(char *, int);
void vclrlin(int, int *);
int vmain(char *);
int vgetcnt(void);
char *vfindcol(int);
int vsave(void);
void getDOT(void);
void vok(char *);
int wordof(char, char *);
int wordch(char *);
void ungetkey(int);
int getkey(void);
int peekbr(void);
int getesc(void);
int peekkey(void);
void vfixcurs(void);
void vsetcurs(char *);
void vigoto(int, int);
void vcsync(void);
void vgotoCL(int);
#endif