[FriBidi-commit] fribidi-sf.net .cvsignore, NONE, 1.1.2.1 .indent.pro, 1.3.2.2, 1.3.2.3 ChangeLog, 1.60.2.14, 1.60.2.15 INSTALL, 1.6, NONE Makefile.am, 1.30.2.7, 1.30.2.8 bootstrap, 1.12, 1.12.2.1 config.guess, 1.2, NONE config.sub, 1.2, NONE configure.in, 1.22.2.8, 1.22.2.9 fribidi.c, 1.33.2.9, 1.33.2.10 fribidi_benchmark.c, 1.16.2.1, 1.16.2.2 fribidi_char_sets.c, 1.13.2.4, 1.13.2.5 fribidi_char_sets.h, 1.13.2.3, 1.13.2.4 fribidi_char_sets_cap_rtl.c, 1.15.2.2, 1.15.2.3 fribidi_char_sets_cap_rtl.h, 1.9.2.2, 1.9.2.3 fribidi_char_sets_cp1255.c, 1.10.2.1, 1.10.2.2 fribidi_char_sets_cp1255.h, 1.8.2.1, 1.8.2.2 fribidi_char_sets_cp1256.c, 1.10.2.1, 1.10.2.2 fribidi_char_sets_cp1256.h, 1.8.2.1, 1.8.2.2 fribidi_char_sets_isiri_3342.c, 1.10.2.1, 1.10.2.2 fribidi_char_sets_isiri_3342.h, 1.9.2.1, 1.9.2.2 fribidi_char_sets_iso8859_6.c, 1.10.2.1, 1.10.2.2 fribidi_char_sets_iso8859_6.h, 1.9.2.1, 1.9.2.2 fribidi_char_sets_iso8859_8.c, 1.11.2.1, 1.11.2.2 fribidi_char_sets_iso8859_8.h, 1.9.2.1, 1.9.2.2 fribidi_char_sets_utf8.c, 1.10.2.3, 1.10.2.4 fribidi_char_sets_utf8.h, 1.8.2.1, 1.8.2.2 fribidi_char_type.c, 1.3.2.3, 1.3.2.4 fribidi_create_char_types.c, 1.7.2.4, 1.7.2.5 fribidi_create_mirroring.c, 1.7.2.2, 1.7.2.3 fribidi_main.c, 1.25.2.6, 1.25.2.7 fribidi_mem.c, 1.3.2.3, 1.3.2.4 fribidi_mem.h, 1.2.2.5, 1.2.2.6 fribidi_tab_char_type_2.i, 1.5.2.5, 1.5.2.6 fribidi_tab_char_type_9.i, 1.5.2.4, 1.5.2.5 fribidi_tab_mirroring.i, 1.3.2.2, 1.3.2.3 fribidi_types.h, 1.16.2.4, 1.16.2.5 fribidi_unicode.h, 1.3.2.5, 1.3.2.6 fribidi_utils.c, 1.12.2.5, 1.12.2.6 fribidi_wcwidth.c, 1.1.2.5, NONE fribidi_wcwidth.i, 1.1.2.2, NONE install-sh, 1.3, NONE ltmain.sh, 1.4, NONE missing, 1.1.1.1, NONE mkinstalldirs, 1.2, 1.2.2.1 wcwidth.c, NONE, 1.2.2.2 wcwidth.i, NONE, 1.1.2.1

Behdad Esfahbod behdad at freedesktop.org
Tue Jun 7 06:37:34 PDT 2005


Update of /cvs/fribidi/fribidi-sf.net
In directory gabe:/tmp/cvs-serv16378

Modified Files:
      Tag: STABLE
	.indent.pro ChangeLog Makefile.am bootstrap configure.in 
	fribidi.c fribidi_benchmark.c fribidi_char_sets.c 
	fribidi_char_sets.h fribidi_char_sets_cap_rtl.c 
	fribidi_char_sets_cap_rtl.h fribidi_char_sets_cp1255.c 
	fribidi_char_sets_cp1255.h fribidi_char_sets_cp1256.c 
	fribidi_char_sets_cp1256.h fribidi_char_sets_isiri_3342.c 
	fribidi_char_sets_isiri_3342.h fribidi_char_sets_iso8859_6.c 
	fribidi_char_sets_iso8859_6.h fribidi_char_sets_iso8859_8.c 
	fribidi_char_sets_iso8859_8.h fribidi_char_sets_utf8.c 
	fribidi_char_sets_utf8.h fribidi_char_type.c 
	fribidi_create_char_types.c fribidi_create_mirroring.c 
	fribidi_main.c fribidi_mem.c fribidi_mem.h 
	fribidi_tab_char_type_2.i fribidi_tab_char_type_9.i 
	fribidi_tab_mirroring.i fribidi_types.h fribidi_unicode.h 
	fribidi_utils.c mkinstalldirs 
Added Files:
      Tag: STABLE
	.cvsignore wcwidth.c wcwidth.i 
Removed Files:
      Tag: STABLE
	INSTALL config.guess config.sub fribidi_wcwidth.c 
	fribidi_wcwidth.i install-sh ltmain.sh missing 
Log Message:
Updated to Unicode 4.1.0.
Fixed FriBidiChar size problem on 64-bit machines.
Misc updates and fixes.


--- NEW FILE: .cvsignore ---
INSTALL
aclocal.m4
autom4te.cache
fribidi.pc
fribidi.spec
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
stamp-h1

Index: .indent.pro
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/.indent.pro,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -u -d -r1.3.2.2 -r1.3.2.3
--- .indent.pro	4 Aug 2002 19:43:28 -0000	1.3.2.2
+++ .indent.pro	7 Jun 2005 13:37:31 -0000	1.3.2.3
@@ -1,5 +1,4 @@
 -gnu
--bfda
 -T TypeLink
 -T LevelInfo
 -T FriBidiChar

Index: ChangeLog
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/ChangeLog,v
retrieving revision 1.60.2.14
retrieving revision 1.60.2.15
diff -u -d -r1.60.2.14 -r1.60.2.15
--- ChangeLog	30 Jan 2004 20:26:43 -0000	1.60.2.14
+++ ChangeLog	7 Jun 2005 13:37:31 -0000	1.60.2.15
@@ -1,3 +1,8 @@
+2005-06-07  Behdad Esfahbid <fribidi at behdad.org>
+	* *: Updated to Unicode 4.1.0.  Misc build fixes.
+	* wcwidth.c,i: Renamed from fribidi_wcwidth.c,i.
+	* fribidi_types.h: Include stdint.h and use the int types from there.
+
 2002-12-22  Behdad Esfahbod <fribidi at behdad.org>
 	* Makefile.am: Added fribidi_types.i to
 	libfribidiinc_HEADERS, to fix bug reported by Omer Zak.

--- INSTALL DELETED ---

Index: Makefile.am
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/Makefile.am,v
retrieving revision 1.30.2.7
retrieving revision 1.30.2.8
diff -u -d -r1.30.2.7 -r1.30.2.8
--- Makefile.am	30 Jan 2004 20:26:43 -0000	1.30.2.7
+++ Makefile.am	7 Jun 2005 13:37:31 -0000	1.30.2.8
@@ -1,9 +1,11 @@
 
 AUTOMAKE_OPTIONS = gnu 
 
-noinst_PROGRAMS = fribidi_benchmark	\
-		fribidi_create_char_types	\
-		fribidi_create_mirroring
+noinst_PROGRAMS =	\
+	fribidi_benchmark	\
+	fribidi_create_char_types	\
+	fribidi_create_mirroring	\
+	fribidi_bidi_types
 
 libfribidi_charsets =	\
 	fribidi_char_sets.c	\
@@ -40,8 +42,8 @@
 	fribidi_mem.c	\
 	fribidi_mirroring.c	\
 	fribidi_char_type.c	\
-	fribidi_wcwidth.c	\
 	fribidi_utils.c	\
+	wcwidth.c	\
 	$(libfribidi_charsets)	\
 	$(libfribidi_charsets_extra)
 
@@ -87,7 +89,7 @@
 	unidata/BidiMirroring.txt
 
 OTHER_FILES =	\
-	fribidi_wcwidth.i
+	wcwidth.i
 
 EXTRA_HEADERS =	\
 	packtab.h	\
@@ -112,6 +114,8 @@
 fribidi_benchmark_SOURCES = fribidi_benchmark.c $(GETOPT_SRC)
 fribidi_benchmark_LDADD = libfribidi.la
 
+fribidi_bidi_types_LDADD = libfribidi.la
+
 fribidi_create_char_types_SOURCES = fribidi_create_char_types.c packtab.c
 
 fribidi_create_mirroring_SOURCES = fribidi_create_mirroring.c

Index: bootstrap
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/bootstrap,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- bootstrap	8 Mar 2002 15:21:30 -0000	1.12
+++ bootstrap	7 Jun 2005 13:37:31 -0000	1.12.2.1
@@ -1,6 +1,7 @@
 #! /bin/sh
 
-aclocal \
-&& autoheader \
-&& automake --add-missing \
-&& autoconf
+libtoolize --copy --force --automake &&
+aclocal --force &&
+autoheader --force &&
+automake --add-missing --copy --force &&
+autoconf --force

--- config.guess DELETED ---

--- config.sub DELETED ---

Index: configure.in
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/configure.in,v
retrieving revision 1.22.2.8
retrieving revision 1.22.2.9
diff -u -d -r1.22.2.8 -r1.22.2.9
--- configure.in	10 Aug 2002 04:17:50 -0000	1.22.2.8
+++ configure.in	7 Jun 2005 13:37:31 -0000	1.22.2.9
@@ -21,7 +21,7 @@
 #
 FRIBIDI_MAJOR_VERSION=0
 FRIBIDI_MINOR_VERSION=10
-FRIBIDI_MICRO_VERSION=-5
+FRIBIDI_MICRO_VERSION=5
 FRIBIDI_INTERFACE_VERSION=2
 FRIBIDI_INTERFACE_AGE=5
 FRIBIDI_BINARY_AGE=5
@@ -76,6 +76,10 @@
   *[\ \	]-pedantic[\ \	]*) ;;
   *) CFLAGS="$CFLAGS -pedantic " ;;
   esac
+  case " $CFLAGS " in
+  *[\ \	]strict-aliasing[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -fno-strict-aliasing " ;;
+  esac
 fi
 changequote([,])dnl
 

Index: fribidi.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi.c,v
retrieving revision 1.33.2.9
retrieving revision 1.33.2.10
diff -u -d -r1.33.2.9 -r1.33.2.10
--- fribidi.c	13 Sep 2002 20:17:42 -0000	1.33.2.9
+++ fribidi.c	7 Jun 2005 13:37:31 -0000	1.33.2.10
@@ -1430,7 +1430,8 @@
   "\n"
   "Unicode version " FRIBIDI_UNICODE_VERSION "\n"
   "\n"
-  "Copyright (C) 2002 FriBidi Project (http://fribidi.sf.net/).\n"
+  "Copyright (C) 2001,2002,2005  Behdad Esfahbod <fribidi at behdad.org>.\n"
+  "Copyright (C) 1999,2000 Dov Grobgeld\n"
   FRIBIDI_PACKAGE " comes with NO WARRANTY, to the extent permitted by law.\n"
   "You may redistribute copies of " FRIBIDI_PACKAGE " under the terms of\n"
   "the GNU Lesser General Public License.\n"

Index: fribidi_benchmark.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_benchmark.c,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -u -d -r1.16.2.1 -r1.16.2.2
--- fribidi_benchmark.c	4 Aug 2002 19:43:29 -0000	1.16.2.1
+++ fribidi_benchmark.c	7 Jun 2005 13:37:31 -0000	1.16.2.2
@@ -40,8 +40,7 @@
 #define MAX_STR_LEN 1000
 
 static void
-die (char *fmt,
-     ...)
+die (char *fmt, ...)
 {
   va_list ap;
   va_start (ap, fmt);
@@ -99,8 +98,7 @@
 }
 
 static void
-benchmark (char *S_,
-	   int niter)
+benchmark (char *S_, int niter)
 {
   int len, i;
   FriBidiChar us[MAX_STR_LEN], out_us[MAX_STR_LEN];
@@ -184,8 +182,7 @@
 }
 
 int
-main (int argc,
-      char *argv[])
+main (int argc, char *argv[])
 {
   niter = 2000;
 

Index: fribidi_char_sets.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets.c,v
retrieving revision 1.13.2.4
retrieving revision 1.13.2.5
diff -u -d -r1.13.2.4 -r1.13.2.5
--- fribidi_char_sets.c	7 Aug 2002 12:02:56 -0000	1.13.2.4
+++ fribidi_char_sets.c	7 Jun 2005 13:37:31 -0000	1.13.2.5
@@ -30,14 +30,12 @@
 {
   /* Convert the character string "s" to unicode string "us" and
      return it's length. */
-  int (*charset_to_unicode) (char *s,
-			     int length,
+  int (*charset_to_unicode) (char *s, int length,
 			     /* output */
 			     FriBidiChar *us);
   /* Convert the unicode string "us" with length "length" to character
      string "s" and return it's length. */
-  int (*unicode_to_charset) (FriBidiChar *us,
-			     int length,
+  int (*unicode_to_charset) (FriBidiChar *us, int length,
 			     /* output */
 			     char *s);
   /* Charset's name. */
@@ -84,8 +82,7 @@
 }
 
 static int
-fribidi_strcasecmp (const char *s1,
-		    const char *s2)
+fribidi_strcasecmp (const char *s1, const char *s2)
 {
   while (*s1 && toupper (*s1) == toupper (*s2))
     {
@@ -112,9 +109,7 @@
 /* Convert the character string "s" in charset "char_set" to unicode
    string "us" and return it's length. */
 FRIBIDI_API int
-fribidi_charset_to_unicode (FriBidiCharSet char_set,
-			    char *s,
-			    int length,
+fribidi_charset_to_unicode (FriBidiCharSet char_set, char *s, int length,
 			    /* output */
 			    FriBidiChar *us)
 {
@@ -127,8 +122,7 @@
    string "s" in charset "char_set" and return it's length. */
 FRIBIDI_API int
 fribidi_unicode_to_charset (FriBidiCharSet char_set,
-			    FriBidiChar *us,
-			    int length,
+			    FriBidiChar *us, int length,
 			    /* output */
 			    char *s)
 {
@@ -196,8 +190,7 @@
 #include <string.h>
 
 FRIBIDI_API int
-fribidi_charset_to_unicode_1 (FriBidiCharSet char_set,
-			      char *s,
+fribidi_charset_to_unicode_1 (FriBidiCharSet char_set, char *s,
 			      /* output */
 			      FriBidiChar *us)
 {

Index: fribidi_char_sets.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets.h,v
retrieving revision 1.13.2.3
retrieving revision 1.13.2.4
diff -u -d -r1.13.2.3 -r1.13.2.4
--- fribidi_char_sets.h	4 Aug 2002 19:43:29 -0000	1.13.2.3
+++ fribidi_char_sets.h	7 Jun 2005 13:37:31 -0000	1.13.2.4
@@ -65,16 +65,14 @@
 /* Convert the character string "s" in charset "char_set" to unicode
    string "us" and return it's length. */
   FRIBIDI_API int fribidi_charset_to_unicode (FriBidiCharSet char_set,
-					      char *s,
-					      int length,
+					      char *s, int length,
 					      /* output */
 					      FriBidiChar *us);
 
 /* Convert the unicode string "us" with length "length" to character
    string "s" in charset "char_set" and return it's length. */
   FRIBIDI_API int fribidi_unicode_to_charset (FriBidiCharSet char_set,
-					      FriBidiChar *us,
-					      int length,
+					      FriBidiChar *us, int length,
 					      /* output */
 					      char *s);
 

Index: fribidi_char_sets_cap_rtl.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cap_rtl.c,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -u -d -r1.15.2.2 -r1.15.2.3
--- fribidi_char_sets_cap_rtl.c	4 Aug 2002 19:43:29 -0000	1.15.2.2
+++ fribidi_char_sets_cap_rtl.c	7 Jun 2005 13:37:31 -0000	1.15.2.3
@@ -101,9 +101,7 @@
 }
 
 int
-fribidi_cap_rtl_to_unicode (char *s,
-			    int len,
-			    FriBidiChar *us)
+fribidi_cap_rtl_to_unicode (char *s, int len, FriBidiChar *us)
 {
   int i, j;
 
@@ -155,9 +153,7 @@
 }
 
 int
-fribidi_unicode_to_cap_rtl (FriBidiChar *us,
-			    int length,
-			    char *s)
+fribidi_unicode_to_cap_rtl (FriBidiChar *us, int length, char *s)
 {
   int i, j;
 

Index: fribidi_char_sets_cap_rtl.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cap_rtl.h,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -u -d -r1.9.2.2 -r1.9.2.3
--- fribidi_char_sets_cap_rtl.h	4 Aug 2002 19:43:29 -0000	1.9.2.2
+++ fribidi_char_sets_cap_rtl.h	7 Jun 2005 13:37:31 -0000	1.9.2.3
@@ -40,12 +40,10 @@
   fribidi_boolean fribidi_char_set_enter_cap_rtl (void);
   fribidi_boolean fribidi_char_set_leave_cap_rtl (void);
 
-  int fribidi_cap_rtl_to_unicode (char *s,
-				  int length,
+  int fribidi_cap_rtl_to_unicode (char *s, int length,
 				  /* Output */
 				  FriBidiChar *us);
-  int fribidi_unicode_to_cap_rtl (FriBidiChar *us,
-				  int length,
+  int fribidi_unicode_to_cap_rtl (FriBidiChar *us, int length,
 				  /* Output */
 				  char *s);
 

Index: fribidi_char_sets_cp1255.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cp1255.c,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- fribidi_char_sets_cp1255.c	4 Aug 2002 19:43:29 -0000	1.10.2.1
+++ fribidi_char_sets_cp1255.c	7 Jun 2005 13:37:31 -0000	1.10.2.2
@@ -70,9 +70,7 @@
 }
 
 int
-fribidi_cp1255_to_unicode (char *s,
-			   int len,
-			   FriBidiChar *us)
+fribidi_cp1255_to_unicode (char *s, int len, FriBidiChar *us)
 {
   int i;
 
@@ -99,9 +97,7 @@
 }
 
 int
-fribidi_unicode_to_cp1255 (FriBidiChar *us,
-			   int length,
-			   char *s)
+fribidi_unicode_to_cp1255 (FriBidiChar *us, int length, char *s)
 {
   int i;
 

Index: fribidi_char_sets_cp1255.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cp1255.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- fribidi_char_sets_cp1255.h	4 Aug 2002 19:43:29 -0000	1.8.2.1
+++ fribidi_char_sets_cp1255.h	7 Jun 2005 13:37:31 -0000	1.8.2.2
@@ -41,13 +41,11 @@
 #define fribidi_char_set_leave_cp1255 NULL
 
   FriBidiChar fribidi_cp1255_to_unicode_c (char ch);
-  int fribidi_cp1255_to_unicode (char *s,
-				 int length,
+  int fribidi_cp1255_to_unicode (char *s, int length,
 				 /* Output */
 				 FriBidiChar *us);
   char fribidi_unicode_to_cp1255_c (FriBidiChar uch);
-  int fribidi_unicode_to_cp1255 (FriBidiChar *us,
-				 int length,
+  int fribidi_unicode_to_cp1255 (FriBidiChar *us, int length,
 				 /* Output */
 				 char *s);
 

Index: fribidi_char_sets_cp1256.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cp1256.c,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- fribidi_char_sets_cp1256.c	4 Aug 2002 19:43:29 -0000	1.10.2.1
+++ fribidi_char_sets_cp1256.c	7 Jun 2005 13:37:31 -0000	1.10.2.2
@@ -65,9 +65,7 @@
 }
 
 int
-fribidi_cp1256_to_unicode (char *s,
-			   int len,
-			   FriBidiChar *us)
+fribidi_cp1256_to_unicode (char *s, int len, FriBidiChar *us)
 {
   int i;
 
@@ -218,9 +216,7 @@
 }
 
 int
-fribidi_unicode_to_cp1256 (FriBidiChar *us,
-			   int length,
-			   char *s)
+fribidi_unicode_to_cp1256 (FriBidiChar *us, int length, char *s)
 {
   int i;
 

Index: fribidi_char_sets_cp1256.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_cp1256.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- fribidi_char_sets_cp1256.h	4 Aug 2002 19:43:29 -0000	1.8.2.1
+++ fribidi_char_sets_cp1256.h	7 Jun 2005 13:37:31 -0000	1.8.2.2
@@ -41,13 +41,11 @@
 #define fribidi_char_set_leave_cp1256 NULL
 
   FriBidiChar fribidi_cp1256_to_unicode_c (char ch);
-  int fribidi_cp1256_to_unicode (char *s,
-				 int length,
+  int fribidi_cp1256_to_unicode (char *s, int length,
 				 /* Output */
 				 FriBidiChar *us);
   char fribidi_unicode_to_cp1256_c (FriBidiChar uch);
-  int fribidi_unicode_to_cp1256 (FriBidiChar *us,
-				 int length,
+  int fribidi_unicode_to_cp1256 (FriBidiChar *us, int length,
 				 /* Output */
 				 char *s);
 

Index: fribidi_char_sets_isiri_3342.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_isiri_3342.c,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- fribidi_char_sets_isiri_3342.c	4 Aug 2002 19:43:29 -0000	1.10.2.1
+++ fribidi_char_sets_isiri_3342.c	7 Jun 2005 13:37:31 -0000	1.10.2.2
@@ -57,9 +57,7 @@
 }
 
 int
-fribidi_isiri_3342_to_unicode (char *s,
-			       int len,
-			       FriBidiChar *us)
+fribidi_isiri_3342_to_unicode (char *s, int len, FriBidiChar *us)
 {
   int i;
 
@@ -220,9 +218,7 @@
 }
 
 int
-fribidi_unicode_to_isiri_3342 (FriBidiChar *us,
-			       int length,
-			       char *s)
+fribidi_unicode_to_isiri_3342 (FriBidiChar *us, int length, char *s)
 {
   int i;
 

Index: fribidi_char_sets_isiri_3342.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_isiri_3342.h,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- fribidi_char_sets_isiri_3342.h	4 Aug 2002 19:43:29 -0000	1.9.2.1
+++ fribidi_char_sets_isiri_3342.h	7 Jun 2005 13:37:31 -0000	1.9.2.2
@@ -41,13 +41,11 @@
 #define fribidi_char_set_leave_isiri_3342 NULL
 
   FriBidiChar fribidi_isiri_3342_to_unicode_c (char ch);
-  int fribidi_isiri_3342_to_unicode (char *s,
-				     int length,
+  int fribidi_isiri_3342_to_unicode (char *s, int length,
 				     /* Output */
 				     FriBidiChar *us);
   char fribidi_unicode_to_isiri_3342_c (FriBidiChar uch);
-  int fribidi_unicode_to_isiri_3342 (FriBidiChar *us,
-				     int length,
+  int fribidi_unicode_to_isiri_3342 (FriBidiChar *us, int length,
 				     /* Output */
 				     char *s);
 

Index: fribidi_char_sets_iso8859_6.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_iso8859_6.c,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- fribidi_char_sets_iso8859_6.c	4 Aug 2002 19:43:29 -0000	1.10.2.1
+++ fribidi_char_sets_iso8859_6.c	7 Jun 2005 13:37:31 -0000	1.10.2.2
@@ -44,9 +44,7 @@
 }
 
 int
-fribidi_iso8859_6_to_unicode (char *s,
-			      int len,
-			      FriBidiChar *us)
+fribidi_iso8859_6_to_unicode (char *s, int len, FriBidiChar *us)
 {
   int i;
 
@@ -75,9 +73,7 @@
 }
 
 int
-fribidi_unicode_to_iso8859_6 (FriBidiChar *us,
-			      int length,
-			      char *s)
+fribidi_unicode_to_iso8859_6 (FriBidiChar *us, int length, char *s)
 {
   int i;
 

Index: fribidi_char_sets_iso8859_6.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_iso8859_6.h,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- fribidi_char_sets_iso8859_6.h	4 Aug 2002 19:43:29 -0000	1.9.2.1
+++ fribidi_char_sets_iso8859_6.h	7 Jun 2005 13:37:31 -0000	1.9.2.2
@@ -41,13 +41,11 @@
 #define fribidi_char_set_leave_iso8859_6 NULL
 
   FriBidiChar fribidi_iso8859_6_to_unicode_c (char ch);
-  int fribidi_iso8859_6_to_unicode (char *s,
-				    int length,
+  int fribidi_iso8859_6_to_unicode (char *s, int length,
 				    /* Output */
 				    FriBidiChar *us);
   char fribidi_unicode_to_iso8859_6_c (FriBidiChar uch);
-  int fribidi_unicode_to_iso8859_6 (FriBidiChar *us,
-				    int length,
+  int fribidi_unicode_to_iso8859_6 (FriBidiChar *us, int length,
 				    /* Output */
 				    char *s);
 

Index: fribidi_char_sets_iso8859_8.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_iso8859_8.c,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -u -d -r1.11.2.1 -r1.11.2.2
--- fribidi_char_sets_iso8859_8.c	4 Aug 2002 19:43:29 -0000	1.11.2.1
+++ fribidi_char_sets_iso8859_8.c	7 Jun 2005 13:37:31 -0000	1.11.2.2
@@ -72,9 +72,7 @@
 }
 
 int
-fribidi_iso8859_8_to_unicode (char *s,
-			      int len,
-			      FriBidiChar *us)
+fribidi_iso8859_8_to_unicode (char *s, int len, FriBidiChar *us)
 {
   int i;
 
@@ -112,9 +110,7 @@
 }
 
 int
-fribidi_unicode_to_iso8859_8 (FriBidiChar *us,
-			      int length,
-			      char *s)
+fribidi_unicode_to_iso8859_8 (FriBidiChar *us, int length, char *s)
 {
   int i;
 

Index: fribidi_char_sets_iso8859_8.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_iso8859_8.h,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- fribidi_char_sets_iso8859_8.h	4 Aug 2002 19:43:29 -0000	1.9.2.1
+++ fribidi_char_sets_iso8859_8.h	7 Jun 2005 13:37:31 -0000	1.9.2.2
@@ -41,13 +41,11 @@
 #define fribidi_char_set_leave_iso8859_8 NULL
 
   FriBidiChar fribidi_iso8859_8_to_unicode_c (char ch);
-  int fribidi_iso8859_8_to_unicode (char *s,
-				    int length,
+  int fribidi_iso8859_8_to_unicode (char *s, int length,
 				    /* Output */
 				    FriBidiChar *us);
   char fribidi_unicode_to_iso8859_8_c (FriBidiChar uch);
-  int fribidi_unicode_to_iso8859_8 (FriBidiChar *us,
-				    int length,
+  int fribidi_unicode_to_iso8859_8 (FriBidiChar *us, int length,
 				    /* Output */
 				    char *s);
 

Index: fribidi_char_sets_utf8.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_utf8.c,v
retrieving revision 1.10.2.3
retrieving revision 1.10.2.4
diff -u -d -r1.10.2.3 -r1.10.2.4
--- fribidi_char_sets_utf8.c	4 Aug 2002 19:43:29 -0000	1.10.2.3
+++ fribidi_char_sets_utf8.c	7 Jun 2005 13:37:31 -0000	1.10.2.4
@@ -29,9 +29,7 @@
 /* the following added by Raphael Finkel <raphael at cs.uky.edu> 12/1999 */
 
 int
-fribidi_utf8_to_unicode (char *s,
-			 int len,
-			 FriBidiChar *us)
+fribidi_utf8_to_unicode (char *s, int len, FriBidiChar *us)
 /* warning: the length of input string may exceed the length of the output */
 {
   int length;
@@ -66,9 +64,7 @@
 }
 
 int
-fribidi_unicode_to_utf8 (FriBidiChar *us,
-			 int length,
-			 char *s)
+fribidi_unicode_to_utf8 (FriBidiChar *us, int length, char *s)
 /* warning: the length of output string may exceed the length of the input */
 {
   int i;

Index: fribidi_char_sets_utf8.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_sets_utf8.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- fribidi_char_sets_utf8.h	4 Aug 2002 19:43:29 -0000	1.8.2.1
+++ fribidi_char_sets_utf8.h	7 Jun 2005 13:37:31 -0000	1.8.2.2
@@ -40,15 +40,13 @@
 #define fribidi_char_set_enter_utf8 NULL
 #define fribidi_char_set_leave_utf8 NULL
 
-  int fribidi_unicode_to_utf8 (FriBidiChar *us,
-			       int length,
+  int fribidi_unicode_to_utf8 (FriBidiChar *us, int length,
 			       /* Output */
 			       char *s);
 
 /* warning: the length of output string may exceed the length of the input */
 /* the length of the string is returned */
-  int fribidi_utf8_to_unicode (char *s,
-			       int length,
+  int fribidi_utf8_to_unicode (char *s, int length,
 			       /* Output */
 			       FriBidiChar *us);
 

Index: fribidi_char_type.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_char_type.c,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -d -r1.3.2.3 -r1.3.2.4
--- fribidi_char_type.c	4 Aug 2002 19:43:29 -0000	1.3.2.3
+++ fribidi_char_type.c	7 Jun 2005 13:37:31 -0000	1.3.2.4
@@ -37,8 +37,7 @@
 
 FRIBIDI_API void
 fribidi_get_types (		/* input */
-		    FriBidiChar *str,
-		    FriBidiStrIndex len,
+		    FriBidiChar *str, FriBidiStrIndex len,
 		    /* output */
 		    FriBidiCharType *type)
 {

Index: fribidi_create_char_types.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_create_char_types.c,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -u -d -r1.7.2.4 -r1.7.2.5
--- fribidi_create_char_types.c	4 Aug 2002 19:43:29 -0000	1.7.2.4
+++ fribidi_create_char_types.c	7 Jun 2005 13:37:31 -0000	1.7.2.5
@@ -40,8 +40,7 @@
 }
 
 static void
-err2 (char *fmt,
-      char *p)
+err2 (char *fmt, char *p)
 {
   fprintf (stderr, "fribidi_create_char_types: ");
   fprintf (stderr, fmt, p);
@@ -113,9 +112,9 @@
 init_table ()
 {
   int i;
+  register FriBidiChar c;
   int deftype = get_type (default_type),
-    RTL = get_type ("RTL"),
-    AL = get_type ("AL");
+    RTL = get_type ("RTL"), AL = get_type ("AL"), BN = get_type ("BN");
 
   for (i = 0; i < type_names_count; i++)
     names[i] = 0;
@@ -123,18 +122,42 @@
     names[type_names[i].key] = type_names[i].name;
 
   /* initialize table */
-  for (i = 0; i < FRIBIDI_UNICODE_CHARS; i++)
-    table[i] = deftype;
-  for (i = 0x590; i < 0x600; i++)
-    table[i] = RTL;
-  for (i = 0xFB1D; i < 0xFB50; i++)
-    table[i] = RTL;
-  for (i = 0x600; i < 0x7C0; i++)
-    table[i] = AL;
-  for (i = 0xFB50; i < 0xFE00; i++)
-    table[i] = AL;
-  for (i = 0xFE70; i < 0xFF00; i++)
-    table[i] = AL;
+  for (c = 0; c < FRIBIDI_UNICODE_CHARS; c++)
+    table[c] = deftype;
+
+  for (c = 0x0590; c < 0x0600; c++)
+    table[c] = RTL;
+  for (c = 0x07C0; c < 0x0900; c++)
+    table[c] = RTL;
+  for (c = 0xFB1D; c < 0xFB50; c++)
+    table[c] = RTL;
+
+  for (c = 0x0600; c < 0x07C0; c++)
+    table[c] = AL;
+  for (c = 0xFB50; c < 0xFDD0; c++)
+    table[c] = AL;
+  for (c = 0xFDF0; c < 0xFE00; c++)
+    table[c] = AL;
+  for (c = 0xFE70; c < 0xFF00; c++)
+    table[c] = AL;
+
+  for (c = 0x2060; c < 0x2070; c++)
+    table[c] = BN;
+  for (c = 0xFDD0; c < 0xFDF0; c++)
+    table[c] = BN;
+  for (c = 0xFFF0; c < 0xFFF9; c++)
+    table[c] = BN;
+  for (c = 0xFFFF; c < FRIBIDI_UNICODE_CHARS; c += 0x10000)
+    table[c - 1] = table[c] = BN;
+
+  if (FRIBIDI_UNICODE_CHARS > 0x10000)
+    {
+      for (c = 0x10800; c < 0x11000; c++)
+	table[c] = RTL;
+
+      for (c = 0xE0000; c < 0xE1000; c++)
+	table[c] = BN;
+    }
 }
 
 static void
@@ -172,8 +195,7 @@
 }
 
 static void
-write_char_type (char *file,
-		 int max_depth)
+write_char_type (char *file, int max_depth)
 {
   int i;
   FILE *f;
@@ -230,8 +252,7 @@
 }
 
 int
-main (int argc,
-      char **argv)
+main (int argc, char **argv)
 {
   int max_depth;
   char file[50], *p;

Index: fribidi_create_mirroring.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_create_mirroring.c,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -u -d -r1.7.2.2 -r1.7.2.3
--- fribidi_create_mirroring.c	4 Aug 2002 19:43:29 -0000	1.7.2.2
+++ fribidi_create_mirroring.c	7 Jun 2005 13:37:31 -0000	1.7.2.3
@@ -28,8 +28,7 @@
 #include "fribidi_unicode.h"
 
 static void
-err2 (char *fmt,
-      char *p)
+err2 (char *fmt, char *p)
 {
   fprintf (stderr, "fribidi_create_mirroring: error: ");
   fprintf (stderr, fmt, p);
@@ -129,8 +128,7 @@
 }
 
 int
-main (int argc,
-      char **argv)
+main (int argc, char **argv)
 {
   char *p;
 

Index: fribidi_main.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_main.c,v
retrieving revision 1.25.2.6
retrieving revision 1.25.2.7
diff -u -d -r1.25.2.6 -r1.25.2.7
--- fribidi_main.c	4 Aug 2002 19:43:29 -0000	1.25.2.6
+++ fribidi_main.c	7 Jun 2005 13:37:31 -0000	1.25.2.7
@@ -48,8 +48,7 @@
 
 #define ALLOCATE(tp,ln) ((tp *) malloc (sizeof (tp) * (ln)))
 static void
-die (char *fmt,
-     ...)
+die (char *fmt, ...)
 {
   va_list ap;
   va_start (ap, fmt);
@@ -161,8 +160,7 @@
 }
 
 int
-main (int argc,
-      char *argv[])
+main (int argc, char *argv[])
 {
   int exit_val;
   fribidi_boolean file_found;
@@ -405,14 +403,10 @@
 	      FriBidiStrIndex new_len;
 	      fribidi_boolean log2vis;
 
-	      visual = show_visual ? ALLOCATE (FriBidiChar,
-					       len + 1) : NULL;
-	      ltov = show_ltov ? ALLOCATE (FriBidiStrIndex,
-					   len + 1) : NULL;
-	      vtol = show_vtol ? ALLOCATE (FriBidiStrIndex,
-					   len + 1) : NULL;
-	      levels = show_levels ? ALLOCATE (FriBidiLevel,
-					       len + 1) : NULL;
+	      visual = show_visual ? ALLOCATE (FriBidiChar, len + 1) : NULL;
+	      ltov = show_ltov ? ALLOCATE (FriBidiStrIndex, len + 1) : NULL;
+	      vtol = show_vtol ? ALLOCATE (FriBidiStrIndex, len + 1) : NULL;
+	      levels = show_levels ? ALLOCATE (FriBidiLevel, len + 1) : NULL;
 
 	      /* Create a bidi string. */
 	      base = input_base_direction;

Index: fribidi_mem.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_mem.c,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -d -r1.3.2.3 -r1.3.2.4
--- fribidi_mem.c	7 Aug 2002 12:02:56 -0000	1.3.2.3
+++ fribidi_mem.c	7 Jun 2005 13:37:31 -0000	1.3.2.4
@@ -35,8 +35,7 @@
 };
 
 FriBidiList *
-fribidi_list_append (FriBidiList *list,
-		     void *data)
+fribidi_list_append (FriBidiList *list, void *data)
 {
   FriBidiList *node, *last;
 
@@ -56,9 +55,7 @@
 
 FriBidiMemChunk *
 fribidi_mem_chunk_new (char *name,
-		       int atom_size,
-		       unsigned long area_size,
-		       int type)
+		       int atom_size, unsigned long area_size, int type)
 {
   FriBidiMemChunk *m = (FriBidiMemChunk *) malloc (sizeof (FriBidiMemChunk));
 
@@ -103,8 +100,7 @@
 }
 
 void
-fribidi_mem_chunk_free (FriBidiMemChunk *mem_chunk,
-			void *mem)
+fribidi_mem_chunk_free (FriBidiMemChunk *mem_chunk, void *mem)
 {
   if (mem_chunk->type == FRIBIDI_ALLOC_AND_FREE)
     free (mem);

Index: fribidi_mem.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_mem.h,v
retrieving revision 1.2.2.5
retrieving revision 1.2.2.6
diff -u -d -r1.2.2.5 -r1.2.2.6
--- fribidi_mem.h	7 Aug 2002 12:02:56 -0000	1.2.2.5
+++ fribidi_mem.h	7 Jun 2005 13:37:31 -0000	1.2.2.6
@@ -30,8 +30,7 @@
 {
 #endif
 
-  FriBidiList *fribidi_list_append (FriBidiList *list,
-				    void *data);
+  FriBidiList *fribidi_list_append (FriBidiList *list, void *data);
 
   typedef struct _FriBidiMemChunk FriBidiMemChunk;
 
@@ -40,13 +39,11 @@
 
   FriBidiMemChunk *fribidi_mem_chunk_new (char *name,
 					  int atom_size,
-					  unsigned long area_size,
-					  int type);
+					  unsigned long area_size, int type);
   void fribidi_mem_chunk_destroy (FriBidiMemChunk *mem_chunk);
   void *fribidi_mem_chunk_alloc (FriBidiMemChunk *mem_chunk);
   void *fribidi_mem_chunk_alloc0 (FriBidiMemChunk *mem_chunk);
-  void fribidi_mem_chunk_free (FriBidiMemChunk *mem_chunk,
-			       void *mem);
+  void fribidi_mem_chunk_free (FriBidiMemChunk *mem_chunk, void *mem);
 
 #define fribidi_mem_chunk_create(type, pre_alloc, alloc_type) ( \
   fribidi_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \

Index: fribidi_tab_char_type_2.i
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_tab_char_type_2.i,v
retrieving revision 1.5.2.5
retrieving revision 1.5.2.6
diff -u -d -r1.5.2.5 -r1.5.2.6
--- fribidi_tab_char_type_2.i	1 Aug 2002 12:47:49 -0000	1.5.2.5
+++ fribidi_tab_char_type_2.i	7 Jun 2005 13:37:31 -0000	1.5.2.6
@@ -1,5 +1,5 @@
 /*
-  This file was automatically created from UnicodeData.txt version 3.2.0
+  This file was automatically created from UnicodeData.txt version 4.1.0
   by fribidi_create_char_types
 */
 
@@ -37,21 +37,21 @@
   just use FRIBIDI_GET_TYPE(key)
 
   assumed sizeof(FriBidiPropCharType) == 1
-  required memory: 19200
[...1194 lines suppressed...]
   FriBidiPropertyBlockLevel1_0100,  /* F0100..F01FF */
   FriBidiPropertyBlockLevel1_0100,  /* F0200..F02FF */
@@ -4926,7 +5287,7 @@
   FriBidiPropertyBlockLevel1_0100,  /* FFC00..FFCFF */
   FriBidiPropertyBlockLevel1_0100,  /* FFD00..FFDFF */
   FriBidiPropertyBlockLevel1_0100,  /* FFE00..FFEFF */
-  FriBidiPropertyBlockLevel1_0100,  /* FFF00..FFFFF */
+  FriBidiPropertyBlockLevel1_1FF00,  /* FFF00..FFFFF */
   FriBidiPropertyBlockLevel1_0100,  /* 100000..1000FF */
   FriBidiPropertyBlockLevel1_0100,  /* 100100..1001FF */
   FriBidiPropertyBlockLevel1_0100,  /* 100200..1002FF */
@@ -5182,7 +5543,7 @@
   FriBidiPropertyBlockLevel1_0100,  /* 10FC00..10FCFF */
   FriBidiPropertyBlockLevel1_0100,  /* 10FD00..10FDFF */
   FriBidiPropertyBlockLevel1_0100,  /* 10FE00..10FEFF */
-  FriBidiPropertyBlockLevel1_0100,  /* 10FF00..10FFFF */
+  FriBidiPropertyBlockLevel1_1FF00,  /* 10FF00..10FFFF */
 };
 
 /* *INDENT-ON* */

Index: fribidi_tab_char_type_9.i
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_tab_char_type_9.i,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -d -r1.5.2.4 -r1.5.2.5
--- fribidi_tab_char_type_9.i	1 Aug 2002 12:47:49 -0000	1.5.2.4
+++ fribidi_tab_char_type_9.i	7 Jun 2005 13:37:31 -0000	1.5.2.5
@@ -1,5 +1,5 @@
 /*
-  This file was automatically created from UnicodeData.txt version 3.2.0
+  This file was automatically created from UnicodeData.txt version 4.1.0
   by fribidi_create_char_types
 */
 
@@ -37,15 +37,15 @@
   just use FRIBIDI_GET_TYPE(key)
 
   assumed sizeof(FriBidiPropCharType) == 1
-  required memory: 2111
[...3725 lines suppressed...]
 #define FriBidiPropertyBlockLevel1_E0000 0x18
 
   FriBidiPropertyBlockLevel2_E0000,  /* E0000..E1FFF */
-  FriBidiPropertyBlockLevel2_4000,  /* E2000..E3FFF */
-  FriBidiPropertyBlockLevel2_4000,  /* E4000..E5FFF */
-  FriBidiPropertyBlockLevel2_4000,  /* E6000..E7FFF */
-  FriBidiPropertyBlockLevel2_4000,  /* E8000..E9FFF */
-  FriBidiPropertyBlockLevel2_4000,  /* EA000..EBFFF */
-  FriBidiPropertyBlockLevel2_4000,  /* EC000..EDFFF */
-  FriBidiPropertyBlockLevel2_4000,  /* EE000..EFFFF */
+  FriBidiPropertyBlockLevel2_6000,  /* E2000..E3FFF */
+  FriBidiPropertyBlockLevel2_6000,  /* E4000..E5FFF */
+  FriBidiPropertyBlockLevel2_6000,  /* E6000..E7FFF */
+  FriBidiPropertyBlockLevel2_6000,  /* E8000..E9FFF */
+  FriBidiPropertyBlockLevel2_6000,  /* EA000..EBFFF */
+  FriBidiPropertyBlockLevel2_6000,  /* EC000..EDFFF */
+  FriBidiPropertyBlockLevel2_1E000,  /* EE000..EFFFF */
 };
 
 static const PACKTAB_UINT8 FriBidiPropertyBlockLevel0[17*1] = {

Index: fribidi_tab_mirroring.i
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_tab_mirroring.i,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -u -d -r1.3.2.2 -r1.3.2.3
--- fribidi_tab_mirroring.i	18 May 2002 17:52:53 -0000	1.3.2.2
+++ fribidi_tab_mirroring.i	7 Jun 2005 13:37:31 -0000	1.3.2.3
@@ -1,5 +1,5 @@
 /*
-  This file was automatically created from BidiMirroring.txt, version 3.2.0
+  This file was automatically created from BidiMirroring.txt, version 4.1.0
   by fribidi_create_mirroring
 */
 
@@ -182,6 +182,10 @@
   {0x2773, 0x2772},
   {0x2774, 0x2775},
   {0x2775, 0x2774},
+  {0x27C3, 0x27C4},
+  {0x27C4, 0x27C3},
+  {0x27C5, 0x27C6},
+  {0x27C6, 0x27C5},
   {0x27D5, 0x27D6},
   {0x27D6, 0x27D5},
   {0x27DD, 0x27DE},
@@ -239,7 +243,7 @@
   {0x29FC, 0x29FD},
   {0x29FD, 0x29FC},
   {0x2A2B, 0x2A2C},
-  {0x2A2C, 0x2A2D},
+  {0x2A2C, 0x2A2B},
   {0x2A2D, 0x2A2E},
   {0x2A2E, 0x2A2D},
   {0x2A34, 0x2A35},
@@ -318,6 +322,16 @@
   {0x2AF8, 0x2AF7},
   {0x2AF9, 0x2AFA},
   {0x2AFA, 0x2AF9},
+  {0x2E02, 0x2E03},
+  {0x2E03, 0x2E02},
+  {0x2E04, 0x2E05},
+  {0x2E05, 0x2E04},
+  {0x2E09, 0x2E0A},
+  {0x2E0A, 0x2E09},
+  {0x2E0C, 0x2E0D},
+  {0x2E0D, 0x2E0C},
+  {0x2E1C, 0x2E1D},
+  {0x2E1D, 0x2E1C},
   {0x3008, 0x3009},
   {0x3009, 0x3008},
   {0x300A, 0x300B},
@@ -352,7 +366,7 @@
 
 /* *INDENT-ON* */
 
-const int nFriBidiMirroredChars = 318;
+const int nFriBidiMirroredChars = 332;
 
 
 #endif /* FRIBIDI_TAB_MIRRORING_I */

Index: fribidi_types.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_types.h,v
retrieving revision 1.16.2.4
retrieving revision 1.16.2.5
diff -u -d -r1.16.2.4 -r1.16.2.5
--- fribidi_types.h	7 Aug 2002 12:02:56 -0000	1.16.2.4
+++ fribidi_types.h	7 Jun 2005 13:37:31 -0000	1.16.2.5
@@ -24,27 +24,23 @@
 #define FRIBIDI_TYPES_H
 
 #include "fribidi_config.h"
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
-#define FRIBIDI_INT8	char
-#define FRIBIDI_INT16	short
-#define FRIBIDI_INT32	long
-#define FRIBIDI_INT	int
-
   typedef int fribidi_boolean;
 
-  typedef signed FRIBIDI_INT8 fribidi_int8;
-  typedef unsigned FRIBIDI_INT8 fribidi_uint8;
-  typedef signed FRIBIDI_INT16 fribidi_int16;
-  typedef unsigned FRIBIDI_INT16 fribidi_uint16;
-  typedef signed FRIBIDI_INT32 fribidi_int32;
-  typedef unsigned FRIBIDI_INT32 fribidi_uint32;
-  typedef signed FRIBIDI_INT fribidi_int;
-  typedef unsigned FRIBIDI_INT fribidi_uint;
+  typedef int8_t fribidi_int8;
+  typedef uint8_t fribidi_uint8;
+  typedef int16_t fribidi_int16;
+  typedef uint16_t fribidi_uint16;
+  typedef int32_t fribidi_int32;
+  typedef uint32_t fribidi_uint32;
+  typedef int fribidi_int;
+  typedef unsigned int fribidi_uint;
 
 
   typedef fribidi_int8 FriBidiLevel;

Index: fribidi_unicode.h
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_unicode.h,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -u -d -r1.3.2.5 -r1.3.2.6
--- fribidi_unicode.h	7 Aug 2002 12:02:56 -0000	1.3.2.5
+++ fribidi_unicode.h	7 Jun 2005 13:37:31 -0000	1.3.2.6
@@ -1,5 +1,5 @@
 /* FriBidi - Library of BiDi algorithm
- * Copyright (C) 2001,2002 Behdad Esfahbod.
+ * Copyright (C) 2001,2002,2005 Behdad Esfahbod.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public  
@@ -32,7 +32,7 @@
 
 /* Unicode version */
 #define FRIBIDI_UNICODE_CHARS	(sizeof(FriBidiChar) >= 4 ? 0x110000 : 0x10000)
-#define FRIBIDI_UNICODE_VERSION	"3.2.0"
+#define FRIBIDI_UNICODE_VERSION	"4.1.0"
 
 /* UAX#9 Unicode BiDirectional Algorithm */
 #define UNI_MAX_BIDI_LEVEL 61

Index: fribidi_utils.c
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/fribidi_utils.c,v
retrieving revision 1.12.2.5
retrieving revision 1.12.2.6
diff -u -d -r1.12.2.5 -r1.12.2.6
--- fribidi_utils.c	7 Aug 2002 12:02:56 -0000	1.12.2.5
+++ fribidi_utils.c	7 Jun 2005 13:37:31 -0000	1.12.2.6
@@ -64,15 +64,11 @@
  **----------------------------------------------------------------------*/
 FRIBIDI_API void
 fribidi_map_range (FriBidiStrIndex in_span[2],	/* Start and end span */
-
-		   FriBidiStrIndex len,
-		   fribidi_boolean is_v2l_map,	/* Needed for embedding_level */
-
+		   FriBidiStrIndex len, fribidi_boolean is_v2l_map,	/* Needed for embedding_level */
 		   FriBidiStrIndex *position_map,
 		   FriBidiLevel *embedding_level_list,
 		   /* output */
-		   int *num_mapped_spans,
-		   FriBidiStrIndex mapped_spans[63][2])
+		   int *num_mapped_spans, FriBidiStrIndex mapped_spans[63][2])
 {
   FriBidiStrIndex ch_idx;
   fribidi_boolean in_range = FRIBIDI_FALSE;
@@ -120,8 +116,7 @@
 fribidi_find_string_changes (	/* input */
 			      FriBidiChar *old_str,
 			      FriBidiStrIndex old_len,
-			      FriBidiChar *new_str,
-			      FriBidiStrIndex new_len,
+			      FriBidiChar *new_str, FriBidiStrIndex new_len,
 			      /* output */
 			      FriBidiStrIndex *change_start,
 			      FriBidiStrIndex *change_len)
@@ -201,8 +196,7 @@
 		      FriBidiStrIndex len,
 		      FriBidiLevel *embedding_level_list,
 		      FriBidiCharType base_dir,
-		      FriBidiStrIndex *vis2log,
-		      int *char_widths,
+		      FriBidiStrIndex *vis2log, int *char_widths,
 		      /* output */
 		      FriBidiStrIndex *res_log_pos,
 		      FriBidiStrIndex *res_vis_pos,
@@ -306,8 +300,7 @@
  *----------------------------------------------------------------------*/
 FRIBIDI_API fribidi_boolean
 fribidi_is_char_rtl (FriBidiLevel *embedding_level_list,
-		     FriBidiCharType base_dir,
-		     FriBidiStrIndex idx)
+		     FriBidiCharType base_dir, FriBidiStrIndex idx)
 {
   if (!embedding_level_list || idx < 0)
     return FRIBIDI_IS_RTL (base_dir);
@@ -324,12 +317,8 @@
 FRIBIDI_API void
 fribidi_runs_log2vis (		/* input */
 		       FriBidiList *logical_runs,	/* List of FriBidiRunType */
-
-		       FriBidiStrIndex len,
-		       FriBidiStrIndex *log2vis,
-		       FriBidiCharType base_dir,	/* TBD: remove it, not needed */
+		       FriBidiStrIndex len, FriBidiStrIndex *log2vis, FriBidiCharType base_dir,	/* TBD: remove it, not needed */
 		       /* output */
-
 		       FriBidiList **visual_runs)
 {
   void **visual_attribs = (void **) malloc (sizeof (void *) * len);

--- fribidi_wcwidth.c DELETED ---

--- fribidi_wcwidth.i DELETED ---

--- install-sh DELETED ---

--- ltmain.sh DELETED ---

--- missing DELETED ---

Index: mkinstalldirs
===================================================================
RCS file: /cvs/fribidi/fribidi-sf.net/mkinstalldirs,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- mkinstalldirs	19 Feb 2001 17:22:11 -0000	1.2
+++ mkinstalldirs	7 Jun 2005 13:37:31 -0000	1.2.2.1
@@ -1,40 +1,150 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
 
-# $Id$
+scriptversion=2004-02-15.20
+
+# Original author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
 
 errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake at gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit 0
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
 
 for file
 do
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
 
-   pathcomp=
-   for d
-   do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
+case $# in
+  0) exit 0 ;;
+esac
 
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
+esac
 
-        mkdir "$pathcomp" || lasterr=$?
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
 
-        if test ! -d "$pathcomp"; then
-  	  errstatus=$lasterr
-        fi
-     fi
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
 
-     pathcomp="$pathcomp/"
-   done
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+	errstatus=$lasterr
+      else
+	if test ! -z "$dirmode"; then
+	  echo "chmod $dirmode $pathcomp"
+	  lasterr=""
+	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+	  if test ! -z "$lasterr"; then
+	    errstatus=$lasterr
+	  fi
+	fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
 done
 
 exit $errstatus
 
-# mkinstalldirs ends here
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

--- NEW FILE: wcwidth.c ---
/*
 * This is an implementation of wcwidth() and wcswidth() (defined in
 * IEEE Std 1002.1-2001) for Unicode.
 *
 * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
 * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
 *
 * In fixed-width output devices, Latin characters all occupy a single
 * "cell" position of equal width, whereas ideographic CJK characters
 * occupy two such cells. Interoperability between terminal-line
 * applications and (teletype-style) character terminals using the
 * UTF-8 encoding requires agreement on which character should advance
 * the cursor by how many cell positions. No established formal
 * standards exist at present on which Unicode character shall occupy
 * how many cell positions on character terminals. These routines are
 * a first attempt of defining such behavior based on simple rules
 * applied to data provided by the Unicode Consortium.
 *
 * For some graphical characters, the Unicode standard explicitly
 * defines a character-cell width via the definition of the East Asian
 * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
 * In all these cases, there is no ambiguity about which width a
 * terminal shall use. For characters in the East Asian Ambiguous (A)
 * class, the width choice depends purely on a preference of backward
 * compatibility with either historic CJK or Western practice.
 * Choosing single-width for these characters is easy to justify as
 * the appropriate long-term solution, as the CJK practice of
 * displaying these characters as double-width comes from historic
 * implementation simplicity (8-bit encoded characters were displayed
 * single-width and 16-bit ones double-width, even for Greek,
 * Cyrillic, etc.) and not any typographic considerations.
 *
 * Much less clear is the choice of width for the Not East Asian
 * (Neutral) class. Existing practice does not dictate a width for any
 * of these characters. It would nevertheless make sense
 * typographically to allocate two character cells to characters such
 * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
 * represented adequately with a single-width glyph. The following
 * routines at present merely assign a single-cell width to all
 * neutral characters, in the interest of simplicity. This is not
 * entirely satisfactory and should be reconsidered before
 * establishing a formal standard in this area. At the moment, the
 * decision which Not East Asian (Neutral) characters should be
 * represented by double-width glyphs cannot yet be answered by
 * applying a simple rule from the Unicode database content. Setting
 * up a proper standard for the behavior of UTF-8 character terminals
 * will require a careful analysis not only of each Unicode character,
 * but also of each presentation form, something the author of these
 * routines has avoided to do so far.
 *
 * http://www.unicode.org/unicode/reports/tr11/
 *
 * Markus Kuhn -- 2003-05-20 (Unicode 4.0)
 *
 * Permission to use, copy, modify, and distribute this software
 * for any purpose and without fee is hereby granted. The author
 * disclaims all warranties with regard to this software.
 *
 * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
 */

#include "fribidi_wcwidth.i"

struct interval {
  int first;
  int last;
};

/* auxiliary function for binary search in interval table */
static int bisearch(wchar_t ucs, const struct interval *table, int max) {
  int min = 0;
  int mid;

  if (ucs < table[0].first || ucs > table[max].last)
    return 0;
  while (max >= min) {
    mid = (min + max) / 2;
    if (ucs > table[mid].last)
      min = mid + 1;
    else if (ucs < table[mid].first)
      max = mid - 1;
    else
      return 1;
  }

  return 0;
}


/* The following two functions define the column width of an ISO 10646
 * character as follows:
 *
 *    - The null character (U+0000) has a column width of 0.
 *
 *    - Other C0/C1 control characters and DEL will lead to a return
 *      value of -1.
 *
 *    - Non-spacing and enclosing combining characters (general
 *      category code Mn or Me in the Unicode database) have a
 *      column width of 0.
 *
 *    - SOFT HYPHEN (U+00AD) has a column width of 1.
 *
 *    - Other format characters (general category code Cf in the Unicode
 *      database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.
 *
 *    - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
 *      have a column width of 0.
 *
 *    - Spacing characters in the East Asian Wide (W) or East Asian
 *      Full-width (F) category as defined in Unicode Technical
 *      Report #11 have a column width of 2.
 *
 *    - All remaining characters (including all printable
 *      ISO 8859-1 and WGL4 characters, Unicode control characters,
 *      etc.) have a column width of 1.
 *
 * This implementation assumes that wchar_t characters are encoded
 * in ISO 10646.
 */

int mk_wcwidth(wchar_t ucs)
{
  /* sorted list of non-overlapping intervals of non-spacing characters */
  /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
  static const struct interval combining[] = {
    { 0x0300, 0x0357 }, { 0x035D, 0x036F }, { 0x0483, 0x0486 },
    { 0x0488, 0x0489 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 },
    { 0x05BB, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
    { 0x05C4, 0x05C4 }, { 0x0600, 0x0603 }, { 0x0610, 0x0615 },
    { 0x064B, 0x0658 }, { 0x0670, 0x0670 }, { 0x06D6, 0x06E4 },
    { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, { 0x070F, 0x070F },
    { 0x0711, 0x0711 }, { 0x0730, 0x074A }, { 0x07A6, 0x07B0 },
    { 0x0901, 0x0902 }, { 0x093C, 0x093C }, { 0x0941, 0x0948 },
    { 0x094D, 0x094D }, { 0x0951, 0x0954 }, { 0x0962, 0x0963 },
    { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 },
    { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 },
    { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 },
    { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 },
    { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 },
    { 0x0ACD, 0x0ACD }, { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 },
    { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 },
    { 0x0B4D, 0x0B4D }, { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 },
    { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 },
    { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 },
    { 0x0CBC, 0x0CBC }, { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 },
    { 0x0CCC, 0x0CCD }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D },
    { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
    { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
    { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },
    { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },
    { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },
    { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 },
    { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },
    { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 },
    { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x1712, 0x1714 },
    { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, { 0x1772, 0x1773 },
    { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 },
    { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, { 0x180B, 0x180D },
    { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, { 0x1927, 0x1928 },
    { 0x1932, 0x1932 }, { 0x1939, 0x193B }, { 0x200B, 0x200F },
    { 0x202A, 0x202E }, { 0x2060, 0x2063 }, { 0x206A, 0x206F },
    { 0x20D0, 0x20EA }, { 0x302A, 0x302F }, { 0x3099, 0x309A },
    { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE23 },
    { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, { 0x1D167, 0x1D169 },
    { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },
    { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, { 0xE0100, 0xE01EF }
  };

  /* test for 8-bit control characters */
  if (ucs == 0)
    return 0;
  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
    return -1;

  /* binary search in table of non-spacing characters */
  if (bisearch(ucs, combining,
	       sizeof(combining) / sizeof(struct interval) - 1))
    return 0;

  /* if we arrive here, ucs is not a combining or C0/C1 control character */

  return 1 + 
    (ucs >= 0x1100 &&
     (ucs <= 0x115f ||                    /* Hangul Jamo init. consonants */
      ucs == 0x2329 || ucs == 0x232a ||
      (ucs >= 0x2e80 && ucs <= 0xa4cf &&
       ucs != 0x303f) ||                  /* CJK ... Yi */
      (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */
      (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
      (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
      (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */
      (ucs >= 0xffe0 && ucs <= 0xffe6) ||
      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
      (ucs >= 0x30000 && ucs <= 0x3fffd)));
}


int mk_wcswidth(const wchar_t *pwcs, size_t n)
{
  int w, width = 0;

  for (;*pwcs && n-- > 0; pwcs++)
    if ((w = mk_wcwidth(*pwcs)) < 0)
      return -1;
    else
      width += w;

  return width;
}


/*
 * The following functions are the same as mk_wcwidth() and
 * mk_wcwidth_cjk(), except that spacing characters in the East Asian
 * Ambiguous (A) category as defined in Unicode Technical Report #11
 * have a column width of 2. This variant might be useful for users of
 * CJK legacy encodings who want to migrate to UCS without changing
 * the traditional terminal character-width behaviour. It is not
 * otherwise recommended for general use.
 */
static int mk_wcwidth_cjk(wchar_t ucs)
{
  /* sorted list of non-overlapping intervals of East Asian Ambiguous
   * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
  static const struct interval ambiguous[] = {
    { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 },
    { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 },
    { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 },
    { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 },
    { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED },
    { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA },
    { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 },
    { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B },
    { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 },
    { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 },
    { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 },
    { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE },
    { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 },
    { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA },
    { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 },
    { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB },
    { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB },
    { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0391, 0x03A1 },
    { 0x03A3, 0x03A9 }, { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 },
    { 0x0401, 0x0401 }, { 0x0410, 0x044F }, { 0x0451, 0x0451 },
    { 0x2010, 0x2010 }, { 0x2013, 0x2016 }, { 0x2018, 0x2019 },
    { 0x201C, 0x201D }, { 0x2020, 0x2022 }, { 0x2024, 0x2027 },
    { 0x2030, 0x2030 }, { 0x2032, 0x2033 }, { 0x2035, 0x2035 },
    { 0x203B, 0x203B }, { 0x203E, 0x203E }, { 0x2074, 0x2074 },
    { 0x207F, 0x207F }, { 0x2081, 0x2084 }, { 0x20AC, 0x20AC },
    { 0x2103, 0x2103 }, { 0x2105, 0x2105 }, { 0x2109, 0x2109 },
    { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 },
    { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 },
    { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 },
    { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 },
    { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 },
    { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B },
    { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 },
    { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 },
    { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E },
    { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 },
    { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 },
    { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },
    { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },
    { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },
    { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },
    { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },
    { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 },
    { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 },
    { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 },
    { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 },
    { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 },
    { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 },
    { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 },
    { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F },
    { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF },
    { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }
  };

  /* binary search in table of non-spacing characters */
  if (bisearch(ucs, ambiguous,
	       sizeof(ambiguous) / sizeof(struct interval) - 1))
    return 2;

  return mk_wcwidth(ucs);
}


int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
{
  int w, width = 0;

  for (;*pwcs && n-- > 0; pwcs++)
    if ((w = mk_wcwidth_cjk(*pwcs)) < 0)
      return -1;
    else
      width += w;

  return width;
}

--- NEW FILE: wcwidth.i ---
#include "fribidi.h"

#define	mk_wcwidth	FRIBIDI_API fribidi_wcwidth
#define	mk_wcswidth	FRIBIDI_API fribidi_wcswidth
#define	mk_wcwidth_cjk	FRIBIDI_API fribidi_wcwidth_cjk
#define	mk_wcswidth_cjk	FRIBIDI_API fribidi_wcswidth_cjk

#define wchar_t		FriBidiChar
#define size_t		FriBidiStrIndex



More information about the fribidi-commit mailing list