Lines Matching defs:line

75  * While the whatis line is being formed, it is stored in whatis_proto.
336 char *line = whatis_lines->sl_str[i];
337 if (i > 0 && strcmp(line, prev) == 0)
339 prev = line;
340 (void) fputs(line, output);
397 * Return whether the line is of one of the forms:
404 name_section_line(char *line, const char *section_start)
408 if (strncmp(line, section_start, 3) != 0)
410 line = skip_spaces(line + 3);
411 rhs = trim_rhs(line);
412 if (*line == '"') {
413 line++;
417 if (strcmp(line, "NAME") == 0)
501 * Processes an old-style man(7) line. This ignores commands with only
505 process_man_line(char *line)
509 if (*line == '.') {
510 while (isalpha(*++line))
512 p = line = skip_spaces(line);
521 line = skip_spaces(line);
522 if (*line != '\0') {
523 add_nroff(line);
529 * Processes a new-style mdoc(7) line.
532 process_mdoc_line(char *line)
536 char *line_end = &line[strlen(line)];
540 if (*line == '\0')
542 if (line[0] != '.' || !isupper(line[1]) || !islower(line[2])) {
543 add_nroff(skip_spaces(line));
547 xref = strncmp(line, ".Xr", 3) == 0;
548 line += 3;
549 while ((line = skip_spaces(line)) < line_end) {
550 if (*line == '"') {
551 next = ++line;
563 next = strpbrk(line, " \t");
569 if (isupper(*line) && islower(line[1]) && line[2] == '\0') {
570 if (strcmp(line, "Ns") == 0) {
572 line = next;
575 if (strstr(line, MDOC_COMMANDS) != NULL) {
576 line = next;
580 if (arg > 0 && strchr(",.:;?!)]", *line) == 0) {
583 add_nroff(line);
590 add_nroff(line);
592 line = next;
622 * Process a man page source into a single whatis line and add it
633 char *line = NULL;
641 while (getline(&line, &linecap, fp) > 0) {
643 if (strncmp(line, ".\\\"", 3) == 0)
648 if (name_section_line(line, ".SH"))
650 else if (name_section_line(line, ".Sh"))
655 if (strncmp(line, ".SH", 3) == 0 ||
656 strncmp(line, ".SS", 3) == 0)
658 (void) trim_rhs(line);
659 if (strcmp(line, ".") == 0)
661 if (strncmp(line, ".IX", 3) == 0) {
662 line += 3;
663 line = skip_spaces(line);
665 process_man_line(line);
669 (void) trim_rhs(line);
670 if (strncmp(line, ".Nm", 3) == 0) {
671 process_mdoc_line(line);
674 if (strcmp(line, ".") == 0)
682 if (strncmp(line, ".Sh", 3) == 0)
684 (void) trim_rhs(line);
685 if (strcmp(line, ".") == 0)
687 process_mdoc_line(line);
694 line = sbuf_content(whatis_proto);
699 descr = strstr(line, " - ");
701 descr = strchr(line, ' ');
710 collect_names(names, line);