6 extern int stgetopt(int, char *const *, const char *);
14 ER: Tabelle extra gross gemacht, da es anscheinend ein Problem mit der
15 der Verkettung gibt, irgendwann irgendwo wird mal ein nlist->next
16 ueberschrieben, was in eineme SIGSEGV resultiert.
17 Den GDB mit watchpoint hab ich aber nach 2 Tagen abgebrochen..
18 so loeppt's jedenfalls erstmal..
22 static Nlist
*nlist
[NLSIZE
];
33 {"ifdef", KIFDEF
, ISKW
},
34 {"ifndef", KIFNDEF
, ISKW
},
35 {"elif", KELIF
, ISKW
},
36 {"else", KELSE
, ISKW
},
37 {"endif", KENDIF
, ISKW
},
38 {"include", KINCLUDE
, ISKW
},
39 {"include_next", KINCLUDENEXT
, ISKW
},
40 {"import", KIMPORT
, ISKW
},
41 {"define", KDEFINE
, ISKW
},
42 {"undef", KUNDEF
, ISKW
},
43 {"line", KLINE
, ISKW
},
44 {"error", KERROR
, ISKW
},
45 {"pragma", KPRAGMA
, ISKW
},
46 {"ident", KIDENT
, ISKW
},
47 {"eval", KEVAL
, ISKW
},
48 {"defined", KDEFINED
, ISDEFINED
+ ISUNCHANGE
},
49 {"machine", KMACHINE
, ISDEFINED
+ ISUNCHANGE
},
50 {"__LINE__", KLINENO
, ISMAC
+ ISUNCHANGE
},
51 {"__FILE__", KFILE
, ISMAC
+ ISUNCHANGE
},
52 {"__DATE__", KDATE
, ISMAC
+ ISUNCHANGE
},
53 {"__TIME__", KTIME
, ISMAC
+ ISUNCHANGE
},
54 {"__STDC__", KSTDC
, ISUNCHANGE
},
58 unsigned long namebit
[077 + 1];
66 static Token deftoken
[1] = {{NAME
, 0, 0, 7, (uchar
*) "defined", 0}};
67 static Tokenrow deftr
= {deftoken
, deftoken
, deftoken
+ 1, 1};
69 for (kp
= kwtab
; kp
->kw
; kp
++)
71 t
.t
= (uchar
*) kp
->kw
;
72 t
.len
= strlen(kp
->kw
);
74 np
->flag
= (char) kp
->flag
;
75 np
->val
= (char) kp
->val
;
76 if (np
->val
== KDEFINED
)
87 lookup(Token
* tp
, int install
)
94 for (cp
= tp
->t
, cpe
= cp
+ tp
->len
; cp
< cpe
;)
100 if (*tp
->t
== *np
->name
&& tp
->len
== (unsigned int)np
->len
101 && strncmp((char *)tp
->t
, (char *)np
->name
, tp
->len
) == 0)
113 np
->name
= newstring(tp
->t
, tp
->len
, 0);
116 quickset(tp
->t
[0], tp
->len
> 1 ? tp
->t
[1] : 0);