summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-05-23 07:08:25 +0000
committerDerick Rethans <derick@php.net>2002-05-23 07:08:25 +0000
commitc37d2a97ac3c54833e7237230005bcc3a00c9159 (patch)
tree6a3d8dc27df47be8f8dd3f1b5a8bfbeb38861ce9 /ext
parentb768cf0322fbce704342808f856e043bba66f0df (diff)
downloadphp-git-c37d2a97ac3c54833e7237230005bcc3a00c9159.tar.gz
- Fix errormessage and whitespace
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 01c19d4b6e..31f128a916 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1924,7 +1924,7 @@ PHPAPI PHP_FUNCTION(fread)
}
/* }}} */
-/* {{{ 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 @@ PHP_FUNCTION(fgetcsv)
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 @@ PHP_FUNCTION(fgetcsv)
}
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 @@ PHP_FUNCTION(fgetcsv)
/* 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 @@ PHP_FUNCTION(fgetcsv)
/* 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 @@ PHP_FUNCTION(fgetcsv)
/* 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);