| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
| 3 * Copyright © 2011 Google, Inc. | 3 * Copyright © 2011 Google, Inc. |
| 4 * | 4 * |
| 5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
| 6 * | 6 * |
| 7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
| 8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
| 9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
| 10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 buf[7] = (tag >> 16) & 0xFF; | 920 buf[7] = (tag >> 16) & 0xFF; |
| 921 buf[8] = (tag >> 8) & 0xFF; | 921 buf[8] = (tag >> 8) & 0xFF; |
| 922 buf[9] = tag & 0xFF; | 922 buf[9] = tag & 0xFF; |
| 923 if (buf[9] == 0x20) | 923 if (buf[9] == 0x20) |
| 924 buf[9] = '\0'; | 924 buf[9] = '\0'; |
| 925 buf[10] = '\0'; | 925 buf[10] = '\0'; |
| 926 return hb_language_from_string ((char *) buf, -1); | 926 return hb_language_from_string ((char *) buf, -1); |
| 927 } | 927 } |
| 928 } | 928 } |
| 929 | 929 |
| 930 #if 0 | 930 #ifdef MAIN |
| 931 static inline void | 931 static inline void |
| 932 test_langs_sorted (void) | 932 test_langs_sorted (void) |
| 933 { | 933 { |
| 934 for (unsigned int i = 1; i < ARRAY_LENGTH (ot_languages); i++) | 934 for (unsigned int i = 1; i < ARRAY_LENGTH (ot_languages); i++) |
| 935 { | 935 { |
| 936 int c = lang_compare_first_component (ot_languages[i-1].language, ot_languag
es[i].language); | 936 int c = lang_compare_first_component (ot_languages[i-1].language, ot_languag
es[i].language); |
| 937 if (c >= 0) | 937 if (c >= 0) |
| 938 { | 938 { |
| 939 fprintf (stderr, "ot_languages not sorted at index %d: %s %d %s\n", | 939 fprintf (stderr, "ot_languages not sorted at index %d: %s %d %s\n", |
| 940 i, ot_languages[i-1].language, c, ot_languages[i].language); | 940 i, ot_languages[i-1].language, c, ot_languages[i].language); |
| 941 abort(); | 941 abort(); |
| 942 } | 942 } |
| 943 } | 943 } |
| 944 } | 944 } |
| 945 #endif | |
| 946 | 945 |
| 947 #ifdef MAIN | |
| 948 int | 946 int |
| 949 main (void) | 947 main (void) |
| 950 { | 948 { |
| 951 test_langs_sorted (); | 949 test_langs_sorted (); |
| 952 return 0; | 950 return 0; |
| 953 } | 951 } |
| 954 | 952 |
| 955 #endif | 953 #endif |
| OLD | NEW |