martin 98/08/05 17:10:39
Modified: src CHANGES
src/main util.c
Log:
The recent changes which avoid whitespace compression in config lines
failed to remove leading whitespace, so it became impossible to indent
the block constructs. Fixed.
Revision Changes Path
1.1003 +2 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1002
retrieving revision 1.1003
diff -u -u -r1.1002 -r1.1003
--- CHANGES 1998/08/05 01:36:35 1.1002
+++ CHANGES 1998/08/06 00:10:36 1.1003
@@ -3,6 +3,8 @@
*) Cure ap_cfg_getline() of its nasty habit of compressing internal
whitespace in input lines -- including within quoted strings.
[Ken Coar]
+ but leading and trailing whitespace should continue to be
+ stripped [Martin Kraemer]
*) Cleanup of the PrintPath/PrintPathOS2 helper functions. Avoid
the ugly use of an env. variable and use command-line args for
1.128 +4 -0 apache-1.3/src/main/util.c
Index: util.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -u -r1.127 -r1.128
--- util.c 1998/08/05 01:36:40 1.127
+++ util.c 1998/08/06 00:10:38 1.128
@@ -873,6 +873,10 @@
dst = &src[strlen(src)];
while (--dst >= buf && ap_isspace(*dst))
*dst = '\0';
+ /* Zap leading whitespace by shifting */
+ if (src != buf)
+ for (dst = buf; (*dst++ = *src++) != '\0'; )
+ ;
#ifdef DEBUG_CFG_LINES
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL, "Read config:
%s", buf);