syn.c (7a8124d8) | syn.c (6df3ee40) |
---|---|
1/* $OpenBSD: syn.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */ | 1/* $OpenBSD: syn.c,v 1.23 2005/12/11 20:31:21 otto Exp $ */ |
2 3/* 4 * shell parser (C version) 5 */ 6 7#include "sh.h" 8#include "c_test.h" 9 --- 646 unchanged lines hidden (view full) --- 656}; 657 658void 659initkeywords(void) 660{ 661 struct tokeninfo const *tt; 662 struct tbl *p; 663 | 2 3/* 4 * shell parser (C version) 5 */ 6 7#include "sh.h" 8#include "c_test.h" 9 --- 646 unchanged lines hidden (view full) --- 656}; 657 658void 659initkeywords(void) 660{ 661 struct tokeninfo const *tt; 662 struct tbl *p; 663 |
664 tinit(&keywords, APERM, 32); /* must be 2^n (currently 20 keywords) */ | 664 ktinit(&keywords, APERM, 32); /* must be 2^n (currently 20 keywords) */ |
665 for (tt = tokentab; tt->name; tt++) { 666 if (tt->reserved) { | 665 for (tt = tokentab; tt->name; tt++) { 666 if (tt->reserved) { |
667 p = tenter(&keywords, tt->name, hash(tt->name)); | 667 p = ktenter(&keywords, tt->name, hash(tt->name)); |
668 p->flag |= DEFINED|ISSET; 669 p->type = CKEYWD; 670 p->val.i = tt->val; 671 } 672 } 673} 674 675static void --- 224 unchanged lines hidden --- | 668 p->flag |= DEFINED|ISSET; 669 p->type = CKEYWD; 670 p->val.i = tt->val; 671 } 672 } 673} 674 675static void --- 224 unchanged lines hidden --- |