| 1621 | } |
| 1622 | |
| 1623 | boolean |
| 1624 | read_config_file(const char *filename, int src) |
| 1625 | { |
| 1626 | FILE *fp; |
| 1627 | boolean rv = TRUE; |
| 1628 | |
| 1629 | if (!(fp = fopen_config_file(filename, src))) |
| 1630 | return FALSE; |
| 1631 | #ifndef SFCTOOL |
| 1632 | /* begin detection of duplicate configfile options */ |
| 1633 | reset_duplicate_opt_detection(); |
| 1634 | #endif /* SFCTOOL */ |
| 1635 | free_config_sections(); |
| 1636 | iflags.parse_config_file_src = src; |
| 1637 | |
| 1638 | rv = parse_conf_file(fp, parse_config_line); |
| 1639 | (void) fclose(fp); |
| 1640 | |
| 1641 | free_config_sections(); |
| 1642 | #ifndef SFCTOOL |
| 1643 | /* turn off detection of duplicate configfile options */ |
| 1644 | reset_duplicate_opt_detection(); |
| 1645 | #endif /* SFCTOOL */ |
| 1646 | return rv; |
| 1647 | } |
| 1648 | |
| 1649 | struct _cnf_parser_state { |
| 1650 | char *inbuf; |