-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathchanges.txt
247 lines (207 loc) · 6.34 KB
/
changes.txt
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
-----------------------------------------------------------------------
My changes vs. original:
_____________________________ ansi.c ___________________________________________
--so it would compile on Windows
Changed line 104
> ttopen();
To
>#if !WIN32
> ttopen();
>#endif
_____________________________ basic.c __________________________________________
--this was a bug fix I found in a later version
Changed line 126
> curwp->w_doto = getgoal(elp);
To
> curwp->w_doto = getgoal(dlp);
_____________________________ buffer.c _________________________________________
--clashes with system itoa(int value, char *str, int base)
Changed line 193
> itoa(b, 6, nbytes); /* 6 digit buffer size. */
To
> me_itoa(b, 6, nbytes); /* 6 digit buffer size. */
Changed line 218
>itoa(buf, width, num)
To
>me_itoa(buf, width, num)
_____________________________ ed.h _____________________________________________
--added includes, and LINUX and WIN32 defines
Inserted before line 1
>#include <stdio.h>
>#include <stdlib.h>
>#include <string.h>
>
Changed lines 7-8
>
>#define AMIGA 1 /* AmigaDOS, Lattice */
To
>#if defined(__CYGWIN__) || defined(__linux__)
> #define ANSI 1
> #define LINUX 1
> #define WIN32 0
>#elif defined(_WIN32) || defined(_WIN64)
> #define ANSI 0
> #define LINUX 0
> #define WIN32 1
>#else
> error "unknown system"
>#endif
>
>#define AMIGA 0 /* AmigaDOS, Lattice */
Deleted line 19
>#define ANSI 1
_____________________________ file.c ___________________________________________
--Add proper environment
Changed line 215
>#if MSDOS
To
>#if MSDOS || WIN32
Changed line 219
>#if V7
To
>#if V7 || LINUX
_____________________________ main.c ___________________________________________
--Since we're using actual screen size, need to call display init first
Changed lines 268-269
> edinit(bname); /* Buffers, windows. */
> vtinit(); /* Displays. */
To
> vtinit(); /* Displays. */
> edinit(bname); /* Buffers, windows. */
_____________________________ spawn.c __________________________________________
--Add code for newer systems
Changed line 52
>#if V7
To
>#if V7 || LINUX
Changed line 73
>#if V7
To
>#if V7 || LINUX
Inserted after line 85
>#if WIN32
> movecursor(term.t_nrow, 0); /* Seek to last line. */
> term.t_flush();
> term.t_close(); /* stty to old settings */
> system(getenv("COMSPEC"));
> sgarbf = TRUE;
> term.t_open();
> return(TRUE);
>#endif
Changed line 127
>#if MSDOS
To
>#if MSDOS || WIN32
Inserted after line 129
>#if WIN32
> movecursor(term.t_nrow, 0); /* Seek to last line. */
> term.t_flush();
> term.t_close(); /* stty to old settings */
>#endif
Inserted after line 132
>#if WIN32
> term.t_open();
>#endif
Changed line 136
>#if V7
To
>#if V7 || LINUX
_____________________________ tcap.c ___________________________________________
--To make the compiler happy
Changed line 125
>#endif TERMCAP
To
>#endif /* TERMCAP */
_____________________________ termio.c _________________________________________
--adding LINUX support
Inserted after line 8
>#if !WIN32
>
Inserted after line 55
>#if LINUX
>#undef CTRL
>#include <termios.h>
>#include <unistd.h>
>#include <signal.h>
>#include <stdio.h> /* puts(3), setbuffer(3), ... */
>#include <stdlib.h>
>#include <sys/ioctl.h> /* to get at the typeahead */
>
>#define TBUFSIZ 128
>char tobuf[TBUFSIZ]; /* terminal output buffer */
>struct termios ostate, nstate;
>#endif
>
Inserted after line 116
>#if LINUX
> struct winsize w;
>
> /* save terminal flags */
> if ((tcgetattr(0, &ostate) < 0) || (tcgetattr(0, &nstate) < 0)) {
> puts ("Can't read terminal capabilites\n");
> exit (1);
> }
> cfmakeraw(&nstate); /* set raw mode */
> nstate.c_cc[VMIN] = 1;
> nstate.c_cc[VTIME] = 0; /* block indefinitely for a single char */
> if (tcsetattr(0, TCSADRAIN, &nstate) < 0) {
> puts ("Can't set terminal mode\n");
> exit (1);
> }
> /* provide a smaller terminal output buffer so that the type ahead
> * detection works better (more often) */
> setbuffer (stdout, &tobuf[0], TBUFSIZ);
> signal (SIGTSTP, SIG_DFL);
>
> if (ioctl(0, TIOCGWINSZ, &w) >= 0) {
> term.t_ncol = w.ws_col;
> term.t_nrow = w.ws_row - 1;
> }
>#endif
Inserted after line 148
>#if LINUX
> ttflush ();
> if (tcsetattr(0, TCSADRAIN, &ostate) < 0) {
> puts ("Can't restore terminal flags");
> exit (1);
> }
>#endif
Changed line 183
>#if V7
To
>#if V7 || LINUX
Changed line 214
>#if V7
To
>#if LINUX
> tcdrain (0);
>#endif
>#if V7 || LINUX
Changed line 281
>#if V7
To
>#if V7 || LINUX
Inserted after line 284
>#endif /* !WIN32 */
_____________________________ vt52.c __________________________________________
--Only call this if an actual VT52
Changed line 96
> ttopen();
To
>#if VT52
> ttopen();
>#endif
_____________________________ word.c ___________________________________________
-- When compiling 64-bit, I got a compiler error here. I _think_ this is the
-- correct fix, but I'm not 100% sure.
Changed lines 21-22
> register int cnt, oldp;
> oldp = curwp->w_dotp;
To
> register int cnt;
> LINE *oldp = curwp->w_dotp;
Changed line 32
> if (oldp == (int) (curwp->w_dotp && curwp->w_doto)) {
To
> if (oldp == curwp->w_dotp && curwp->w_doto) {
________________________________________________________________________________