cvs: php4 /ext/standard file.c

From: Date: Thu, 23 May 2002 07:08:31 +0000
Subject: cvs: php4 /ext/standard file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12057@lists.php.net to get a copy of this message
derick Thu May 23 03:08:31 2002 EDT Modified files: /php4/ext/standard file.c Log: - Fix errormessage and whitespace Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.230 php4/ext/standard/file.c:1.231 --- php4/ext/standard/file.c:1.230 Thu May 23 03:03:43 2002 +++ php4/ext/standard/file.c Thu May 23 03:08:25 2002 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.230 2002/05/23 07:03:43 yohgaki Exp $ */ +/* $Id: file.c,v 1.231 2002/05/23 07:08:25 derick Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1924,7 +1924,7 @@ } /* }}} */ -/* {{{ proto array fgetcsv(resource fp, int length [, string delimiter[, string enclosure]]) +/* {{{ proto array fgetcsv(resource fp, int length [, string delimiter [, string enclosure]]) Get line from file pointer and parse for CSV fields */ PHP_FUNCTION(fgetcsv) { @@ -1978,7 +1978,7 @@ convert_to_string_ex(p_enclosure); /* Make sure that there is at least one character in string */ if (Z_STRLEN_PP(p_enclosure) < 1) { - php_error(E_WARNING, "%s() 3rd paramater must be a character", + php_error(E_WARNING, "%s() 4th paramater must be a character", get_active_function_name(TSRMLS_C)); return; } @@ -2004,10 +2004,10 @@ } buf = emalloc(len + 1); - /*needed because recv/read/gzread doesnt set null char at end*/ + /* needed because recv/read/gzread doesnt set null char at end */ memset(buf, 0, len + 1); - if (php_stream_gets(stream, buf, len) == NULL) { + if (php_stream_gets(stream, buf, len) == NULL) { efree(buf); RETURN_FALSE; } @@ -2029,7 +2029,7 @@ /* reserve workspace for building each individual field */ - temp = emalloc(len); /* unlikely but possible! */ + temp = emalloc(len); /* unlikely but possible! */ tptr = temp; /* Initialize return array */ @@ -2038,7 +2038,7 @@ /* Main loop to read CSV fields */ /* NB this routine will return a single null entry for a blank line */ - do { + do { /* 1. Strip any leading space */ while(isspace((int) *bptr) && (*bptr!=delimiter)) bptr++; /* 2. Read field, leaving bptr pointing at start of next field */ @@ -2069,7 +2069,7 @@ /* read a new line from input, as at start of routine */ memset(buf, 0, len+1); - if (php_stream_gets(stream, buf, len) == NULL) { + if (php_stream_gets(stream, buf, len) == NULL) { efree(lineEnd); efree(temp); efree(buf);

« previous php.cvs (#12057) next »