Lines Matching +defs:match +defs:line
94 char line[LINE_MAX]; /* current line */
275 * Get next line from a help file
282 if (fgets(hp->line, sizeof(hp->line), hp->fp) != NULL)
283 return (hp->line);
306 const char *line;
312 while ((line = help_next_line(hp)) != NULL) {
313 if (line[0] == '^' && line[1] == '^')
314 printf("%s", line + 2);
326 struct help_pos match, last_match;
327 const char *line;
333 memset(&match, 0, sizeof(match));
344 match.pos = -1;
347 /* read next line */
348 if ((line = help_next_line(&hfile)) == NULL) {
353 if (line[0] != '^' || line[1] == '^')
356 if (sscanf(line + 1, "%d%99s", &level, key) != 2)
357 errx(1, "error in help file '%s'", line);
362 if (match.pos == -1) {
366 /* go back to the match */
367 help_file_seek(&hfile, &match);
368 last_match = match;
369 memset(&match, 0, sizeof(match));
370 match.pos = -1;
378 if (match.pos != -1) {
382 help_file_tell(&hfile, &match);
389 if ((line = help_next_line(&hfile)) == NULL)
392 if (line[0] == '#')
394 if (line[0] == '^') {
395 if (line[1] == '^')
399 if (strncmp(line, "$MAIN", 5) == 0) {
403 printf("%s", line);
426 while ((line = help_next_line(&hfile)) != NULL) {
427 if (line[0] == '#' || line[0] != '^' || line[1] == '^')
430 if (sscanf(line + 1, "%d%99s", &level, key) != 2)
431 errx(1, "error in help file '%s'", line);
528 const struct cmdtab *match, *cc, *tab;
582 * Scan the table for a match
585 match = NULL;
588 if (match != NULL) {
594 match = cc;
598 if ((cc = match) == NULL) {
605 * Have a match. If there is no subtable, there must
721 * Parse command line options