summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat/dateformat_parse.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-01-03 01:22:58 -0800
committerStanislav Malyshev <stas@php.net>2015-01-10 15:07:38 -0800
commitb7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc (patch)
tree0e09490075ee4f9a75a77ef4168d8ee254c52e5b /ext/intl/dateformat/dateformat_parse.c
parent773c8b0c092a0e9ad5c5548815bcb9991d54d5c1 (diff)
downloadphp-git-b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc.tar.gz
trailing whitespace removal
Diffstat (limited to 'ext/intl/dateformat/dateformat_parse.c')
-rw-r--r--ext/intl/dateformat/dateformat_parse.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index 15d19485ed..378ddf641a 100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
@@ -28,11 +28,11 @@
#include "dateformat_parse.h"
#include "dateformat_data.h"
-/* {{{
+/* {{{
* Internal function which calls the udat_parse
- * param int store_error acts like a boolean
- * if set to 1 - store any error encountered in the parameter parse_error
- * if set to 0 - no need to store any error encountered in the parameter parse_error
+ * param int store_error acts like a boolean
+ * if set to 1 - store any error encountered in the parameter parse_error
+ * if set to 0 - no need to store any error encountered in the parameter parse_error
*/
static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* text_to_parse, size_t text_len, int32_t *parse_pos, zval *return_value)
{
@@ -51,7 +51,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex
}
INTL_METHOD_CHECK_STATUS( dfo, "Date parsing failed" );
-
+
/* Since return is in sec. */
result = (double)timestamp / U_MILLIS_PER_SECOND;
if(result > LONG_MAX || result < -LONG_MAX) {
@@ -64,17 +64,17 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex
static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, zend_long calendar_field, char* key_name)
{
- zend_long calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo));
+ zend_long calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : could not get a field from calendar" );
if( strcmp(key_name, CALENDAR_YEAR )==0 ){
/* since tm_year is years from 1900 */
- add_assoc_long( return_value, key_name,( calendar_field_val-1900) );
+ add_assoc_long( return_value, key_name,( calendar_field_val-1900) );
}else if( strcmp(key_name, CALENDAR_WDAY )==0 ){
/* since tm_wday starts from 0 whereas ICU WDAY start from 1 */
- add_assoc_long( return_value, key_name,( calendar_field_val-1) );
+ add_assoc_long( return_value, key_name,( calendar_field_val-1) );
}else{
- add_assoc_long( return_value, key_name, calendar_field_val );
+ add_assoc_long( return_value, key_name, calendar_field_val );
}
}
@@ -94,7 +94,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
parsed_calendar = (UCalendar *)udat_getCalendar(DATE_FORMAT_OBJECT(dfo));
udat_parseCalendar( DATE_FORMAT_OBJECT(dfo), parsed_calendar, text_utf16, text_utf16_len, parse_pos, &INTL_DATA_ERROR_CODE(dfo));
-
+
if (text_utf16) {
efree(text_utf16);
}
@@ -107,7 +107,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_SECOND, CALENDAR_SEC);
add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MINUTE, CALENDAR_MIN);
add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_HOUR_OF_DAY, CALENDAR_HOUR);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_YEAR, CALENDAR_YEAR);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_YEAR, CALENDAR_YEAR);
add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_MONTH, CALENDAR_MDAY);
add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_WEEK, CALENDAR_WDAY);
add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_YEAR, CALENDAR_YDAY);
@@ -116,7 +116,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
/* Is in DST? */
isInDST = ucal_inDaylightTime(parsed_calendar , &INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : while checking if currently in DST." );
- add_assoc_long( return_value, CALENDAR_ISDST,(isInDST==1?1:0));
+ add_assoc_long( return_value, CALENDAR_ISDST,(isInDST==1?1:0));
}
/* }}} */