Skip to content

Commit

Permalink
English Unicode 13.0, French Unicode 13.0. Add Alts and Both.
Browse files Browse the repository at this point in the history
Modified Both annotation to show language specific even if no
English annotation available - seen with example code 0x1fbc5
  • Loading branch information
JoesCat committed Mar 30, 2020
1 parent 0f302ab commit 2c2aa1a
Show file tree
Hide file tree
Showing 6 changed files with 7,159 additions and 3,372 deletions.
4 changes: 2 additions & 2 deletions buildnameslist.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,14 @@ static int dumpinit(FILE *out, FILE *header, int is_fr) {
fprintf( out, "UN_DLL_EXPORT\nint uniNamesList_nameBoth(unsigned long uni, unsigned int lang, const char **str0, const char **str1) {\n" );
fprintf( out, "\tint error=-1;\n\t*str0=*str1=NULL;\n#ifdef WANTLIBOFR\n" );
fprintf( out, "\tif ( uni<0x110000 && lang<=1 ) {\n\t\terror=0;\n\t\t*str0=uniNamesList_name(uni);\n" );
fprintf( out, "\t\tif ( lang && *str0!=NULL )\n\t\t\t*str1=uniNamesList_nameFR(uni);\n" );
fprintf( out, "\t\tif ( lang )\n\t\t\t*str1=uniNamesList_nameFR(uni);\n" );
fprintf( out, "\t\telse if ( lang==0 )\n\t\t\t*str1=*str0;\n\t}\n#else\n" );
fprintf( out, "\tif ( uni<0x110000 && lang==0 ) {\n\t\terror=0;\n\t\t*str0=*str1=uniNamesList_name(uni);\n" );
fprintf( out, "\t}\n#endif\n\treturn( error );\n}\n\nUN_DLL_EXPORT\n" );
fprintf( out, "int uniNamesList_annotBoth(unsigned long uni, unsigned int lang, const char **str0, const char **str1) {\n" );
fprintf( out, "\tint error=-1;\n\t*str0=*str1=NULL;\n" );
fprintf( out, "#ifdef WANTLIBOFR\n\tif ( uni<0x110000 && lang<=1 ) {\n\t\terror=0;\n" );
fprintf( out, "\t\t*str0=uniNamesList_annot(uni);\n\t\tif ( lang && *str0!=NULL )\n" );
fprintf( out, "\t\t*str0=uniNamesList_annot(uni);\n\t\tif ( lang )\n" );
fprintf( out, "\t\t\t*str1=uniNamesList_annotFR(uni);\n\t\telse if ( lang==0 )\n\t\t\t*str1=*str0;\n" );
fprintf( out, "\t}\n#else\n\tif ( uni<0x110000 && lang==0 ) {\n\t\terror=0;\n" );
fprintf( out, "\t\t*str0=*str1=uniNamesList_annot(uni);\n\t}\n#endif\n\treturn( error );\n}\n\n\n" );
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ m4_define([uninameslist_libver],

# These values below are kept for backwards compatibility with older programs
# that are using the French namesList. This increments with ListeDesNoms.txt.
m4_define([fr_major_version], [10]) dnl latest ListeDesNoms.txt = ver10.0
m4_define([fr_major_version], [13]) dnl latest ListeDesNoms.txt = ver13.0
m4_define([fr_minor_version], [0])
m4_define([uninameslist_fr_nameslist_ver], [fr_major_version.fr_minor_version])
m4_define([uninameslist_fr_current], [1])
Expand Down
Loading

0 comments on commit 2c2aa1a

Please sign in to comment.