| 1513 | |
| 1514 | #ifndef SFCTOOL |
| 1515 | int |
| 1516 | l_get_config_errors(lua_State *L) |
| 1517 | { |
| 1518 | struct _config_error_errmsg *dat = config_error_msg; |
| 1519 | struct _config_error_errmsg *tmp; |
| 1520 | int idx = 1; |
| 1521 | |
| 1522 | lua_newtable(L); |
| 1523 | |
| 1524 | while (dat) { |
| 1525 | lua_pushinteger(L, idx++); |
| 1526 | lua_newtable(L); |
| 1527 | nhl_add_table_entry_int(L, "line", dat->line_num); |
| 1528 | nhl_add_table_entry_str(L, "error", dat->errormsg); |
| 1529 | lua_settable(L, -3); |
| 1530 | tmp = dat->next; |
| 1531 | free(dat->errormsg); |
| 1532 | dat->errormsg = (char *) 0; |
| 1533 | free(dat); |
| 1534 | dat = tmp; |
| 1535 | } |
| 1536 | config_error_msg = (struct _config_error_errmsg *) 0; |
| 1537 | |
| 1538 | return 1; |
| 1539 | } |
| 1540 | #endif /* SFCTOOL */ |
| 1541 | |
| 1542 | /* varargs 'config_error_add()' moved to pline.c */ |
nothing calls this directly
no test coverage detected