| 219 | } |
| 220 | |
| 221 | static void init_sym_table() |
| 222 | { |
| 223 | char buf[512]; |
| 224 | if (my_init_dynamic_array(&sym_table, sizeof(SYM_ENTRY), INIT_SYM_TABLE, |
| 225 | INC_SYM_TABLE)) |
| 226 | die("Failed in my_init_dynamic_array() -- looks like out of memory problem"); |
| 227 | |
| 228 | while (fgets(buf, sizeof(buf), fp_sym)) |
| 229 | { |
| 230 | SYM_ENTRY se; |
| 231 | if (init_sym_entry(&se, buf)) |
| 232 | continue; |
| 233 | if (insert_dynamic(&sym_table, &se)) |
| 234 | die("insert_dynamic() failed - looks like we are out of memory"); |
| 235 | } |
| 236 | |
| 237 | verify_sort(); |
| 238 | } |
| 239 | |
| 240 | static void clean_up() |
| 241 | { |
no test coverage detected