]> granicus.if.org Git - fribidi/commitdiff
Small changes to shut gcc warnings up.
authorbehdad <behdad>
Sat, 30 Jul 2005 09:06:27 +0000 (09:06 +0000)
committerbehdad <behdad>
Sat, 30 Jul 2005 09:06:27 +0000 (09:06 +0000)
14 files changed:
.cvsignore
Makefile.am
USERS
bin/fribidi-benchmark.c
bin/fribidi-bidi-types.c
bin/fribidi-caprtl2utf8.c
bin/fribidi-main.c
charset/fribidi-char-sets-cap-rtl.c
charset/fribidi-char-sets-utf8.c
configure.ac
gen.tab/gen-unicode-version.c
lib/fribidi-bidi.c
lib/fribidi-types.h
lib/fribidi.c

index 4cae31ff7539c2c7a64e4d0b7245b635ccef0f6e..926bb207f8482235803133f50754450723441f07 100644 (file)
@@ -16,4 +16,5 @@ install-sh
 libtool
 ltmain.sh
 missing
+mkinstalldirs
 stamp-h1
index 2cd57a91f2d8e43cb7879027c57dc3cc2b632fb9..5b6727cc08ae8ce1c2d89ea396708044add84779 100644 (file)
@@ -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`
diff --git a/USERS b/USERS
index 577daf6b8c84a657013e63d7bc36a5528dd52499..a2793349a3f821465657c2a1f0e8ae7f3752c3f2 100644 (file)
--- a/USERS
+++ b/USERS
@@ -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
index 3de87953e757a529ff8145b2757ec522b563eaef..9ca5750bfeea6c47932b1308253ec7b94fc031b6 100644 (file)
@@ -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;
index ecc8dfc84c2e1e8f8c5ca5320573ab942dec0d90..efdf44bc02bb62993d92eff638f5e757ca3265f9 100644 (file)
@@ -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;
 }
index cc7c8ac709c2f528835d32ea76fefadcb9461d70..492b44e8fa245c97f7fdf0020970ba5973c60341 100644 (file)
@@ -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;
index 3744fe7fc821e8022236390de5aa3b9c22f34143..aa8451bb9218eee9734a7fa5037e181a1fec02e3 100644 (file)
@@ -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 = "";
index a81268cea0bc7e64780951861251f0d7f4483e13..e5e6cb122e4203efe142f35f9788f89b59ab4931 100644 (file)
@@ -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:
 
 #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++)
index 3933aeacbc451dab9d6a39636fa6140dd7e77ff5..668c9415ef779f9581dca8b6852afdde71987775 100644 (file)
@@ -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;
 
index 8dc6b9d227be5b7f0e7a190a71f9fab600fb4174..26377f27470cbb136331ee38b23d1806a188b492 100644 (file)
@@ -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
index cdd7d6f733e7fc64a567078cc6f4c699a44c411b..439d3881a0d0e0e780f373ae9ead2a866891ac66 100644 (file)
@@ -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);
index ff760e514e0fe746fd14e723f52b0c31bdb2b965..c3258dde7461c697291616916a466e8df39a6fd1 100644 (file)
@@ -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",
index 2bc954d2081d0f8645dbcbf80d27d94b425e52da..83428b30e3ecc1c2cdd4420d91b8f3363a0de199 100644 (file)
@@ -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 */
index c50511954fddaead6ad2ebffc29b1cfab4a1dcda..685d9354c2971dccc83d6ff3b3502a646ea866ec 100644 (file)
@@ -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;
     }