| 775 | } |
| 776 | |
| 777 | static int |
| 778 | grep_check_id(const char *id) |
| 779 | { |
| 780 | struct grep_var *rv; |
| 781 | |
| 782 | while (*id && isspace((uchar) *id)) |
| 783 | id++; |
| 784 | if (!*id) { |
| 785 | Fprintf(stderr, "missing identifier in line %d", grep_lineno); |
| 786 | grep_errors++; |
| 787 | return 0; |
| 788 | } |
| 789 | rv = grepsearch(id); |
| 790 | if (rv) { |
| 791 | if (grep_trace) { |
| 792 | Fprintf(outputfp, "ID %d %s\n", rv->is_defined, id); |
| 793 | } |
| 794 | return rv->is_defined; |
| 795 | } |
| 796 | |
| 797 | if (grep_trace) { |
| 798 | Fprintf(outputfp, "ID U %s\n", id); |
| 799 | } |
| 800 | Fprintf(stderr, "unknown identifier '%s' in line %d.\n", id, grep_lineno); |
| 801 | grep_errors++; |
| 802 | return 2; /* So new features can be checked before makedefs |
| 803 | * is rebuilt. */ |
| 804 | } |
| 805 | |
| 806 | static void |
| 807 | grep_show_wstack(const char *tag) |
no test coverage detected