sterling                Wed Nov 27 15:32:26 2002 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/standard  file.c 
  Log:
  MFH 
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.279 php4/ext/standard/file.c:1.279.2.1
--- php4/ext/standard/file.c:1.279      Wed Nov  6 13:07:23 2002
+++ php4/ext/standard/file.c    Wed Nov 27 15:32:26 2002
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.279 2002/11/06 18:07:23 iliaa Exp $ */
+/* $Id: file.c,v 1.279.2.1 2002/11/27 20:32:26 sterling Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1484,26 +1484,22 @@
                RETURN_FALSE;
        }
 
-       len = SCAN_MAX_FSCANF_BUFSIZE;
 
-       buf = emalloc(len + 1);
-       /* needed because recv doesnt put a null at the end*/
-       memset(buf, 0, len+1);
-
-       if (php_stream_gets((php_stream *) what, buf, len) == NULL)     {
-               efree(buf);
+       buf = php_stream_get_line((php_stream *) what, NULL, 0, &len);
+       if (buf == NULL) {
                RETURN_FALSE;
        }
 
        convert_to_string_ex(format_string);
        result = php_sscanf_internal(buf, Z_STRVAL_PP(format_string),
                        argCount, args, 2, &return_value TSRMLS_CC);
+
        efree(args);
        efree(buf);
+
        if (SCAN_ERROR_WRONG_PARAM_COUNT == result) {
-               WRONG_PARAM_COUNT
+               WRONG_PARAM_COUNT;
        }
-
 
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to