? .hg ? .hgignore ? obj.save Index: defs.h =================================================================== RCS file: /cvsroot/src/usr.bin/config/defs.h,v retrieving revision 1.64 diff -u -p -r1.64 defs.h --- defs.h 17 Nov 2014 00:53:15 -0000 1.64 +++ defs.h 23 May 2015 21:07:41 -0000 @@ -568,6 +568,7 @@ void *ht_lookup2(struct hashtab *, const void *ht_lookup(struct hashtab *, const char *); void initintern(void); const char *intern(const char *); +const char *intern2(const char *, const char *); typedef int (*ht_callback2)(const char *, const char *, void *, void *); typedef int (*ht_callback)(const char *, void *, void *); int ht_enumerate2(struct hashtab *, ht_callback2, void *); Index: gram.y =================================================================== RCS file: /cvsroot/src/usr.bin/config/gram.y,v retrieving revision 1.46 diff -u -p -r1.46 gram.y --- gram.y 4 Nov 2014 23:01:23 -0000 1.46 +++ gram.y 23 May 2015 21:07:42 -0000 @@ -184,7 +184,7 @@ static struct loclist *namelocvals(const %token SELECT SINGLE SOURCE %token TYPE %token VECTOR VERSION -%token WITH +%token WEDGE WITH %token NUMBER %token PATHNAME QSTRING WORD EMPTYSTRING %token ENDDEFS @@ -904,6 +904,8 @@ dev_spec: | WORD { $$ = new_si($1, (long long)NODEV); } | major_minor { $$ = new_si(NULL, $1); } + | WEDGE stringvalue { $$ = new_si(intern2("wedge:", $2), + (long long)NODEV); } ; /* major and minor device number */ Index: hash.c =================================================================== RCS file: /cvsroot/src/usr.bin/config/hash.c,v retrieving revision 1.11 diff -u -p -r1.11 hash.c --- hash.c 29 Oct 2014 17:14:50 -0000 1.11 +++ hash.c 23 May 2015 21:07:42 -0000 @@ -227,6 +227,26 @@ intern(const char *s) return (p); } +/* + * Concat and intern. This is not fast, but whatever. + */ +const char * +intern2(const char *a, const char *b) +{ + size_t al, bl; + char *c; + const char *ret; + + al = strlen(a); + bl = strlen(b); + c = emalloc(al+bl+1); + strcpy(c, a); + strcat(c, b); + ret = intern(c); + free(c); + return ret; +} + struct hashtab * ht_new(void) { Index: scan.l =================================================================== RCS file: /cvsroot/src/usr.bin/config/scan.l,v retrieving revision 1.22 diff -u -p -r1.22 scan.l --- scan.l 7 Nov 2014 17:50:14 -0000 1.22 +++ scan.l 23 May 2015 21:07:42 -0000 @@ -173,6 +173,7 @@ source return SOURCE; type return TYPE; vector return VECTOR; version return VERSION; +wedge return WEDGE; with return WITH; \+= return PLUSEQ;