revert last commit (i.e. remove FCGX_Peek)
robs [Wed, 21 Nov 2001 21:03:35 +0000 (21:03 +0000)]
libfcgi/fcgiapp.c

index 7ce3270..6a92a41 100644 (file)
@@ -11,7 +11,7 @@
  *
  */
 #ifndef lint
-static const char rcsid[] = "$Id: fcgiapp.c,v 1.31 2001/11/17 03:58:31 robs Exp $";
+static const char rcsid[] = "$Id: fcgiapp.c,v 1.32 2001/11/21 21:03:35 robs Exp $";
 #endif /* not lint */
 
 #include <assert.h>
@@ -92,23 +92,7 @@ static char *StringCopy(char *str)
     return newString;
 }
 
-int FCGX_Peek(FCGX_Stream * stream)\r
-{\r
-    if (stream->rdNext != stream->stop)
-        return *stream->rdNext;\r
 
-    if (stream->isClosed || ! stream->isReader) return EOF;\r
-
-    stream->fillBuffProc(stream);
-    stream->stopUnget = stream->rdNext;\r
-
-    if (stream->rdNext != stream->stop)
-        return *stream->rdNext;\r
-
-    ASSERT(stream->isClosed); /* bug in fillBufProc if not */
-    return EOF;
-}
-\r
 /*
  *----------------------------------------------------------------------
  *
@@ -123,9 +107,16 @@ int FCGX_Peek(FCGX_Stream * stream)
  */
 int FCGX_GetChar(FCGX_Stream *stream)
 {
-    int rv = FCGX_Peek(stream);\r
-       if (rv != EOF) ++stream->rdNext;\r
-       return rv;\r
+    if(stream->rdNext != stream->stop)
+        return *stream->rdNext++;
+    if(stream->isClosed || !stream->isReader)
+        return EOF;
+    stream->fillBuffProc(stream);
+    stream->stopUnget = stream->rdNext;
+    if(stream->rdNext != stream->stop)
+        return *stream->rdNext++;
+    ASSERT(stream->isClosed); /* bug in fillBufProc if not */
+    return EOF;
 }
 
 /*