src/cmd/m4/main.c
/*
 * initkwds - initialise m4 keywords as fast as possible. 
 * This very similar to install, but without certain overheads,
 * such as calling lookup. Malloc is not used for storing the 
 * keyword strings, since we simply use the static  pointers
 * within keywrds block.
 */
initialise m4 keywords as fast as possible.
This very similar to install, but without certain overheads,
such as calling lookup. Malloc is not used for storing the
keyword strings, since we simply use the static  pointers
within keywrds block.
initialise m4 keywords as fast as possible . This very similar to install but without certain overheads such as calling lookup . Malloc is not used for storing the keyword strings since we simply use the static pointers within keywrds block .
void
initkwds() {
	register int i;
	register int h;
	register ndptr p;
	for (i = 0; i < MAXKEYS; i++) {
		h = hash(keywrds[i].knam);
		p = (ndptr) xalloc(sizeof(struct ndblock));
		p->nxtptr = hashtab[h];
		hashtab[h] = p;
		p->name = keywrds[i].knam;
		p->defn = null;
		p->type = keywrds[i].ktyp | STATIC;
	}
}
void initkwds ( ) { register int i ; register int h ; register ndptr p ; for ( i = 0 ; i < MAXKEYS ; i ++ ) { h = hash ( keywrds [ i ] . knam ) ; p = ( ndptr ) xalloc ( sizeof ( struct ndblock ) ) ; p -> nxtptr = hashtab [ h ] ; hashtab [ h ] = p ; p -> name = keywrds [ i ] . knam ; p -> defn = null ; p -> type = keywrds [ i ] . ktyp | STATIC ; } }
initkwds - initialise m4 keywords as fast as possible.
initkwds - initialise m4 keywords as fast as possible .