MCPcopy Create free account
hub / github.com/apache/httpd / ap_pcfg_open_custom

Function ap_pcfg_open_custom

server/util.c:1038–1052  ·  view source on GitHub ↗

Allocate a ap_configfile_t handle with user defined functions and params */

Source from the content-addressed store, hash-verified

1036
1037/* Allocate a ap_configfile_t handle with user defined functions and params */
1038AP_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 */
1055AP_DECLARE(apr_status_t) ap_cfg_getc(char *ch, ap_configfile_t *cfp)

Callers 2

make_array_configFunction · 0.85
process_command_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected