diff options
author | behdad <behdad> | 2005-07-30 09:06:27 +0000 |
---|---|---|
committer | behdad <behdad> | 2005-07-30 09:06:27 +0000 |
commit | e8bca571a125502fe0735cf45d6af1d3a85a49c7 (patch) | |
tree | 05ee6f46cecbb78a212ef351444a4669928939b6 | |
parent | 6f84aff9f7901178ef9e7e2e463a04e639b5a606 (diff) | |
download | fribidi-e8bca571a125502fe0735cf45d6af1d3a85a49c7.tar.gz |
Small changes to shut gcc warnings up.
-rw-r--r-- | .cvsignore | 1 | ||||
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | USERS | 4 | ||||
-rw-r--r-- | bin/fribidi-benchmark.c | 17 | ||||
-rw-r--r-- | bin/fribidi-bidi-types.c | 7 | ||||
-rw-r--r-- | bin/fribidi-caprtl2utf8.c | 17 | ||||
-rw-r--r-- | bin/fribidi-main.c | 30 | ||||
-rw-r--r-- | charset/fribidi-char-sets-cap-rtl.c | 78 | ||||
-rw-r--r-- | charset/fribidi-char-sets-utf8.c | 12 | ||||
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | gen.tab/gen-unicode-version.c | 33 | ||||
-rw-r--r-- | lib/fribidi-bidi.c | 10 | ||||
-rw-r--r-- | lib/fribidi-types.h | 10 | ||||
-rw-r--r-- | lib/fribidi.c | 8 |
14 files changed, 138 insertions, 116 deletions
@@ -16,4 +16,5 @@ install-sh libtool ltmain.sh missing +mkinstalldirs stamp-h1 diff --git a/Makefile.am b/Makefile.am index 2cd57a9..5b6727c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,10 @@ ## -*- Automake -*- ## Process this file with automake to produce Makefile.in ############################################################################## -## $Id: Makefile.am,v 1.8 2004-08-27 21:55:59 behdad Exp $ +## $Id: Makefile.am,v 1.9 2005-07-30 09:06:27 behdad Exp $ ## $Author: behdad $ -## $Date: 2004-08-27 21:55:59 $ -## $Revision: 1.8 $ +## $Date: 2005-07-30 09:06:27 $ +## $Revision: 1.9 $ ## $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/Makefile.am,v $ ############################################################################## @@ -33,6 +33,7 @@ MAINTAINERCLEANFILES = \ $(srcdir)/install-sh \ $(srcdir)/ltmain.sh \ $(srcdir)/missing \ + $(srcdir)/mkinstalldirs \ `find "$(srcdir)" -type f -name Makefile.in -print` \ `find "$(srcdir)" -type f -name "*~" -print` \ `$(srcdir)/bootstrap --write-configure` @@ -6,4 +6,6 @@ mlterm: http://mlterm.sourceforge.net/ MPlayer: http://www.mplayerhq.hu/ BiCon: http://www.arabeyes.org/project.php?proj=BiCon Geresh: http://www.typo.co.il/~mooffie/geresh/ -Motor: http://konst.org.ua/en/motor +Motor: http://konst.org.ua/en/motor/ +CenterICQ: http://konst.org.ua/centericq/ +bidiv: http://www.iglu.org.il/faq/cache/153.html diff --git a/bin/fribidi-benchmark.c b/bin/fribidi-benchmark.c index 3de8795..9ca5750 100644 --- a/bin/fribidi-benchmark.c +++ b/bin/fribidi-benchmark.c @@ -1,10 +1,10 @@ /* FriBidi * fribidi-benchmark.c - command line benchmark tool for libfribidi * - * $Id: fribidi-benchmark.c,v 1.4 2004-06-09 08:56:53 behdad Exp $ + * $Id: fribidi-benchmark.c,v 1.5 2005-07-30 09:06:27 behdad Exp $ * $Author: behdad $ - * $Date: 2004-06-09 08:56:53 $ - * $Revision: 1.4 $ + * $Date: 2005-07-30 09:06:27 $ + * $Revision: 1.5 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/bin/fribidi-benchmark.c,v $ * * Authors: @@ -64,6 +64,7 @@ #define appname "fribidi_benchmark" #define MAX_STR_LEN 1000 +#define NUM_ITER 2000 static void die2 ( @@ -92,8 +93,6 @@ die2 ( "a _L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_Rbug" \ "here_L is_o_o_o _R ab one_o _r 123,987_LT_oHE_R t_o oNE:" \ -int niter; - static void help ( void @@ -106,7 +105,7 @@ help ( " -h, --help Display this information and exit\n" " -V, --version Display version information and exit\n" " -n, --niter N Number of iterations. Default is %d.\n" - "\nReport bugs online at\n<" FRIBIDI_BUGREPORT ">.\n", niter); + "\nReport bugs online at\n<" FRIBIDI_BUGREPORT ">.\n", NUM_ITER); exit (0); } @@ -131,7 +130,7 @@ utime ( static void benchmark ( - char *S_, + const char *S_, int niter ) { @@ -139,7 +138,7 @@ benchmark ( FriBidiChar us[MAX_STR_LEN], out_us[MAX_STR_LEN]; FriBidiStrIndex positionLtoV[MAX_STR_LEN], positionVtoL[MAX_STR_LEN]; FriBidiLevel embedding_list[MAX_STR_LEN]; - FriBidiCharType base; + FriBidiParType base; double time0, time1; { @@ -226,7 +225,7 @@ main ( char *argv[] ) { - niter = 2000; + int niter = NUM_ITER; /* Parse the command line */ argv[0] = appname; diff --git a/bin/fribidi-bidi-types.c b/bin/fribidi-bidi-types.c index ecc8dfc..efdf44b 100644 --- a/bin/fribidi-bidi-types.c +++ b/bin/fribidi-bidi-types.c @@ -2,13 +2,16 @@ #include <fribidi.h> int -main() +main ( + void +) { FriBidiChar c; for (c = 0; c < FRIBIDI_UNICODE_CHARS; c++) - printf ("0x%04lx %s\n", (long) c, fribidi_get_bidi_type_name(fribidi_get_bidi_type(c))); + printf ("0x%04lx %s\n", (long) c, + fribidi_get_bidi_type_name (fribidi_get_bidi_type (c))); return 0; } diff --git a/bin/fribidi-caprtl2utf8.c b/bin/fribidi-caprtl2utf8.c index cc7c8ac..492b44e 100644 --- a/bin/fribidi-caprtl2utf8.c +++ b/bin/fribidi-caprtl2utf8.c @@ -5,23 +5,26 @@ char buf[BUFSIZ]; FriBidiChar ubuf[BUFSIZ]; -int main() +int +main ( + void +) { - FriBidiCharSet caprtl = fribidi_parse_charset("CapRTL"); - FriBidiCharSet utf8 = fribidi_parse_charset("UTF-8"); + FriBidiCharSet caprtl = fribidi_parse_charset ("CapRTL"); + FriBidiCharSet utf8 = fribidi_parse_charset ("UTF-8"); - while (fgets(buf, sizeof buf, stdin)) + while (fgets (buf, sizeof buf, stdin)) { char eol[5]; - FriBidiStrIndex len = strlen(buf); - while (len && (buf[len-1] == '\n' || buf[len-1] == '\r')) + FriBidiStrIndex len = strlen (buf); + while (len && (buf[len - 1] == '\n' || buf[len - 1] == '\r')) len--; strncpy (eol, buf + len, sizeof eol); buf[len] = 0; len = fribidi_charset_to_unicode (caprtl, buf, len, ubuf); - fprintf(stderr, "%d\n", len); + fprintf (stderr, "%d\n", len); len = fribidi_unicode_to_charset (utf8, ubuf, len, buf); buf[len] = 0; diff --git a/bin/fribidi-main.c b/bin/fribidi-main.c index 3744fe7..aa8451b 100644 --- a/bin/fribidi-main.c +++ b/bin/fribidi-main.c @@ -1,10 +1,10 @@ /* FriBidi * fribidi-main.c - command line program for libfribidi * - * $Id: fribidi-main.c,v 1.11 2004-06-23 22:26:06 behdad Exp $ + * $Id: fribidi-main.c,v 1.12 2005-07-30 09:06:27 behdad Exp $ * $Author: behdad $ - * $Date: 2004-06-23 22:26:06 $ - * $Revision: 1.11 $ + * $Date: 2005-07-30 09:06:27 $ + * $Revision: 1.12 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/bin/fribidi-main.c,v $ * * Authors: @@ -91,9 +91,9 @@ fribidi_boolean do_break, do_pad, do_mirror, do_reorder_nsm, do_clean; fribidi_boolean show_input, show_visual, show_basedir; fribidi_boolean show_ltov, show_vtol, show_levels; int text_width; -char *char_set; -char *bol_text, *eol_text; -FriBidiCharType input_base_direction; +const char *char_set; +const char *bol_text, *eol_text; +FriBidiParType input_base_direction; #if FRIBIDI_MAIN_USE_ICONV_H iconv_t to_ucs4, from_ucs4; #else /* !FRIBIDI_MAIN_USE_ICONV_H */ @@ -185,7 +185,7 @@ version ( exit (0); } -char * +static char * my_fribidi_strdup ( char *s ) @@ -227,7 +227,7 @@ main ( char_set = "UTF-8"; bol_text = NULL; eol_text = NULL; - input_base_direction = FRIBIDI_TYPE_ON; + input_base_direction = FRIBIDI_PAR_ON; if ((s = (char *) getenv ("COLUMNS"))) { @@ -374,23 +374,23 @@ main ( file_found = false; while (optind < argc || !file_found) { - char *S_; + const char *filename; - S_ = optind < argc ? argv[optind++] : "-"; + filename = optind < argc ? argv[optind++] : "-"; file_found = true; /* Open the infile for reading */ - if (S_[0] == '-' && !S_[1]) + if (filename[0] == '-' && !filename[1]) { IN = stdin; } else { - IN = fopen (S_, "r"); + IN = fopen (filename, "r"); if (!IN) { fprintf (stderr, "%s: %s: no such file or directory\n", - appname, S_); + appname, filename); exit_val = 1; continue; } @@ -406,10 +406,10 @@ main ( while (fgets (S_, sizeof (S_) - 1, IN)) { - char *new_line, *nl_found; + const char *new_line, *nl_found; FriBidiChar logical[MAX_STR_LEN]; char outstring[MAX_STR_LEN]; - FriBidiCharType base; + FriBidiParType base; FriBidiStrIndex len; nl_found = ""; diff --git a/charset/fribidi-char-sets-cap-rtl.c b/charset/fribidi-char-sets-cap-rtl.c index a81268c..e5e6cb1 100644 --- a/charset/fribidi-char-sets-cap-rtl.c +++ b/charset/fribidi-char-sets-cap-rtl.c @@ -1,10 +1,10 @@ /* FriBidi * fribidi-char-sets-cap-rtl.c - CapRTL character set conversion routines * - * $Id: fribidi-char-sets-cap-rtl.c,v 1.10 2005-01-10 06:43:53 behdad Exp $ + * $Id: fribidi-char-sets-cap-rtl.c,v 1.11 2005-07-30 09:06:28 behdad Exp $ * $Author: behdad $ - * $Date: 2005-01-10 06:43:53 $ - * $Revision: 1.10 $ + * $Date: 2005-07-30 09:06:28 $ + * $Revision: 1.11 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-cap-rtl.c,v $ * * Authors: @@ -45,14 +45,21 @@ #include <stdio.h> -enum MyFriBidiTypeEnum +enum { # define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) TYPE = FRIBIDI_TYPE_##TYPE, # include "fribidi-bidi-types-list.h" # undef _FRIBIDI_ADD_TYPE - _FRIBIDI_NUM_TYPES + _FRIBIDI_MAX_TYPES_VALUE }; +enum +{ +# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) DUMMY_##TYPE, +# include "fribidi-bidi-types-list.h" +# undef _FRIBIDI_ADD_TYPE + _FRIBIDI_NUM_TYPES +}; static FriBidiCharType CapRTLCharTypes[] = { /* *INDENT-OFF* */ @@ -67,7 +74,7 @@ static FriBidiCharType CapRTLCharTypes[] = { /* *INDENT-ON* */ }; -#define CAPRTL_CHARS (sizeof CapRTLCharTypes / sizeof CapRTLCharTypes[0]) +#define CAPRTL_CHARS (int)(sizeof CapRTLCharTypes / sizeof CapRTLCharTypes[0]) static FriBidiChar *caprtl_to_unicode = NULL; @@ -78,7 +85,7 @@ init_cap_rtl ( { int request[_FRIBIDI_NUM_TYPES]; FriBidiCharType to_type[_FRIBIDI_NUM_TYPES]; - int num_types = 0, j, count = 0; + int num_types = 0, count = 0; FriBidiCharType i; char mark[CAPRTL_CHARS]; @@ -86,17 +93,20 @@ init_cap_rtl ( (FriBidiChar *) fribidi_malloc (CAPRTL_CHARS * sizeof caprtl_to_unicode[0]); for (i = 0; i < CAPRTL_CHARS; i++) - if (CapRTLCharTypes[i] == fribidi_get_bidi_type(i)) - { - caprtl_to_unicode[i] = i; - mark[i] = 1; - } + if (CapRTLCharTypes[i] == fribidi_get_bidi_type (i)) + { + caprtl_to_unicode[i] = i; + mark[i] = 1; + } else { + int j; + caprtl_to_unicode[i] = FRIBIDI_UNICODE_CHARS; mark[i] = 0; - if (fribidi_get_mirror_char (i, NULL)) - DBG ("warning: I could not map mirroring character map to itself in CapRTL"); + if (fribidi_get_mirror_char (i, NULL)) + DBG + ("warning: I could not map mirroring character map to itself in CapRTL"); for (j = 0; j < num_types; j++) if (to_type[j] == CapRTLCharTypes[i]) @@ -121,25 +131,26 @@ init_cap_rtl ( if (!request[j]) /* Do not need this type */ continue; for (k = 0; k < CAPRTL_CHARS; k++) - if (caprtl_to_unicode[k] == FRIBIDI_UNICODE_CHARS && to_type[j] == CapRTLCharTypes[k]) - { - request[j]--; - count--; - caprtl_to_unicode[k] = i; - break; - } + if (caprtl_to_unicode[k] == FRIBIDI_UNICODE_CHARS + && to_type[j] == CapRTLCharTypes[k]) + { + request[j]--; + count--; + caprtl_to_unicode[k] = i; + break; + } } if (count) - { - int j; + { + int j; + + DBG ("warning: could not find a mapping for CapRTL to Unicode:"); + for (j = 0; j < num_types; j++) + if (request[j]) + DBG2 (" need this type: %s", fribidi_get_bidi_type_name + (to_type[j])); - DBG ("warning: could not find a mapping for CapRTL to Unicode:"); - for (j = 0; j < num_types; j++) - if (request[j]) - DBG2 (" need this type: %s", fribidi_get_bidi_type_name - (to_type[j])); - - } + } } static char @@ -155,7 +166,7 @@ fribidi_unicode_to_cap_rtl_c ( for (i = 0; i < CAPRTL_CHARS; i++) if (uch == caprtl_to_unicode[i]) - return (char) i; + return (unsigned char) i; return '?'; } @@ -224,12 +235,13 @@ FriBidiStrIndex fribidi_unicode_to_cap_rtl ( /* input */ const FriBidiChar *us, - int len, + FriBidiStrIndex len, /* output */ char *s ) { - int i, j; + FriBidiStrIndex i; + int j; j = 0; for (i = 0; i < len; i++) diff --git a/charset/fribidi-char-sets-utf8.c b/charset/fribidi-char-sets-utf8.c index 3933aea..668c941 100644 --- a/charset/fribidi-char-sets-utf8.c +++ b/charset/fribidi-char-sets-utf8.c @@ -1,10 +1,10 @@ /* FriBidi * fribidi-char-sets-utf8.c - UTF-8 character set conversion routines * - * $Id: fribidi-char-sets-utf8.c,v 1.2 2004-05-03 22:05:19 behdad Exp $ + * $Id: fribidi-char-sets-utf8.c,v 1.3 2005-07-30 09:06:28 behdad Exp $ * $Author: behdad $ - * $Date: 2004-05-03 22:05:19 $ - * $Revision: 1.2 $ + * $Date: 2005-07-30 09:06:28 $ + * $Revision: 1.3 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-utf8.c,v $ * * Authors: @@ -49,11 +49,11 @@ fribidi_utf8_to_unicode ( ) { FriBidiStrIndex length; - const unsigned char *s = (unsigned char *) ss; + const unsigned char *s = (unsigned const char *) ss; const unsigned char *t = s; length = 0; - while (s - t < len) + while ((FriBidiStrIndex) (s - t) < len) { register unsigned char ch = *s; if (ch <= 0x7f) /* one byte */ @@ -86,7 +86,7 @@ fribidi_unicode_to_utf8 ( char *ss ) { - int i; + FriBidiStrIndex i; unsigned char *s = (unsigned char *) ss; unsigned char *t = s; diff --git a/configure.ac b/configure.ac index 8dc6b9d..26377f2 100644 --- a/configure.ac +++ b/configure.ac @@ -3,10 +3,10 @@ ## Use autoupdate to update this file for newer versions of autoconf. ## Use autoscan to check if you need to add something to this file. ############################################################################## -## $Id: configure.ac,v 1.19 2005-06-07 08:44:23 behdad Exp $ +## $Id: configure.ac,v 1.20 2005-07-30 09:06:27 behdad Exp $ ## $Auther: behdad $ -## $Date: 2005-06-07 08:44:23 $ -## $Revision: 1.19 $ +## $Date: 2005-07-30 09:06:27 $ +## $Revision: 1.20 $ ## $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/configure.ac,v $ ############################################################################## @@ -44,7 +44,7 @@ m4_define(fribidi_version, fribidi_major_version.fribidi_minor_version.fribidi_micro_version))dnl AC_INIT([GNU FriBidi],fribidi_version(),[http://bugs.freedesktop.org/enter_bug.cgi?product=FriBidi]) -AC_REVISION([$Id: configure.ac,v 1.19 2005-06-07 08:44:23 behdad Exp $]) +AC_REVISION([$Id: configure.ac,v 1.20 2005-07-30 09:06:27 behdad Exp $]) AC_CONFIG_SRCDIR(lib/fribidi.h) AC_CONFIG_HEADERS(config.h) AM_INIT_AUTOMAKE([gnits]) @@ -209,13 +209,13 @@ AC_SUBST(MISC_PACKAGES) # Generate output AC_CONFIG_FILES([fribidi.pc - fribidi.spec - lib/fribidi-config.h - Makefile + fribidi.spec + lib/fribidi-config.h + Makefile charset/Makefile gen.tab/Makefile - lib/Makefile - bin/Makefile + lib/Makefile + bin/Makefile doc/Makefile - test/Makefile]) + test/Makefile]) AC_OUTPUT diff --git a/gen.tab/gen-unicode-version.c b/gen.tab/gen-unicode-version.c index cdd7d6f..439d388 100644 --- a/gen.tab/gen-unicode-version.c +++ b/gen.tab/gen-unicode-version.c @@ -1,10 +1,10 @@ /* FriBidi * gen-unicode-version.c - generate fribidi-unicode-version.h * - * $Id: gen-unicode-version.c,v 1.9 2005-06-07 08:43:17 behdad Exp $ + * $Id: gen-unicode-version.c,v 1.10 2005-07-30 09:06:28 behdad Exp $ * $Author: behdad $ - * $Date: 2005-06-07 08:43:17 $ - * $Revision: 1.9 $ + * $Date: 2005-07-30 09:06:28 $ + * $Revision: 1.10 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/gen.tab/gen-unicode-version.c,v $ * * Author: @@ -108,7 +108,7 @@ read_file ( const char *where; if (READ_VERSION ("Version ") || READ_VERSION ("Unicode ")) - { + { found = 1; break; } @@ -147,8 +147,7 @@ gen_unicode_version ( const char *data_file_type ) { - fprintf (stderr, - "Generating `" outputname "'\n"); + fprintf (stderr, "Generating `" outputname "'\n"); printf ("/* " outputname "\n * generated by " appname " (" FRIBIDI_NAME " " FRIBIDI_VERSION ")\n" " * from the file %s */\n\n", data_file_type); @@ -180,21 +179,23 @@ main ( int found = 0; if (argc < 2) - die ("usage:\n " appname " /path/to/a/UCD/file [/path/to/more/UCD/files ...]"); + die ("usage:\n " appname + " /path/to/a/UCD/file [/path/to/more/UCD/files ...]"); { const char *data_file_name; init (); - for (i = 1; i < argc && !found; i++) { - data_file_name = argv[i]; - data_file_type = strrchr (data_file_name, '/'); - if (data_file_type) - data_file_type++; - else - data_file_type = data_file_name; - found = read_data (data_file_type, data_file_name); - } + for (i = 1; i < argc && !found; i++) + { + data_file_name = argv[i]; + data_file_type = strrchr (data_file_name, '/'); + if (data_file_type) + data_file_type++; + else + data_file_type = data_file_name; + found = read_data (data_file_type, data_file_name); + } if (!found) die ("error: version not found"); gen_unicode_version (data_file_type); diff --git a/lib/fribidi-bidi.c b/lib/fribidi-bidi.c index ff760e5..c3258dd 100644 --- a/lib/fribidi-bidi.c +++ b/lib/fribidi-bidi.c @@ -1,10 +1,10 @@ /* FriBidi * fribidi-bidi.c - bidirectional algorithm * - * $Id: fribidi-bidi.c,v 1.17 2004-06-21 18:49:23 behdad Exp $ + * $Id: fribidi-bidi.c,v 1.18 2005-07-30 09:06:28 behdad Exp $ * $Author: behdad $ - * $Date: 2004-06-21 18:49:23 $ - * $Revision: 1.17 $ + * $Date: 2005-07-30 09:06:28 $ + * $Revision: 1.18 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-bidi.c,v $ * * Authors: @@ -899,8 +899,8 @@ fribidi_reorder_line ( } if UNLIKELY - (off + len > FRIBIDI_MAX_STRING_LENGTH && (positions_V_to_L || - positions_L_to_V)) + ((unsigned long) off + (unsigned long) len > + FRIBIDI_MAX_STRING_LENGTH && (positions_V_to_L || positions_L_to_V)) { # if DEBUG MSG2 (FRIBIDI ": cannot handle strings > %lu characters\n", diff --git a/lib/fribidi-types.h b/lib/fribidi-types.h index 2bc954d..83428b3 100644 --- a/lib/fribidi-types.h +++ b/lib/fribidi-types.h @@ -1,10 +1,10 @@ /* FriBidi * fribidi-types.h - define data types for the rest of the library * - * $Id: fribidi-types.h,v 1.9 2004-07-03 11:36:15 behdad Exp $ + * $Id: fribidi-types.h,v 1.10 2005-07-30 09:06:28 behdad Exp $ * $Author: behdad $ - * $Date: 2004-07-03 11:36:15 $ - * $Revision: 1.9 $ + * $Date: 2005-07-30 09:06:28 $ + * $Revision: 1.10 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-types.h,v $ * * Author: @@ -132,8 +132,8 @@ typedef FRIBIDI_STR_INDEX FriBidiStrIndex; #ifndef FRIBIDI_MAX_STRING_LENGTH # define FRIBIDI_MAX_STRING_LENGTH (sizeof (FriBidiStrIndex) == 2 ? \ - 0xFFFF : (sizeof (FriBidiStrIndex) == 1 ? \ - 0xFF : 0xFFFFFFFFL)) + 0x7FFF : (sizeof (FriBidiStrIndex) == 1 ? \ + 0x7F : 0x7FFFFFFFL)) #endif /* A few macros for working with bits */ diff --git a/lib/fribidi.c b/lib/fribidi.c index c505119..685d935 100644 --- a/lib/fribidi.c +++ b/lib/fribidi.c @@ -1,10 +1,10 @@ /* FriBidi * fribidi.c - Unicode bidirectional and Arabic joining/shaping algorithms * - * $Id: fribidi.c,v 1.15 2004-06-21 21:15:31 behdad Exp $ + * $Id: fribidi.c,v 1.16 2005-07-30 09:06:28 behdad Exp $ * $Author: behdad $ - * $Date: 2004-06-21 21:15:31 $ - * $Revision: 1.15 $ + * $Date: 2005-07-30 09:06:28 $ + * $Revision: 1.16 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi.c,v $ * * Authors: @@ -91,7 +91,7 @@ fribidi_remove_bidi_marks ( if UNLIKELY (!position_from_this_list) goto out; private_from_this = true; - for (i = len - 1; i >= 0; i--) + for (i = 0; i < len; i++) position_from_this_list[positions_to_this[i]] = i; } |