xref: /illumos-gate/usr/src/contrib/ast/src/cmd/INIT/proto.c (revision b30d1939)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1990-2012 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                 Eclipse Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *          http://www.eclipse.org/org/documents/epl-v10.html           *
11 *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                 Glenn Fowler <gsf@research.att.com>                  *
18 *                                                                      *
19 ***********************************************************************/
20 
21 /* : : generated by proto : : */
22 
23 #if !defined(__PROTO__)
24 #  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
25 #    if defined(__cplusplus)
26 #      define __LINKAGE__	"C"
27 #    else
28 #      define __LINKAGE__
29 #    endif
30 #    define __STDARG__
31 #    define __PROTO__(x)	x
32 #    define __OTORP__(x)
33 #    define __PARAM__(n,o)	n
34 #    if !defined(__STDC__) && !defined(__cplusplus)
35 #      if !defined(c_plusplus)
36 #      	define const
37 #      endif
38 #      define signed
39 #      define void		int
40 #      define volatile
41 #      define __V_		char
42 #    else
43 #      define __V_		void
44 #    endif
45 #  else
46 #    define __PROTO__(x)	()
47 #    define __OTORP__(x)	x
48 #    define __PARAM__(n,o)	o
49 #    define __LINKAGE__
50 #    define __V_		char
51 #    define const
52 #    define signed
53 #    define void		int
54 #    define volatile
55 #  endif
56 #  define __MANGLE__	__LINKAGE__
57 #  if defined(__cplusplus) || defined(c_plusplus)
58 #    define __VARARG__	...
59 #  else
60 #    define __VARARG__
61 #  endif
62 #  if defined(__STDARG__)
63 #    define __VA_START__(p,a)	va_start(p,a)
64 #  else
65 #    define __VA_START__(p,a)	va_start(p)
66 #  endif
67 #  if !defined(__INLINE__)
68 #    if defined(__cplusplus)
69 #      define __INLINE__	extern __MANGLE__ inline
70 #    else
71 #      if defined(_WIN32) && !defined(__GNUC__)
72 #      	define __INLINE__	__inline
73 #      endif
74 #    endif
75 #  endif
76 #endif
77 #if !defined(__LINKAGE__)
78 #define __LINKAGE__		/* 2004-08-11 transition */
79 #endif
80 #line 1 "proto.c"
81 
82 
83 #line 151
84 # ifndef __STDC__
85 # ifndef creat
86 # define creat		_huh_creat
87 # endif
88 # if 1
89 # ifndef access
90 # define access		_huh_access
91 # endif
92 # ifndef ctime
93 # define ctime		_huh_ctime
94 # endif
95 # ifndef mkdir
96 # define mkdir		_huh_mkdir
97 # endif
98 # endif
99 # endif
100 
101 # include <sys/types.h>
102 # include <sys/stat.h>
103 # include <fcntl.h>
104 # if 1
105 # include <stdio.h>
106 # else
107 # include <time.h>
108 # endif
109 
110 # ifndef __STDC__
111 # undef	access
112 # undef	ctime
113 # undef	creat
114 # undef	mkdir
115 # endif
116 
117 # ifndef O_RDONLY
118 # define O_RDONLY	0
119 # endif
120 
121 # ifndef S_IRUSR
122 # define S_IRUSR		0400
123 # endif
124 # ifndef S_IWUSR
125 # define S_IWUSR		0200
126 # endif
127 # ifndef S_IXUSR
128 # define S_IXUSR		0100
129 # endif
130 # ifndef S_IRGRP
131 # define S_IRGRP		0040
132 # endif
133 # ifndef S_IWGRP
134 # define S_IWGRP		0020
135 # endif
136 # ifndef S_IXGRP
137 # define S_IXGRP		0010
138 # endif
139 # ifndef S_IROTH
140 # define S_IROTH		0004
141 # endif
142 # ifndef S_IWOTH
143 # define S_IWOTH		0002
144 # endif
145 # ifndef S_IXOTH
146 # define S_IXOTH		0001
147 # endif
148 
149 # ifndef __STDC__
150 # if !_WIN32 && !_WINIX
151 # define remove(x)	unlink(x)
152 # define rename(x,y)	((link(x,y)||remove(x))?-1:0)
153 # endif
154 
155 # if 1
156 extern __MANGLE__ int	access __PROTO__((const char*, int));
157 extern __MANGLE__ int	mkdir __PROTO__((const char*, int));
158 # endif
159 
160 # endif
161 
162 # if 1
163 extern __MANGLE__ int	utime __PROTO__((const char*, time_t*));
164 # endif
165 
166 
167 
168 
169 
170 
171 int
__OTORP__(const char * newfile;const char * oldfile;int preserve;)172 replace __PARAM__((const char* newfile, const char* oldfile, int preserve), (newfile, oldfile, preserve)) __OTORP__(const char* newfile; const char* oldfile; int preserve;){
173 	struct stat	st;
174 	time_t		ut[2];
175 
176 	if (stat(oldfile, &st))
177 	{
178 		if (preserve)
179 			return -1;
180 		st.st_mode = 0;
181 	}
182 	if (remove(oldfile) || rename(newfile, oldfile))
183 		return -1;
184 	if (st.st_mode &= (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH))
185 		chmod(oldfile, st.st_mode);
186 	if (preserve)
187 	{
188 		ut[0] = st.st_atime;
189 		ut[1] = st.st_mtime;
190 		preserve = utime(oldfile, ut);
191 	}
192 	return preserve;
193 }
194 
195 # undef	utime
196 # define utime		______utime
197 
198 #line 1 "../../lib/libpp/ppproto.c"
199 
200 #line 13
201 static const char id[] = "\n@(#)$Id: proto (AT&T Research) 2012-04-14 $\000\n";
202 
203 #line 1 "../../lib/libpp/ppfsm.c"
204 
205 #line 1 "../../lib/libpp/pplib.h"
206 
207 #line 108
208 struct ppsymbol;
209 struct ppindex;
210 
211 typedef char*	(*PPBUILTIN) __PROTO__((char*, const char*, const char*));
212 typedef void	(*PPCOMMENT) __PROTO__((const char*, const char*, const char*, int));
213 typedef void	(*PPINCREF) __PROTO__((const char*, const char*, int, int));
214 typedef void	(*PPLINESYNC) __PROTO__((int, const char*));
215 typedef void	(*PPMACREF) __PROTO__((struct ppsymbol*, const char*, int, int, unsigned long));
216 typedef int	(*PPOPTARG) __PROTO__((int, int, const char*));
217 typedef void	(*PPPRAGMA) __PROTO__((const char*, const char*, const char*, const char*, int));
218 
219 struct ppinstk
220 {
221 	char*		nextchr;
222 	struct ppinstk*	next;
223 	struct ppinstk*	prev;
224 	long*		control;
225 	char*		buffer;
226 	char*		file;
227 	char*		prefix;
228 	struct ppsymbol* symbol;
229 
230 	struct ppindex*	index;
231 	int		buflen;
232 
233 	int		line;
234 	int		vendor;
235 	short		fd;
236 	short		hide;
237 	short		flags;
238 	char		type;
239 };
240 
241 
242 
243 
244 
245 
246 
247 
248 
249 struct pplist
250 {
251 	char*		value;
252 	struct pplist*	next;
253 };
254 
255 struct oplist
256 {
257 	int		op;
258 	char*		value;
259 	struct oplist*	next;
260 };
261 
262 struct pphide
263 {
264 	struct ppmacro*	macro;
265 	unsigned long	flags;
266 	int		level;
267 };
268 
269 struct ppmacstk
270 {
271 	struct ppmacstk* next;
272 	struct ppmacstk* prev;
273 	int		line;
274 	char*		arg[1];
275 };
276 
277 struct ppmember
278 {
279 	struct ppdirs*	archive;
280 	unsigned long	offset;
281 	unsigned long	size;
282 };
283 
284 struct counter
285 {
286 	int		candidate;
287 	int		function;
288 	int		macro;
289 	int		pplex;
290 	int		push;
291 	int		terminal;
292 	int		token;
293 };
294 
295 struct pptuple
296 {
297 	struct pptuple*	nomatch;
298 	struct pptuple*	match;
299 	char		token[1];
300 };
301 
302 struct ppfileid
303 {
304 	unsigned long	st_dev;
305 	unsigned long	st_ino;
306 };
307 
308 struct pathid
309 {
310 	char*		path;
311 	struct ppfileid	id;
312 };
313 
314 #line 1 "../../lib/libpp/pp.h"
315 
316 #line 206
317 
318 #line 217
319 
320 #line 329
321 struct ppdirs
322 {
323 	char*		name;
324 	struct ppdirs*	next;
325 
326 
327 	unsigned char c; unsigned char index; unsigned char type; union { char* buffer; char* sp; struct ppdirs* subdir; } info; struct ppfileid id;
328 
329 
330 };
331 
332 struct ppkeyword
333 {
334 	char*		name;
335 	int		value;
336 };
337 
338 struct ppmacro
339 {
340 	int		arity;
341 	char*		value;
342 
343 
344 	struct pptuple* tuple; char* formals; int size;
345 
346 
347 };
348 
349 struct ppsymbol
350 {
351 	int hash_header;
352 	unsigned long	flags;
353 	struct ppmacro*	macro;
354 	__V_*		value;
355 
356 
357 	struct pphide* hidden;
358 
359 
360 };
361 
362 #line 378
363 struct ppglobals
364 {
365 	const char*	version;
366 	char*		lineid;
367 	char*		outfile;
368 	char*		pass;
369 	char*		token;
370 	struct ppsymbol* symbol;
371 
372 
373 
374 	char*		outb;
375 	char*		outbuf;
376 	char*		outp;
377 	char*		oute;
378 	unsigned long	offset;
379 
380 
381 	struct ppdirs* lcldirs; struct ppdirs* stddirs; int flags; char* symtab;
382 
383 
384 
385 	struct ppcontext* context; long state; long mode; long option; long test; struct { char* sp; long flags; } filedeps; struct ppdirs* firstdir; struct ppdirs* lastdir; int hide; int column; int pending; char* firstfile; char* lastfile; char* ignore; char* probe; char* filtab; char* prdtab; char* date; char* time; char* maps; long ro_state; long ro_mode; long ro_option; long ro_op[2]; struct pathid cdir; struct pathid hostdir; char* ppdefault; struct ppindex* firstindex; struct ppindex* lastindex; struct oplist* firstop; struct oplist* lastop; struct oplist* firsttx; struct oplist* lasttx; unsigned char arg_file; unsigned char arg_mode; unsigned char arg_style; unsigned char c; unsigned char hosted; unsigned char ignoresrc; unsigned char initialized; unsigned char standalone; unsigned char spare_1;
386 
387 
388 
389 	char* checkpoint; int constack; struct ppinstk* in; char* addp; char* args; char* addbuf; char* catbuf; char* hdrbuf; char* hidebuf; char* path; char* tmpbuf; char* valbuf; char* optflags; int lastout; char* include; char* prefix; struct ppmember* member; int hidden; int hiding; int level; struct { int input; int output; } pool; struct { long ro_state; long ro_mode; long ro_option; long ro_op[2]; int on; char* symtab; } reset; int truncate; struct ppmacstk* macp; char* maxmac; char* mactop; char* toknxt; long* control; long* maxcon; struct oplist* chop; struct ppfile* insert; struct ppfile* original; struct ppdirs* found; int vendor; char* dirtab; char* strtab; PPBUILTIN builtin; PPCOMMENT comment; PPINCREF incref; PPLINESYNC linesync; PPLINESYNC olinesync; PPMACREF macref; PPOPTARG optarg; PPPRAGMA pragma; struct counter counter; char funbuf[256];
390 
391 
392 };
393 
394 
395 
396 
397 
398 
399 
400 extern __MANGLE__ struct ppglobals	pp;
401 extern __MANGLE__ char		_pp_ctype[];
402 
403 extern __MANGLE__ int		ppargs __PROTO__((char**, int));
404 extern __MANGLE__ void		ppcpp __PROTO__((void));
405 extern __MANGLE__ void		ppcomment __PROTO__((char*, char*, char*, int));
406 extern __MANGLE__ __V_*		ppcontext __PROTO__((__V_*, int));
407 extern __MANGLE__ void		pperror __PROTO__((int, ...));
408 extern __MANGLE__ void		ppincref __PROTO__((char*, char*, int, int));
409 extern __MANGLE__ void		ppinput __PROTO__((char*, char*, int));
410 extern __MANGLE__ int		pplex __PROTO__((void));
411 extern __MANGLE__ void		ppline __PROTO__((int, char*));
412 extern __MANGLE__ void		ppmacref __PROTO__((struct ppsymbol*, char*, int, int, unsigned long));
413 extern __MANGLE__ void		ppop __PROTO__((int, ...));
414 extern __MANGLE__ void		pppragma __PROTO__((char*, char*, char*, char*, int));
415 extern __MANGLE__ int		ppprintf __PROTO__((char*, ...));
416 extern __MANGLE__ int		ppsync __PROTO__((void));
417 
418 #line 368 "../../lib/libpp/pplib.h"
419 
420 #line 1 "../../lib/libpp/ppdef.h"
421 
422 #line 369 "../../lib/libpp/pplib.h"
423 
424 #line 1 "../../lib/libpp/ppkey.h"
425 
426 #line 16
427 
428 #line 125
429 extern __MANGLE__ struct ppkeyword	ppkey[];
430 
431 #line 370 "../../lib/libpp/pplib.h"
432 
433 #line 683
434 struct ppcontext
435 {
436 	struct ppdirs* lcldirs; struct ppdirs* stddirs; int flags; char* symtab;
437 	struct ppcontext* context; long state; long mode; long option; long test; struct { char* sp; long flags; } filedeps; struct ppdirs* firstdir; struct ppdirs* lastdir; int hide; int column; int pending; char* firstfile; char* lastfile; char* ignore; char* probe; char* filtab; char* prdtab; char* date; char* time; char* maps; long ro_state; long ro_mode; long ro_option; long ro_op[2]; struct pathid cdir; struct pathid hostdir; char* ppdefault; struct ppindex* firstindex; struct ppindex* lastindex; struct oplist* firstop; struct oplist* lastop; struct oplist* firsttx; struct oplist* lasttx; unsigned char arg_file; unsigned char arg_mode; unsigned char arg_style; unsigned char c; unsigned char hosted; unsigned char ignoresrc; unsigned char initialized; unsigned char standalone; unsigned char spare_1;
438 };
439 
440 struct ppfile
441 {
442 	int hash_header;
443 	struct ppsymbol* guard;
444 	struct ppfile*	bound[4];
445 	int		flags;
446 };
447 
448 
449 
450 struct ppindex
451 {
452 	struct ppindex*	next;
453 	struct ppfile*	file;
454 	unsigned long	begin;
455 	unsigned long	end;
456 };
457 
458 
459 
460 struct ppsymkey
461 {
462 	struct ppsymbol	sym;
463 	int		lex;
464 };
465 
466 #line 729
467 # ifdef __STDC__
468 
469 # include <stdlib.h>
470 # include <unistd.h>
471 # include <time.h>
472 # include <string.h>
473 
474 # else
475 
476 # define size_t		int
477 
478 extern __MANGLE__ __V_*		realloc __PROTO__((__V_*, size_t));
479 extern __MANGLE__ __V_*		calloc __PROTO__((size_t, size_t));
480 extern __MANGLE__ char*		ctime __PROTO__((time_t*));
481 extern __MANGLE__ void		free __PROTO__((__V_*));
482 
483 # ifndef O_RDONLY
484 
485 extern __MANGLE__ int		access __PROTO__((const char*, int));
486 extern __MANGLE__ int		close __PROTO__((int));
487 extern __MANGLE__ int		creat __PROTO__((const char*, int));
488 extern __MANGLE__ void		exit __PROTO__((int));
489 extern __MANGLE__ int		link __PROTO__((const char*, const char*));
490 extern __MANGLE__ int		open __PROTO__((const char*, int, ...));
491 extern __MANGLE__ int		read __PROTO__((int, __V_*, int));
492 extern __MANGLE__ time_t		time __PROTO__((time_t*));
493 extern __MANGLE__ int		unlink __PROTO__((const char*));
494 extern __MANGLE__ int		write __PROTO__((int, const __V_*, int));
495 
496 # endif
497 
498 # endif
499 
500 #line 802
501 extern __MANGLE__ void		ppassert __PROTO__((int, char*, char*));
502 extern __MANGLE__ void		ppbuiltin __PROTO__((void));
503 extern __MANGLE__ int		ppcall __PROTO__((struct ppsymbol*, int));
504 extern __MANGLE__ int		ppcontrol __PROTO__((void));
505 extern __MANGLE__ void		ppdump __PROTO__((void));
506 extern __MANGLE__ char*		ppexpand __PROTO__((char*));
507 extern __MANGLE__ long		ppexpr __PROTO__((int*));
508 extern __MANGLE__ void		ppfsm __PROTO__((int, char*));
509 extern __MANGLE__ char*		ppinstr __PROTO__((struct ppinstk*));
510 extern __MANGLE__ char*		ppkeyname __PROTO__((int, int));
511 extern __MANGLE__ char*		pplexstr __PROTO__((int));
512 extern __MANGLE__ void		ppload __PROTO__((char*));
513 extern __MANGLE__ void		ppmapinclude __PROTO__((char*, char*));
514 extern __MANGLE__ char*		ppmodestr __PROTO__((long));
515 extern __MANGLE__ int		ppmultiple __PROTO__((struct ppfile*, struct ppsymbol*));
516 extern __MANGLE__ void		ppnest __PROTO__((void));
517 extern __MANGLE__ int		ppoption __PROTO__((char*));
518 extern __MANGLE__ char*		ppoptionstr __PROTO__((long));
519 extern __MANGLE__ void		pppclose __PROTO__((char*));
520 extern __MANGLE__ int		pppdrop __PROTO__((char*));
521 extern __MANGLE__ char*		pppopen __PROTO__((char*, int, char*, char*, char*, char*, int));
522 extern __MANGLE__ int		pppread __PROTO__((char*));
523 extern __MANGLE__ int		pppredargs __PROTO__((void));
524 extern __MANGLE__ void		pppush __PROTO__((int, char*, char*, int));
525 extern __MANGLE__ struct ppsymbol*	pprefmac __PROTO__((char*, int));
526 extern __MANGLE__ int		ppsearch __PROTO__((char*, int, int));
527 extern __MANGLE__ int		ppset __PROTO__((long*, long, int));
528 extern __MANGLE__ char*		ppstatestr __PROTO__((long));
529 extern __MANGLE__ char*		pptokstr __PROTO__((char*, int));
530 extern __MANGLE__ void		pptrace __PROTO__((int));
531 
532 #line 11 "../../lib/libpp/ppfsm.c"
533 
534 #line 1 "../../lib/libpp/ppfsm.h"
535 
536 #line 185
537 
538 #line 249
539 extern __MANGLE__ short		_pp_fsmtab[(0+28)+1][255+1];
540 
541 
542 
543 
544 
545 extern __MANGLE__ char		_pp_trigraph[255+1];
546 
547 extern __MANGLE__ void		_pp_refill __PROTO__((int));
548 
549 #line 12 "../../lib/libpp/ppfsm.c"
550 
551 
552 #line 67
553 struct fsminit
554 {
555 	int		state;
556 	unsigned char	ch[4];
557 	int		nextstate;
558 };
559 
560 static struct fsminit	fsminit[] =
561 {
562 
563 	{	0,	{ 023 },		((0+28)+11),			},
564 	{	0,	{ 002 },		(0),			},
565 	{	0,	{ 001 },		(0+23),			},
566 	{	0,	{ '.' },		(0+25),			},
567 	{	0,	{ 021 },		(0+19),			},
568 	{	0,	{ 'L' },		(0+20),			},
569 	{	0,	{ 'd', 'e', 'f', 'i' },	(0+1),			},
570 	{	0,	{ 'r', 's', 't', 'v' },	(0+1),			},
571 	{	0,	{ 'w', 'N' },		(0+1),			},
572 	{	0,	{ '"', '\'' },		((0+28)+3),		},
573 	{	0,	{ '/' },		(0+12),			},
574 	{	0,	{ '\n' },		((0+28)+7),			},
575 	{	0,	{ ' ','\t','\f','\013' },	(0+27),			},
576 
577 
578 	{	(0+1),	{ 023 },		((0+28)+6),		},
579 	{	(0+1),	{ 021, 001 },	(0+19),			},
580 	{	(0+1),	{ 'a' },		(0+2),			},
581 	{	(0+1),	{ 'e' },		(0+3),			},
582 	{	(0+1),	{ 'f' },		(0+4),			},
583 	{	(0+1),	{ 'h' },		(0+5),			},
584 	{	(0+1),	{ 'l' },		(0+6),			},
585 	{	(0+1),	{ 'n' },		(0+7),			},
586 	{	(0+1),	{ 'o' },		(0+8),			},
587 	{	(0+1),	{ 't' },		(0+9),			},
588 	{	(0+1),	{ 'x' },		(0+10),			},
589 	{	(0+1),	{ 'y' },		(0+11),			},
590 
591 
592 	{	(0+2),	{ 023 },		(((0+28)+12)),		},
593 	{	(0+2),	{ 021, 001 },	(0+19),			},
594 	{	(0+2),	{ '_','s','t','a' },	(0+2),			},
595 	{	(0+2),	{ 'r' },		(0+2),			},
596 
597 
598 	{	(0+3),	{ 023 },		(((0+28)+12)),		},
599 	{	(0+3),	{ 021, 001 },	(0+19),			},
600 	{	(0+3),	{ 't','u','r','n' },	(0+3),			},
601 
602 
603 	{	(0+4),	{ 023 },		(((0+28)+12)),		},
604 	{	(0+4),	{ 021, 001 },	(0+19),			},
605 
606 
607 	{	(0+5),	{ 023 },		(((0+28)+12)),		},
608 	{	(0+5),	{ 021, 001 },	(0+19),			},
609 	{	(0+5),	{ 'i','l','e' },	(0+5),			},
610 
611 
612 	{	(0+6),	{ 023 },		(((0+28)+12)),		},
613 	{	(0+6),	{ 021, 001 },	(0+19),			},
614 	{	(0+6),	{ 's','e' },		(0+6),			},
615 
616 
617 	{	(0+7),	{ 023 },		(((0+28)+12)),		},
618 	{	(0+7),	{ 021, 001 },	(0+19),			},
619 	{	(0+7),	{ 'l','i','n','e' },	(0+7),			},
620 
621 
622 	{	(0+8),	{ 023 },		(((0+28)+12)),		},
623 	{	(0+8),	{ 021, 001 },	(0+19),			},
624 	{	(0+8),	{ 'r','i','d','N' },	(0+8),			},
625 
626 
627 	{	(0+9),	{ 023 },		(((0+28)+12)),		},
628 	{	(0+9),	{ 021, 001 },	(0+19),			},
629 	{	(0+9),	{ 'a','t','i','c' },	(0+9),			},
630 
631 
632 	{	(0+10),	{ 023 },		(((0+28)+12)),		},
633 	{	(0+10),	{ 021, 001 },	(0+19),			},
634 	{	(0+10),	{ 't','e','r','n' },	(0+10),			},
635 
636 
637 	{	(0+11),	{ 023 },		(((0+28)+12)),		},
638 	{	(0+11),	{ 021, 001 },	(0+19),			},
639 	{	(0+11),	{ 'p','e','d','f' },	(0+11),			},
640 
641 
642 	{	(0+12),	{ 023 },		((0+28)+0),			},
643 	{	(0+12),	{ '*' },		(0+13),			},
644 
645 	{	(0+12),	{ '/' },		(0+16),			},
646 
647 
648 
649 	{	(0+13),	{ 023 },		(0+13),			},
650 	{	(0+13),	{ '\n', 002 },	((0+28)+1),		},
651 	{	(0+13),	{ '/' },		(0+15),			},
652 	{	(0+13),	{ '*' },		(0+14),			},
653 	{	(0+13),	{ '#', ';', ')' },	((( (0+13))<<(7+1))|(((0+28)+8))),		},
654 
655 
656 	{	(0+14),	{ 023 },		(0+13),			},
657 	{	(0+14),	{ '\n', 002 },	((0+28)+1),		},
658 	{	(0+14),	{ '#', ';', ')' },	((( (0+13))<<(7+1))|(((0+28)+8))),		},
659 	{	(0+14),	{ '*' },		(0+14),			},
660 	{	(0+14),	{ '/' },		((0+28)+1),		},
661 
662 
663 	{	(0+15),	{ 023 },		(0+13),			},
664 	{	(0+15),	{ '*', '\n', 002 },	((0+28)+1),		},
665 	{	(0+15),	{ '/' },		(0+15),			},
666 
667 
668 	{	(0+16),	{ 023 },		(0+16),			},
669 	{	(0+16),	{ '\n', 002 },	((0+28)+1),		},
670 	{	(0+16),	{ '/' },		(0+17),			},
671 	{	(0+16),	{ '*' },		(0+18),			},
672 
673 
674 	{	(0+17),	{ 023 },		(0+16),			},
675 	{	(0+17),	{ '*', '\n', 002 },	((0+28)+1),		},
676 	{	(0+17),	{ '/' },		(0+17),			},
677 
678 
679 	{	(0+18),	{ 023 },		(0+16),			},
680 	{	(0+18),	{ '\n', 002 },	((0+28)+1),		},
681 	{	(0+18),	{ '*' },		(0+18),			},
682 	{	(0+18),	{ '/' },		((0+28)+1),		},
683 
684 
685 	{	(0+19),	{ 023 },		((0+28)+6),		},
686 	{	(0+19),	{ 021, 001 },	(0+19),			},
687 
688 
689 	{	(0+25),	{ 023 },		((0+28)+0),			},
690 	{	(0+25),	{ '.' },		(0+26),			},
691 	{	(0+25),	{ 001 },		(0+23),			},
692 
693 
694 	{	(0+26),	{ 023 },		(((( (0401+1))-0401)<<(7+1))|( ((0+28)+14))),	},
695 	{	(0+26),	{ '.' },		(((( (0401+29))-0401)<<(7+1))|( ((0+28)+13))),	},
696 
697 
698 	{	(0+20),	{ 023 },		((0+28)+6),		},
699 	{	(0+20),	{ 021, 001 },	(0+19),			},
700 	{	(0+20),	{ '"', '\'' },		((( (0+21))<<(7+1))|(((0+28)+8))),		},
701 
702 
703 	{	(0+21),	{ 023 },		(0+21),			},
704 	{	(0+21),	{ '"', '\'' },		((0+28)+4),		},
705 	{	(0+21),	{ '\n', 002 },	((0+28)+4),		},
706 	{	(0+21),	{ '\\' },		(0+22),			},
707 
708 
709 	{	(0+22),	{ 023 },		((0+28)+5),		},
710 	{	(0+22),	{ '\n', 002 },	((0+28)+4),		},
711 
712 
713 	{	(0+23),	{ 023 },		(((( (0401+1))-0401)<<(7+1))|( ((0+28)+14))),	},
714 	{	(0+23),	{ 021, 001, '.' },	(0+23),			},
715 	{	(0+23),	{ 'e', 'E' },		(0+24),			},
716 
717 
718 	{	(0+24),	{ 023 },		(((( (0401+1))-0401)<<(7+1))|( ((0+28)+14))),	},
719 	{	(0+24),	{ 021, 001, '.' },	(0+23),			},
720 	{	(0+24),	{ '+', '-' },		(0+23),			},
721 
722 
723 	{	(0+27),	{ 023 },		((0+28)+15),			},
724 	{	(0+27),	{ ' ', '\t' },		(0+27),			},
725 	{	(0+27),	{ '\f', '\013' },		((0+28)+10),			},
726 
727 
728 
729 
730 
731 
732 
733 
734 
735 
736 
737 
738 
739 
740 
741 
742 
743 
744 
745 
746 
747 
748 
749 
750 
751 
752 
753 
754 
755 
756 
757 
758 
759 
760 
761 
762 
763 
764 
765 
766 
767 
768 
769 
770 
771 
772 
773 
774 
775 
776 
777 
778 
779 
780 
781 
782 
783 
784 
785 
786 
787 
788 
789 
790 
791 
792 
793 
794 
795 
796 
797 
798 
799 
800 
801 
802 
803 
804 
805 
806 
807 
808 
809 
810 
811 
812 
813 
814 
815 
816 
817 
818 
819 
820 
821 
822 
823 
824 
825 
826 
827 
828 
829 
830 
831 
832 
833 
834 
835 
836 
837 
838 
839 
840 
841 
842 
843 
844 
845 
846 
847 
848 
849 
850 
851 
852 
853 
854 
855 
856 
857 
858 
859 
860 
861 
862 
863 
864 
865 
866 
867 
868 
869 
870 
871 
872 
873 
874 
875 
876 
877 
878 
879 
880 
881 
882 
883 
884 
885 
886 
887 
888 
889 
890 
891 
892 
893 
894 
895 
896 
897 
898 
899 
900 
901 
902 
903 
904 
905 
906 
907 
908 
909 
910 
911 
912 
913 
914 
915 
916 #line 528
917 	{	(-1),	{ 0 },			0,			}
918 };
919 
920 short		_pp_fsmtab[(0+28)+1][255+1];
921 
922 char		_pp_trigraph[255+1];
923 
924 
925 static char	spl[] = { '\\', '\r', 0 };
926 static char	aln[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$@";
927 
928 
929 
930 
931 static char*	let = &aln[10];
932 static char	hex[] = "fedcbaFEDCBA9876543210";
933 static char*	dec = &hex[12];
934 static char*	oct = &hex[14];
935 
936 
937 
938 
939 
940 
941 void
__OTORP__(int op;register char * s;)942 ppfsm __PARAM__((int op, register char* s), (op, s)) __OTORP__(int op; register char* s;){
943 	register int			c;
944 	register int			n;
945 	register int			i;
946 	register short*			rp;
947 	register struct fsminit*	fp;
948 
949 
950 
951 
952 
953 	switch (op)
954 	{
955 
956 
957 
958 
959 
960 
961 
962 
963 
964 
965 
966 
967 
968 
969 
970 
971 
972 
973 
974 
975 
976 
977 
978 
979 
980 
981 
982 
983 
984 	case 4:
985 		for (fp = fsminit;; fp++)
986 		{
987 			if ((n = fp->nextstate) >= (0+28)) n = ~n;
988 			if (fp->state == (-1))
989 			{
990 
991 
992 
993 
994 
995 
996 
997 
998 
999 
1000 
1001 
1002 
1003 				break;
1004 			}
1005 			rp = _pp_fsmtab[fp->state];
1006 			for (i = 0; i < sizeof(fp->ch) && (c = fp->ch[i]); i++)
1007 			{
1008 				switch (c)
1009 				{
1010 				case 023:
1011 					for (c = 0; c <= 255; c++)
1012 						rp[c] = n;
1013 
1014 
1015 				case 002:
1016 					_pp_fsmtab[(0+28)][fp->state+1] = n < 0 ? ~n : n;
1017 					continue;
1018 
1019 				case 021:
1020 					s = let;
1021 					break;
1022 
1023 				case 003:
1024 					s = hex;
1025 					break;
1026 
1027 				case 001:
1028 					s = dec;
1029 					break;
1030 
1031 				case 022:
1032 					s = oct;
1033 					break;
1034 
1035 				default:
1036 					rp[c] = n;
1037 					continue;
1038 				}
1039 				while (c = *s++)
1040 					rp[c] = n;
1041 			}
1042 		}
1043 
1044 
1045 
1046 
1047 
1048 
1049 		for (i = 0; i < (0+28); i++)
1050 		{
1051 			rp = _pp_fsmtab[i];
1052 			s = spl;
1053 			while (c = *s++)
1054 				if (c != '@' || !(( rp)>=_pp_fsmtab[(0+13)]&&( rp)<=_pp_fsmtab[(0+18)]))
1055 				{
1056 					if (rp[c] >= 0) rp[c] = ~rp[c];
1057 					rp[c] &= ~(1<<7);
1058 				}
1059 			rp[0] = ~((0+28)+2);
1060 			for (c = 0; c <= 255; c++)
1061 				if (rp[c] == i)
1062 					rp[c] = 0;
1063 		}
1064 		_pp_fsmtab[(0+28)][0] = ~((0+28)+2);
1065 
1066 
1067 
1068 
1069 
1070 
1071 
1072 
1073 
1074 
1075 
1076 
1077 
1078 
1079 
1080 
1081 
1082 
1083 #line 707
1084 		break;
1085 
1086 
1087 
1088 
1089 
1090 
1091 
1092 
1093 
1094 
1095 
1096 
1097 
1098 
1099 
1100 
1101 
1102 
1103 
1104 
1105 
1106 
1107 
1108 
1109 
1110 
1111 
1112 
1113 
1114 
1115 
1116 
1117 
1118 
1119 
1120 
1121 
1122 
1123 
1124 
1125 
1126 
1127 
1128 
1129 
1130 
1131 
1132 
1133 
1134 
1135 
1136 
1137 
1138 
1139 
1140 
1141 
1142 
1143 
1144 
1145 
1146 
1147 
1148 
1149 
1150 
1151 
1152 
1153 
1154 
1155 
1156 
1157 
1158 
1159 
1160 
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 
1169 
1170 
1171 
1172 
1173 
1174 
1175 
1176 
1177 
1178 
1179 
1180 
1181 
1182 
1183 
1184 
1185 
1186 
1187 
1188 
1189 
1190 
1191 
1192 
1193 
1194 
1195 
1196 
1197 
1198 
1199 
1200 
1201 
1202 
1203 
1204 
1205 
1206 
1207 
1208 
1209 
1210 
1211 
1212 
1213 
1214 
1215 
1216 
1217 
1218 
1219 
1220 
1221 
1222 
1223 #line 860
1224 	}
1225 }
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
1234 
1235 
1236 
1237 
1238 
1239 
1240 
1241 
1242 
1243 
1244 
1245 
1246 
1247 
1248 
1249 
1250 
1251 
1252 
1253 
1254 
1255 
1256 
1257 
1258 
1259 
1260 
1261 
1262 
1263 
1264 
1265 
1266 
1267 
1268 
1269 
1270 
1271 
1272 
1273 
1274 
1275 
1276 #line 18 "../../lib/libpp/ppproto.c"
1277 
1278 #line 1 "../../../include/ast/hashkey.h"
1279 
1280 #line 24
1281 
1282 
1283 #line 68
1284 extern __MANGLE__  long	strkey  __PROTO__((const char*));
1285 
1286 #line 20 "../../lib/libpp/ppproto.c"
1287 
1288 #line 41
1289 typedef struct Key_s
1290 {
1291 	const char*	name;
1292 	size_t		size;
1293 	int		hit;
1294 	int		val;
1295 } Key_t;
1296 
1297 typedef struct Proto_s
1298 {
1299 	int		brace;
1300 	int		call;
1301 	int		fd;
1302 	char*		file;
1303 	long		flags;
1304 	long		options;
1305 	char*		package;
1306 	int		line;
1307 	int		test;
1308 
1309 	char*		tp;
1310 
1311 	int		iz;
1312 	char*		ib;
1313 	char*		ip;
1314 
1315 	int		oz;
1316 	char*		ob;
1317 	char*		op;
1318 	char*		ox;
1319 
1320 	char		cc[3];
1321 	char		pushback[4];
1322 
1323 	char		variadic[256];
1324 
1325 
1326 
1327 
1328 } Proto_t;
1329 
1330 
1331 #line 171
1332 static const Key_t	pragmas[] =
1333 {
1334 	{ "prototyped",sizeof( "prototyped")-1, 0x01, 1},
1335 	{ "noprototyped",sizeof( "noprototyped")-1, 0x01, 0},
1336 	{ "noticed",sizeof( "noticed")-1, 0x02, 1},
1337 	{ "nonoticed",sizeof( "nonoticed")-1, 0x02, 0},
1338 };
1339 
1340 static const Key_t	notices[] =
1341 {
1342 	{ "Copyright",sizeof( "Copyright")-1, 0x02, 1},
1343 	{ "COPYRIGHT",sizeof( "COPYRIGHT")-1, 0x02, 1},
1344 	{ "copyright",sizeof( "copyright")-1, 0x02, 1},
1345 	{ "Public Domain",sizeof( "Public Domain")-1, 0x02, 0},
1346 	{ "PUBLIC DOMAIN",sizeof( "PUBLIC DOMAIN")-1, 0x02, 0},
1347 };
1348 
1349 
1350 
1351 
1352 
1353 
1354 static char*
__OTORP__(register char * p;register long n;)1355 number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register char* p; register long n;){
1356 	register long	d;
1357 
1358 	for (d = 1000000; d > 1; d /= 10)
1359 		if (n >= d) *p++ = '0' + (n / d) % 10;
1360 	*p++ = '0' + n % 10;
1361 	return p;
1362 }
1363 
1364 
1365 
1366 static int		errors;
1367 
1368 
1369 #line 224
1370 
1371 
1372 
1373 
1374 static int
__OTORP__(register const char * s;)1375 sstrlen __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){
1376 	register const char*	b;
1377 
1378 	for (b = s; *s; s++);
1379 	return s - b;
1380 }
1381 
1382 
1383 
1384 
1385 
1386 static int
__OTORP__(register const char * s;register const char * t;register int n;)1387 sstrncmp __PARAM__((register const char* s, register const char* t, register int n), (s, t, n)) __OTORP__(register const char* s; register const char* t; register int n;){
1388 	register const char*	e = s + n;
1389 
1390 	while (s < e)
1391 	{
1392 		if (*s != *t || !*s)
1393 			return *s - *t;
1394 		s++;
1395 		t++;
1396 	}
1397 	return 0;
1398 }
1399 
1400 
1401 
1402 
1403 
1404 static char*
__OTORP__(register char * s;register const char * t;)1405 strcopy __PARAM__((register char* s, register const char* t), (s, t)) __OTORP__(register char* s; register const char* t;){
1406 	while (*s++ = *t++);
1407 	return s - 1;
1408 }
1409 
1410 
1411 
1412 static void
__OTORP__(char * iob;int level;char * msg;char * arg;)1413 proto_error __PARAM__((char* iob, int level, char* msg, char* arg), (iob, level, msg, arg)) __OTORP__(char* iob; int level; char* msg; char* arg;){
1414 	register char*	p;
1415 	char		buf[1024];
1416 
1417 	p = strcopy(buf, "proto: ");
1418 	if (iob)
1419 	{
1420 		register Proto_t*	proto = (Proto_t*)(iob - sizeof(Proto_t));
1421 
1422 		if (proto->line)
1423 		{
1424 			if (proto->file)
1425 			{
1426 				*p++ = '"';
1427 				p = strcopy(p, proto->file);
1428 				*p++ = '"';
1429 				*p++ = ',';
1430 				*p++ = ' ';
1431 			}
1432 			p = strcopy(p, "line ");
1433 			p = number(p, proto->line);
1434 		}
1435 		else if (proto->file)
1436 			p = strcopy(p, proto->file);
1437 	}
1438 	else
1439 	{
1440 		p = strcopy(p, msg);
1441 		msg = arg;
1442 		arg = 0;
1443 	}
1444 	if (*(p - 1) != ' ')
1445 	{
1446 		*p++ = ':';
1447 		*p++ = ' ';
1448 	}
1449 	if (level == 1)
1450 		p = strcopy(p, "warning: ");
1451 	p = strcopy(p, msg);
1452 	if (arg)
1453 	{
1454 		*p++ = ' ';
1455 		p = strcopy(p, arg);
1456 	}
1457 	*p++ = '\n';
1458 	write(2, buf, p - buf);
1459 	if (level >= 3)
1460 		exit(level - 2);
1461 	if (level >= 2)
1462 		errors++;
1463 }
1464 
1465 
1466 
1467 
1468 
1469 static char*
__OTORP__(register char * s;register char * t;int n;)1470 memcopy __PARAM__((register char* s, register char* t, int n), (s, t, n)) __OTORP__(register char* s; register char* t; int n;){
1471 	register char*	e = t + n;
1472 
1473 	while (t < e) *s++ = *t++;
1474 	return s;
1475 }
1476 
1477 #line 1 "../../lib/libast/port/astlicense.c"
1478 
1479 
1480 
1481 #line 92
1482 typedef struct Buffer_s
1483 {
1484 	char*		buf;
1485 	char*		nxt;
1486 	char*		end;
1487 	int		siz;
1488 } Buffer_t;
1489 
1490 typedef struct Item_s
1491 {
1492 	char*		data;
1493 	int		size;
1494 	int		quote;
1495 } Item_t;
1496 
1497 typedef struct Id_s
1498 {
1499 	Item_t		name;
1500 	Item_t		value;
1501 } Id_t;
1502 
1503 
1504 
1505 
1506 
1507 
1508 
1509 static const Item_t	key[] =
1510 {
1511 	{ "author",sizeof( "author")-1,0},
1512 	{ "class",sizeof( "class")-1,0},
1513 	{ "company",sizeof( "company")-1,0},
1514 	{ "component",sizeof( "component")-1,0},
1515 	{ "contributor",sizeof( "contributor")-1,0},
1516 	{ "corporation",sizeof( "corporation")-1,0},
1517 	{ "domain",sizeof( "domain")-1,0},
1518 	{ "id",sizeof( "id")-1,0},
1519 	{ "incorporation",sizeof( "incorporation")-1,0},
1520 	{ "license",sizeof( "license")-1,0},
1521 	{ "location",sizeof( "location")-1,0},
1522 	{ "name",sizeof( "name")-1,0},
1523 	{ "notice",sizeof( "notice")-1,0},
1524 	{ "organization",sizeof( "organization")-1,0},
1525 	{ "package",sizeof( "package")-1,0},
1526 	{ "parent",sizeof( "parent")-1,0},
1527 	{ "query",sizeof( "query")-1,0},
1528 	{ "since",sizeof( "since")-1,0},
1529 	{ "source",sizeof( "source")-1,0},
1530 	{ "start",sizeof( "start")-1,0},
1531 	{ "type",sizeof( "type")-1,0},
1532 	{ "url",sizeof( "url")-1,0},
1533 	{ "urlmd5",sizeof( "urlmd5")-1,0},
1534 	{ "version",sizeof( "version")-1,0},
1535 	{0}
1536 };
1537 
1538 
1539 
1540 
1541 
1542 static const Item_t	lic[] =
1543 {
1544 	{ "none",sizeof( "none")-1, 0},
1545 	{ "inline",sizeof( "inline")-1, 12},
1546 	{ "test",sizeof( "test")-1, 2},
1547 	{ "verbose",sizeof( "verbose")-1, 3},
1548 	{ "usage",sizeof( "usage")-1, 4},
1549 	{ "open",sizeof( "open")-1, 5},
1550 	{ "cpl",sizeof( "cpl")-1, 5},
1551 	{ "epl",sizeof( "epl")-1, 5},
1552 	{ "bsd",sizeof( "bsd")-1, 5},
1553 	{ "zlib",sizeof( "zlib")-1, 5},
1554 	{ "mit",sizeof( "mit")-1, 5},
1555 	{ "gpl",sizeof( "gpl")-1, 11},
1556 	{ "special",sizeof( "special")-1, 12},
1557 	{ "nonexclusive",sizeof( "nonexclusive")-1, 12},
1558 	{ "noncommercial",sizeof( "noncommercial")-1, 12},
1559 	{ "proprietary",sizeof( "proprietary")-1, 15},
1560 	{0}
1561 };
1562 
1563 typedef struct Notice_s
1564 {
1565 	int		test;
1566 	int		type;
1567 	int		verbose;
1568 	int		ids;
1569 	Item_t		item[(sizeof(key)/sizeof(key[0])-1)];
1570 	Id_t		id[64];
1571 	char		cc[3];
1572 } Notice_t;
1573 
1574 
1575 
1576 
1577 
1578 static int
__OTORP__(register const Item_t * item;const char * name;int size;)1579 lookup __PARAM__((register const Item_t* item, const char* name, int size), (item, name, size)) __OTORP__(register const Item_t* item; const char* name; int size;){
1580 	register int	c;
1581 	register int	i;
1582 
1583 	c = name[0];
1584 	for (i = 0; item[i].data; i++)
1585 		if (c == item[i].data[0] && size == item[i].size && !sstrncmp( name, item[i].data, size))
1586 			return i;
1587 	return -1;
1588 }
1589 
1590 
1591 
1592 
1593 
1594 
1595 static void
__OTORP__(register Buffer_t * b;register char * s;int n;)1596 copy __PARAM__((register Buffer_t* b, register char* s, int n), (b, s, n)) __OTORP__(register Buffer_t* b; register char* s; int n;){
1597 	if (n < 0)
1598 		n = sstrlen( s);
1599 	while (n--)
1600 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( *s++)):(( *s++),(-1)));
1601 }
1602 
1603 
1604 #line 225
1605 static void
__OTORP__(Notice_t * notice;register Buffer_t * b;register char * s;register int n;int u;)1606 comment __PARAM__((Notice_t* notice, register Buffer_t* b, register char* s, register int n, int u), (notice, b, s, n, u)) __OTORP__(Notice_t* notice; register Buffer_t* b; register char* s; register int n; int u;){
1607 	register int	i;
1608 	register int	m;
1609 	register int	x;
1610 	int		cc;
1611 
1612 	cc = notice->cc[1];
1613 	if (!s)
1614 	{
1615 		if (n)
1616 		{
1617 			((( b)->nxt<( b)->end)?(*( b)->nxt++=( notice->cc[n > 0 ? 0 : 1])):(( notice->cc[n > 0 ? 0 : 1]),(-1)));
1618 			for (i = 0; i < 70; i++)
1619 				((( b)->nxt<( b)->end)?(*( b)->nxt++=( cc)):(( cc),(-1)));
1620 			((( b)->nxt<( b)->end)?(*( b)->nxt++=( notice->cc[n > 0 ? 1 : 2])):(( notice->cc[n > 0 ? 1 : 2]),(-1)));
1621 		}
1622 		else
1623 			s = "";
1624 	}
1625 	if (s)
1626 	{
1627 		if (n > 70)
1628 			n = 70;
1629 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( cc)):(( cc),(-1)));
1630 		m = (u < 0) ? 1 : (70 - n) / 2;
1631 		if ((x = 70 - m - n) < 0)
1632 			n--;
1633 		while (m-- > 0)
1634 			((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
1635 		while (n-- > 0)
1636 		{
1637 			i = *s++;
1638 			if (u > 0 && i >= 'a' && i <= 'z')
1639 				i = i - 'a' + 'A';
1640 			((( b)->nxt<( b)->end)?(*( b)->nxt++=( i)):(( i),(-1)));
1641 		}
1642 		while (x-- > 0)
1643 			((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
1644 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( cc)):(( cc),(-1)));
1645 	}
1646 	((( b)->nxt<( b)->end)?(*( b)->nxt++=( '\n')):(( '\n'),(-1)));
1647 }
1648 
1649 
1650 
1651 
1652 
1653 static void
__OTORP__(Notice_t * notice;register Buffer_t * b;const Item_t * item;)1654 expand __PARAM__((Notice_t* notice, register Buffer_t* b, const Item_t* item), (notice, b, item)) __OTORP__(Notice_t* notice; register Buffer_t* b; const Item_t* item;){
1655 	register char*	t;
1656 	register char*	e;
1657 	register int	q;
1658 	register char*	x;
1659 	register char*	z;
1660 	register int	c;
1661 	int		m;
1662 	int		i;
1663 	int		k;
1664 
1665 	if (t = item->data)
1666 	{
1667 		q = item->quote;
1668 		e = t + item->size;
1669 		i = 0;
1670 		while (t < e)
1671 		{
1672 			if (*t == '$' && t < (e + 2) && *(t + 1) == '{')
1673 			{
1674 				k = m = 0;
1675 				x = t += 2;
1676 				while (t < e && (c = *t++) != '}')
1677 					if (c == '.')
1678 						x = t;
1679 					else if (c == '-')
1680 					{
1681 						k = 1;
1682 						break;
1683 					}
1684 					else if (c == '/')
1685 					{
1686 						m = 1;
1687 						break;
1688 					}
1689 				if ((c = lookup(key, x, t - x - 1)) >= 0 && (x = notice->item[c].data))
1690 				{
1691 					z = x + notice->item[c].size;
1692 					while (x < z)
1693 					{
1694 						c = *x++;
1695 						if (!m || c >= '0' && c <= '9')
1696 							((( b)->nxt<( b)->end)?(*( b)->nxt++=( c)):(( c),(-1)));
1697 					}
1698 				}
1699 				else if (k)
1700 				{
1701 					k = 0;
1702 					i++;
1703 				}
1704 				if (k || m)
1705 				{
1706 					k = 1;
1707 					while (t < e)
1708 						if ((c = *t++) == '{')
1709 							k++;
1710 						else if (c == '}' && !--k)
1711 							break;
1712 				}
1713 			}
1714 			else if (q > 0 && *t == '\\' && (*(t + 1) == q || *(t + 1) == '\\'))
1715 				t++;
1716 			else if (*t == '}' && i)
1717 			{
1718 				t++;
1719 				i--;
1720 			}
1721 			else
1722 				((( b)->nxt<( b)->end)?(*( b)->nxt++=( *t++)):(( *t++),(-1)));
1723 		}
1724 	}
1725 }
1726 
1727 
1728 
1729 
1730 
1731 static void
__OTORP__(Notice_t * notice;register Buffer_t * b;)1732 copyright __PARAM__((Notice_t* notice, register Buffer_t* b), (notice, b)) __OTORP__(Notice_t* notice; register Buffer_t* b;){
1733 	register char*	x;
1734 	register char*	t;
1735 	time_t		clock;
1736 
1737 	copy(b, "Copyright (c) ", -1);
1738 	if (notice->test)
1739 	{
1740 		clock = (time_t)1000212300;
1741 		t = ctime(&clock) + 20;
1742 	}
1743 	else if (!(t = notice->item[18].data))
1744 	{
1745 		time(&clock);
1746 		t = ctime(&clock) + 20;
1747 	}
1748 	if ((x = notice->item[19].data) && sstrncmp( t, x, 4) < 0)
1749 		t = x;
1750 	if ((x = notice->item[17].data) && sstrncmp( x, t, 4) < 0)
1751 	{
1752 		expand(notice, b, &notice->item[17]);
1753 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( '-')):(( '-'),(-1)));
1754 	}
1755 	copy(b, t, 4);
1756 	if (notice->item[15].data)
1757 	{
1758 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
1759 		expand(notice, b, &notice->item[15]);
1760 	}
1761 	if (notice->item[5].data)
1762 	{
1763 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
1764 		expand(notice, b, &notice->item[5]);
1765 		if (notice->item[8].data)
1766 		{
1767 			((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
1768 			expand(notice, b, &notice->item[8]);
1769 		}
1770 	}
1771 	else if (notice->item[2].data)
1772 	{
1773 		((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
1774 		expand(notice, b, &notice->item[2]);
1775 	}
1776 }
1777 
1778 typedef struct Stack_s
1779 {
1780 	char*	info;
1781 	char*	file;
1782 	int	line;
1783 	int	size;
1784 } Stack_t;
1785 
1786 static int
__OTORP__(Stack_t * sp;char * file;char * parent;char * info;int size;Buffer_t * buf;)1787 push __PARAM__((Stack_t* sp, char* file, char* parent, char* info, int size, Buffer_t* buf), (sp, file, parent, info, size, buf)) __OTORP__(Stack_t* sp; char* file; char* parent; char* info; int size; Buffer_t* buf;){
1788 	char*		s;
1789 	char*		t;
1790 	int		i;
1791 	int		n;
1792 	char		path[1024];
1793 
1794 	if (size <= 8)
1795 	{
1796 		copy(buf, file, -1);
1797 		copy(buf, ": no space", -1);
1798 		((( buf)->nxt<( buf)->end)?(*( buf)->nxt++=( 0)):(( 0),(-1)));
1799 		return -1;
1800 	}
1801 	if (*file != '/' && parent && (s = strrchr(parent, '/')))
1802 	{
1803 		n = s - parent + 1;
1804 		if ((sstrlen( file) + n + 1) <= sizeof(path))
1805 		{
1806 			memcopy( path, parent, n);
1807 			strcopy( path + n, file);
1808 			file = path;
1809 		}
1810 	}
1811 	if ((i = open(file, O_RDONLY|0)) < 0)
1812 	{
1813 
1814 		if (file == path)
1815 			for (s = path; *s; s++)
1816 				if (s[0] == '/' && s[1] == 'a' && s[2] == 'r' && s[3] == 'c' && s[4] == 'h' && s[5] == '/')
1817 				{
1818 					t = s;
1819 					for (s += 6; *s && *s != '/'; s++);
1820 					while (*t++ = *s++);
1821 					i = open(file, O_RDONLY|0);
1822 				}
1823 		if (i < 0)
1824 		{
1825 			copy(buf, file, -1);
1826 			copy(buf, ": cannot open", -1);
1827 			((( buf)->nxt<( buf)->end)?(*( buf)->nxt++=( 0)):(( 0),(-1)));
1828 			return -1;
1829 		}
1830 	}
1831 	n = read(i, info, size - 1);
1832 	close(i);
1833 	if (n < 0)
1834 	{
1835 		copy(buf, file, -1);
1836 		copy(buf, ": cannot read", -1);
1837 		((( buf)->nxt<( buf)->end)?(*( buf)->nxt++=( 0)):(( 0),(-1)));
1838 		return -1;
1839 	}
1840 	info[n++] = 0;
1841 	sp->file = file;
1842 	sp->info = info;
1843 	sp->line = 0;
1844 	sp->size = n;
1845 	return 0;
1846 }
1847 
1848 
1849 
1850 
1851 
1852 
1853 
1854 int
__OTORP__(char * p;int size;char * file;char * options;int cc1;int cc2;int cc3;)1855 astlicense __PARAM__((char* p, int size, char* file, char* options, int cc1, int cc2, int cc3), (p, size, file, options, cc1, cc2, cc3)) __OTORP__(char* p; int size; char* file; char* options; int cc1; int cc2; int cc3;){
1856 	register char*	s;
1857 	register char*	v;
1858 	register char*	x;
1859 	register int	c;
1860 	int		i;
1861 	int		h;
1862 	int		k;
1863 	int		n;
1864 	int		q;
1865 	int		contributor;
1866 	int		first;
1867 	int		level;
1868 	int		quote;
1869 	char*		data;
1870 	char		tmpbuf[(70+4)];
1871 	char		info[8 * 1024];
1872 	Stack_t		input[4];
1873 	Notice_t	notice;
1874 	Item_t		item;
1875 	Buffer_t	buf;
1876 	Buffer_t	tmp;
1877 
1878 	buf.end = (buf.buf = buf.nxt = p) + size;
1879 	tmp.end = (tmp.buf = tmp.nxt = tmpbuf) + sizeof(tmpbuf);
1880 	level = 0;
1881 	data = info;
1882 	level = -1;
1883 	if (options)
1884 	{
1885 		level++;
1886 		input[level].file = "<options>";
1887 		input[level].info = options;
1888 		input[level].line = 0;
1889 	}
1890 	if (file && *file)
1891 	{
1892 		if (push(&input[++level], file, 0, data, &info[sizeof(info)] - data, &buf))
1893 			return -1;
1894 		data += input[level].size;
1895 	}
1896 	if (level < 0)
1897 		return 0;
1898 	s = input[level].info;
1899 	notice.test = 0;
1900 	notice.type = 0;
1901 	notice.verbose = 0;
1902 	notice.ids = 0;
1903 	notice.cc[0] = cc1;
1904 	notice.cc[1] = cc2;
1905 	notice.cc[2] = cc3;
1906 	for (i = 0; i < (sizeof(key)/sizeof(key[0])-1); i++)
1907 		notice.item[i].data = 0;
1908 	notice.item[20] = notice.item[1] = lic[notice.type];
1909 	notice.item[20].quote = notice.item[1].quote = 0;
1910 	contributor = i = k = 0;
1911 	for (;;)
1912 	{
1913 		first = 1;
1914 		while (c = *s)
1915 		{
1916 			while (c == ' ' || c == '\t' || c == '\n' && ++input[level].line || c == '\r' || c == ',' || c == ';' || c == ')')
1917 				c = *++s;
1918 			if (!c)
1919 				break;
1920 			if (c == '#')
1921 			{
1922 				while (*++s && *s != '\n');
1923 				if (*s)
1924 					s++;
1925 				input[level].line++;
1926 				continue;
1927 			}
1928 			if (c == '.')
1929 			{
1930 				while ((c = *++s) && (c == ' ' || c == '\t'));
1931 				file = s;
1932 				while (c && c != ' ' && c != '\t' && c != '\r' && c != '\n')
1933 					c = *++s;
1934 				*s = 0;
1935 				while (c && c != '\n')
1936 					c = *++s;
1937 				if (*file)
1938 				{
1939 					input[level].info = s + (c != 0);
1940 					if (++level >= (sizeof(input) / sizeof(input[0])) || push(&input[level], file, input[level-1].file, data, &info[sizeof(info)] - data, &buf))
1941 						return -1;
1942 					data += input[level].size;
1943 					s = input[level].info;
1944 				}
1945 				continue;
1946 			}
1947 			if (c == '\n')
1948 			{
1949 				s++;
1950 				input[level].line++;
1951 				continue;
1952 			}
1953 			if (c == '[')
1954 				c = *++s;
1955 			x = s;
1956 			n = 0;
1957 			while (c && c != '+' && c != '=' && c != ']' && c != ')' && c != ',' && c != ' ' && c != '\t' && c != '\n' && c != '\r')
1958 				c = *++s;
1959 			n = s - x;
1960 			h = lookup(key, x, n);
1961 			if (c == '+' || c == ']')
1962 				c = *++s;
1963 			quote = 0;
1964 			if (c == '=' || first)
1965 			{
1966 				if (c == '=')
1967 				{
1968 					q = ((c = *++s) == '"' || c == '\'') ? *s++ : 0;
1969 					if (c == '(')
1970 					{
1971 						s++;
1972 						if (h == 9)
1973 							contributor = 0;
1974 						else if (h == 4)
1975 							contributor = 1;
1976 						else
1977 						{
1978 							q = 1;
1979 							i = 0;
1980 							for (;;)
1981 							{
1982 								switch (*s++)
1983 								{
1984 								case 0:
1985 									s--;
1986 									break;
1987 								case '(':
1988 									if (!i)
1989 										q++;
1990 									continue;
1991 								case ')':
1992 									if (!i && !--q)
1993 										break;
1994 									continue;
1995 								case '"':
1996 								case '\'':
1997 									if (!i)
1998 										i = *(s - 1);
1999 									else if (i == *(s - 1))
2000 										i = 0;
2001 									continue;
2002 								case '\\':
2003 									if (*s == i && i == '"')
2004 										i++;
2005 									continue;
2006 								case '\n':
2007 									input[level].line++;
2008 									continue;
2009 								default:
2010 									continue;
2011 								}
2012 								break;
2013 							}
2014 						}
2015 						continue;
2016 					}
2017 					v = s;
2018 					while ((c = *s) && (q == '"' && (c == '\\' && (*(s + 1) == '"' || *(s + 1) == '\\') && s++ && (quote = q)) || q && c != q || !q && c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != ',' && c != ';'))
2019 					{
2020 						if (c == '\n')
2021 							input[level].line++;
2022 						s++;
2023 					}
2024 				}
2025 				else
2026 				{
2027 					h = 20;
2028 					v = x;
2029 				}
2030 				if (c == '\n')
2031 					input[level].line++;
2032 				if (contributor)
2033 				{
2034 					for (i = 0; i < notice.ids; i++)
2035 						if (n == notice.id[i].name.size && !sstrncmp( x, notice.id[i].name.data, n))
2036 							break;
2037 					if (i < 64)
2038 					{
2039 						notice.id[i].name.data = x;
2040 						notice.id[i].name.size = n;
2041 						notice.id[i].name.quote = 0;
2042 						notice.id[i].value.data = v;
2043 						notice.id[i].value.size = s - v;
2044 						notice.id[i].value.quote = quote;
2045 						if (notice.ids <= i)
2046 							notice.ids = i + 1;
2047 					}
2048 				}
2049 				else if (h == 16)
2050 				{
2051 					if ((s - v) == 3 && v[0] == 'a' && v[1] == 'l' && v[2] == 'l')
2052 					{
2053 						for (i = 0; i < (sizeof(key)/sizeof(key[0])-1); i++)
2054 							if (notice.item[i].size)
2055 							{
2056 								expand(&notice, &buf, &key[i]);
2057 								((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '=')):(( '='),(-1)));
2058 								for (h = 0;; h++)
2059 									if (h >= notice.item[i].size)
2060 									{
2061 										h = 0;
2062 										break;
2063 									}
2064 									else if (notice.item[i].data[h] == ' ' || notice.item[i].data[h] == '\t')
2065 										break;
2066 								if (h)
2067 									((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\'')):(( '\''),(-1)));
2068 								expand(&notice, &buf, &notice.item[i]);
2069 								if (h)
2070 									((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\'')):(( '\''),(-1)));
2071 								((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1)));
2072 							}
2073 					}
2074 					else
2075 					{
2076 						if ((h = lookup(key, v, s - v)) < 0)
2077 						{
2078 							item.data = v;
2079 							item.size = s - v;
2080 							item.quote = 0;
2081 							expand(&notice, &buf, &item);
2082 						}
2083 						else
2084 							expand(&notice, &buf, &notice.item[h]);
2085 						((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1)));
2086 					}
2087 					return (*(( &buf)->nxt>=( &buf)->end?(( &buf)->nxt=( &buf)->end-1):( &buf)->nxt)=0,( &buf)->nxt-( &buf)->buf);
2088 				}
2089 				else
2090 				{
2091 					if (h == 20)
2092 						switch (c = lookup(lic, v, s - v))
2093 						{
2094 						case 0:
2095 							return 0;
2096 						case 2:
2097 							notice.test = 1;
2098 							h = -1;
2099 							break;
2100 						case 3:
2101 							notice.verbose = 1;
2102 							h = -1;
2103 							break;
2104 						case 4:
2105 							notice.type = c;
2106 							h = -1;
2107 							break;
2108 						case -1:
2109 							c = 12;
2110 
2111 						default:
2112 							notice.type = c;
2113 							notice.item[1].data = lic[lic[c].quote].data;
2114 							notice.item[1].size = lic[lic[c].quote].size;
2115 							if (notice.item[20].data != lic[0].data)
2116 								h = -1;
2117 							break;
2118 						}
2119 					if (h >= 0)
2120 					{
2121 						notice.item[h].data = (notice.item[h].size = s - v) ? v : (char*)0;
2122 						notice.item[h].quote = quote;
2123 						k = 1;
2124 					}
2125 				}
2126 			}
2127 			else
2128 			{
2129 				if (input[level].file)
2130 				{
2131 					copy(&buf, "\"", -1);
2132 					copy(&buf, input[level].file, -1);
2133 					copy(&buf, "\", line ", -1);
2134 					x = &tmpbuf[sizeof(tmpbuf)];
2135 					*--x = 0;
2136 					n = ++input[level].line;
2137 					do *--x = ("0123456789")[n % 10]; while (n /= 10);
2138 					copy(&buf, x, -1);
2139 					copy(&buf, ": ", -1);
2140 				}
2141 				copy(&buf, "option error: assignment expected", -1);
2142 				((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( 0)):(( 0),(-1)));
2143 				return -1;
2144 			}
2145 			if (*s)
2146 				s++;
2147 			first = 0;
2148 		}
2149 		if (!level--)
2150 			break;
2151 		s = input[level].info;
2152 	}
2153 	if (!k)
2154 		return 0;
2155 	if (notice.type == 1 && (!notice.verbose || !notice.item[12].data))
2156 		return 0;
2157 	if (notice.type != 4)
2158 	{
2159 		if (!notice.type)
2160 			notice.type = 12;
2161 		comment(&notice, &buf, ((char*)0), 1, 0);
2162 		comment(&notice, &buf, ((char*)0), 0, 0);
2163 		if (notice.item[14].data)
2164 		{
2165 			copy(&tmp, "This software is part of the ", -1);
2166 			expand(&notice, &tmp, &notice.item[14]);
2167 			copy(&tmp, " package", -1);
2168 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2169 		}
2170 		if (notice.type >= 5)
2171 		{
2172 			copyright(&notice, &tmp);
2173 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2174 			if (notice.type >= 12)
2175 				comment( &notice, &buf, "All Rights Reserved",sizeof( "All Rights Reserved")-1, 0);
2176 		}
2177 		if (notice.type == 6 || notice.type == 7)
2178 		{
2179 			copy(&tmp, notice.item[14].data ? "and": "This software", -1);
2180 			copy(&tmp, " is licensed under the", -1);
2181 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2182 			if (notice.type == 7)
2183 				copy(&tmp, "Eclipse Public License", -1);
2184 			else
2185 				copy(&tmp, "Common Public License", -1);
2186 			if (notice.item[23].data)
2187 			{
2188 				copy(&tmp, ", Version ", -1);
2189 				expand(&notice, &tmp, &notice.item[23]);
2190 			}
2191 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2192 			if (notice.item[5].data || notice.item[2].data)
2193 			{
2194 				copy(&tmp, "by ", -1);
2195 				if (notice.item[15].data)
2196 				{
2197 					expand(&notice, &tmp, &notice.item[15]);
2198 					copy(&tmp, " ", -1);
2199 				}
2200 				if (notice.item[5].data)
2201 				{
2202 					expand(&notice, &tmp, &notice.item[5]);
2203 					if (notice.item[8].data)
2204 					{
2205 						copy(&tmp, " ", -1);
2206 						expand(&notice, &tmp, &notice.item[8]);
2207 					}
2208 				}
2209 				else if (notice.item[2].data)
2210 					expand(&notice, &tmp, &notice.item[2]);
2211 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2212 			}
2213 			comment(&notice, &buf, ((char*)0), 0, 0);
2214 			comment( &notice, &buf, "A copy of the License is available at",sizeof( "A copy of the License is available at")-1, 0);
2215 			if (notice.item[21].data)
2216 			{
2217 				expand(&notice, &tmp, &notice.item[21]);
2218 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2219 				if (notice.item[22].data)
2220 				{
2221 					copy(&tmp, "(with md5 checksum ", -1);
2222 					expand(&notice, &tmp, &notice.item[22]);
2223 					copy(&tmp, ")", -1);
2224 					comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2225 				}
2226 			}
2227 			else if (notice.type == 7)
2228 				comment( &notice, &buf, "http://www.eclipse.org/org/documents/epl-v10.html",sizeof( "http://www.eclipse.org/org/documents/epl-v10.html")-1, 0);
2229 			else
2230 				comment( &notice, &buf, "http://www.opensource.org/licenses/cpl",sizeof( "http://www.opensource.org/licenses/cpl")-1, 0);
2231 			comment(&notice, &buf, ((char*)0), 0, 0);
2232 		}
2233 		else if (notice.type == 5)
2234 		{
2235 			copy(&tmp, notice.item[14].data ? "and it": "This software", -1);
2236 			copy(&tmp, " may only be used by you under license from", -1);
2237 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2238 			if (notice.item[i = 5].data)
2239 			{
2240 				if (notice.item[15].data)
2241 				{
2242 					expand(&notice, &tmp, &notice.item[i = 15]);
2243 					copy(&tmp, " ", -1);
2244 				}
2245 				expand(&notice, &tmp, &notice.item[5]);
2246 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2247 			}
2248 			else if (notice.item[i = 2].data)
2249 			{
2250 				if (notice.item[15].data)
2251 				{
2252 					expand(&notice, &tmp, &notice.item[i = 15]);
2253 					copy(&tmp, " ", -1);
2254 				}
2255 				expand(&notice, &tmp, &notice.item[2]);
2256 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2257 			}
2258 			else
2259 				i = -1;
2260 			if (notice.item[21].data)
2261 			{
2262 				comment( &notice, &buf, "A copy of the Source Code Agreement is available",sizeof( "A copy of the Source Code Agreement is available")-1, 0);
2263 				copy(&tmp, "at the ", -1);
2264 				if (i >= 0)
2265 					expand(&notice, &tmp, &notice.item[i]);
2266 				copy(&tmp, " Internet web site URL", -1);
2267 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2268 				comment(&notice, &buf, ((char*)0), 0, 0);
2269 				expand(&notice, &tmp, &notice.item[21]);
2270 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2271 				if (notice.item[22].data)
2272 				{
2273 					copy(&tmp, "(with an md5 checksum of ", -1);
2274 					expand(&notice, &tmp, &notice.item[22]);
2275 					copy(&tmp, ")", -1);
2276 					comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2277 				}
2278 				comment(&notice, &buf, ((char*)0), 0, 0);
2279 			}
2280 			comment( &notice, &buf, "If you have copied or used this software without agreeing",sizeof( "If you have copied or used this software without agreeing")-1, 0);
2281 			comment( &notice, &buf, "to the terms of the license you are infringing on",sizeof( "to the terms of the license you are infringing on")-1, 0);
2282 			comment( &notice, &buf, "the license and copyright and are violating",sizeof( "the license and copyright and are violating")-1, 0);
2283 			if (i >= 0)
2284 				expand(&notice, &tmp, &notice.item[i]);
2285 			copy(&tmp, "'s", -1);
2286 			if (n >= (70-32))
2287 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2288 			else
2289 				((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
2290 			copy(&tmp, "intellectual property rights.", -1);
2291 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2292 			comment(&notice, &buf, ((char*)0), 0, 0);
2293 		}
2294 		else if (notice.type == 11)
2295 		{
2296 			comment(&notice, &buf, ((char*)0), 0, 0);
2297 			comment( &notice, &buf, "This is free software; you can redistribute it and/or",sizeof( "This is free software; you can redistribute it and/or")-1, 0);
2298 			comment( &notice, &buf, "modify it under the terms of the GNU General Public License",sizeof( "modify it under the terms of the GNU General Public License")-1, 0);
2299 			comment( &notice, &buf, "as published by the Free Software Foundation;",sizeof( "as published by the Free Software Foundation;")-1, 0);
2300 			comment( &notice, &buf, "either version 2, or (at your option) any later version.",sizeof( "either version 2, or (at your option) any later version.")-1, 0);
2301 			comment(&notice, &buf, ((char*)0), 0, 0);
2302 			comment( &notice, &buf, "This software is distributed in the hope that it",sizeof( "This software is distributed in the hope that it")-1, 0);
2303 			comment( &notice, &buf, "will be useful, but WITHOUT ANY WARRANTY;",sizeof( "will be useful, but WITHOUT ANY WARRANTY;")-1, 0);
2304 			comment( &notice, &buf, "without even the implied warranty of MERCHANTABILITY",sizeof( "without even the implied warranty of MERCHANTABILITY")-1, 0);
2305 			comment( &notice, &buf, "or FITNESS FOR A PARTICULAR PURPOSE.",sizeof( "or FITNESS FOR A PARTICULAR PURPOSE.")-1, 0);
2306 			comment( &notice, &buf, "See the GNU General Public License for more details.",sizeof( "See the GNU General Public License for more details.")-1, 0);
2307 			comment(&notice, &buf, ((char*)0), 0, 0);
2308 			comment( &notice, &buf, "You should have received a copy of the",sizeof( "You should have received a copy of the")-1, 0);
2309 			comment( &notice, &buf, "GNU General Public License",sizeof( "GNU General Public License")-1, 0);
2310 			comment( &notice, &buf, "along with this software (see the file COPYING.)",sizeof( "along with this software (see the file COPYING.)")-1, 0);
2311 			comment( &notice, &buf, "If not, a copy is available at",sizeof( "If not, a copy is available at")-1, 0);
2312 			comment( &notice, &buf, "http://www.gnu.org/copyleft/gpl.html",sizeof( "http://www.gnu.org/copyleft/gpl.html")-1, 0);
2313 			comment(&notice, &buf, ((char*)0), 0, 0);
2314 		}
2315 		else if (notice.type == 8)
2316 		{
2317 			comment(&notice, &buf, ((char*)0), 0, 0);
2318 			comment( &notice, &buf, "Redistribution and use in source and binary forms, with or",sizeof( "Redistribution and use in source and binary forms, with or")-1, -1);
2319 			comment( &notice, &buf, "without modification, are permitted provided that the following",sizeof( "without modification, are permitted provided that the following")-1, -1);
2320 			comment( &notice, &buf, "conditions are met:",sizeof( "conditions are met:")-1, -1);
2321 			comment(&notice, &buf, ((char*)0), 0, 0);
2322 			comment( &notice, &buf, "   1. Redistributions of source code must retain the above",sizeof( "   1. Redistributions of source code must retain the above")-1, -1);
2323 			comment( &notice, &buf, "      copyright notice, this list of conditions and the",sizeof( "      copyright notice, this list of conditions and the")-1, -1);
2324 			comment( &notice, &buf, "      following disclaimer.",sizeof( "      following disclaimer.")-1, -1);
2325 			comment(&notice, &buf, ((char*)0), 0, 0);
2326 			comment( &notice, &buf, "   2. Redistributions in binary form must reproduce the above",sizeof( "   2. Redistributions in binary form must reproduce the above")-1, -1);
2327 			comment( &notice, &buf, "      copyright notice, this list of conditions and the",sizeof( "      copyright notice, this list of conditions and the")-1, -1);
2328 			comment( &notice, &buf, "      following disclaimer in the documentation and/or other",sizeof( "      following disclaimer in the documentation and/or other")-1, -1);
2329 			comment( &notice, &buf, "      materials provided with the distribution.",sizeof( "      materials provided with the distribution.")-1, -1);
2330 			comment(&notice, &buf, ((char*)0), 0, 0);
2331 			copy(&tmp, "   3. Neither the name of ", -1);
2332 			if (notice.item[i = 15].data || notice.item[i = 5].data || notice.item[i = 2].data)
2333 				expand(&notice, &tmp, &notice.item[i]);
2334 			else
2335 				copy(&tmp, "the copyright holder", -1);
2336 			copy(&tmp, " nor the", -1);
2337 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), -1);
2338 			comment( &notice, &buf, "      names of its contributors may be used to endorse or",sizeof( "      names of its contributors may be used to endorse or")-1, -1);
2339 			comment( &notice, &buf, "      promote products derived from this software without",sizeof( "      promote products derived from this software without")-1, -1);
2340 			comment( &notice, &buf, "      specific prior written permission.",sizeof( "      specific prior written permission.")-1, -1);
2341 			comment(&notice, &buf, ((char*)0), 0, 0);
2342 			comment( &notice, &buf, "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND",sizeof( "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND")-1, -1);
2343 			comment( &notice, &buf, "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,",sizeof( "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,")-1, -1);
2344 			comment( &notice, &buf, "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF",sizeof( "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF")-1, -1);
2345 			comment( &notice, &buf, "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",sizeof( "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE")-1, -1);
2346 			comment( &notice, &buf, "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS",sizeof( "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS")-1, -1);
2347 			comment( &notice, &buf, "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,",sizeof( "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,")-1, -1);
2348 			comment( &notice, &buf, "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED",sizeof( "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED")-1, -1);
2349 			comment( &notice, &buf, "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,",sizeof( "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,")-1, -1);
2350 			comment( &notice, &buf, "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON",sizeof( "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON")-1, -1);
2351 			comment( &notice, &buf, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,",sizeof( "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,")-1, -1);
2352 			comment( &notice, &buf, "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY",sizeof( "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY")-1, -1);
2353 			comment( &notice, &buf, "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE",sizeof( "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE")-1, -1);
2354 			comment( &notice, &buf, "POSSIBILITY OF SUCH DAMAGE.",sizeof( "POSSIBILITY OF SUCH DAMAGE.")-1, -1);
2355 			comment(&notice, &buf, ((char*)0), 0, 0);
2356 		}
2357 		else if (notice.type == 9)
2358 		{
2359 			comment(&notice, &buf, ((char*)0), 0, 0);
2360 			comment( &notice, &buf, "This software is provided 'as-is', without any express or implied",sizeof( "This software is provided 'as-is', without any express or implied")-1, -1);
2361 			comment( &notice, &buf, "warranty. In no event will the authors be held liable for any",sizeof( "warranty. In no event will the authors be held liable for any")-1, -1);
2362 			comment( &notice, &buf, "damages arising from the use of this software.",sizeof( "damages arising from the use of this software.")-1, -1);
2363 			comment(&notice, &buf, ((char*)0), 0, 0);
2364 			comment( &notice, &buf, "Permission is granted to anyone to use this software for any",sizeof( "Permission is granted to anyone to use this software for any")-1, -1);
2365 			comment( &notice, &buf, "purpose, including commercial applications, and to alter it and",sizeof( "purpose, including commercial applications, and to alter it and")-1, -1);
2366 			comment( &notice, &buf, "redistribute it freely, subject to the following restrictions:",sizeof( "redistribute it freely, subject to the following restrictions:")-1, -1);
2367 			comment(&notice, &buf, ((char*)0), 0, 0);
2368 			comment( &notice, &buf, " 1. The origin of this software must not be misrepresented;",sizeof( " 1. The origin of this software must not be misrepresented;")-1, -1);
2369 			comment( &notice, &buf, "    you must not claim that you wrote the original software. If",sizeof( "    you must not claim that you wrote the original software. If")-1, -1);
2370 			comment( &notice, &buf, "    you use this software in a product, an acknowledgment in the",sizeof( "    you use this software in a product, an acknowledgment in the")-1, -1);
2371 			comment( &notice, &buf, "    product documentation would be appreciated but is not",sizeof( "    product documentation would be appreciated but is not")-1, -1);
2372 			comment( &notice, &buf, "    required.",sizeof( "    required.")-1, -1);
2373 			comment(&notice, &buf, ((char*)0), 0, 0);
2374 			comment( &notice, &buf, " 2. Altered source versions must be plainly marked as such,",sizeof( " 2. Altered source versions must be plainly marked as such,")-1, -1);
2375 			comment( &notice, &buf, "    and must not be misrepresented as being the original",sizeof( "    and must not be misrepresented as being the original")-1, -1);
2376 			comment( &notice, &buf, "    software.",sizeof( "    software.")-1, -1);
2377 			comment(&notice, &buf, ((char*)0), 0, 0);
2378 			comment( &notice, &buf, " 3. This notice may not be removed or altered from any source",sizeof( " 3. This notice may not be removed or altered from any source")-1, -1);
2379 			comment( &notice, &buf, "    distribution.",sizeof( "    distribution.")-1, -1);
2380 			comment(&notice, &buf, ((char*)0), 0, 0);
2381 		}
2382 		else if (notice.type == 10)
2383 		{
2384 			comment(&notice, &buf, ((char*)0), 0, 0);
2385 			comment( &notice, &buf, "Permission is hereby granted, free of charge, to any person",sizeof( "Permission is hereby granted, free of charge, to any person")-1, 0);
2386 			comment( &notice, &buf, "obtaining a copy of this software and associated",sizeof( "obtaining a copy of this software and associated")-1, 0);
2387 			comment( &notice, &buf, "documentation files (the \"Software\"), to deal in the",sizeof( "documentation files (the \"Software\"), to deal in the")-1, 0);
2388 			comment( &notice, &buf, "Software without restriction, including without limitation",sizeof( "Software without restriction, including without limitation")-1, 0);
2389 			comment( &notice, &buf, "the rights to use, copy, modify, merge, publish, distribute,",sizeof( "the rights to use, copy, modify, merge, publish, distribute,")-1, 0);
2390 			comment( &notice, &buf, "sublicense, and/or sell copies of the Software, and to",sizeof( "sublicense, and/or sell copies of the Software, and to")-1, 0);
2391 			comment( &notice, &buf, "permit persons to whom the Software is furnished to do so,",sizeof( "permit persons to whom the Software is furnished to do so,")-1, 0);
2392 			comment( &notice, &buf, "subject to the following conditions:",sizeof( "subject to the following conditions:")-1, 0);
2393 			comment(&notice, &buf, ((char*)0), 0, 0);
2394 			comment( &notice, &buf, "The above copyright notice and this permission notice shall",sizeof( "The above copyright notice and this permission notice shall")-1, 0);
2395 			comment( &notice, &buf, "be included in all copies or substantial portions of the",sizeof( "be included in all copies or substantial portions of the")-1, 0);
2396 			comment( &notice, &buf, "Software.",sizeof( "Software.")-1, 0);
2397 			comment(&notice, &buf, ((char*)0), 0, 0);
2398 			comment( &notice, &buf, "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY",sizeof( "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY")-1, 0);
2399 			comment( &notice, &buf, "KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE",sizeof( "KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE")-1, 0);
2400 			comment( &notice, &buf, "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR",sizeof( "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR")-1, 0);
2401 			comment( &notice, &buf, "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS",sizeof( "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS")-1, 0);
2402 			comment( &notice, &buf, "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR",sizeof( "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR")-1, 0);
2403 			comment( &notice, &buf, "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR",sizeof( "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR")-1, 0);
2404 			comment( &notice, &buf, "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE",sizeof( "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE")-1, 0);
2405 			comment( &notice, &buf, "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",sizeof( "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.")-1, 0);
2406 			comment(&notice, &buf, ((char*)0), 0, 0);
2407 		}
2408 		else
2409 		{
2410 			if (notice.type == 15)
2411 			{
2412 				if (notice.item[i = 15].data || notice.item[i = 5].data || notice.item[i = 2].data)
2413 				{
2414 					expand(&notice, &tmp, &notice.item[i]);
2415 					copy(&tmp, " - ", -1);
2416 				}
2417 				else
2418 					i = -1;
2419 				copy(&tmp, "Proprietary", -1);
2420 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
2421 				comment(&notice, &buf, ((char*)0), 0, 0);
2422 				if (notice.item[21].data)
2423 				{
2424 					copy(&tmp, "This is proprietary source code", -1);
2425 					if (i >= 0)
2426 						copy(&tmp, " licensed by", -1);
2427 					comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
2428 					if (notice.item[15].data)
2429 					{
2430 						expand(&notice, &tmp, &notice.item[15]);
2431 						copy(&tmp, " ", -1);
2432 					}
2433 					if (notice.item[5].data)
2434 					{
2435 						expand(&notice, &tmp, &notice.item[5]);
2436 						comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
2437 					}
2438 					else if (notice.item[2].data)
2439 					{
2440 						expand(&notice, &tmp, &notice.item[2]);
2441 						comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
2442 					}
2443 				}
2444 				else
2445 				{
2446 					copy(&tmp, "This is unpublished proprietary source code", -1);
2447 					if (i >= 0)
2448 						copy(&tmp, " of", -1);
2449 					comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
2450 					if (notice.item[i = 15].data || notice.item[i = 5].data)
2451 						expand(&notice, &tmp, &notice.item[i]);
2452 					if (notice.item[2].data)
2453 					{
2454 						if ((( &tmp)->nxt-( &tmp)->buf))
2455 							((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
2456 						expand(&notice, &tmp, &notice.item[2]);
2457 					}
2458 					if ((( &tmp)->nxt-( &tmp)->buf))
2459 						comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
2460 					comment( &notice, &buf, "and is not to be disclosed or used except in",sizeof( "and is not to be disclosed or used except in")-1, 1);
2461 					comment( &notice, &buf, "accordance with applicable agreements",sizeof( "accordance with applicable agreements")-1, 1);
2462 				}
2463 				comment(&notice, &buf, ((char*)0), 0, 0);
2464 			}
2465 			else if (notice.type == 13)
2466 			{
2467 				comment( &notice, &buf, "For nonexclusive individual use",sizeof( "For nonexclusive individual use")-1, 1);
2468 				comment(&notice, &buf, ((char*)0), 0, 0);
2469 			}
2470 			else if (notice.type == 14)
2471 			{
2472 				comment( &notice, &buf, "For noncommercial use",sizeof( "For noncommercial use")-1, 1);
2473 				comment(&notice, &buf, ((char*)0), 0, 0);
2474 			}
2475 			if (notice.type >= 15 && !notice.item[21].data)
2476 			{
2477 				comment( &notice, &buf, "Unpublished & Not for Publication",sizeof( "Unpublished & Not for Publication")-1, 0);
2478 				comment(&notice, &buf, ((char*)0), 0, 0);
2479 			}
2480 			if (notice.item[21].data)
2481 			{
2482 				copy(&tmp, "This software is licensed", -1);
2483 				if (notice.item[5].data || notice.item[2].data)
2484 				{
2485 					copy(&tmp, " by", -1);
2486 					if ((notice.item[15].size + (notice.item[5].data ? (notice.item[5].size + notice.item[8].size) : notice.item[2].size)) >= ((70-32) - 6))
2487 						comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2488 					else
2489 						((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
2490 					if (notice.item[15].data)
2491 					{
2492 						expand(&notice, &tmp, &notice.item[15]);
2493 						copy(&tmp, " ", -1);
2494 					}
2495 					if (notice.item[5].data)
2496 					{
2497 						expand(&notice, &tmp, &notice.item[5]);
2498 						if (notice.item[8].data)
2499 						{
2500 							copy(&tmp, " ", -1);
2501 							expand(&notice, &tmp, &notice.item[8]);
2502 						}
2503 					}
2504 					else if (notice.item[2].data)
2505 						expand(&notice, &tmp, &notice.item[2]);
2506 				}
2507 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2508 				comment( &notice, &buf, "under the terms and conditions of the license in",sizeof( "under the terms and conditions of the license in")-1, 0);
2509 				expand(&notice, &tmp, &notice.item[21]);
2510 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2511 				if (notice.item[22].data)
2512 				{
2513 					copy(&tmp, "(with an md5 checksum of ", -1);
2514 					expand(&notice, &tmp, &notice.item[22]);
2515 					copy(&tmp, ")", -1);
2516 					comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2517 				}
2518 				comment(&notice, &buf, ((char*)0), 0, 0);
2519 			}
2520 			else if (notice.type == 15)
2521 			{
2522 				comment( &notice, &buf, "The copyright notice above does not evidence any",sizeof( "The copyright notice above does not evidence any")-1, 0);
2523 				comment( &notice, &buf, "actual or intended publication of such source code",sizeof( "actual or intended publication of such source code")-1, 0);
2524 				comment(&notice, &buf, ((char*)0), 0, 0);
2525 			}
2526 		}
2527 		if (v = notice.item[12].data)
2528 		{
2529 			x = v + notice.item[12].size;
2530 			if (*v == '\n')
2531 				v++;
2532 			item.quote = notice.item[12].quote;
2533 			do
2534 			{
2535 				for (item.data = v; v < x && *v != '\n'; v++);
2536 				if ((item.size = v - item.data) && *item.data == '\t')
2537 				{
2538 					item.data++;
2539 					item.size--;
2540 					h = 0;
2541 				}
2542 				else
2543 					h = -1;
2544 				expand(&notice, &tmp, &item);
2545 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), h);
2546 			} while (v++ < x);
2547 			if (item.size)
2548 				comment(&notice, &buf, ((char*)0), 0, 0);
2549 		}
2550 		if (notice.item[13].data)
2551 		{
2552 			expand(&notice, &tmp, &notice.item[13]);
2553 			comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2554 			if (notice.item[i = 15].data || notice.item[i = 5].data)
2555 				expand(&notice, &tmp, &notice.item[i]);
2556 			if (notice.item[2].data)
2557 			{
2558 				if ((( &tmp)->nxt-( &tmp)->buf))
2559 					((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
2560 				expand(&notice, &tmp, &notice.item[2]);
2561 			}
2562 			if ((( &tmp)->nxt-( &tmp)->buf))
2563 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2564 			if (notice.item[10].data)
2565 			{
2566 				expand(&notice, &tmp, &notice.item[10]);
2567 				comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2568 			}
2569 			comment(&notice, &buf, ((char*)0), 0, 0);
2570 		}
2571 	}
2572 	if (v = notice.item[0].data)
2573 	{
2574 		x = v + notice.item[0].size;
2575 		q = (x - v) == 1 && (*v == '*' || *v == '-');
2576 		k = q && notice.type != 4 ? -1 : 0;
2577 		for (;;)
2578 		{
2579 			if (!q)
2580 			{
2581 				while (v < x && (*v == ' ' || *v == '\t' || *v == '\r' || *v == '\n' || *v == ',' || *v == '+'))
2582 					v++;
2583 				if (v >= x)
2584 					break;
2585 				item.data = v;
2586 				while (v < x && *v != ',' && *v != '+' && *v++ != '>');
2587 				item.size = v - item.data;
2588 				item.quote = notice.item[0].quote;
2589 			}
2590 			h = 0;
2591 			for (i = 0; i < notice.ids; i++)
2592 				if (q || item.size == notice.id[i].name.size && !sstrncmp( item.data, notice.id[i].name.data, item.size))
2593 				{
2594 					h = 1;
2595 					if (notice.type == 4)
2596 					{
2597 						copy(&buf, "[-author?", -1);
2598 						expand(&notice, &buf, &notice.id[i].value);
2599 						((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
2600 					}
2601 					else
2602 					{
2603 						if (k < 0)
2604 						{
2605 							comment( &notice, &buf, "CONTRIBUTORS",sizeof( "CONTRIBUTORS")-1, 0);
2606 							comment(&notice, &buf, ((char*)0), 0, 0);
2607 						}
2608 						k = 1;
2609 						expand(&notice, &tmp, &notice.id[i].value);
2610 						comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2611 					}
2612 					if (!q)
2613 						break;
2614 				}
2615 			if (q)
2616 				break;
2617 			if (!h)
2618 			{
2619 				if (notice.type == 4)
2620 				{
2621 					copy(&buf, "[-author?", -1);
2622 					expand(&notice, &buf, &item);
2623 					((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
2624 				}
2625 				else
2626 				{
2627 					if (k < 0)
2628 					{
2629 						comment( &notice, &buf, "CONTRIBUTORS",sizeof( "CONTRIBUTORS")-1, 0);
2630 						comment(&notice, &buf, ((char*)0), 0, 0);
2631 					}
2632 					k = 1;
2633 					expand(&notice, &tmp, &item);
2634 					comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
2635 				}
2636 			}
2637 		}
2638 		if (k > 0)
2639 			comment(&notice, &buf, ((char*)0), 0, 0);
2640 	}
2641 	if (notice.type == 4)
2642 	{
2643 		copy(&buf, "[-copyright?", -1);
2644 		copyright(&notice, &buf);
2645 		((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
2646 		if (notice.item[21].data)
2647 		{
2648 			copy(&buf, "[-license?", -1);
2649 			expand(&notice, &buf, &notice.item[21]);
2650 			((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
2651 		}
2652 		((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1)));
2653 	}
2654 	else
2655 		comment(&notice, &buf, ((char*)0), -1, 0);
2656 	return (*(( &buf)->nxt>=( &buf)->end?(( &buf)->nxt=( &buf)->end-1):( &buf)->nxt)=0,( &buf)->nxt-( &buf)->buf);
2657 }
2658 #line 336 "../../lib/libpp/ppproto.c"
2659 
2660 #line 348
2661 static char*
__OTORP__(register Proto_t * proto;register char * p;register long n;)2662 linesync __PARAM__((register Proto_t* proto, register char* p, register long n), (proto, p, n)) __OTORP__(register Proto_t* proto; register char* p; register long n;){
2663 
2664 	if (proto->flags & (1L<<13))
2665 
2666 	{
2667 
2668 		p = strcopy(p, "\n#line ");
2669 
2670 
2671 
2672 		p = number(p, n);
2673 		*p++ = '\n';
2674 	}
2675 	return p;
2676 }
2677 
2678 
2679 
2680 
2681 
2682 
2683 static char*
__OTORP__(Proto_t * proto;char * op;int flags;)2684 init __PARAM__((Proto_t* proto, char* op, int flags), (proto, op, flags)) __OTORP__(Proto_t* proto; char* op; int flags;){
2685 	register char*	s;
2686 
2687 	if (flags & (1L<<10))
2688 	{
2689 		op = strcopy(op, "\
2690 \n\
2691 #if !defined(__PROTO__)\n\
2692 #  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)\n\
2693 #    if defined(__cplusplus)\n\
2694 #      define __LINKAGE__	\"C\"\n\
2695 #    else\n\
2696 #      define __LINKAGE__\n\
2697 #    endif\n\
2698 #    define __STDARG__\n\
2699 #    define __PROTO__(x)	x\n\
2700 #    define __OTORP__(x)\n\
2701 #    define __PARAM__(n,o)	n\n\
2702 #    if !defined(__STDC__) && !defined(__cplusplus)\n\
2703 #      if !defined(c_plusplus)\n\
2704 #      	define const\n\
2705 #      endif\n\
2706 #      define signed\n\
2707 #      define void		int\n\
2708 #      define volatile\n\
2709 #      define __V_		char\n\
2710 #    else\n\
2711 #      define __V_		void\n\
2712 #    endif\n\
2713 #  else\n\
2714 #    define __PROTO__(x)	()\n\
2715 #    define __OTORP__(x)	x\n\
2716 #    define __PARAM__(n,o)	o\n\
2717 #    define __LINKAGE__\n\
2718 #    define __V_		char\n\
2719 #    define const\n\
2720 #    define signed\n\
2721 #    define void		int\n\
2722 #    define volatile\n\
2723 #  endif\n\
2724 #  define __MANGLE__	__LINKAGE__\n\
2725 #  if defined(__cplusplus) || defined(c_plusplus)\n\
2726 #    define __VARARG__	...\n\
2727 #  else\n\
2728 #    define __VARARG__\n\
2729 #  endif\n\
2730 #  if defined(__STDARG__)\n\
2731 #    define __VA_START__(p,a)	va_start(p,a)\n\
2732 #  else\n\
2733 #    define __VA_START__(p,a)	va_start(p)\n\
2734 #  endif\n\
2735 #  if !defined(__INLINE__)\n\
2736 #    if defined(__cplusplus)\n\
2737 #      define __INLINE__	extern __MANGLE__ inline\n\
2738 #    else\n\
2739 #      if defined(_WIN32) && !defined(__GNUC__)\n\
2740 #      	define __INLINE__	__inline\n\
2741 #      endif\n\
2742 #    endif\n\
2743 #  endif\n\
2744 #endif\n\
2745 #if !defined(__LINKAGE__)\n\
2746 #define __LINKAGE__		/* 2004-08-11 transition */\n\
2747 #endif\n\
2748 ");
2749 	}
2750 	else
2751 		op = strcopy(op, "\
2752 \n\
2753 #if !defined(__PROTO__)\n\
2754 #include <prototyped.h>\n\
2755 #endif\n\
2756 #if !defined(__LINKAGE__)\n\
2757 #define __LINKAGE__		/* 2004-08-11 transition */\n\
2758 #endif\n\
2759 ");
2760 	if (proto->package)
2761 	{
2762 		s = "\
2763 #ifndef	__MANGLE_%_DATA__\n\
2764 #  ifdef _BLD_%\n\
2765 #    ifdef __EXPORT__\n\
2766 #      define	__MANGLE_%_DATA__	__MANGLE__ __EXPORT__\n\
2767 #    else\n\
2768 #      define	__MANGLE_%_DATA__	__MANGLE__\n\
2769 #    endif\n\
2770 #    define	__MANGLE_%_FUNC__	__MANGLE__\n\
2771 #  else\n\
2772 #    ifdef __IMPORT__\n\
2773 #      define	__MANGLE_%_DATA__	__MANGLE__ __IMPORT__\n\
2774 #    else\n\
2775 #      define	__MANGLE_%_DATA__	__MANGLE__\n\
2776 #    endif\n\
2777 #    define	__MANGLE_%_FUNC__	__MANGLE__\n\
2778 #  endif\n\
2779 #endif\n\
2780 ";
2781 		for (;;)
2782 		{
2783 			switch (*op++ = *s++)
2784 			{
2785 			case 0:
2786 				op--;
2787 				break;
2788 			case '%':
2789 				op = strcopy(op - 1, proto->package);
2790 				continue;
2791 			default:
2792 				continue;
2793 			}
2794 			break;
2795 		}
2796 	}
2797 	return op;
2798 }
2799 
2800 
2801 #line 422
2802 static char*
__OTORP__(register char * s;)2803 nns __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
2804 	while (*s == ' ' || *s == '\t' || *s == '\n')
2805 		s++;
2806 	return s;
2807 }
2808 
2809 
2810 #line 439
2811 static int
__OTORP__(register char * s;int dir;)2812 directive __PARAM__((register char* s, int dir), (s, dir)) __OTORP__(register char* s; int dir;){
2813 	switch (*(s = nns(s)))
2814 	{
2815 	case 'e':
2816 	case 'i':
2817 		dir <<= 2;
2818 		switch (*++s)
2819 		{
2820 		case 'f':
2821 			dir |= 01;
2822 			break;
2823 		case 'l':
2824 			dir |= 02;
2825 			break;
2826 		case 'n':
2827 			dir |= 03;
2828 			break;
2829 		}
2830 		break;
2831 	}
2832 	return dir;
2833 }
2834 
2835 
2836 
2837 
2838 
2839 
2840 
2841 static int
__OTORP__(register Proto_t * proto;register long flags;)2842 lex __PARAM__((register Proto_t* proto, register long flags), (proto, flags)) __OTORP__(register Proto_t* proto; register long flags;){
2843 	register char*		ip;
2844 	register char*		op;
2845 	register int		c;
2846 	register int		state;
2847 	register short*		rp;
2848 	char*			m;
2849 	char*			e;
2850 	char*			t;
2851 	char*			bp;
2852 	char*			v;
2853 	char*			im;
2854 	char*			ko;
2855 	char*			aom;
2856 	int			n;
2857 	int			line;
2858 	int			quot;
2859 	int			brack;
2860 	int			sub;
2861 	int			x;
2862 	int			vc;
2863 
2864 	char*			ie = 0;
2865 	char*			om = 0;
2866 	char*			aim = 0;
2867 	char*			aie = 0;
2868 	char*			func = 0;
2869 	int			call = 0;
2870 	int			dir = 0;
2871 	int			group = 0;
2872 	int			last = 0;
2873 	int			paren = 0;
2874 
2875 	char*			qe = 0;
2876 	int			qn = 0;
2877 	int			args = 0;
2878 
2879 
2880 	do{(ip=proto->ip);(op=proto->op);call=proto->call;}while(0);
2881 
2882 	if (flags & (1L<<5)) (ko=op);
2883 
2884  fsm_start:
2885 	proto->tp = ip;
2886 	state = 0;
2887 	bp = ip;
2888 	do
2889 	{
2890 		rp = _pp_fsmtab[state];
2891  fsm_get:
2892 		while (!(state = rp[c = (*(unsigned char*)ip++)]));
2893  fsm_next:
2894 		;
2895 	} while (state > 0);
2896 	if ((n = ip - bp - 1) > 0)
2897 	{
2898 		ip = bp;
2899 		do switch( n) { default : memcopy( op, ip, n); op += n; ip += n; break; case 7 : * op++ = * ip++; case 6 : * op++ = * ip++; case 5 : * op++ = * ip++; case 4 : * op++ = * ip++; case 3 : * op++ = * ip++; case 2 : * op++ = * ip++; case 1 : * op++ = * ip++; case 0 : break; } while (0);
2900 		ip++;
2901 	}
2902 	state = ~state;
2903  fsm_terminal:
2904 	switch ((( state)&((1<<(7+1))-1)))
2905 	{
2906 	case ((0+28)+11):
2907 		if (op > proto->ob && *(op - 1) == '=' && (op == proto->ob + 1 || *(op - 2) != '=')) switch (c)
2908 		{
2909 		case '+':
2910 		case '-':
2911 		case '*':
2912 		case '&':
2913 			(*op++=( ' '));
2914 			break;
2915 		}
2916 		(*op++=( c));
2917 		break;
2918 
2919 	case ((0+28)+0):
2920 		(ip--);
2921 		c = (*(op-1));
2922 		break;
2923 
2924 	case ((0+28)+1):
2925 		switch (c)
2926 		{
2927 		case '\n':
2928 			if ((( rp)>=_pp_fsmtab[(0+16)]&&( rp)<=_pp_fsmtab[(0+18)])) goto fsm_newline;
2929 			(*op++=( c));
2930 			proto->line++;
2931 			rp = _pp_fsmtab[(0+13)];
2932 			break;
2933 		case '/':
2934 
2935 			if ((flags & ((1L<<5)|(1L<<15))) == (1L<<5)) (op=ko);
2936 			else
2937 
2938 			(*op++=( c));
2939 			if ((( rp)>=_pp_fsmtab[(0+16)]&&( rp)<=_pp_fsmtab[(0+18)]))
2940 			{
2941 				rp = _pp_fsmtab[(0+16)];
2942 				break;
2943 			}
2944 			goto fsm_start;
2945 		case (255+1):
2946 			break;
2947 		default:
2948 
2949 			if ((flags & ((1L<<5)|(1L<<15))) == (1L<<5)) (op=ko);
2950 			else
2951 
2952 			(*op++=( c));
2953 			rp = _pp_fsmtab[(( rp)>=_pp_fsmtab[(0+16)]&&( rp)<=_pp_fsmtab[(0+18)]) ? (0+16) : (0+14)];
2954 			break;
2955 		}
2956 		bp = ip;
2957 		goto fsm_get;
2958 
2959 	case ((0+28)+2):
2960 		if (c)
2961 		{
2962 			if (state = _pp_fsmtab[(0+28)][((( rp)-_pp_fsmtab[0])/(255+1))+1])
2963 				goto fsm_terminal;
2964 			do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
2965 			return 0;
2966 		}
2967 		(ip--);
2968  fsm_eob:
2969 		if ((flags & ((1L<<1)|((1L<<16))|(1L<<21))) == ((1L<<16)) && (proto->flags & (1L<<16)))
2970 		{
2971 
2972 			if (!(flags & (1L<<5)))
2973 
2974 			flags |= (1L<<24);
2975 			c = ip - proto->ib;
2976 			if (!(flags & (1L<<15)))
2977 				im = proto->tp;
2978 			if (ip > proto->ib)
2979 			{
2980 				n = ip - im;
2981 				if (ip - n < proto->ib)
2982 					proto->flags |= (1L<<4);
2983 				memcopy(proto->ib - n, ip - n, n);
2984 				ip = proto->ib;
2985 			}
2986 			proto->tp -= c;
2987 			if (flags & (1L<<15))
2988 			{
2989 				im -= c;
2990 				ie -= c;
2991 			}
2992 			if (aim)
2993 				aim -= c;
2994 			if (aie)
2995 				aie -= c;
2996 			if ((n = read(proto->fd, ip, proto->iz)) > 0)
2997 			{
2998 				if ((proto->options & (1L<<0)) && n < proto->iz)
2999 				{
3000 					proto->flags &= ~(1L<<16);
3001 					close(proto->fd);
3002 				}
3003 				*(ip + n) = 0;
3004 				if (state & (1<<7))
3005 					goto fsm_splice;
3006 				bp = ip;
3007 				goto fsm_get;
3008 			}
3009 			*ip = 0;
3010 			proto->flags &= ~(1L<<16);
3011 			close(proto->fd);
3012 		}
3013 		if (state & (1<<7))
3014 			goto fsm_splice;
3015 
3016 		if (!(flags & (1L<<21)) && (state = rp[c = (255+1)]))
3017 		{
3018 			bp = ip;
3019 			goto fsm_next;
3020 		}
3021 		do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
3022 		return 0;
3023 
3024 	case ((0+28)+3):
3025 		quot = c;
3026 
3027 		if (c == '"' && qe)
3028 		{
3029 			for (n = 0, t = qe + 1; t < op && (*t == ' ' || *t == '\t' || *t == '\n' && ++n || *t >= 'A' && *t <= 'Z' || *t == '_'); t++);
3030 			if (t == op)
3031 			{
3032 				op = qe;
3033 				qe = 0;
3034 				qn = n;
3035 			}
3036 			else (*op++=( c));
3037 		}
3038 		else
3039 
3040 		(*op++=( c));
3041 		rp = _pp_fsmtab[(0+21)];
3042 		bp = ip;
3043 		goto fsm_get;
3044 
3045 	case ((0+28)+4):
3046 		if (c == quot)
3047 		{
3048 
3049 			if (!(flags & (1L<<3)))
3050 				qe = (c == '"') ? op : (char*)0;
3051 
3052 			(*op++=( c));
3053 
3054 			while (qn > 0)
3055 			{
3056 				qn--;
3057 				(*op++=( '\n'));
3058 			}
3059 
3060 		}
3061 		else if (c != '\n' && c != (255+1))
3062 		{
3063 			(*op++=( c));
3064 			bp = ip;
3065 			goto fsm_get;
3066 		}
3067 		else
3068 		{
3069 
3070 			while (qn > 0)
3071 			{
3072 				qn--;
3073 				(*op++=( '\n'));
3074 			}
3075 
3076 			(ip--);
3077 		}
3078 		c = (0401+1);
3079 		break;
3080 
3081 	case ((0+28)+5):
3082 
3083 		if (flags & (1L<<0)) (*op++=( c));
3084 		else
3085 
3086 		switch (c)
3087 		{
3088 		case 'a':
3089 			n = (('A'==0301)?0057:0007);
3090 			goto fsm_oct;
3091 		case 'E':
3092 			n = (('A'==0301)?0047:0033);
3093 			goto fsm_oct;
3094 		case 'v':
3095 			n = 0013;
3096 			goto fsm_oct;
3097 		case 'x':
3098 			do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
3099 			lex(proto, (flags & ((1L<<16))) | (1L<<21));
3100 			for (n = x = 0; (c = (*(unsigned char*)ip++)), x < 3; x++) switch (c)
3101 			{
3102 			case '0': case '1': case '2': case '3':
3103 			case '4': case '5': case '6': case '7':
3104 			case '8': case '9':
3105 				n = (n << 4) + c - '0';
3106 				break;
3107 			case 'a': case 'b': case 'c': case 'd':
3108 			case 'e': case 'f':
3109 				n = (n << 4) + c - 'a' + 10;
3110 				break;
3111 			case 'A': case 'B': case 'C': case 'D':
3112 			case 'E': case 'F':
3113 				n = (n << 4) + c - 'A' + 10;
3114 				break;
3115 			default:
3116 				goto fsm_hex;
3117 			}
3118  fsm_hex:
3119 			(ip--);
3120  fsm_oct:
3121 			(*op++=( ((n >> 6) & 07) + '0'));
3122 			(*op++=( ((n >> 3) & 07) + '0'));
3123 			(*op++=( (n & 07) + '0'));
3124 			break;
3125 		default:
3126 			(*op++=( c));
3127 			break;
3128 		}
3129 		rp = _pp_fsmtab[(0+21)];
3130 		bp = ip;
3131 		goto fsm_get;
3132 
3133 	case ((0+28)+6):
3134 		(ip--);
3135 
3136 		if ((flags & (1L<<5)) && *proto->tp == 's' && !sstrncmp( proto->tp, "static", 6))
3137 		{
3138 			c = ((0500+4)+9);
3139 			break;
3140 		}
3141 
3142 		if (*proto->tp == '_' && !sstrncmp( proto->tp, "__STDPP__directive", 6)) c = '#';
3143 		else c = (0401+0);
3144 
3145 		break;
3146 
3147 	case ((0+28)+7):
3148  fsm_newline:
3149 		proto->line++;
3150 
3151 		if (flags & (1L<<5))
3152 		{
3153 			if (op != proto->ob && (*(op-1)) != ' ' && (*(op-1)) != '\n')
3154 				(*op++=( ' '));
3155 		}
3156 		else
3157 
3158 		(*op++=( c));
3159 		if (flags & (1L<<3))
3160 		{
3161 
3162 			if (flags & (1L<<0))
3163 			{
3164 				if (flags & (1L<<5)) (op=ko);
3165 				if (flags & (1L<<12))
3166 				{
3167 					*(ip - 1) = 0;
3168 					op = strcopy(om, "/* ");
3169 					op = strcopy(op, im);
3170 					op = strcopy(op, " */\n");
3171 				}
3172 				flags &= ~((1L<<2)|(1L<<3)|(1L<<7)|(1L<<8)|(1L<<12)|(1L<<15)|(1L<<22)|(1L<<26));
3173 			}
3174 			else
3175 
3176 			{
3177 				if ((flags & ((1L<<2)|(1L<<22))) == ((1L<<2)|(1L<<22)))
3178 				{
3179 					*(ip - 1) = 0;
3180 					op = strcopy(om, "#if defined(__STDC__) || defined(__STDPP__)\n");
3181 					op = strcopy(op, im);
3182 					op = strcopy(op, "\n#else\n");
3183 					bp = ip;
3184 					ip = im;
3185 					*op++ = *ip++;
3186 					while (*op = *ip++)
3187 						if (*op++ == '#' && *ip != '(')
3188 						{
3189 							op--;
3190 							while (*--op == ' ' || *op == '\t');
3191 							if (*ip == '#')
3192 							{
3193 								op = strcopy(op + 1, "/**/");
3194 								while (*++ip == ' ' || *ip == '\t');
3195 							}
3196 							else
3197 							{
3198 								if (*op != '"') *++op = '"';
3199 								op++;
3200 								while (*ip == ' ' || *ip == '\t') ip++;
3201 								while ((c = *ip) >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c >= '0' && c <= '9' || c == '_') *op++ = *ip++;
3202 								while (*ip == ' ' || *ip == '\t') ip++;
3203 								if (*ip == '"') ip++;
3204 								else *op++ = '"';
3205 							}
3206 						}
3207 					ip = bp;
3208 					op = strcopy(op, "\n#endif\n");
3209 					op = linesync(proto, op, proto->line);
3210 				}
3211 				flags &= ~((1L<<2)|(1L<<3)|(1L<<7)|(1L<<8)|(1L<<15)|(1L<<17)|(1L<<22)|(1L<<23)|(1L<<25)|(1L<<26));
3212 			}
3213 			call = 0;
3214 			group = 0;
3215 			paren = 0;
3216 			last = '\n';
3217 		}
3218 		if (paren == 0 && (flags & ((1L<<15)|(1L<<21)|(1L<<23)|(1L<<24))) == (1L<<24))
3219 		{
3220 
3221 			if (flags & (1L<<5)) (op=ko);
3222 
3223 			do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
3224 			return 0;
3225 		}
3226 		goto fsm_start;
3227 
3228 	case ((0+28)+8):
3229 		(*op++=( c));
3230 		rp = _pp_fsmtab[((( state)>>(7+1))&((1<<7)-1))];
3231 		bp = ip;
3232 		goto fsm_get;
3233 
3234 	case ((0+28)+13):
3235 		(*op++=( c));
3236 		c = (((( state)>>(7+1))&((1<<7)-1))+0401);
3237 		break;
3238 
3239 	case ((0+28)+14):
3240 		(ip--);
3241 		c = (((( state)>>(7+1))&((1<<7)-1))+0401);
3242 		break;
3243 
3244 	case (((0+28)+12)):
3245 		(ip--);
3246 		c = (0401+0);
3247 		if (!(flags & (1L<<1))) switch (((((long)( *proto->tp))<<16)|(((long)( *(ip - 1)))<<8)|((long)( ip - proto->tp))))
3248 		{
3249 		case ((((long)( 'N'))<<16)|(((long)( 'N'))<<8)|((long)( 3))):
3250 			if (proto->tp[1] == 'o')
3251 				c = ((0500+4)+6);
3252 			break;
3253 		case ((((long)( 'd'))<<16)|(((long)( 'o'))<<8)|((long)( 2))):
3254 			c = ((0500+4)+6);
3255 			break;
3256 		case ((((long)( 'e'))<<16)|(((long)( 'e'))<<8)|((long)( 4))):
3257 			if (!(flags & (1L<<21)) && (flags & ((1L<<3)|(1L<<25))) != (1L<<3) && !sstrncmp( proto->tp, "else", 4))
3258 			{
3259 				c = ((0500+4)+8);
3260 				goto fsm_id;
3261 			}
3262 			break;
3263 		case ((((long)( 'e'))<<16)|(((long)( 'n'))<<8)|((long)( 6))):
3264 			if (!sstrncmp( proto->tp, "extern", 6))
3265 				c = ((0500+4)+9);
3266 			break;
3267 		case ((((long)( 'f'))<<16)|(((long)( 'r'))<<8)|((long)( 3))):
3268 			if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "for", 3))
3269 			{
3270 				c = ((0500+4)+11);
3271 				goto fsm_id;
3272 			}
3273 			break;
3274 		case ((((long)( 'i'))<<16)|(((long)( 'f'))<<8)|((long)( 2))):
3275 			c = ((0500+4)+13);
3276 			break;
3277 		case ((((long)( 'i'))<<16)|(((long)( 'e'))<<8)|((long)( 6))):
3278 			if (!sstrncmp( proto->tp, "inline", 6) && !(flags & ((1L<<15)|(1L<<23)|(1L<<25)|(1L<<26))) && proto->brace == 0 && paren == 0 && group == 0 && (last == ';' || last == '}' || last == '\n' || last == 0))
3279 			{
3280 				flags |= (1L<<23);
3281 				do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
3282 				line = proto->line;
3283 				op = strcopy(op - 6, "__INLINE__");
3284 				do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
3285 			}
3286 			break;
3287 		case ((((long)( 'r'))<<16)|(((long)( 'n'))<<8)|((long)( 6))):
3288 			if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "return", 6))
3289 			{
3290 				c = ((0500+4)+17);
3291 				goto fsm_id;
3292 			}
3293 			break;
3294 		case ((((long)( 's'))<<16)|(((long)( 'c'))<<8)|((long)( 6))):
3295 			if ((proto->options & (1L<<6)) && !sstrncmp( proto->tp, "static", 6))
3296 			{
3297 				proto->ox = op - 6;
3298 				flags |= (1L<<6);
3299 			}
3300 			break;
3301 		case ((((long)( 't'))<<16)|(((long)( 'f'))<<8)|((long)( 7))):
3302 			if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "typedef", 7))
3303 			{
3304 				flags |= (1L<<26);
3305 				c = ((0500+4)+9);
3306 			}
3307 			break;
3308 		case ((((long)( 'v'))<<16)|(((long)( 't'))<<8)|((long)( 8))):
3309 			if (*ip == '(' && !sstrncmp( proto->tp, "va_start", 8)) c = (0500+1);
3310 			break;
3311 		case ((((long)( 'v'))<<16)|(((long)( 'd'))<<8)|((long)( 4))):
3312 			if (!sstrncmp( proto->tp, "void", 4))
3313 			{
3314 				if (flags & ((1L<<0)|(1L<<19)|(1L<<10)|(1L<<11))) c = ((0500+4)+30);
3315 				else
3316 				{
3317 					do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
3318 					line = proto->line;
3319 					if (lex(proto, (flags & ((1L<<16))) | (1L<<21)) == '*')
3320 					{
3321 						memcopy(op - 4, "__V_", 4);
3322 						memcopy(ip - 4, "__V_", 4);
3323 					}
3324 					else c = ((0500+4)+30);
3325 					proto->line = line;
3326 					do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<