Lines Matching refs:loc_name
251 static zend_string* get_icu_value_internal( const char* loc_name , char* tag_name, int* result , in… in get_icu_value_internal() argument
261 if (strlen(loc_name) > INTL_MAX_LOCALE_LEN) { in get_icu_value_internal()
267 zend_off_t grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in get_icu_value_internal()
270 return zend_string_init(loc_name, strlen(loc_name), 0); in get_icu_value_internal()
282 if( strlen(loc_name)>1 && (isIDPrefix(loc_name) == 1) ){ in get_icu_value_internal()
283 return zend_string_init(loc_name, strlen(loc_name), 0); in get_icu_value_internal()
287 singletonPos = getSingletonPos( loc_name ); in get_icu_value_internal()
295 mod_loc_name = estrndup ( loc_name , singletonPos-1); in get_icu_value_internal()
302 mod_loc_name = estrdup(loc_name ); in get_icu_value_internal()
379 const char* loc_name = NULL; in get_icu_value_src_php() local
393 &loc_name ,&loc_name_len ) == FAILURE) { in get_icu_value_src_php()
398 loc_name = intl_locale_get_default(); in get_icu_value_src_php()
399 loc_name_len = strlen(loc_name); in get_icu_value_src_php()
405 tag_value = get_icu_value_internal( loc_name , tag_name , &result ,0); in get_icu_value_src_php()
459 const char* loc_name = NULL; in get_icu_disp_value_src_php() local
481 &loc_name, &loc_name_len , in get_icu_disp_value_src_php()
496 loc_name = intl_locale_get_default(); in get_icu_disp_value_src_php()
501 int grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in get_icu_disp_value_src_php()
504 mod_loc_name = getPreferredTag( loc_name ); in get_icu_disp_value_src_php()
513 mod_loc_name = estrdup( loc_name ); in get_icu_disp_value_src_php()
643 const char* loc_name = NULL; in PHP_FUNCTION() local
649 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
654 INTL_CHECK_LOCALE_LEN(strlen(loc_name)); in PHP_FUNCTION()
657 loc_name = intl_locale_get_default(); in PHP_FUNCTION()
661 e = uloc_openKeywords( loc_name, &status ); in PHP_FUNCTION()
679 …kw_value_len=uloc_getKeywordValue( loc_name, kw_key, ZSTR_VAL(kw_value_str), kw_value_len, &status… in PHP_FUNCTION()
683 …kw_value_len=uloc_getKeywordValue( loc_name,kw_key, ZSTR_VAL(kw_value_str), kw_value_len+1, &statu… in PHP_FUNCTION()
720 static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_name) in append_key_value() argument
732 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_key_value()
734 smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value)); in append_key_value()
745 static void add_prefix(smart_str* loc_name, char* key_name) in add_prefix() argument
748 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in add_prefix()
749 smart_str_appendl(loc_name, PRIVATE_PREFIX , sizeof(PRIVATE_PREFIX)-1); in add_prefix()
761 static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, char* key_name) in append_multiple_key_values() argument
769 add_prefix( loc_name , key_name); in append_multiple_key_values()
771 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
772 smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value)); in append_multiple_key_values()
783 add_prefix(loc_name , key_name); in append_multiple_key_values()
785 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
786 smart_str_appendl(loc_name, Z_STRVAL_P(data) , Z_STRLEN_P(data)); in append_multiple_key_values()
817 add_prefix(loc_name , cur_key_name); in append_multiple_key_values()
819 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
820 smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value)); in append_multiple_key_values()
834 static int handleAppendResult( int result, smart_str* loc_name) in handleAppendResult() argument
840 smart_str_free(loc_name); in handleAppendResult()
855 smart_str *loc_name = &loc_name_s; in PHP_FUNCTION() local
874 result = append_key_value(loc_name, hash_arr, LOC_GRANDFATHERED_LANG_TAG); in PHP_FUNCTION()
876 RETURN_SMART_STR(loc_name); in PHP_FUNCTION()
878 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
883 result = append_key_value(loc_name, hash_arr , LOC_LANG_TAG); in PHP_FUNCTION()
886 smart_str_free(loc_name); in PHP_FUNCTION()
889 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
894 result = append_multiple_key_values(loc_name, hash_arr , LOC_EXTLANG_TAG); in PHP_FUNCTION()
895 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
900 result = append_key_value(loc_name, hash_arr , LOC_SCRIPT_TAG); in PHP_FUNCTION()
901 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
906 result = append_key_value( loc_name, hash_arr , LOC_REGION_TAG); in PHP_FUNCTION()
907 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
912 result = append_multiple_key_values( loc_name, hash_arr , LOC_VARIANT_TAG); in PHP_FUNCTION()
913 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
918 result = append_multiple_key_values( loc_name, hash_arr , LOC_PRIVATE_TAG); in PHP_FUNCTION()
919 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
923 RETURN_SMART_STR(loc_name); in PHP_FUNCTION()
934 static zend_string* get_private_subtags(const char* loc_name) in get_private_subtags() argument
940 if( loc_name && (len = strlen(loc_name)) > 0 ){ in get_private_subtags()
942 mod_loc_name = loc_name ; in get_private_subtags()
973 static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name) in add_array_entry() argument
985 key_value = get_private_subtags( loc_name ); in add_array_entry()
988 key_value = get_icu_value_internal( loc_name , key_name , &result,1 ); in add_array_entry()
1035 const char* loc_name = NULL; in PHP_FUNCTION() local
1042 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
1047 INTL_CHECK_LOCALE_LEN(strlen(loc_name)); in PHP_FUNCTION()
1050 loc_name = intl_locale_get_default(); in PHP_FUNCTION()
1055 grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in PHP_FUNCTION()
1057 add_assoc_string( return_value , LOC_GRANDFATHERED_LANG_TAG, (char *)loc_name); in PHP_FUNCTION()
1061 add_array_entry( loc_name , return_value , LOC_LANG_TAG); in PHP_FUNCTION()
1062 add_array_entry( loc_name , return_value , LOC_SCRIPT_TAG); in PHP_FUNCTION()
1063 add_array_entry( loc_name , return_value , LOC_REGION_TAG); in PHP_FUNCTION()
1064 add_array_entry( loc_name , return_value , LOC_VARIANT_TAG); in PHP_FUNCTION()
1065 add_array_entry( loc_name , return_value , LOC_PRIVATE_TAG); in PHP_FUNCTION()
1073 const char* loc_name = NULL; in PHP_FUNCTION() local
1084 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
1090 loc_name = intl_locale_get_default(); in PHP_FUNCTION()
1091 loc_name_len = strlen(loc_name); in PHP_FUNCTION()
1099 if( findOffset( LOC_GRANDFATHERED , loc_name ) >= 0 ){ in PHP_FUNCTION()
1104 variant = get_icu_value_internal( loc_name , LOC_VARIANT_TAG , &result ,0); in PHP_FUNCTION()