| 154 | } |
| 155 | |
| 156 | static int |
| 157 | get_str_num(FILE *f, int num) |
| 158 | { |
| 159 | int n_lines = 0; |
| 160 | |
| 161 | if (f != NULL) { |
| 162 | while (fgets(line, sizeof(line), f) != NULL) |
| 163 | n_lines++; |
| 164 | rewind(f); |
| 165 | } else { |
| 166 | n_lines = num; |
| 167 | } |
| 168 | return n_lines; |
| 169 | } |
| 170 | |
| 171 | static int |
| 172 | parse_file(FILE *f, struct rule *tbl, int rule_tbl) |