Commit | Line | Data |
---|---|---|
fd88f5c5 C |
1 | diff -c ../Makefile ./Makefile |
2 | *** ../Makefile Thu Jun 28 00:44:07 1990 | |
3 | --- ./Makefile Mon Jul 16 13:57:26 1990 | |
4 | *************** | |
5 | *** 39,49 **** | |
6 | # AUXDIR, manual pages will be installed in MANDIR with extension MANEXT. | |
7 | # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff | |
8 | # preformatted versions will be installed if INSTALLMAN=cat. | |
9 | ! DESTDIR = | |
10 | BINDIR = /usr/local | |
11 | LIBDIR = /usr/local/lib | |
12 | AUXDIR = /usr/local/lib | |
13 | MANDIR = /usr/man/manl | |
14 | MANEXT = l | |
15 | INSTALLMAN = man | |
16 | ||
17 | --- 39,50 ---- | |
18 | # AUXDIR, manual pages will be installed in MANDIR with extension MANEXT. | |
19 | # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff | |
20 | # preformatted versions will be installed if INSTALLMAN=cat. | |
21 | ! DESTDIR = /projects/m751stereo/code/c/swl26 | |
22 | BINDIR = /usr/local | |
23 | LIBDIR = /usr/local/lib | |
24 | AUXDIR = /usr/local/lib | |
25 | MANDIR = /usr/man/manl | |
26 | + INCLUDEDIR = . | |
27 | MANEXT = l | |
28 | INSTALLMAN = man | |
29 | ||
30 | *************** | |
31 | *** 52,58 **** | |
32 | ||
33 | SKELETON_FILE = $(DESTDIR)$(AUXDIR)/flex.skel | |
34 | SKELFLAGS = -DDEFAULT_SKELETON_FILE=\"$(SKELETON_FILE)\" | |
35 | ! CFLAGS = -O | |
36 | LDFLAGS = -s | |
37 | ||
38 | COMPRESSION = | |
39 | --- 53,59 ---- | |
40 | ||
41 | SKELETON_FILE = $(DESTDIR)$(AUXDIR)/flex.skel | |
42 | SKELFLAGS = -DDEFAULT_SKELETON_FILE=\"$(SKELETON_FILE)\" | |
43 | ! CFLAGS = -O -DUSG -I$(INCLUDEDIR) | |
44 | LDFLAGS = -s | |
45 | ||
46 | COMPRESSION = | |
47 | diff -c ../ccl.c ./ccl.c | |
48 | *** ../ccl.c Thu Jun 28 00:44:07 1990 | |
49 | --- ./ccl.c Mon Jul 16 13:57:27 1990 | |
50 | *************** | |
51 | *** 28,37 **** | |
52 | ||
53 | #ifndef lint | |
54 | static char rcsid[] = | |
55 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/ccl.c,v 2.5 90/06/27 23:48:13 vern Exp $ (LBL)"; | |
56 | #endif | |
57 | ||
58 | ! #include "flexdef.h" | |
59 | ||
60 | /* ccladd - add a single character to a ccl | |
61 | * | |
62 | --- 28,37 ---- | |
63 | ||
64 | #ifndef lint | |
65 | static char rcsid[] = | |
66 | ! "@(#) $Header: ccl.c,v 2.5 90/06/27 23:48:13 vern Exp $ (LBL)"; | |
67 | #endif | |
68 | ||
69 | ! #include <flexdef.h> | |
70 | ||
71 | /* ccladd - add a single character to a ccl | |
72 | * | |
73 | diff -c ../dfa.c ./dfa.c | |
74 | *** ../dfa.c Thu Jun 28 00:44:08 1990 | |
75 | --- ./dfa.c Mon Jul 16 13:57:28 1990 | |
76 | *************** | |
77 | *** 28,37 **** | |
78 | ||
79 | #ifndef lint | |
80 | static char rcsid[] = | |
81 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/dfa.c,v 2.7 90/06/27 23:48:15 vern Exp $ (LBL)"; | |
82 | #endif | |
83 | ||
84 | ! #include "flexdef.h" | |
85 | ||
86 | ||
87 | /* declare functions that have forward references */ | |
88 | --- 28,38 ---- | |
89 | ||
90 | #ifndef lint | |
91 | static char rcsid[] = | |
92 | ! "@(#) $Header: dfa.c,v 2.7 90/06/27 23:48:15 vern Exp $ (LBL)"; | |
93 | #endif | |
94 | ||
95 | ! #include <flexdef.h> | |
96 | ! #include <ctype.h> | |
97 | ||
98 | ||
99 | /* declare functions that have forward references */ | |
100 | *************** | |
101 | *** 682,688 **** | |
102 | register int j; | |
103 | ||
104 | for ( i = 'A', j = 'a'; i <= 'Z'; ++i, ++j ) | |
105 | ! state[i] = state[j]; | |
106 | } | |
107 | ||
108 | if ( ds > num_start_states ) | |
109 | --- 683,692 ---- | |
110 | register int j; | |
111 | ||
112 | for ( i = 'A', j = 'a'; i <= 'Z'; ++i, ++j ) | |
113 | ! { | |
114 | ! if (isupper(i) ) | |
115 | ! state[i] = state[j]; | |
116 | ! } | |
117 | } | |
118 | ||
119 | if ( ds > num_start_states ) | |
120 | *************** | |
121 | *** 958,964 **** | |
122 | } | |
123 | } | |
124 | ||
125 | ! else if ( sym >= 'A' && sym <= 'Z' && caseins ) | |
126 | flexfatal( "consistency check failed in symfollowset" ); | |
127 | ||
128 | else if ( sym == SYM_EPSILON ) | |
129 | --- 962,968 ---- | |
130 | } | |
131 | } | |
132 | ||
133 | ! else if ( isupper ( sym ) && caseins ) | |
134 | flexfatal( "consistency check failed in symfollowset" ); | |
135 | ||
136 | else if ( sym == SYM_EPSILON ) | |
137 | Only in .: diffs | |
138 | Only in .: diffs.new | |
139 | diff -c ../ecs.c ./ecs.c | |
140 | *** ../ecs.c Thu Jun 28 00:44:08 1990 | |
141 | --- ./ecs.c Mon Jul 16 13:57:28 1990 | |
142 | *************** | |
143 | *** 28,37 **** | |
144 | ||
145 | #ifndef lint | |
146 | static char rcsid[] = | |
147 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/ecs.c,v 2.5 90/06/27 23:48:17 vern Exp $ (LBL)"; | |
148 | #endif | |
149 | ||
150 | ! #include "flexdef.h" | |
151 | ||
152 | /* ccl2ecl - convert character classes to set of equivalence classes | |
153 | * | |
154 | --- 28,37 ---- | |
155 | ||
156 | #ifndef lint | |
157 | static char rcsid[] = | |
158 | ! "@(#) $Header: ecs.c,v 2.5 90/06/27 23:48:17 vern Exp $ (LBL)"; | |
159 | #endif | |
160 | ||
161 | ! #include <flexdef.h> | |
162 | ||
163 | /* ccl2ecl - convert character classes to set of equivalence classes | |
164 | * | |
165 | diff -c ../flex.skel ./flex.skel | |
166 | *** ../flex.skel Thu Jun 28 00:44:27 1990 | |
167 | --- ./flex.skel Mon Jul 16 13:57:29 1990 | |
168 | *************** | |
169 | *** 1,7 **** | |
170 | /* A lexical scanner generated by flex */ | |
171 | ||
172 | /* scanner skeleton version: | |
173 | ! * $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.13 90/05/26 17:24:13 vern Exp $ | |
174 | */ | |
175 | ||
176 | #define FLEX_SCANNER | |
177 | --- 1,7 ---- | |
178 | /* A lexical scanner generated by flex */ | |
179 | ||
180 | /* scanner skeleton version: | |
181 | ! * $Header: flex.skel,v 2.13 90/05/26 17:24:13 vern Exp $ | |
182 | */ | |
183 | ||
184 | #define FLEX_SCANNER | |
185 | diff -c ../flexdef.h ./flexdef.h | |
186 | *** ../flexdef.h Thu Jun 28 00:44:27 1990 | |
187 | --- ./flexdef.h Mon Jul 16 13:57:30 1990 | |
188 | *************** | |
189 | *** 26,32 **** | |
190 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
191 | */ | |
192 | ||
193 | ! /* @(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/flexdef.h,v 2.7 90/06/27 23:48:19 vern Exp $ (LBL) */ | |
194 | ||
195 | #ifndef FILE | |
196 | #include <stdio.h> | |
197 | --- 26,32 ---- | |
198 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
199 | */ | |
200 | ||
201 | ! /* @(#) $Header: flexdef.h,v 2.7 90/06/27 23:48:19 vern Exp $ (LBL) */ | |
202 | ||
203 | #ifndef FILE | |
204 | #include <stdio.h> | |
205 | *************** | |
206 | *** 45,51 **** | |
207 | ||
208 | /* size of input alphabet - should be size of ASCII set */ | |
209 | #ifndef DEFAULT_CSIZE | |
210 | ! #define DEFAULT_CSIZE 128 | |
211 | #endif | |
212 | ||
213 | #ifndef PROTO | |
214 | --- 45,51 ---- | |
215 | ||
216 | /* size of input alphabet - should be size of ASCII set */ | |
217 | #ifndef DEFAULT_CSIZE | |
218 | ! #define DEFAULT_CSIZE 256 | |
219 | #endif | |
220 | ||
221 | #ifndef PROTO | |
222 | *************** | |
223 | *** 90,96 **** | |
224 | --- 90,98 ---- | |
225 | #define SHORT_FILE_NAMES | |
226 | #endif | |
227 | ||
228 | + #ifndef OSVS | |
229 | char *malloc(), *realloc(); | |
230 | + #endif | |
231 | ||
232 | ||
233 | /* maximum line length we'll have to deal with */ | |
234 | *************** | |
235 | *** 116,125 **** | |
236 | #define true 1 | |
237 | #define false 0 | |
238 | ||
239 | - | |
240 | #ifndef DEFAULT_SKELETON_FILE | |
241 | #define DEFAULT_SKELETON_FILE "flex.skel" | |
242 | ! #endif | |
243 | ||
244 | /* special chk[] values marking the slots taking by end-of-buffer and action | |
245 | * numbers | |
246 | --- 118,132 ---- | |
247 | #define true 1 | |
248 | #define false 0 | |
249 | ||
250 | #ifndef DEFAULT_SKELETON_FILE | |
251 | + #ifdef OSVS | |
252 | + #define DEFAULT_SKELETON_FILE "ctri01" | |
253 | + #define SYSUT1 "sysut1" | |
254 | + #define SYSUT2 "sysut2" | |
255 | + #else | |
256 | #define DEFAULT_SKELETON_FILE "flex.skel" | |
257 | ! #endif /* OSVS */ | |
258 | ! #endif /* DEFAULT_SKELETON_FILE */ | |
259 | ||
260 | /* special chk[] values marking the slots taking by end-of-buffer and action | |
261 | * numbers | |
262 | *************** | |
263 | *** 226,233 **** | |
264 | #define INITIAL_MAX_SCS 40 /* maximum number of start conditions */ | |
265 | #define MAX_SCS_INCREMENT 40 /* amount to bump by if it's not enough */ | |
266 | ||
267 | ! #define ONE_STACK_SIZE 500 /* stack of states with only one out-transition */ | |
268 | ! #define SAME_TRANS -1 /* transition is the same as "default" entry for state */ | |
269 | ||
270 | /* the following percentages are used to tune table compression: | |
271 | ||
272 | --- 233,240 ---- | |
273 | #define INITIAL_MAX_SCS 40 /* maximum number of start conditions */ | |
274 | #define MAX_SCS_INCREMENT 40 /* amount to bump by if it's not enough */ | |
275 | ||
276 | ! #define ONE_STACK_SIZE 500 /*stack of states with only one out-transition*/ | |
277 | ! #define SAME_TRANS -1 /*transition is the same as "default" entry for state */ | |
278 | ||
279 | /* the following percentages are used to tune table compression: | |
280 | ||
281 | diff -c ../gen.c ./gen.c | |
282 | *** ../gen.c Thu Jun 28 00:44:28 1990 | |
283 | --- ./gen.c Mon Jul 16 13:57:32 1990 | |
284 | *************** | |
285 | *** 28,37 **** | |
286 | ||
287 | #ifndef lint | |
288 | static char rcsid[] = | |
289 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/gen.c,v 2.9 90/06/27 23:48:22 vern Exp $ (LBL)"; | |
290 | #endif | |
291 | ||
292 | ! #include "flexdef.h" | |
293 | ||
294 | ||
295 | /* declare functions that have forward references */ | |
296 | --- 28,37 ---- | |
297 | ||
298 | #ifndef lint | |
299 | static char rcsid[] = | |
300 | ! "@(#) $Header: gen.c,v 2.9 90/06/27 23:48:22 vern Exp $ (LBL)"; | |
301 | #endif | |
302 | ||
303 | ! #include <flexdef.h> | |
304 | ||
305 | ||
306 | /* declare functions that have forward references */ | |
307 | *************** | |
308 | *** 292,298 **** | |
309 | ||
310 | indent_puts( "{" ); | |
311 | ||
312 | ! indent_puts( "if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )" ); | |
313 | indent_up(); | |
314 | indent_puts( "{" ); | |
315 | indent_puts( "yy_act = yy_acclist[yy_lp];" ); | |
316 | --- 292,298 ---- | |
317 | ||
318 | indent_puts( "{" ); | |
319 | ||
320 | ! indent_puts("if( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )"); | |
321 | indent_up(); | |
322 | indent_puts( "{" ); | |
323 | indent_puts( "yy_act = yy_acclist[yy_lp];" ); | |
324 | diff -c ../initscan.c ./initscan.c | |
325 | *** ../initscan.c Thu Jun 28 00:44:51 1990 | |
326 | --- ./initscan.c Mon Jul 16 13:57:33 1990 | |
327 | *************** | |
328 | *** 1,7 **** | |
329 | /* A lexical scanner generated by flex */ | |
330 | ||
331 | /* scanner skeleton version: | |
332 | ! * $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.13 90/05/26 17:24:13 vern Exp $ | |
333 | */ | |
334 | ||
335 | #define FLEX_SCANNER | |
336 | --- 1,7 ---- | |
337 | /* A lexical scanner generated by flex */ | |
338 | ||
339 | /* scanner skeleton version: | |
340 | ! * $Header: flex.skel,v 2.13 90/05/26 17:24:13 vern Exp $ | |
341 | */ | |
342 | ||
343 | #define FLEX_SCANNER | |
344 | *************** | |
345 | *** 193,199 **** | |
346 | ||
347 | #ifndef lint | |
348 | static char rcsid[] = | |
349 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/scan.l,v 2.9 90/06/27 23:48:34 vern Exp $ (LBL)"; | |
350 | #endif | |
351 | ||
352 | #undef yywrap | |
353 | --- 193,199 ---- | |
354 | ||
355 | #ifndef lint | |
356 | static char rcsid[] = | |
357 | ! "@(#) $Header: scan.l,v 2.9 90/06/27 23:48:34 vern Exp $ (LBL)"; | |
358 | #endif | |
359 | ||
360 | #undef yywrap | |
361 | diff -c ../libmain.c ./libmain.c | |
362 | *** ../libmain.c Thu Jun 28 00:44:28 1990 | |
363 | --- ./libmain.c Mon Jul 16 13:57:34 1990 | |
364 | *************** | |
365 | *** 1,6 **** | |
366 | /* libmain - flex run-time support library "main" function */ | |
367 | ||
368 | ! /* $Header: /usr/fsys/odin/a/vern/flex/RCS/libmain.c,v 1.2 90/05/26 16:50:08 vern Exp $ */ | |
369 | ||
370 | extern int yylex(); | |
371 | ||
372 | --- 1,6 ---- | |
373 | /* libmain - flex run-time support library "main" function */ | |
374 | ||
375 | ! /* $Header: libmain.c,v 1.2 90/05/26 16:50:08 vern Exp $ */ | |
376 | ||
377 | extern int yylex(); | |
378 | ||
379 | diff -c ../main.c ./main.c | |
380 | *** ../main.c Thu Jun 28 00:44:29 1990 | |
381 | --- ./main.c Mon Jul 16 13:57:34 1990 | |
382 | *************** | |
383 | *** 34,44 **** | |
384 | ||
385 | #ifndef lint | |
386 | static char rcsid[] = | |
387 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/main.c,v 2.9 90/06/27 23:48:24 vern Exp $ (LBL)"; | |
388 | #endif | |
389 | ||
390 | ||
391 | ! #include "flexdef.h" | |
392 | ||
393 | static char flex_version[] = "2.3"; | |
394 | ||
395 | --- 34,44 ---- | |
396 | ||
397 | #ifndef lint | |
398 | static char rcsid[] = | |
399 | ! "@(#) $Header: main.c,v 2.9 90/06/27 23:48:24 vern Exp $ (LBL)"; | |
400 | #endif | |
401 | ||
402 | ||
403 | ! #include <flexdef.h> | |
404 | ||
405 | static char flex_version[] = "2.3"; | |
406 | ||
407 | *************** | |
408 | *** 97,106 **** | |
409 | char *program_name; | |
410 | ||
411 | #ifndef SHORT_FILE_NAMES | |
412 | static char *outfile = "lex.yy.c"; | |
413 | ! #else | |
414 | static char *outfile = "lexyy.c"; | |
415 | ! #endif | |
416 | static int outfile_created = 0; | |
417 | static int use_stdout; | |
418 | static char *skelname = NULL; | |
419 | --- 97,110 ---- | |
420 | char *program_name; | |
421 | ||
422 | #ifndef SHORT_FILE_NAMES | |
423 | + #ifdef OSVS | |
424 | + static char *outfile = "ctro01"; | |
425 | + #else /* not OSVS */ | |
426 | static char *outfile = "lex.yy.c"; | |
427 | ! #endif /* not OSVS */ | |
428 | ! #else /* SHORT_FILE_NAMES */ | |
429 | static char *outfile = "lexyy.c"; | |
430 | ! #endif /* SHORT_FILE_NAMES */ | |
431 | static int outfile_created = 0; | |
432 | static int use_stdout; | |
433 | static char *skelname = NULL; | |
434 | *************** | |
435 | *** 209,216 **** | |
436 | --- 213,222 ---- | |
437 | else if ( fclose( temp_action_file ) ) | |
438 | flexfatal( "error occurred when closing temporary action file" ); | |
439 | ||
440 | + #ifndef OSVS | |
441 | else if ( unlink( action_file_name ) ) | |
442 | flexfatal( "error occurred when deleting temporary action file" ); | |
443 | + #endif | |
444 | } | |
445 | ||
446 | if ( status != 0 && outfile_created ) | |
447 | *************** | |
448 | *** 221,228 **** | |
449 | --- 227,236 ---- | |
450 | else if ( fclose( stdout ) ) | |
451 | flexfatal( "error occurred when closing output file" ); | |
452 | ||
453 | + #ifndef OSVS | |
454 | else if ( unlink( outfile ) ) | |
455 | flexfatal( "error occurred when deleting output file" ); | |
456 | + #endif | |
457 | } | |
458 | ||
459 | if ( backtrack_report && backtrack_file ) | |
460 | *************** | |
461 | *** 574,583 **** | |
462 | if ( backtrack_report ) | |
463 | { | |
464 | #ifndef SHORT_FILE_NAMES | |
465 | backtrack_file = fopen( "lex.backtrack", "w" ); | |
466 | ! #else | |
467 | backtrack_file = fopen( "lex.bck", "w" ); | |
468 | ! #endif | |
469 | ||
470 | if ( backtrack_file == NULL ) | |
471 | flexerror( "could not create lex.backtrack" ); | |
472 | --- 582,595 ---- | |
473 | if ( backtrack_report ) | |
474 | { | |
475 | #ifndef SHORT_FILE_NAMES | |
476 | + #ifdef OSVS | |
477 | + backtrack_file = fopen( SYSUT2, "w"); | |
478 | + #else /* not OSVS */ | |
479 | backtrack_file = fopen( "lex.backtrack", "w" ); | |
480 | ! #endif /* OSVS */ | |
481 | ! #else /* SHORT_FILE_NAMES */ | |
482 | backtrack_file = fopen( "lex.bck", "w" ); | |
483 | ! #endif /* SHORT_FILE_NAMES */ | |
484 | ||
485 | if ( backtrack_file == NULL ) | |
486 | flexerror( "could not create lex.backtrack" ); | |
487 | *************** | |
488 | *** 597,604 **** | |
489 | lerrsf( "can't open skeleton file %s", skelname ); | |
490 | ||
491 | #ifdef SYS_V | |
492 | action_file_name = tmpnam( NULL ); | |
493 | ! #endif | |
494 | ||
495 | if ( action_file_name == NULL ) | |
496 | { | |
497 | --- 609,620 ---- | |
498 | lerrsf( "can't open skeleton file %s", skelname ); | |
499 | ||
500 | #ifdef SYS_V | |
501 | + #ifndef OSVS | |
502 | action_file_name = tmpnam( NULL ); | |
503 | ! #else /* OSVS */ | |
504 | ! action_file_name = SYSUT1; | |
505 | ! #endif /* OSVS */ | |
506 | ! #endif /* SYS_V */ | |
507 | ||
508 | if ( action_file_name == NULL ) | |
509 | { | |
510 | *************** | |
511 | *** 609,615 **** | |
512 | --- 625,636 ---- | |
513 | #else | |
514 | (void) strcpy( temp_action_file_name, "flexXXXXXX.tmp" ); | |
515 | #endif | |
516 | + #ifndef OSVS | |
517 | (void) mktemp( temp_action_file_name ); | |
518 | + #else /* OSVS */ | |
519 | + /* should never be executed in OSVS as IF should always be false */ | |
520 | + (void) strcpy( temp_action_file_name, SYSUT1 ) ; | |
521 | + #endif /* OSVS */ | |
522 | ||
523 | action_file_name = temp_action_file_name; | |
524 | } | |
525 | diff -c ../misc.c ./misc.c | |
526 | *** ../misc.c Thu Jun 28 00:44:40 1990 | |
527 | --- ./misc.c Mon Jul 16 13:57:35 1990 | |
528 | *************** | |
529 | *** 28,38 **** | |
530 | ||
531 | #ifndef lint | |
532 | static char rcsid[] = | |
533 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/misc.c,v 2.7 90/06/27 23:48:27 vern Exp $ (LBL)"; | |
534 | #endif | |
535 | ||
536 | #include <ctype.h> | |
537 | ! #include "flexdef.h" | |
538 | ||
539 | ||
540 | /* ANSI C does not guarantee that isascii() is defined */ | |
541 | --- 28,38 ---- | |
542 | ||
543 | #ifndef lint | |
544 | static char rcsid[] = | |
545 | ! "@(#) $Header: misc.c,v 2.7 90/06/27 23:48:27 vern Exp $ (LBL)"; | |
546 | #endif | |
547 | ||
548 | #include <ctype.h> | |
549 | ! #include <flexdef.h> | |
550 | ||
551 | ||
552 | /* ANSI C does not guarantee that isascii() is defined */ | |
553 | *************** | |
554 | *** 107,113 **** | |
555 | --- 107,117 ---- | |
556 | { | |
557 | while ( *str ) | |
558 | { | |
559 | + #ifdef OSVS | |
560 | + if ( ! islower( *str ) ) | |
561 | + #else | |
562 | if ( ! isascii( *str ) || ! islower( *str ) ) | |
563 | + #endif | |
564 | return ( 0 ); | |
565 | ++str; | |
566 | } | |
567 | *************** | |
568 | *** 130,136 **** | |
569 | --- 134,144 ---- | |
570 | { | |
571 | while ( *str ) | |
572 | { | |
573 | + #ifdef OSVS | |
574 | + if ( ! isupper( (char) *str ) ) | |
575 | + #else | |
576 | if ( ! isascii( *str ) || ! isupper( (char) *str ) ) | |
577 | + #endif | |
578 | return ( 0 ); | |
579 | ++str; | |
580 | } | |
581 | *************** | |
582 | *** 182,188 **** | |
583 | --- 190,200 ---- | |
584 | register int c; | |
585 | ||
586 | { | |
587 | + #ifdef OSVS | |
588 | + return ( isupper( c ) ? (Char) tolower( c ) : (Char) c ); | |
589 | + #else | |
590 | return ( (isascii( c ) && isupper( c )) ? tolower( c ) : c ); | |
591 | + #endif | |
592 | } | |
593 | ||
594 | ||
595 | *************** | |
596 | *** 204,210 **** | |
597 | for ( c = str; *c; ++c ) | |
598 | ; | |
599 | ||
600 | ! copy = malloc( (unsigned) ((c - str + 1) * sizeof( char )) ); | |
601 | ||
602 | if ( copy == NULL ) | |
603 | flexfatal( "dynamic memory failure in copy_string()" ); | |
604 | --- 216,222 ---- | |
605 | for ( c = str; *c; ++c ) | |
606 | ; | |
607 | ||
608 | ! copy = (char *) malloc( (unsigned) ((c - str + 1) * sizeof( char )) ); | |
609 | ||
610 | if ( copy == NULL ) | |
611 | flexfatal( "dynamic memory failure in copy_string()" ); | |
612 | *************** | |
613 | *** 392,403 **** | |
614 | --- 404,421 ---- | |
615 | ||
616 | #ifndef MS_DOS | |
617 | #ifndef VMS | |
618 | + #ifndef OSVS | |
619 | #include <sys/types.h> | |
620 | + #endif /* OSVS */ | |
621 | #else | |
622 | #include <types.h> | |
623 | #endif | |
624 | #endif | |
625 | ||
626 | + #ifdef OSVS | |
627 | + #include <time.h> | |
628 | + #endif /* OSVS */ | |
629 | + | |
630 | #ifdef MS_DOS | |
631 | #include <time.h> | |
632 | typedef long time_t; | |
633 | *************** | |
634 | *** 615,621 **** | |
635 | --- 633,643 ---- | |
636 | if ( array[1] == 'x' ) | |
637 | ++sptr; | |
638 | ||
639 | + #ifdef OSVS | |
640 | + while ( isdigit( array[sptr] ) ) | |
641 | + #else | |
642 | while ( isascii( array[sptr] ) && isdigit( array[sptr] ) ) | |
643 | + #endif | |
644 | /* don't increment inside loop control because if | |
645 | * isdigit() is a macro it will expand it to two | |
646 | * increments ... | |
647 | Only in ..: new | |
648 | diff -c ../nfa.c ./nfa.c | |
649 | *** ../nfa.c Thu Jun 28 00:44:40 1990 | |
650 | --- ./nfa.c Mon Jul 16 13:57:36 1990 | |
651 | *************** | |
652 | *** 28,37 **** | |
653 | ||
654 | #ifndef lint | |
655 | static char rcsid[] = | |
656 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/nfa.c,v 2.6 90/06/27 23:48:29 vern Exp $ (LBL)"; | |
657 | #endif | |
658 | ||
659 | ! #include "flexdef.h" | |
660 | ||
661 | ||
662 | /* declare functions that have forward references */ | |
663 | --- 28,37 ---- | |
664 | ||
665 | #ifndef lint | |
666 | static char rcsid[] = | |
667 | ! "@(#) $Header: nfa.c,v 2.6 90/06/27 23:48:29 vern Exp $ (LBL)"; | |
668 | #endif | |
669 | ||
670 | ! #include <flexdef.h> | |
671 | ||
672 | ||
673 | /* declare functions that have forward references */ | |
674 | *************** | |
675 | *** 110,116 **** | |
676 | { | |
677 | int sym, tsp1, tsp2, anum, ns; | |
678 | ||
679 | ! fprintf( stderr, "\n\n********** beginning dump of nfa with start state %d\n", | |
680 | state1 ); | |
681 | ||
682 | /* we probably should loop starting at firstst[state1] and going to | |
683 | --- 110,116 ---- | |
684 | { | |
685 | int sym, tsp1, tsp2, anum, ns; | |
686 | ||
687 | ! fprintf(stderr,"\n\n********* beginning dump of nfa with start state %d\n", | |
688 | state1 ); | |
689 | ||
690 | /* we probably should loop starting at firstst[state1] and going to | |
691 | diff -c ../parse.y ./parse.y | |
692 | *** ../parse.y Thu Jun 28 00:44:40 1990 | |
693 | --- ./parse.y Mon Jul 16 13:57:36 1990 | |
694 | *************** | |
695 | *** 32,45 **** | |
696 | ||
697 | #ifndef lint | |
698 | static char rcsid[] = | |
699 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/parse.y,v 2.7 90/06/27 23:48:31 vern Exp $ (LBL)"; | |
700 | #endif | |
701 | ||
702 | ! #include "flexdef.h" | |
703 | ||
704 | int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen; | |
705 | int trlcontxt, xcluflg, cclsorted, varlength, variable_trail_rule; | |
706 | Char clower(); | |
707 | ||
708 | static int madeany = false; /* whether we've made the '.' character class */ | |
709 | int previous_continued_action; /* whether the previous rule's action was '|' */ | |
710 | --- 32,47 ---- | |
711 | ||
712 | #ifndef lint | |
713 | static char rcsid[] = | |
714 | ! "@(#) $Header: parse.y,v 2.7 90/06/27 23:48:31 vern Exp $ (LBL)"; | |
715 | #endif | |
716 | ||
717 | ! #include <flexdef.h> | |
718 | ||
719 | int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen; | |
720 | int trlcontxt, xcluflg, cclsorted, varlength, variable_trail_rule; | |
721 | Char clower(); | |
722 | + void build_eof_action(); | |
723 | + void yyerror(); | |
724 | ||
725 | static int madeany = false; /* whether we've made the '.' character class */ | |
726 | int previous_continued_action; /* whether the previous rule's action was '|' */ | |
727 | diff -c ../scan.l ./scan.l | |
728 | *** ../scan.l Thu Jun 28 00:44:41 1990 | |
729 | --- ./scan.l Mon Jul 16 13:57:37 1990 | |
730 | *************** | |
731 | *** 30,42 **** | |
732 | ||
733 | #ifndef lint | |
734 | static char rcsid[] = | |
735 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/scan.l,v 2.9 90/06/27 23:48:34 vern Exp $ (LBL)"; | |
736 | #endif | |
737 | ||
738 | #undef yywrap | |
739 | ||
740 | ! #include "flexdef.h" | |
741 | ! #include "parse.h" | |
742 | ||
743 | #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext ) | |
744 | #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" ); | |
745 | --- 30,42 ---- | |
746 | ||
747 | #ifndef lint | |
748 | static char rcsid[] = | |
749 | ! "@(#) $Header: scan.l,v 2.9 90/06/27 23:48:34 vern Exp $ (LBL)"; | |
750 | #endif | |
751 | ||
752 | #undef yywrap | |
753 | ||
754 | ! #include <flexdef.h> | |
755 | ! #include <parse.h> | |
756 | ||
757 | #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext ) | |
758 | #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" ); | |
759 | diff -c ../sym.c ./sym.c | |
760 | *** ../sym.c Thu Jun 28 00:44:41 1990 | |
761 | --- ./sym.c Mon Jul 16 13:57:37 1990 | |
762 | *************** | |
763 | *** 28,37 **** | |
764 | ||
765 | #ifndef lint | |
766 | static char rcsid[] = | |
767 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/sym.c,v 2.4 90/06/27 23:48:36 vern Exp $ (LBL)"; | |
768 | #endif | |
769 | ||
770 | ! #include "flexdef.h" | |
771 | ||
772 | ||
773 | /* declare functions that have forward references */ | |
774 | --- 28,37 ---- | |
775 | ||
776 | #ifndef lint | |
777 | static char rcsid[] = | |
778 | ! "@(#) $Header: sym.c,v 2.4 90/06/27 23:48:36 vern Exp $ (LBL)"; | |
779 | #endif | |
780 | ||
781 | ! #include <flexdef.h> | |
782 | ||
783 | ||
784 | /* declare functions that have forward references */ | |
785 | diff -c ../tblcmp.c ./tblcmp.c | |
786 | *** ../tblcmp.c Thu Jun 28 00:44:41 1990 | |
787 | --- ./tblcmp.c Mon Jul 16 13:57:38 1990 | |
788 | *************** | |
789 | *** 28,37 **** | |
790 | ||
791 | #ifndef lint | |
792 | static char rcsid[] = | |
793 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/tblcmp.c,v 2.5 90/06/27 23:48:38 vern Exp $ (LBL)"; | |
794 | #endif | |
795 | ||
796 | ! #include "flexdef.h" | |
797 | ||
798 | ||
799 | /* declarations for functions that have forward references */ | |
800 | --- 28,37 ---- | |
801 | ||
802 | #ifndef lint | |
803 | static char rcsid[] = | |
804 | ! "@(#) $Header: tblcmp.c,v 2.5 90/06/27 23:48:38 vern Exp $ (LBL)"; | |
805 | #endif | |
806 | ||
807 | ! #include <flexdef.h> | |
808 | ||
809 | ||
810 | /* declarations for functions that have forward references */ | |
811 | diff -c ../yylex.c ./yylex.c | |
812 | *** ../yylex.c Thu Jun 28 00:44:41 1990 | |
813 | --- ./yylex.c Mon Jul 16 13:57:38 1990 | |
814 | *************** | |
815 | *** 28,39 **** | |
816 | ||
817 | #ifndef lint | |
818 | static char rcsid[] = | |
819 | ! "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/yylex.c,v 2.5 90/06/27 23:48:40 vern Exp $ (LBL)"; | |
820 | #endif | |
821 | ||
822 | #include <ctype.h> | |
823 | ! #include "flexdef.h" | |
824 | ! #include "parse.h" | |
825 | ||
826 | ||
827 | /* ANSI C does not guarantee that isascii() is defined */ | |
828 | --- 28,39 ---- | |
829 | ||
830 | #ifndef lint | |
831 | static char rcsid[] = | |
832 | ! "@(#) $Header: yylex.c,v 2.5 90/06/27 23:48:40 vern Exp $ (LBL)"; | |
833 | #endif | |
834 | ||
835 | #include <ctype.h> | |
836 | ! #include <flexdef.h> | |
837 | ! #include <parse.h> | |
838 | ||
839 | ||
840 | /* ANSI C does not guarantee that isascii() is defined */ | |
841 | *************** | |
842 | *** 180,186 **** | |
843 | --- 180,190 ---- | |
844 | break; | |
845 | ||
846 | default: | |
847 | + #ifdef OSVS | |
848 | + if ( ! isprint( yylval ) ) | |
849 | + #else | |
850 | if ( ! isascii( yylval ) || ! isprint( yylval ) ) | |
851 | + #endif | |
852 | fprintf( stderr, "\\%.3o", yylval ); | |
853 | else | |
854 | (void) putc( yylval, stderr ); |