The ap_ prefix is still good, IMHO
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88313
13f79535-47bb-0310-9956-
ffa450edef68
*/
AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp);
+/**
+ * Read one char from open configfile_t, increase line number upon LF
+ * @param cfp The file to read from
+ * @return the character read
+ * @deffunc int ap_cfg_getc(ap_configfile_t *cfp)
+ */
+AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp);
+
/**
* Detach from open ap_configfile_t, calling the close handler
* @param cfp The file to close
new_cfg->line_number = 0;
return new_cfg;
}
-
-
+
+/* Read one character from a configfile_t */
+AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp)
+{
+ register int ch = cfp->getch(cfp->param);
+ if (ch == LF)
+ ++cfp->line_number;
+ return ch;
+}
+
/* Read one line from open ap_configfile_t, strip LF, increase line number */
/* If custom handler does not define a getstr() function, read char by char */
AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp)
ap_bucket_split_shared
ap_bwrite_core
ap_cfg_closefile
+ap_cfg_getch
ap_cfg_getline
ap_chdir_file
ap_check_cmd_context