# | Line 104 | Line 104 | char *s, *ds; | |
---|---|---|
104 | cp = fskip(s); | |
105 | return(cp != NULL && strchr(ds, *cp) != NULL); | |
106 | } | |
107 | + | |
108 | + | |
109 | + | int |
110 | + | isname(s) /* check for legal identifier name */ |
111 | + | register char *s; |
112 | + | { |
113 | + | while (*s == '_') /* skip leading underscores */ |
114 | + | s++; |
115 | + | if (!isascii(*s) || !isalpha(*s)) /* start with a letter */ |
116 | + | return(0); |
117 | + | while (isascii(*++s) && isgraph(*s)) /* all visible characters */ |
118 | + | ; |
119 | + | return(*s == '\0'); /* ending in nul */ |
120 | + | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |