ben 96/10/19 09:08:59
Modified: src util.c
Log:
cfg_getline returned EOF too early. Fixed.
Revision Changes Path
1.25 +5 -2 apache/src/util.c
Index: util.c
===================================================================
RCS file: /export/home/cvs/apache/src/util.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C3 -r1.24 -r1.25
*** util.c 1996/10/18 19:22:11 1.24
--- util.c 1996/10/19 16:08:58 1.25
***************
*** 50,56 ****
*
*/
! /* $Id: util.c,v 1.24 1996/10/18 19:22:11 ben Exp $ */
/*
* str.c: string utility things
--- 50,56 ----
*
*/
! /* $Id: util.c,v 1.25 1996/10/19 16:08:58 ben Exp $ */
/*
* str.c: string utility things
***************
*** 535,540 ****
--- 535,543 ----
c = getc(f);
} while (c == '\t' || c == ' ');
+ if(c == EOF)
+ return 1;
+
while(1) {
if((c == '\t') || (c == ' ')) {
s[i++] = ' ';
***************
*** 548,554 ****
/* blast trailing whitespace */
while(i && (s[i-1] == ' ')) --i;
s[i] = '\0';
! return (feof(f) ? 1 : 0);
}
s[i] = c;
++i;
--- 551,557 ----
/* blast trailing whitespace */
while(i && (s[i-1] == ' ')) --i;
s[i] = '\0';
! return 0;
}
s[i] = c;
++i;