Allocate a ap_configfile_t handle with user defined functions and params */
| 1036 | |
| 1037 | /* Allocate a ap_configfile_t handle with user defined functions and params */ |
| 1038 | AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom( |
| 1039 | apr_pool_t *p, const char *descr, void *param, |
| 1040 | apr_status_t (*getc_func) (char *ch, void *param), |
| 1041 | apr_status_t (*gets_func) (void *buf, apr_size_t bufsize, void *param), |
| 1042 | apr_status_t (*close_func) (void *param)) |
| 1043 | { |
| 1044 | ap_configfile_t *new_cfg = apr_palloc(p, sizeof(*new_cfg)); |
| 1045 | new_cfg->param = param; |
| 1046 | new_cfg->name = descr; |
| 1047 | new_cfg->getch = getc_func; |
| 1048 | new_cfg->getstr = gets_func; |
| 1049 | new_cfg->close = close_func; |
| 1050 | new_cfg->line_number = 0; |
| 1051 | return new_cfg; |
| 1052 | } |
| 1053 | |
| 1054 | /* Read one character from a configfile_t */ |
| 1055 | AP_DECLARE(apr_status_t) ap_cfg_getc(char *ch, ap_configfile_t *cfp) |
no outgoing calls
no test coverage detected