tokp->str = alloc(len + 1); (void) strncpy(tokp->str, str, len); tokp->str[len] = 0;
tmp = alloc(len + 1); strncpy(tmp, str, len); tmp[len] = 0; tokp->str = tmp;
findkind(mark, tokp)	char **mark;	token *tokp;{	int len;	token *s;	char *str;	str = *mark;	for (s = symbols; s->kind != TOK_EOF; s++) {		len = strlen(s->str);		if (strncmp(str, s->str, len) == 0) {			if (!isalnum(str[len]) && str[len] != '_') {				tokp->kind = s->kind;				tokp->str = s->str;				*mark = str + len;				return;			}		}	}	tokp->kind = TOK_IDENT;	for (len = 0; isalnum(str[len]) || str[len] == '_'; len++);	tokp->str = alloc(len + 1);	(void) strncpy(tokp->str, str, len);	tokp->str[len] = 0;	*mark = str + len;}