Lines Matching refs:loc_name
254 static char* get_icu_value_internal( char* loc_name , char* tag_name, int* result , int fromParseLo… in get_icu_value_internal() argument
269 grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in get_icu_value_internal()
272 return estrdup(loc_name); in get_icu_value_internal()
282 if( strlen(loc_name)>1 && isIDPrefix(loc_name) ){ in get_icu_value_internal()
283 return estrdup(loc_name); 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()
372 char* loc_name = NULL; in get_icu_value_src_php() local
386 &loc_name ,&loc_name_len ) == FAILURE) { in get_icu_value_src_php()
395 loc_name = INTL_G(default_locale); in get_icu_value_src_php()
399 tag_value = get_icu_value_internal( loc_name , tag_name , &result ,0); in get_icu_value_src_php()
467 char* loc_name = NULL; in get_icu_disp_value_src_php() local
491 &loc_name, &loc_name_len , in get_icu_disp_value_src_php()
509 loc_name = INTL_G(default_locale); in get_icu_disp_value_src_php()
514 grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in get_icu_disp_value_src_php()
517 mod_loc_name = getPreferredTag( loc_name ); in get_icu_disp_value_src_php()
526 mod_loc_name = estrdup( loc_name ); in get_icu_disp_value_src_php()
679 char* loc_name = NULL; in PHP_FUNCTION() local
694 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
703 loc_name = INTL_G(default_locale); in PHP_FUNCTION()
707 e = uloc_openKeywords( loc_name, &status ); in PHP_FUNCTION()
717 kw_value_len=uloc_getKeywordValue( loc_name,kw_key, kw_value, kw_value_len , &status ); in PHP_FUNCTION()
721 kw_value_len=uloc_getKeywordValue( loc_name,kw_key, kw_value, kw_value_len+1 , &status ); in PHP_FUNCTION()
761 static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_name) in append_key_value() argument
773 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_key_value()
775 smart_str_appendl(loc_name, Z_STRVAL_PP(ele_value) , Z_STRLEN_PP(ele_value)); in append_key_value()
786 static void add_prefix(smart_str* loc_name, char* key_name) in add_prefix() argument
789 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in add_prefix()
790 smart_str_appendl(loc_name, PRIVATE_PREFIX , sizeof(PRIVATE_PREFIX)-1); in add_prefix()
802 static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, char* key_name TSRM… in append_multiple_key_values() argument
812 add_prefix( loc_name , key_name); in append_multiple_key_values()
814 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
815 smart_str_appendl(loc_name, Z_STRVAL_PP(ele_value) , Z_STRLEN_PP(ele_value)); in append_multiple_key_values()
828 add_prefix(loc_name , key_name); in append_multiple_key_values()
830 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
831 smart_str_appendl(loc_name, Z_STRVAL_PP(data) , Z_STRLEN_PP(data)); in append_multiple_key_values()
862 add_prefix(loc_name , cur_key_name); in append_multiple_key_values()
864 smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); in append_multiple_key_values()
865 smart_str_appendl(loc_name, Z_STRVAL_PP(ele_value) , Z_STRLEN_PP(ele_value)); in append_multiple_key_values()
879 static int handleAppendResult( int result, smart_str* loc_name TSRMLS_DC) in handleAppendResult()
885 smart_str_free(loc_name); in handleAppendResult()
902 smart_str *loc_name = &loc_name_s; in PHP_FUNCTION() local
923 result = append_key_value(loc_name, hash_arr, LOC_GRANDFATHERED_LANG_TAG); in PHP_FUNCTION()
925 RETURN_SMART_STR(loc_name); in PHP_FUNCTION()
927 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
932 result = append_key_value(loc_name, hash_arr , LOC_LANG_TAG); in PHP_FUNCTION()
936 smart_str_free(loc_name); in PHP_FUNCTION()
939 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
944 result = append_multiple_key_values(loc_name, hash_arr , LOC_EXTLANG_TAG TSRMLS_CC); in PHP_FUNCTION()
945 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
950 result = append_key_value(loc_name, hash_arr , LOC_SCRIPT_TAG); in PHP_FUNCTION()
951 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
956 result = append_key_value( loc_name, hash_arr , LOC_REGION_TAG); in PHP_FUNCTION()
957 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
962 result = append_multiple_key_values( loc_name, hash_arr , LOC_VARIANT_TAG TSRMLS_CC); in PHP_FUNCTION()
963 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
968 result = append_multiple_key_values( loc_name, hash_arr , LOC_PRIVATE_TAG TSRMLS_CC); in PHP_FUNCTION()
969 if( !handleAppendResult( result, loc_name TSRMLS_CC)){ in PHP_FUNCTION()
973 RETURN_SMART_STR(loc_name); in PHP_FUNCTION()
984 static char* get_private_subtags(char* loc_name) in get_private_subtags() argument
991 if( loc_name && (len = strlen(loc_name)>0 ) ){ in get_private_subtags()
992 mod_loc_name = loc_name ; in get_private_subtags()
1029 static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS_DC) in add_array_entry() argument
1042 key_value = get_private_subtags( loc_name ); in add_array_entry()
1045 key_value = get_icu_value_internal( loc_name , key_name , &result,1 ); in add_array_entry()
1094 char* loc_name = NULL; in PHP_FUNCTION() local
1101 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
1110 loc_name = INTL_G(default_locale); in PHP_FUNCTION()
1115 grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); in PHP_FUNCTION()
1117 add_assoc_string( return_value , LOC_GRANDFATHERED_LANG_TAG , estrdup(loc_name) ,FALSE ); in PHP_FUNCTION()
1121 add_array_entry( loc_name , return_value , LOC_LANG_TAG TSRMLS_CC); in PHP_FUNCTION()
1122 add_array_entry( loc_name , return_value , LOC_SCRIPT_TAG TSRMLS_CC); in PHP_FUNCTION()
1123 add_array_entry( loc_name , return_value , LOC_REGION_TAG TSRMLS_CC); in PHP_FUNCTION()
1124 add_array_entry( loc_name , return_value , LOC_VARIANT_TAG TSRMLS_CC); in PHP_FUNCTION()
1125 add_array_entry( loc_name , return_value , LOC_PRIVATE_TAG TSRMLS_CC); in PHP_FUNCTION()
1138 char* loc_name = NULL; in PHP_FUNCTION() local
1149 &loc_name, &loc_name_len ) == FAILURE) in PHP_FUNCTION()
1158 loc_name = INTL_G(default_locale); in PHP_FUNCTION()
1165 if( findOffset( LOC_GRANDFATHERED , loc_name ) >= 0 ){ in PHP_FUNCTION()
1170 variant = get_icu_value_internal( loc_name , LOC_VARIANT_TAG , &result ,0); in PHP_FUNCTION()