/* FriBidi
* fribidi-main.c - command line program for libfribidi
*
- * $Id: fribidi-main.c,v 1.8 2004-06-09 08:56:53 behdad Exp $
+ * $Id: fribidi-main.c,v 1.9 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-09 08:56:53 $
- * $Revision: 1.8 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.9 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/bin/fribidi-main.c,v $
*
* Authors:
exit (0);
}
+char *my_fribidi_strdup (char *s)
+{
+ char *m;
+
+ m = fribidi_malloc (strlen (s) + 1);
+ if (!m)
+ return NULL;
+
+ strcpy(m, s);
+
+ return m;
+}
+
int
main (
int argc,
do_break = false;
break;
case 'c':
- char_set = strdup (optarg);
+ char_set = my_fribidi_strdup (optarg);
+ if (!char_set)
+ die1 ("memory allocation failed for char_set!");
break;
#if !FRIBIDI_MAIN_USE_ICONV_H
case CAPRTL:
char_set = "CapRTL";
break;
case CHARSETDESC:
- char_set = strdup (optarg);
+ char_set = optarg;
char_set_num = fribidi_parse_charset (char_set);
if (!char_set_num)
die2 ("unrecognized character set `%s'\n", char_set);
libfribidi_char_sets_la_headers = \
- fribidi-char-sets-cap-rtl.h \
- fribidi-char-sets-cp1255.h \
- fribidi-char-sets-cp1256.h \
fribidi-char-sets.h \
- fribidi-char-sets-iso8859-6.h \
- fribidi-char-sets-iso8859-8.h \
- fribidi-char-sets-list.h \
- fribidi-char-sets-utf8.h
+ fribidi-char-sets-list.h
libfribidi_char_sets_la_symbols = \
fribidi_charset_to_unicode \
/* FriBidi
* fribidi-char-sets-cap-rtl.h - CapRTL character set conversion routines
*
- * $Id: fribidi-char-sets-cap-rtl.h,v 1.1 2004-04-25 18:47:57 behdad Exp $
+ * $Id: fribidi-char-sets-cap-rtl.h,v 1.2 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-25 18:47:57 $
- * $Revision: 1.1 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.2 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-cap-rtl.h,v $
*
* Authors:
#include "fribidi-types.h"
+#include "fribidi-begindecls.h"
+
#define fribidi_char_set_name_cap_rtl "CapRTL"
#define fribidi_char_set_title_cap_rtl "CapRTL (Test)"
/* FriBidi
* fribidi-char-sets-cp1255.h - CP1255 character set conversion routines
*
- * $Id: fribidi-char-sets-cp1255.h,v 1.1 2004-04-25 18:47:57 behdad Exp $
+ * $Id: fribidi-char-sets-cp1255.h,v 1.2 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-25 18:47:57 $
- * $Revision: 1.1 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.2 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-cp1255.h,v $
*
* Authors:
#include "fribidi-types.h"
+#include "fribidi-begindecls.h"
+
#define fribidi_char_set_name_cp1255 "CP1255"
#define fribidi_char_set_title_cp1255 "CP1255 (MS Hebrew/Yiddish)"
#define fribidi_char_set_desc_cp1255 NULL
/* FriBidi
* fribidi-char-sets-cp1256.h - CP1256 character set conversion routines
*
- * $Id: fribidi-char-sets-cp1256.h,v 1.1 2004-04-25 18:47:57 behdad Exp $
+ * $Id: fribidi-char-sets-cp1256.h,v 1.2 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-25 18:47:57 $
- * $Revision: 1.1 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.2 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-cp1256.h,v $
*
* Authors:
#include "fribidi-types.h"
+#include "fribidi-begindecls.h"
+
#define fribidi_char_set_name_cp1256 "CP1256"
#define fribidi_char_set_title_cp1256 "CP1256 (MS Arabic)"
#define fribidi_char_set_desc_cp1256 NULL
/* FriBidi
* fribidi-char-sets-iso8859-6.h - ISO8859-6 character set conversion routines
*
- * $Id: fribidi-char-sets-iso8859-6.h,v 1.1 2004-04-25 18:47:57 behdad Exp $
+ * $Id: fribidi-char-sets-iso8859-6.h,v 1.2 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-25 18:47:57 $
- * $Revision: 1.1 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.2 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-iso8859-6.h,v $
*
* Authors:
#include "fribidi-types.h"
+#include "fribidi-begindecls.h"
+
#define fribidi_char_set_name_iso8859_6 "ISO8859-6"
#define fribidi_char_set_title_iso8859_6 "ISO8859-6 (Arabic)"
#define fribidi_char_set_desc_iso8859_6 NULL
/* FriBidi
* fribidi-char-sets-iso8859-8.h - ISO8859-8 character set conversion routines
*
- * $Id: fribidi-char-sets-iso8859-8.h,v 1.1 2004-04-25 18:47:57 behdad Exp $
+ * $Id: fribidi-char-sets-iso8859-8.h,v 1.2 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-25 18:47:57 $
- * $Revision: 1.1 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.2 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-iso8859-8.h,v $
*
* Authors:
#include "fribidi-types.h"
+#include "fribidi-begindecls.h"
+
#define fribidi_char_set_name_iso8859_8 "ISO8859-8"
#define fribidi_char_set_title_iso8859_8 "ISO8859-8 (Hebrew)"
#define fribidi_char_set_desc_iso8859_8 NULL
-#ifndef __C2MAN__
+#ifndef __FRIBIDI_DOC
/* FriBidi
* fribidi-char-sets-list.h - list of supported character sets
*
- * $Id: fribidi-char-sets-list.h,v 1.2 2004-04-27 16:47:22 behdad Exp $
+ * $Id: fribidi-char-sets-list.h,v 1.3 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-27 16:47:22 $
- * $Revision: 1.2 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.3 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-list.h,v $
*
* Author:
/* The order of types in this list should not be important at compile time,
* but apparently it should not be changed after compilation! */
-#endif /* !__C2MAN__ */
+#endif /* !__FRIBIDI_DOC */
#ifdef _FRIBIDI_ADD_CHAR_SET
# define _FRIBIDI_ADD_CHAR_SET_OTHERS _FRIBIDI_ADD_CHAR_SET
# define _FRIBIDI_ADD_CHAR_SET_ONE2ONE _FRIBIDI_ADD_CHAR_SET
# undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE
#endif /* _FRIBIDI_ADD_CHAR_SET */
-#ifndef __C2MAN__
+#ifndef __FRIBIDI_DOC
/* *INDENT-ON* */
-#endif /* !__C2MAN__ */
+#endif /* !__FRIBIDI_DOC */
/* FriBidi
* fribidi-char-sets-utf8.h - UTF-8 character set conversion routines
*
- * $Id: fribidi-char-sets-utf8.h,v 1.1 2004-04-25 18:47:57 behdad Exp $
+ * $Id: fribidi-char-sets-utf8.h,v 1.2 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-04-25 18:47:57 $
- * $Revision: 1.1 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.2 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-utf8.h,v $
*
* Authors:
#include "fribidi-types.h"
+#include "fribidi-begindecls.h"
+
#define fribidi_char_set_name_utf8 "UTF-8"
#define fribidi_char_set_title_utf8 "UTF-8 (Unicode)"
#define fribidi_char_set_desc_utf8 NULL
/* FriBidi
* fribidi-char-sets.c - character set conversion routines
*
- * $Id: fribidi-char-sets.c,v 1.4 2004-05-22 11:21:40 behdad Exp $
+ * $Id: fribidi-char-sets.c,v 1.5 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-05-22 11:21:40 $
- * $Revision: 1.4 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.5 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets.c,v $
*
* Authors:
#include <fribidi-char-sets.h>
+#include "fribidi-char-sets-cap-rtl.h"
+#include "fribidi-char-sets-utf8.h"
+#include "fribidi-char-sets-iso8859-6.h"
+#include "fribidi-char-sets-cp1256.h"
+#include "fribidi-char-sets-iso8859-8.h"
+#include "fribidi-char-sets-cp1255.h"
+
typedef struct
{
FriBidiChar (
};
#if !FRIBIDI_USE_GLIB
-static inline char
+static char
toupper (
/* input */
char c
return c < 'a' || c > 'z' ? c : c + 'A' - 'a';
}
-static inline int
+static int
fribidi_strcasecmp (
/* input */
const char *s1,
return toupper (*s1) - toupper (*s2);
}
#else /* FRIBIDI_USE_GLIB */
-# include <glib/gstrfuncs.h>
# define fribidi_strcasecmp g_ascii_strcasecmp
#endif /* FRIBIDI_USE_GLIB */
/* FriBidi
* fribidi-char-sets.h - character set conversion routines
*
- * $Id: fribidi-char-sets.h,v 1.2 2004-05-03 22:05:19 behdad Exp $
+ * $Id: fribidi-char-sets.h,v 1.3 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-05-03 22:05:19 $
- * $Revision: 1.2 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.3 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets.h,v $
*
* Authors:
#include "fribidi-types.h"
-#include "fribidi-char-sets-cap-rtl.h"
-#include "fribidi-char-sets-utf8.h"
-#include "fribidi-char-sets-iso8859-6.h"
-#include "fribidi-char-sets-cp1256.h"
-#include "fribidi-char-sets-iso8859-8.h"
-#include "fribidi-char-sets-cp1255.h"
-
#include "fribidi-begindecls.h"
typedef enum
## 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.12 2004-06-04 09:41:11 behdad Exp $
+## $Id: configure.ac,v 1.13 2004-06-09 14:59:21 behdad Exp $
## $Auther: behdad $
-## $Date: 2004-06-04 09:41:11 $
-## $Revision: 1.12 $
+## $Date: 2004-06-09 14:59:21 $
+## $Revision: 1.13 $
## $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/configure.ac,v $
##############################################################################
fribidi_major_version.fribidi_minor_version.fribidi_micro_version))dnl
AC_INIT([GNU FriBidi],fribidi_version(),[http://freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi?product=FriBidi])
-AC_REVISION([$Id: configure.ac,v 1.12 2004-06-04 09:41:11 behdad Exp $])
+AC_REVISION([$Id: configure.ac,v 1.13 2004-06-09 14:59:21 behdad Exp $])
AC_CONFIG_SRCDIR(lib/fribidi.h)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([gnits])
AC_C_INLINE
AC_C_STRINGIZE
AC_CHECK_SIZEOF(int)
+SIZEOF_INT=$ac_cv_sizeof_int
AC_SUBST(SIZEOF_INT)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(void *)
# Checks for compiler characteristics.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-Wall[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wall " ;;
- esac
- case " $CFLAGS " in
- *[\ \ ]-pedantic[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -pedantic " ;;
- esac
+ CFLAGS="$CFLAGS -Wall -pedantic -ansi "
fi
changequote([,])dnl
man3 = $(dist_man_MANS) $(dist_noinst_MANS)
C2MANFLAGS = $(includepath) \
+ -D__FRIBIDI_DOC \
-DDONT_HAVE_FRIBIDI_CONFIG_H \
-M "Programmer's Manual" \
-m "$(PACKAGE_NAME) $(PACKAGE_VERSION)"
/* FriBidi
* common.h - common include for library sources
*
- * $Id: common.h,v 1.11 2004-05-31 18:39:39 behdad Exp $
+ * $Id: common.h,v 1.12 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-05-31 18:39:39 $
- * $Revision: 1.11 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.12 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/common.h,v $
*
* Author:
# ifndef SIZEOF_VOID_P
# define SIZEOF_VOID_P GLIB_SIZEOF_VOID_P
# endif /* !SIZEOF_VOID_P */
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <glib/gmem.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# ifndef fribidi_malloc
-# define fribidi_malloc g_malloc
+# define fribidi_malloc g_try_malloc
# define fribidi_free g_free
# endif /* !fribidi_malloc */
# ifndef fribidi_assert
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <glib/gmessages.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define fribidi_assert g_assert
# endif /* !fribidi_assert */
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <glib/gmacros.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# ifndef FRIBIDI_BEGIN_STMT
# define FRIBIDI_BEGIN_STMT G_STMT_START {
# define FRIBIDI_END_STMT } G_STMT_END
* No need to include any headers. */
#ifndef fribidi_malloc
# if HAVE_STDLIB_H
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <stdlib.h>
-# endif /* __C2MAN__ */
+# endif /* __FRIBIDI_DOC */
# define fribidi_malloc malloc
# else /* !HAVE_STDLIB_H */
# define fribidi_malloc (void *) malloc
* allocated for data structure pools. */
#ifndef FRIBIDI_CHUNK_SIZE
# if HAVE_ASM_PAGE_H
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <asm/page.h>
-# endif /* __C2MAN__ */
+# endif /* __FRIBIDI_DOC */
# define FRIBIDI_CHUNK_SIZE (PAGE_SIZE - 16)
# else /* !HAVE_ASM_PAGE_H */
# define FRIBIDI_CHUNK_SIZE (4096 - 16)
/* FriBidi
* debug.h - debug-only interfaces
*
- * $Id: debug.h,v 1.5 2004-05-31 18:39:39 behdad Exp $
+ * $Id: debug.h,v 1.6 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-05-31 18:39:39 $
- * $Revision: 1.5 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.6 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/debug.h,v $
*
* Author:
#endif /* !__FILE__ */
#ifndef FRIBIDI_FPRINTF
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <stdio.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_FPRINTF fprintf
# define FRIBIDI_STDERR_ stderr,
#endif /* !FRIBIDI_FPRINTF */
/* FriBidi
* fribidi-bidi-type.c - get character bidi type
*
- * $Id: fribidi-bidi-type.c,v 1.9 2004-06-04 09:41:11 behdad Exp $
+ * $Id: fribidi-bidi-type.c,v 1.10 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-04 09:41:11 $
- * $Revision: 1.9 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.10 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/Attic/fribidi-bidi-type.c,v $
*
* Authors:
# undef _FRIBIDI_ADD_TYPE
};
-static inline FriBidiCharType
-get_bidi_type (
+FRIBIDI_ENTRY FriBidiCharType
+fribidi_get_bidi_type (
/* input */
FriBidiChar uch
)
return FRIBIDI_TYPE_LTR;
/* Non-Unicode chars */
}
-
-FRIBIDI_ENTRY FriBidiCharType
-fribidi_get_bidi_type (
- /* input */
- FriBidiChar ch
-)
-{
- return get_bidi_type (ch);
-}
-
-/* The following is only defined for binary compatibility */
-FriBidiCharType
-fribidi_get_type (
- FriBidiChar ch
-)
-{
- return fribidi_get_bidi_type (ch);
-}
-
-/* The following is only defined for binary compatibility */
-FriBidiCharType
-fribidi_get_type_internal (
- FriBidiChar ch
-)
-{
- return fribidi_get_bidi_type (ch);
-}
-
-FRIBIDI_ENTRY void
-fribidi_get_bidi_types (
- /* input */
- const FriBidiChar *str,
- FriBidiStrIndex len,
- /* output */
- FriBidiCharType *type
-)
-{
- register FriBidiStrIndex i = len;
- for (; i; i--)
- *type++ = get_bidi_type (*str++);
-}
-
-/* The following is only defined for binary compatibility */
-void
-fribidi_get_types (
- const FriBidiChar *str,
- FriBidiStrIndex len,
- FriBidiCharType *type
-)
-{
- fribidi_get_bidi_types (str, len, type);
-}
/* FriBidi
* fribidi-bidi-type.h - get character bidi type
*
- * $Id: fribidi-bidi-type.h,v 1.4 2004-06-09 08:56:53 behdad Exp $
+ * $Id: fribidi-bidi-type.h,v 1.5 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-09 08:56:53 $
- * $Revision: 1.4 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.5 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/Attic/fribidi-bidi-type.h,v $
*
* Author:
FriBidiChar ch /* input character */
) FRIBIDI_GNUC_CONST;
-/* fribidi_get_type is the old name of fribidi_get_bidi_type. deprecated.*/
-#define fribidi_get_type FRIBIDI_NAMESPACE(get_type)
- FRIBIDI_ENTRY FriBidiCharType fribidi_get_type (
- FriBidiChar ch
-)
- FRIBIDI_GNUC_CONST FRIBIDI_GNUC_DEPRECATED;
-
-#define fribidi_get_type_internal FRIBIDI_NAMESPACE(get_type_internal)
- FRIBIDI_ENTRY FriBidiCharType fribidi_get_type_internal (
- FriBidiChar ch
-)
- FRIBIDI_GNUC_CONST FRIBIDI_GNUC_DEPRECATED;
-
-#define fribidi_get_bidi_types FRIBIDI_NAMESPACE(get_bidi_types)
-/* fribidi_get_bidi_types - get bidi types for an string of characters
- *
- * This function finds the bidi types of an string of characters. See
- * fribidi_get_bidi_type for more information.
- */
- FRIBIDI_ENTRY void fribidi_get_bidi_types (
- const FriBidiChar *str, /* input string */
- FriBidiStrIndex len, /* input string length */
- FriBidiCharType *type /* output bidi types */
-);
-
-/* fribidi_get_types is the old name of fribidi_get_bidi_types. deprecated. */
-#define fribidi_get_types FRIBIDI_NAMESPACE(get_types)
- FRIBIDI_ENTRY void fribidi_get_types (
- const FriBidiChar *str,
- FriBidiStrIndex len,
- FriBidiCharType *type
-) FRIBIDI_GNUC_DEPRECATED;
-
#include "fribidi-enddecls.h"
#endif /* !_FRIBIDI_BIDI_TYPE_H */
-#ifndef __C2MAN__
+#ifndef __FRIBIDI_DOC
/* FriBidi
* fribidi-bidi-types-list.h - list of bidi types
*
- * $Id: fribidi-bidi-types-list.h,v 1.3 2004-06-07 20:38:21 behdad Exp $
+ * $Id: fribidi-bidi-types-list.h,v 1.4 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-07 20:38:21 $
- * $Revision: 1.3 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.4 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-bidi-types-list.h,v $
*
* Author:
* For licensing issues, contact <license@farsiweb.info>.
*/
/* *INDENT-OFF* */
-#endif /* !__C2MAN__ */
+#endif /* !__FRIBIDI_DOC */
#ifndef _FRIBIDI_ADD_TYPE
# define _FRIBIDI_ADD_TYPE(x,y)
#endif
} _FRIBIDI_ENUM_TYPES
#endif /* _FRIBIDI_ENUM_TYPES */
-#ifndef __C2MAN__
+#ifndef __FRIBIDI_DOC
/* *INDENT-ON* */
-#endif /* !__C2MAN__ */
+#endif /* !__FRIBIDI_DOC */
/* FriBidi
* fribidi-bidi-types.h - character bidi types
*
- * $Id: fribidi-bidi-types.h,v 1.5 2004-06-07 20:38:21 behdad Exp $
+ * $Id: fribidi-bidi-types.h,v 1.6 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-07 20:38:21 $
- * $Revision: 1.5 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.6 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-bidi-types.h,v $
*
* Author:
#define FRIBIDI_MASK_SS 0x00400000L
#define FRIBIDI_MASK_WS 0x00800000L
-/* We reserve the sign bit for user's private use: we will never use it,
- then negative character types will be never assigned. */
+/* We reserve a single bit for user's private use: we will never use it. */
+#define FRIBIDI_MASK_PRIVATE 0x01000000L
/*
/* Weak right to left */
#define FRIBIDI_TYPE_WRTL_VAL ( FRIBIDI_MASK_WEAK + FRIBIDI_MASK_RTL )
-/* The following is only used internally */
-
-/* Start or end of text (run list) */
+/* Start or end of text (run list). Only used internally */
#define FRIBIDI_TYPE_SENTINEL ( FRIBIDI_MASK_SENTINEL )
+/* Private types for applications. More private types can be obtained by
+ * summing up from this one. */
+#define FRIBIDI_TYPE_PRIVATE ( FRIBIDI_MASK_PRIVATE )
+
/* Define values for FriBidiCharType. */
-#if defined(__C2MAN__) || (defined(FRIBIDI_SIZEOF_INT) && ((FRIBIDI_SIZEOF_INT <= 4) && (FRIBIDI_SIZEOF_INT >= 4)))
+/* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++.
+ * The problem with C++ is that then casts between int32 and enum will fail!
+ */
+#if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus))
typedef enum
{
FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
- _FRIBIDI_TYPE_JUNK
+ _FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
} FriBidiCharType;
typedef enum
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
# undef _FRIBIDI_PAR_TYPES
- _FRIBIDI_TYPE_JUNK
+ _FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
} FriBidiParType;
#else
#endif
-/* Just for compatibility */
+/* For lazy people... */
#define FRIBIDI_TYPE_WLTR FRIBIDI_PAR_WLTR
#define FRIBIDI_TYPE_WL FRIBIDI_PAR_WLTR
#define FRIBIDI_TYPE_WRTL FRIBIDI_PAR_WRTL
*/
-/* Is private-use value? */
-#define FRIBIDI_TYPE_PRIVATE(p) ((p) < 0)
-
/* Is right-to-left level? */
#define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1)
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \
| FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
+/* Is private-use type for application? */
+#define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE)
+
/* Define some conversions. */
/* Change numbers: EN, AN to RTL. */
/* FriBidi
* fribidi-bidi.h - bidirectional algorithm
*
- * $Id: fribidi-bidi.h,v 1.6 2004-06-07 20:38:21 behdad Exp $
+ * $Id: fribidi-bidi.h,v 1.7 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-07 20:38:21 $
- * $Revision: 1.6 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.7 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-bidi.h,v $
*
* Authors:
back to logical string positions */
) FRIBIDI_GNUC_WARN_UNUSED;
-
#include "fribidi-enddecls.h"
#endif /* !_FRIBIDI_BIDI_H */
/* FriBidi
* fribidi-common.h - common include for library headers
*
- * $Id: fribidi-common.h,v 1.8 2004-06-04 09:41:11 behdad Exp $
+ * $Id: fribidi-common.h,v 1.9 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-04 09:41:11 $
- * $Revision: 1.8 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.9 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-common.h,v $
*
* Author:
#endif /* !FRIBIDI_ENTRY */
#if FRIBIDI_USE_GLIB
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <glib/gmacros.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS
# define FRIBIDI_END_DECLS G_END_DECLS
# define FRIBIDI_GNUC_CONST G_GNUC_CONST
# endif /* !__cplusplus */
#endif /* !FRIBIDI_BEGIN_DECLS */
-#define fribidi_version_info FRIBIDI_NAMESPACE(version_info)
-/* An string containing the version information of the library. */
-extern const char *fribidi_version_info;
-
#endif /* !_FRIBIDI_COMMON_H */
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
* For licensing issues, contact <license@farsiweb.info> or write to
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
*/
-/* $Id: fribidi-mirroring.c,v 1.8 2004-06-07 20:38:21 behdad Exp $
+/* $Id: fribidi-mirroring.c,v 1.9 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-07 20:38:21 $
- * $Revision: 1.8 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.9 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-mirroring.c,v $
*
* Authors:
/* Editor directions:
* Local Variables:
- * mode:c
+ * mode: c
* c-basic-offset: 2
- * indent-tabs-mode:t
+ * indent-tabs-mode: t
* tab-width: 8
* End:
- * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8
+ * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
*/
* For licensing issues, contact <license@farsiweb.info> or write to
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
*/
-/* $Id: fribidi-mirroring.h,v 1.6 2004-06-07 20:38:21 behdad Exp $
+/* $Id: fribidi-mirroring.h,v 1.7 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-07 20:38:21 $
- * $Revision: 1.6 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.7 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-mirroring.h,v $
*
* Authors:
#endif /* !_FRIBIDI_MIRRORING_H */
/* Editor directions:
* Local Variables:
- * mode:c
+ * mode: c
* c-basic-offset: 2
- * indent-tabs-mode:t
+ * indent-tabs-mode: t
* tab-width: 8
* End:
- * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8
+ * vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
*/
/* FriBidi
* fribidi-types.h - define data types for the rest of the library
*
- * $Id: fribidi-types.h,v 1.4 2004-05-07 06:30:38 behdad Exp $
+ * $Id: fribidi-types.h,v 1.5 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-05-07 06:30:38 $
- * $Revision: 1.4 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.5 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-types.h,v $
*
* Author:
#if !FRIBIDI_USE_GLIB
# if HAVE_INTTYPES_H
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <inttypes.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_UINT8_LOCAL uint8_t
# define FRIBIDI_UINT16_LOCAL uint16_t
# define FRIBIDI_UINT32_LOCAL uint32_t
# else /* !HAVE_INTTYPES_H */
# if HAVE_STDINT_H
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <stdint.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_UINT8_LOCAL uint8_t
# define FRIBIDI_UINT16_LOCAL uint16_t
# define FRIBIDI_UINT32_LOCAL uint32_t
# endif /* !HAVE_STDINT_H */
# endif /* !HAVE_INTTYPES_H */
# if HAVE_STDBOOL_H
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <stdbool.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_BOOLEAN_LOCAL bool
# else /* !HAVE_STDBOOL_H */
# define FRIBIDI_BOOLEAN_LOCAL int
# endif /* !HAVE_STDBOOL_H */
# if SIZEOF_WCHAR_T >= 4
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# include <stdlib.h>
# endif /* !HAVE_STDLIB_H */
# endif /* !STDC_HEADERS */
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_UNICHAR_LOCAL wchar_t
# else /* SIZEOF_WCHAR_T < 4 */
# define FRIBIDI_UNICHAR_LOCAL fribidi_uint32
# endif /* SIZEOF_WCHAR_T < 4 */
#else /* FRIBIDI_USE_GLIB */
-# ifndef __C2MAN__
+# ifndef __FRIBIDI_DOC
# include <glib/gtypes.h>
# include <glib/gunicode.h>
-# endif /* !__C2MAN__ */
+# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_UINT8_LOCAL guint8
# define FRIBIDI_UINT16_LOCAL guint16
# define FRIBIDI_UINT32_LOCAL guint32
/* FriBidi
- * fribidi.c - Unicode bidirectional and Arabic joining algorithms
+ * fribidi.c - Unicode bidirectional and Arabic joining/shaping algorithms
*
- * $Id: fribidi.c,v 1.7 2004-06-07 20:38:21 behdad Exp $
+ * $Id: fribidi.c,v 1.8 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-07 20:38:21 $
- * $Revision: 1.7 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.8 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi.c,v $
*
* Authors:
fribidi_bidi_type_name
fribidi_get_bidi_type
-fribidi_get_bidi_types
-fribidi_get_type
-fribidi_get_types
fribidi_log2vis
fribidi_get_par_embedding_levels
fribidi_remove_bidi_marks
/* FriBidi
- * fribidi.h - Unicode bidirectional and Arabic joining algorithms
+ * fribidi.h - Unicode bidirectional and Arabic joining/shaping algorithms
*
- * $Id: fribidi.h,v 1.3 2004-06-09 08:56:53 behdad Exp $
+ * $Id: fribidi.h,v 1.4 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-06-09 08:56:53 $
- * $Revision: 1.3 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.4 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi.h,v $
*
* Author:
# include "fribidi-char-sets.h"
#endif /* FRIBIDI_CHARSETS */
+#include "fribidi-begindecls.h"
/* See fribidi-bidi.h for the core functions fribidi_get_par_embedding_levels
* and fribidi_reorder_line which are probably the main calls you need. See
)
FRIBIDI_GNUC_WARN_UNUSED FRIBIDI_GNUC_DEPRECATED;
-
#define fribidi_log2vis_get_embedding_levels fribidi_get_par_embedding_levels
+#define fribidi_get_type fribidi_get_bidi_type
+
+
+
+#define fribidi_version_info FRIBIDI_NAMESPACE(version_info)
+/* An string containing the version information of the library. */
+extern const char *fribidi_version_info;
+#include "fribidi-enddecls.h"
#endif /* !_FRIBIDI_H */
/* Editor directions:
/* FriBidi
* mem.h - memory manipulation routines
*
- * $Id: mem.h,v 1.5 2004-05-07 06:30:38 behdad Exp $
+ * $Id: mem.h,v 1.6 2004-06-09 14:59:21 behdad Exp $
* $Author: behdad $
- * $Date: 2004-05-07 06:30:38 $
- * $Revision: 1.5 $
+ * $Date: 2004-06-09 14:59:21 $
+ * $Revision: 1.6 $
* $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/mem.h,v $
*
* Author:
#else /* FRIBIDI_USE_GLIB */
-#ifndef __C2MAN__
+#ifndef __FRIBIDI_DOC
# include <glib/gmem.h>
-#endif /* !__C2MAN__ */
+#endif /* !__FRIBIDI_DOC */
#define FriBidiMemChunk GMemChunk
#define FRIBIDI_ALLOC_ONLY G_ALLOC_ONLY