| 1467 | static struct _config_error_errmsg *config_error_msg = 0; |
| 1468 | |
| 1469 | void |
| 1470 | config_error_init(boolean from_file, const char *sourcename, boolean secure) |
| 1471 | { |
| 1472 | struct _config_error_frame *tmp = (struct _config_error_frame *) |
| 1473 | alloc(sizeof *tmp); |
| 1474 | |
| 1475 | tmp->line_num = 0; |
| 1476 | tmp->num_errors = 0; |
| 1477 | tmp->origline_shown = FALSE; |
| 1478 | tmp->fromfile = from_file; |
| 1479 | tmp->secure = secure; |
| 1480 | tmp->origline[0] = '\0'; |
| 1481 | if (sourcename && sourcename[0]) { |
| 1482 | (void) strncpy(tmp->source, sourcename, sizeof (tmp->source) - 1); |
| 1483 | tmp->source[sizeof (tmp->source) - 1] = '\0'; |
| 1484 | } else |
| 1485 | tmp->source[0] = '\0'; |
| 1486 | |
| 1487 | tmp->next = config_error_data; |
| 1488 | config_error_data = tmp; |
| 1489 | program_state.config_error_ready = TRUE; |
| 1490 | } |
| 1491 | |
| 1492 | staticfn boolean |
| 1493 | config_error_nextline(const char *line) |