Lines Matching refs:loc_name

257 static zend_string* get_icu_value_internal( const char* loc_name , char* tag_name, int* result , in…  in get_icu_value_internal()  argument
267 if (strlen(loc_name) > INTL_MAX_LOCALE_LEN) { in get_icu_value_internal()
273 zend_off_t grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in get_icu_value_internal()
276 return zend_string_init(loc_name, strlen(loc_name), 0); in get_icu_value_internal()
288 if( strlen(loc_name)>1 && (isIDPrefix(loc_name) == 1) ){ in get_icu_value_internal()
289 return zend_string_init(loc_name, strlen(loc_name), 0); in get_icu_value_internal()
293 singletonPos = getSingletonPos( loc_name ); in get_icu_value_internal()
301 mod_loc_name = estrndup ( loc_name , singletonPos-1); in get_icu_value_internal()
308 mod_loc_name = estrdup(loc_name ); in get_icu_value_internal()
385 const char* loc_name = NULL; in get_icu_value_src_php() local
399 &loc_name ,&loc_name_len ) == FAILURE) { in get_icu_value_src_php()
408 loc_name = intl_locale_get_default(); in get_icu_value_src_php()
409 loc_name_len = strlen(loc_name); in get_icu_value_src_php()
415 tag_value = get_icu_value_internal( loc_name , tag_name , &result ,0); in get_icu_value_src_php()
484 const char* loc_name = NULL; in get_icu_disp_value_src_php() local
506 &loc_name, &loc_name_len , in get_icu_disp_value_src_php()
524 loc_name = intl_locale_get_default(); in get_icu_disp_value_src_php()
529 int grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in get_icu_disp_value_src_php()
532 mod_loc_name = getPreferredTag( loc_name ); in get_icu_disp_value_src_php()
541 mod_loc_name = estrdup( loc_name ); in get_icu_disp_value_src_php()
693 const char* loc_name = NULL; in PHP_FUNCTION() local
699 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
707 INTL_CHECK_LOCALE_LEN(strlen(loc_name)); in PHP_FUNCTION()
710 loc_name = intl_locale_get_default(); in PHP_FUNCTION()
714 e = uloc_openKeywords( loc_name, &status ); in PHP_FUNCTION()
732 …kw_value_len=uloc_getKeywordValue( loc_name, kw_key, ZSTR_VAL(kw_value_str), kw_value_len, &status… in PHP_FUNCTION()
736 …kw_value_len=uloc_getKeywordValue( loc_name,kw_key, ZSTR_VAL(kw_value_str), kw_value_len+1, &statu… in PHP_FUNCTION()
776 static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_name) in append_key_value() argument
788 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_key_value()
790 smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value)); in append_key_value()
801 static void add_prefix(smart_str* loc_name, char* key_name) in add_prefix() argument
804 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in add_prefix()
805 smart_str_appendl(loc_name, PRIVATE_PREFIX , sizeof(PRIVATE_PREFIX)-1); in add_prefix()
817 static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, char* key_name) in append_multiple_key_values() argument
825 add_prefix( loc_name , key_name); in append_multiple_key_values()
827 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
828 smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value)); in append_multiple_key_values()
839 add_prefix(loc_name , key_name); in append_multiple_key_values()
841 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
842 smart_str_appendl(loc_name, Z_STRVAL_P(data) , Z_STRLEN_P(data)); in append_multiple_key_values()
873 add_prefix(loc_name , cur_key_name); in append_multiple_key_values()
875 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
876 smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value)); in append_multiple_key_values()
890 static int handleAppendResult( int result, smart_str* loc_name) in handleAppendResult() argument
896 smart_str_free(loc_name); in handleAppendResult()
913 smart_str *loc_name = &loc_name_s; in PHP_FUNCTION() local
934 result = append_key_value(loc_name, hash_arr, LOC_GRANDFATHERED_LANG_TAG); in PHP_FUNCTION()
936 RETURN_SMART_STR(loc_name); in PHP_FUNCTION()
938 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
943 result = append_key_value(loc_name, hash_arr , LOC_LANG_TAG); in PHP_FUNCTION()
947 smart_str_free(loc_name); in PHP_FUNCTION()
950 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
955 result = append_multiple_key_values(loc_name, hash_arr , LOC_EXTLANG_TAG); in PHP_FUNCTION()
956 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
961 result = append_key_value(loc_name, hash_arr , LOC_SCRIPT_TAG); in PHP_FUNCTION()
962 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
967 result = append_key_value( loc_name, hash_arr , LOC_REGION_TAG); in PHP_FUNCTION()
968 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
973 result = append_multiple_key_values( loc_name, hash_arr , LOC_VARIANT_TAG); in PHP_FUNCTION()
974 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
979 result = append_multiple_key_values( loc_name, hash_arr , LOC_PRIVATE_TAG); in PHP_FUNCTION()
980 if( !handleAppendResult( result, loc_name)){ in PHP_FUNCTION()
984 RETURN_SMART_STR(loc_name); in PHP_FUNCTION()
995 static zend_string* get_private_subtags(const char* loc_name) in get_private_subtags() argument
1001 if( loc_name && (len = strlen(loc_name)) > 0 ){ in get_private_subtags()
1003 mod_loc_name = loc_name ; in get_private_subtags()
1035 static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name) in add_array_entry() argument
1047 key_value = get_private_subtags( loc_name ); in add_array_entry()
1050 key_value = get_icu_value_internal( loc_name , key_name , &result,1 ); in add_array_entry()
1102 const char* loc_name = NULL; in PHP_FUNCTION() local
1109 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
1117 INTL_CHECK_LOCALE_LEN(strlen(loc_name)); in PHP_FUNCTION()
1120 loc_name = intl_locale_get_default(); in PHP_FUNCTION()
1125 grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in PHP_FUNCTION()
1127 add_assoc_string( return_value , LOC_GRANDFATHERED_LANG_TAG, (char *)loc_name); in PHP_FUNCTION()
1131 add_array_entry( loc_name , return_value , LOC_LANG_TAG); in PHP_FUNCTION()
1132 add_array_entry( loc_name , return_value , LOC_SCRIPT_TAG); in PHP_FUNCTION()
1133 add_array_entry( loc_name , return_value , LOC_REGION_TAG); in PHP_FUNCTION()
1134 add_array_entry( loc_name , return_value , LOC_VARIANT_TAG); in PHP_FUNCTION()
1135 add_array_entry( loc_name , return_value , LOC_PRIVATE_TAG); in PHP_FUNCTION()
1148 const char* loc_name = NULL; in PHP_FUNCTION() local
1159 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
1168 loc_name = intl_locale_get_default(); in PHP_FUNCTION()
1169 loc_name_len = strlen(loc_name); in PHP_FUNCTION()
1177 if( findOffset( LOC_GRANDFATHERED , loc_name ) >= 0 ){ in PHP_FUNCTION()
1182 variant = get_icu_value_internal( loc_name , LOC_VARIANT_TAG , &result ,0); in PHP_FUNCTION()