diff options
author | Zeev Suraski <zeev@php.net> | 2001-08-11 17:03:37 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-08-11 17:03:37 +0000 |
commit | c0404f46311e5b519dc51697e181bb39ca8d09d2 (patch) | |
tree | 291959f75d7b2a3f3e171830ed6eea76b5d98b4d /ext/standard/datetime.c | |
parent | f6f6c4d7e63d2eaf4ece7aee66f46a013b29bffa (diff) | |
download | php-git-c0404f46311e5b519dc51697e181bb39ca8d09d2.tar.gz |
Whitespace
Diffstat (limited to 'ext/standard/datetime.c')
-rw-r--r-- | ext/standard/datetime.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index e48c20e1f8..7ee353110e 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -85,7 +85,7 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm) int i, gmadjust, seconds, arg_count = ZEND_NUM_ARGS(); int is_dst = -1; - if (arg_count > 7 || zend_get_parameters_array_ex(arg_count,arguments) == FAILURE) { + if (arg_count > 7 || zend_get_parameters_array_ex(arg_count, arguments) == FAILURE) { WRONG_PARAM_COUNT; } /* convert supplied arguments to longs */ @@ -99,7 +99,7 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm) /* ** Set default time parameters with local time values, ** EVEN when some GMT time parameters are specified! - ** This may give strange result, with PHP gmmktime(0,0,0), + ** This may give strange result, with PHP gmmktime(0, 0, 0), ** which is assumed to return GMT midnight time ** for today (in localtime), so that the result time may be ** AFTER or BEFORE the current time. @@ -439,7 +439,7 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) #if HAVE_TM_GMTOFF sprintf(tmp_buff, "%c%02d%02d", (ta->tm_gmtoff < 0) ? '-' : '+', abs(ta->tm_gmtoff / 3600), abs( ta->tm_gmtoff % 3600)); #else - sprintf(tmp_buff, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+',abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs((ta->tm_isdst ? timezone - 3600 : timezone) % 3600)); + sprintf(tmp_buff, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs((ta->tm_isdst ? timezone - 3600 : timezone) % 3600)); #endif strcat(return_value->value.str.val, tmp_buff); break; @@ -616,7 +616,7 @@ PHP_FUNCTION(getdate) if (ZEND_NUM_ARGS() == 0) { timestamp = time(NULL); - } else if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,×tamp_arg) == FAILURE) { + } else if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, ×tamp_arg) == FAILURE) { WRONG_PARAM_COUNT; } else { convert_to_long_ex(timestamp_arg); @@ -711,7 +711,7 @@ PHP_FUNCTION(checkdate) if (d < 1 || d > phpday_tab[isleap(y)][m - 1]) { RETURN_FALSE; } - RETURN_TRUE; /* True : This month,day,year arguments are valid */ + RETURN_TRUE; /* True : This month, day, year arguments are valid */ } /* }}} */ @@ -721,7 +721,7 @@ PHP_FUNCTION(checkdate) void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) { pval **format_arg, **timestamp_arg; - char *format,*buf; + char *format, *buf; time_t timestamp; struct tm *ta, tmbuf; int max_reallocs = 5; @@ -729,13 +729,13 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) switch (ZEND_NUM_ARGS()) { case 1: - if (zend_get_parameters_ex(1,&format_arg)==FAILURE) { + if (zend_get_parameters_ex(1, &format_arg)==FAILURE) { RETURN_FALSE; } time(×tamp); break; case 2: - if (zend_get_parameters_ex(2, &format_arg,×tamp_arg)==FAILURE) { + if (zend_get_parameters_ex(2, &format_arg, ×tamp_arg)==FAILURE) { RETURN_FALSE; } convert_to_long_ex(timestamp_arg); @@ -761,14 +761,14 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) } buf = (char *) emalloc(buf_len); - while ((real_len=strftime(buf,buf_len,format,ta))==buf_len || real_len==0) { + while ((real_len=strftime(buf, buf_len, format, ta))==buf_len || real_len==0) { buf_len *= 2; buf = (char *) erealloc(buf, buf_len); if(!--max_reallocs) break; } if(real_len && real_len != buf_len) { - buf = (char *) erealloc(buf,real_len+1); + buf = (char *) erealloc(buf, real_len+1); RETURN_STRINGL(buf, real_len, 0); } efree(buf); |