]> granicus.if.org Git - apache/commitdiff
Reconsidered the wisdom of this change... back to the drawing board.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 25 Feb 2001 01:12:50 +0000 (01:12 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 25 Feb 2001 01:12:50 +0000 (01:12 +0000)
  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

include/http_config.h
server/util.c
support/httpd.exp

index 0948bb291351900a4c9f711567e2d2a8f9fbdcc4..f335bcf66013b098f858c179ea82fd2b9f542174 100644 (file)
@@ -627,6 +627,14 @@ AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *des
  */
 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
index 398dfcdb3cf444e4e71f0a311a8cd489926f85b1..7ff05caa6e692864f4bf612edb48c3ad305a7a62 100644 (file)
@@ -935,8 +935,16 @@ AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *des
     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)
index c21caba0c2a2549cc9a341bf84045d280be8db43..242140681bb525c82da35ce7fbeaf0616ad2ce90 100644 (file)
@@ -91,6 +91,7 @@ ap_bucket_make_shared
 ap_bucket_split_shared
 ap_bwrite_core
 ap_cfg_closefile
+ap_cfg_getch
 ap_cfg_getline
 ap_chdir_file
 ap_check_cmd_context