Lines Matching refs:cp
75 static char *namex(char *cp, char **w);
76 static void addchild(char *cp, struct node *np);
77 static struct node *getnode(char *cp);
189 namex(char *cp, char **w)
194 if (*cp == '\0') {
196 return (cp);
199 for (c = *cp++; isspace(c); c = *cp++)
201 orig = --cp;
202 c = *cp++;
204 for (c = *cp++; isalnum(c) || ispunct(c); c = *cp++)
206 len = cp - orig;
208 while (orig < cp - 1)
217 return (cp);
256 addchild(char *cp, struct node *np)
262 cp = namex(cp, &w);
264 cp = namex(cp, &w);
284 getnode(char *cp)
289 cp = namex(cp, &w);
298 cp = namex(cp, &w);
302 cp = namex(cp, &w);
322 char *cp;
330 for (line = 1; (cp = fgets(linebuf, MAXLINE, sp)) != NULL; line++) {
331 if (*cp == '\n') {
336 if (*cp == '\\') {
337 if (cp[1] == '#')
338 printf("%s", (cp + 1));
341 if (strcmp(cp, "model_end\n") == 0) {
349 if (strncmp(cp, "model_start ", c) == 0) {
350 if (strncmp(cp + c, model->name, strlen(model->name))
351 == 0 && *(cp + c + strlen(model->name)) == '\n')
357 if ((strcmp(cp, "verbatim_begin\n") == 0) ||
358 (strcmp(cp, "forth_start\n") == 0)) {
362 if ((strcmp(cp, "verbatim_end\n") == 0) ||
363 (strcmp(cp, "forth_end\n") == 0)) {
368 printf("%s", cp);
371 np = getnode(cp);
373 ((cp = fgets(linebuf, MAXLINE, sp)) != NULL) &&
374 *cp != '\n'; line++) {
376 addchild(cp, np);