diff options
author | Dov Grobgeld <dov.grobgeld@gmail.com> | 2017-11-07 21:55:06 +0200 |
---|---|---|
committer | Dov Grobgeld <dov.grobgeld@gmail.com> | 2017-11-07 23:06:15 +0200 |
commit | 7588059c7d3378baf60d12f3217324781b2f7669 (patch) | |
tree | f3f29a58233679347ed344c3d91905ca1915427d /fribidi-vs-unicode | |
parent | 7be4e8f87c77d0ff4bdbd1638768e8772d89f7b2 (diff) | |
download | fribidi-7588059c7d3378baf60d12f3217324781b2f7669.tar.gz |
Restored the old API and made it deprecated.
* fribidi_get_par_embedding_levels() is now a deprecated interface to
the new fribidi_get_par_embedding_levels_ex() function with a
NULL pointer for the bracket type.
* Removed warnings of unassigned return values from fribidi-vs-unicode
test.c and test-character.c .
Diffstat (limited to 'fribidi-vs-unicode')
-rw-r--r-- | fribidi-vs-unicode/test-character.c | 35 | ||||
-rw-r--r-- | fribidi-vs-unicode/test.c | 38 |
2 files changed, 40 insertions, 33 deletions
diff --git a/fribidi-vs-unicode/test-character.c b/fribidi-vs-unicode/test-character.c index a4087ee..545b7fa 100644 --- a/fribidi-vs-unicode/test-character.c +++ b/fribidi-vs-unicode/test-character.c @@ -298,21 +298,23 @@ main (int argc, char **argv) case 2: base_dir = FRIBIDI_PAR_ON; break; } - fribidi_get_par_embedding_levels (types, - bracket_types, - types_len, - &base_dir, - levels); + if (fribidi_get_par_embedding_levels_ex (types, + bracket_types, + types_len, + &base_dir, + levels)) + ; for (i = 0; i < types_len; i++) ltor[i] = i; - fribidi_reorder_line (0 /*FRIBIDI_FLAG_REORDER_NSM*/, - types, types_len, - 0, base_dir, - levels, - NULL, - ltor); + if (fribidi_reorder_line (0 /*FRIBIDI_FLAG_REORDER_NSM*/, + types, types_len, + 0, base_dir, + levels, + NULL, + ltor)) + ; j = 0; for (i = 0; i < types_len; i++) @@ -382,11 +384,12 @@ main (int argc, char **argv) case 2: base_dir = FRIBIDI_PAR_RTL; break; } - fribidi_get_par_embedding_levels (types, - bracket_types, - types_len, - &base_dir, - levels); + if (fribidi_get_par_embedding_levels_ex (types, + bracket_types, + types_len, + &base_dir, + levels)) + ; fribidi_set_debug (0); } diff --git a/fribidi-vs-unicode/test.c b/fribidi-vs-unicode/test.c index 35d74d2..8571142 100644 --- a/fribidi-vs-unicode/test.c +++ b/fribidi-vs-unicode/test.c @@ -274,21 +274,23 @@ main (int argc, char **argv) case 2: base_dir = FRIBIDI_PAR_RTL; break; } - fribidi_get_par_embedding_levels (types, - NULL, /* Brackets are not used in the BidiTest.txt file */ - types_len, - &base_dir, - levels); + if (fribidi_get_par_embedding_levels_ex (types, + NULL, /* Brackets are not used in the BidiTest.txt file */ + types_len, + &base_dir, + levels)) + ; for (i = 0; i < types_len; i++) ltor[i] = i; - fribidi_reorder_line (0 /*FRIBIDI_FLAG_REORDER_NSM*/, - types, types_len, - 0, base_dir, - levels, - NULL, - ltor); + if (fribidi_reorder_line (0 /*FRIBIDI_FLAG_REORDER_NSM*/, + types, types_len, + 0, base_dir, + levels, + NULL, + ltor)) + ; j = 0; for (i = 0; i < types_len; i++) @@ -347,7 +349,8 @@ main (int argc, char **argv) g_printerr (" %d", ltor[i]); g_printerr ("\n"); - if (debug) { + if (debug) + { FriBidiParType base_dir; fribidi_set_debug (1); @@ -358,11 +361,12 @@ main (int argc, char **argv) case 2: base_dir = FRIBIDI_PAR_RTL; break; } - fribidi_get_par_embedding_levels (types, - NULL, /* No bracket types */ - types_len, - &base_dir, - levels); + if (fribidi_get_par_embedding_levels_ex (types, + NULL, /* No bracket types */ + types_len, + &base_dir, + levels)) + ; fribidi_set_debug (0); } |