| 355 | */ |
| 356 | |
| 357 | const char **my_error_unregister(int first, int last) |
| 358 | { |
| 359 | struct my_err_head *meh_p; |
| 360 | struct my_err_head **search_meh_pp; |
| 361 | const char **errmsgs; |
| 362 | |
| 363 | /* Search for the registration in the list. */ |
| 364 | for (search_meh_pp= &my_errmsgs_list; |
| 365 | *search_meh_pp; |
| 366 | search_meh_pp= &(*search_meh_pp)->meh_next) |
| 367 | { |
| 368 | if (((*search_meh_pp)->meh_first == first) && |
| 369 | ((*search_meh_pp)->meh_last == last)) |
| 370 | break; |
| 371 | } |
| 372 | if (! *search_meh_pp) |
| 373 | return NULL; |
| 374 | |
| 375 | /* Remove header from the chain. */ |
| 376 | meh_p= *search_meh_pp; |
| 377 | *search_meh_pp= meh_p->meh_next; |
| 378 | |
| 379 | /* Save the return value and free the header. */ |
| 380 | errmsgs= meh_p->get_errmsgs(); |
| 381 | my_free(meh_p); |
| 382 | |
| 383 | return errmsgs; |
| 384 | } |
| 385 | |
| 386 | |
| 387 | /** |
no test coverage detected