libtool
ltmain.sh
missing
+mkinstalldirs
stamp-h1
## -*- 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 $
##############################################################################
$(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`
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
/* 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:
#define appname "fribidi_benchmark"
#define MAX_STR_LEN 1000
+#define NUM_ITER 2000
static void
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
" -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);
}
static void
benchmark (
- char *S_,
+ const char *S_,
int niter
)
{
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;
{
char *argv[]
)
{
- niter = 2000;
+ int niter = NUM_ITER;
/* Parse the command line */
argv[0] = appname;
#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;
}
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;
/* 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:
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 */
exit (0);
}
-char *
+static char *
my_fribidi_strdup (
char *s
)
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")))
{
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;
}
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 = "";
/* 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* */
/* *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;
{
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];
(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])
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
for (i = 0; i < CAPRTL_CHARS; i++)
if (uch == caprtl_to_unicode[i])
- return (char) i;
+ return (unsigned char) i;
return '?';
}
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++)
/* 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:
)
{
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 */
char *ss
)
{
- int i;
+ FriBidiStrIndex i;
unsigned char *s = (unsigned char *) ss;
unsigned char *t = s;
## 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 $
##############################################################################
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])
# 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
/* 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:
const char *where;
if (READ_VERSION ("Version ") || READ_VERSION ("Unicode "))
- {
+ {
found = 1;
break;
}
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);
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);
/* 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:
}
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",
/* 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:
#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 */
/* 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:
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;
}