sniper Thu Apr 14 11:36:45 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/calendar calendar.c Log: MFH http://cvs.php.net/diff.php/php-src/ext/calendar/calendar.c?r1=1.40.2.3&r2=1.40.2.4&ty=u Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.40.2.3 php-src/ext/calendar/calendar.c:1.40.2.4 --- php-src/ext/calendar/calendar.c:1.40.2.3 Thu Apr 7 12:16:28 2005 +++ php-src/ext/calendar/calendar.c Thu Apr 14 11:36:45 2005 @@ -18,7 +18,7 @@ | Wez Furlong <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: calendar.c,v 1.40.2.3 2005/04/07 16:16:28 dmitry Exp $ */ +/* $Id: calendar.c,v 1.40.2.4 2005/04/14 15:36:45 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -266,7 +266,7 @@ Converts from a supported calendar to Julian Day Count */ PHP_FUNCTION(cal_to_jd) { - long cal, month, day, year, jdate; + long cal, month, day, year; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &cal, &month, &day, &year) != SUCCESS) { RETURN_FALSE; @@ -277,8 +277,7 @@ RETURN_FALSE; } - jdate = cal_conversion_table[cal].to_jd(year, month, day); - RETURN_LONG(jdate); + RETURN_LONG(cal_conversion_table[cal].to_jd(year, month, day)); } /* }}} */ @@ -347,15 +346,12 @@ PHP_FUNCTION(gregoriantojd) { long year, month, day; - int jdate; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) { RETURN_FALSE; } - jdate = GregorianToSdn(year, month, day); - - RETURN_LONG(jdate); + RETURN_LONG(GregorianToSdn(year, month, day)); } /* }}} */ @@ -383,15 +379,12 @@ PHP_FUNCTION(juliantojd) { long year, month, day; - int jdate; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) { RETURN_FALSE; } - jdate = JulianToSdn(year, month, day); - - RETURN_LONG(jdate); + RETURN_LONG(JulianToSdn(year, month, day)); } /* }}} */ @@ -534,15 +527,12 @@ PHP_FUNCTION(jewishtojd) { long year, month, day; - int jdate; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) { RETURN_FALSE; } - jdate = JewishToSdn(year, month, day); - - RETURN_LONG(jdate); + RETURN_LONG(JewishToSdn(year, month, day)); } /* }}} */ @@ -570,15 +560,12 @@ PHP_FUNCTION(frenchtojd) { long year, month, day; - int jdate; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) { RETURN_FALSE; } - jdate = FrenchToSdn(year, month, day); - - RETURN_LONG(jdate); + RETURN_LONG(FrenchToSdn(year, month, day)); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php