Permalink
Browse files

Initial revision

  • Loading branch information...
behdad
behdad committed Apr 25, 2004
0 parents commit 63d12e574eb5cfe95290b303bac0950c25afe397
Showing with 19,125 additions and 0 deletions.
  1. +19 −0 .cvsignore
  2. +19 −0 .indent.pro
  3. +1 −0 AUTHORS
  4. +504 −0 COPYING
  5. +7 −0 HACKING
  6. +34 −0 HISTORY
  7. +54 −0 Makefile.am
  8. +18 −0 NEWS
  9. +152 −0 README
  10. +33 −0 THANKS
  11. +13 −0 TODO
  12. +25 −0 bin/Makefile.am
  13. +278 −0 bin/fribidi-benchmark.c
  14. +597 −0 bin/fribidi-main.c
  15. +1,268 −0 bin/getopt.c
  16. +187 −0 bin/getopt.h
  17. +213 −0 bin/getopt1.c
  18. +145 −0 bin/getopt_int.h
  19. +110 −0 bootstrap
  20. +9 −0 charset/Headers.mk
  21. +48 −0 charset/Makefile.am
  22. +336 −0 charset/fribidi-char-sets-cap-rtl.c
  23. +70 −0 charset/fribidi-char-sets-cap-rtl.h
  24. +106 −0 charset/fribidi-char-sets-cp1255.c
  25. +62 −0 charset/fribidi-char-sets-cp1255.h
  26. +223 −0 charset/fribidi-char-sets-cp1256.c
  27. +62 −0 charset/fribidi-char-sets-cp1256.h
  28. +81 −0 charset/fribidi-char-sets-iso8859-6.c
  29. +62 −0 charset/fribidi-char-sets-iso8859-6.h
  30. +120 −0 charset/fribidi-char-sets-iso8859-8.c
  31. +62 −0 charset/fribidi-char-sets-iso8859-8.h
  32. +56 −0 charset/fribidi-char-sets-list.h
  33. +126 −0 charset/fribidi-char-sets-utf8.c
  34. +66 −0 charset/fribidi-char-sets-utf8.h
  35. +230 −0 charset/fribidi-char-sets.c
  36. +125 −0 charset/fribidi-char-sets.h
  37. +208 −0 configure.ac
  38. +27 −0 doc/Makefile.am
  39. +13 −0 fribidi.pc.in
  40. +145 −0 fribidi.spec.in
  41. 0 gen.tab/Makefile.am
  42. +267 −0 gen.tab/gen-bidi-type-tab.c
  43. +152 −0 gen.tab/gen-mirroring-tab.c
  44. +364 −0 gen.tab/packtab.c
  45. +49 −0 gen.tab/packtab.h
  46. +525 −0 gen.tab/unidata/BidiMirroring.txt
  47. +40 −0 gen.tab/unidata/ReadMe.txt
  48. +1,299 −0 gen.tab/unidata/extracted/DerivedBidiClass.txt
  49. +933 −0 gen.tab/unidata/extracted/DerivedDecompositionType.txt
  50. +215 −0 gen.tab/unidata/extracted/DerivedJoiningType.txt
  51. +14 −0 lib/Headers.mk
  52. +75 −0 lib/Makefile.am
  53. +5,228 −0 lib/bidi-type-table.i
  54. +69 −0 lib/bidi-types-list.h
  55. +78 −0 lib/bidi-types.h
  56. +110 −0 lib/common.h
  57. +87 −0 lib/debug.h
  58. +1 −0 lib/fribidi-begindecls.h
  59. +79 −0 lib/fribidi-bidi-type.c
  60. +74 −0 lib/fribidi-bidi-type.h
  61. +76 −0 lib/fribidi-bidi-types.c
  62. +278 −0 lib/fribidi-bidi-types.h
  63. +1,424 −0 lib/fribidi-bidi.c
  64. +112 −0 lib/fribidi-bidi.h
  65. +83 −0 lib/fribidi-common.h
  66. +22 −0 lib/fribidi-config.h.in
  67. +1 −0 lib/fribidi-enddecls.h
  68. +107 −0 lib/fribidi-env.c
  69. +125 −0 lib/fribidi-env.h
  70. +94 −0 lib/fribidi-mem.c
  71. +90 −0 lib/fribidi-mirroring.c
  72. +67 −0 lib/fribidi-mirroring.h
  73. +143 −0 lib/fribidi-types.h
  74. +4 −0 lib/fribidi-unicode-version.h
  75. +101 −0 lib/fribidi-unicode.h
  76. +68 −0 lib/fribidi.c
  77. +48 −0 lib/fribidi.h
  78. +90 −0 lib/mem.h
  79. +358 −0 lib/mirroring-table.i
  80. +33 −0 test/Makefile.am
  81. +74 −0 test/run.tests
  82. +13 −0 test/test_CapRTL_explicit.input
  83. +13 −0 test/test_CapRTL_explicit.reference
  84. +26 −0 test/test_CapRTL_implicit.input
  85. +26 −0 test/test_CapRTL_implicit.reference
  86. +17 −0 test/test_ISO8859-8_hebrew.input
  87. +17 −0 test/test_ISO8859-8_hebrew.reference
  88. +14 −0 test/test_UTF-8_persian.input
  89. +14 −0 test/test_UTF-8_persian.reference
  90. +7 −0 test/test_UTF-8_reordernsm.input
  91. +7 −0 test/test_UTF-8_reordernsm.reference
@@ -0,0 +1,19 @@
ChangeLog.bak
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
@@ -0,0 +1,19 @@
-gnu
-bfda
-bfde
-T TypeLink
-T LevelInfo
-T FriBidiChar
-T FriBidiStrIndex
-T FriBidiMaskType
-T FriBidiCharType
-T FriBidiPropCharType
-T FriBidiLevel
-T FriBidiCharSet
-T FriBidiCharSetHandler
-T FriBidiMemChunk
-T FriBidiEnv
-T fribidi_uint8
-T fribidi_uint16
-T fribidi_uint32
-T fribidi_boolean
@@ -0,0 +1 @@
behdad: Behdad Esfahbod <behdad@gnu.org>
504 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,7 @@
The GIMP uses GNU Libtool in order to build shared libraries on a
variety of systems. While this is very nice for making usable
binaries, it can be a pain when trying to debug a program. For that
reason, compilation of shared libraries can be turned off by
specifying the `--disable-shared' option to `configure'.
34 HISTORY
@@ -0,0 +1,34 @@
FriBidi was first developed by Dov Grobgeld of the Ivrix project, a few
releases happened there, up to 0.1.15. This was late 2000.
Behdad Esfahbod of the FarsiWeb project started reading and hacking FriBidi
in the same days. As per request of Roozbeh Pournader from the FarsiWeb
project, FriBidi development was moved to SourceForge (http://www.sf.net/),
under the same name (http://fribidi.sf.net/).
Behdad started applying patches in early 2001, and became the new
maintainer. He first aimed for full compliance of the standard, and then
applied the GNU Coding Standards. The effort was then released in the
Iranian New Year celebrations on 2001-03-29 as FriBidi 0.9.0.
Since then, FriBidi has been quite stable. A few other releases were made,
to fix bugs, code cleanup, etc which all led to the release of FriBidi
0.10.4 on 2002-05-19. It turned out to be quite stable, and is shipped by
several distributions these days (~2003).
Behdad promised a major redesign of the interface and the code to code, but
it almost never happened, at least not before Iranian New Years of March
2004. In the mean time, FriBidi was dubbed as a GNU package by Richard
Stallman. The first time was in 2002, and he mis-spelled it as "FreeBidi".
Next time in 2003 he addressed the correct name "FriBidi", but the
transition to gnu.org (http://www.gnu.org/) never happened, due to long
down-times of gnu.org due to several administrative problems.
GNU FriBidi was finally moved to the FreeDesktop project
(http://www.freedesktop.org), which it lives a peaceful life these days
(http://www.freedesktop.org/Software/FriBidi). Major cleanup made to the
build system, and was reimported from scratch in the FreeDesktop CVS. The
old CVS repository is still available under the "fribidi-sf.net" module.
You can find more details in the file ChangeLog.old in the GNU FriBidi CVS
repository.
@@ -0,0 +1,54 @@
##############################################################################
## $Id: Makefile.am,v 1.1 2004-04-25 18:47:57 behdad Exp $
## $Author: behdad $
## $Date: 2004-04-25 18:47:57 $
## $Revision: 1.1 $
## $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/Makefile.am,v $
##############################################################################
## -*- Automake -*-
## Process this file with automake to produce Makefile.in
## The order of subdirs is important, don't change without a reason.
SUBDIRS = tablegen charset lib bin doc test
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @PACKAGE@.pc
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
`find "$(srcdir)" -type f -name Makefile.in -print` \
`find "$(srcdir)" -type f -name "*~" -print`
# Indent all C source and header files
.PHONY: indent
indent: $(srcdir)/.indent.pro
cd "$(srcdir)" && \
find . -type f -mindepth 2 -name "*.[ch]" -print | \
xargs ./missing --run indent
# Creating ChangeLog from CVS log, with cvs2cl:
MAINTAINERCLEANFILES += ChangeLog ChangeLog.bak
EXTRA_DIST = ChangeLog
ChangeLog:
if test -d "$(srcdir)/CVS"; then \
cd "$(srcdir)" && \
./missing --run cvs2cl --stdout --utc --FSF -U AUTHORS; \
fi > $@
18 NEWS
@@ -0,0 +1,18 @@
Overview of changes between 0.10.4 and 0.19.0
=============================================
* Unicode 4.0.1 data files used.
* Has been dubbed GNU FriBidi by Richard Stallman
* Restructured.
Overview of changes between 0.10.2 and 0.10.4
=============================================
* Unicode 3.2 data files used.
Overview of changes between 0.10.1 and 0.10.2
=============================================
* Rule L3 of UAX#9 implemented. Now fribidi implements the whole Unicode
BiDi Algorithm.
* The autogenerated table files now contain much fewer symbols, which reduces
the relocation time of the library.
See ChangeLog for more descriptive list of changes.
152 README
@@ -0,0 +1,152 @@
This is GNU FriBidi
The Free Implementation of the Unicode Bidirectional Algorithm.
Background
==========
One of the missing links stopping the penetration of free software in Middle
East is the lack of support for the Arabic and Hebrew alphabets. In order to
have proper Arabic and Hebrew support, the BiDi algorithm should have been
implemented. It is our hope that this library will stimulate more free
software in the Middle Eastern countries.
Audience
========
It is our hope that this library will stimulate the implementation of Hebrew
and Arabic in lots of free software. Here is a small list of projects that
would benefit from the use of the GNU FriBidi library, but of course there are
many more: Wine, Mozilla, Qt, KDE, lynx, OpenOffice.
GNU FriBidi is already being used in projects like Pango (resulting in GTK+
and GNOME using GNU FriBidi), AbiWord, MLTerm, MPlayer, and BiCon.
Dependencies
============
Currently GNU FriBidi does not depend on any other library. It uses GNU Build
System for build and installation on POSIX systems. There are some files to
assist you creating a w32 DLL in the w32/ folder.
Downloading
===========
The latest version of GNU FriBidi may be found at:
http://www.freedesktop.org/Software/FriBidi
Building
========
See INSTALL for a description of how to build and install this library.
License
=========
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library, in a file named COPYING; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
Implementation
==============
The library implements the algorithm described in the "Unicode Standard
Annex #9, The Bidirectional Algorithm", available at
http://www.unicode.org/unicode/reports/tr9/. GNU Fribidi has been tested
exhaustively against the Unicode Reference Code, and to the best of our
knowledge, it completely conforms to the specification, always producing
the same result as the Reference Code.
The library uses Unicode (UTF32) entirely. The character properties are
automatically extracted from the Unicode data files, available from:
http://www.unicode.org/Public/UNIDATA/
This means that every Unicode character is treated in strict accordance
with the Unicode specification.
There is a limited support for character set conversion from/to the UTF32
encoding. Data in these character sets must be converted into UTF32 before
the library may be used. iconv(3) can always do a better job on that, so you
may find that the character sets conversion code is typically turned off on
POSIX machines.
The reordering of characters is typically done through the function:
fribidi_boolean
fribidi_log2vis(/* input */
FriBidiChar *str,
FriBidiStrIndex len,
FriBidiCharType *pbase_dir,
/* output */
FriBidiChar *visual_str,
FriBidiStrIndex *position_L_to_V_list,
FriBidiStrIndex *position_V_to_L_list,
FriBidiLevel *embedding_level_list
)
where
str is the Unicode input string
len is the length of the unicode string
pbase_dir is the input and output base direction. If
base == FRIBIDI_TYPE_ON then fribidi_log2vis
calculates the base direction on its own
according to the BiDi algorithm.
visual_str The reordered output unicode string.
position_L_to_V_list Maps the positions in the logical string to
positions in the visual string.
position_V_to_L_list Maps the positions in the visual string to
the positions in the logical string.
embedding_level_list Returns the classification of each character. Even
levels indicate LTR characters, and odd levels
indicate RTL characters. The main use of this
list is in interactive applications when the
embedding e.g. level determines cursor display.
In any of the output pointers == NULL, then that information is not
calculated.
How it looks like
=================
Have a look at tests directory, to see some input and outputs, which
CapRTL charset means that CAPITAL letters are right to left, and digits
6, 7, 8, 9 are Arabic digits, try 'fribidi --charsetdesc CapRTL' for the
full description.
Executable
==========
There is also a command-line utilitity called fribidi that loops over
the text of a file and performs the BiDi algorithm on each line, also
used for testing the algorithm. Run fribidi with the --help option to
learn about usage. The command-line utility is known to have problems
with line-breaking and ltov/vtol lists.
Bugs and comments
=================
Report GNU FriBidi bugs at:
http://freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi?product=FriBidi
And send your comments to:
fribidi-discuss@lists.sourceforge.net
Behdad Esfahbod
behdad@gnu.org
10 April 2004
33 THANKS
@@ -0,0 +1,33 @@
Thanks to:
Members of the Linux-il and Arabeyes communities
* For the feedbacks.
* For the constant pressure on keep the wheel rolling.
Mark Davis
* For writing the Unicode Standard Annex #9.
And for the previous versions of FriBidi (up to 2002), thanks to:
Dov Grobgeld <dov@imagic.weizmann.ac.il>
* Initial author, and maintainer before the 0.9 releases.
Franck Portaneri
* For the Mozilla BiDi languges support document;
Owen Tayler <otaylor@redhat.com>
* Contributed very important memory leak and speed patches.
Pablo Saratxaga <pablo@mandrakesoft.com>
* Contributed several arabic charset converters.
Omer Zak <omerz@actcom.co.il>
* Contributed several bug fixes, and several considerations for
embedded systems.
Roozbeh Pournader <roozbeh@sharif.edu>
* Fixed small things here and there.
13 TODO
@@ -0,0 +1,13 @@
Implementation issues:
* BidiTypes enum in manual.
* Update CapRTL with new Unicode reference code.
* Revise reorder API, in fribidi_main.c reorder after link break.
* Add an option to fribidi_main.c to assume two consecutive returns as
paragraph separators.
* Design better apis to do reorder based on available levels, remove
explicit marks then calculate position maps, ....
@@ -0,0 +1,25 @@
bin_PROGRAMS = fribidi
noinst_PROGRAMS = fribidi-benchmark
getopt_SOURCES = getopt.c getopt1.c getopt_int.h getopt.h
fribidi_SOURCES = fribidi-main.c $(getopt_SOURCES)
fribidi_benchmark_SOURCES = fribidi-benchmark.c $(getopt_SOURCES)
AM_CPPFLAGS = \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/charset \
$(GLIB_CFLAGS)
LDADD = $(top_builddir)/lib/libfribidi.la $(GLIB_LIBS)
if FRIBIDI_CHARSETS
else # !FRIBIDI_CHARSETS
LDADD += $(top_builddir)/charset/libfribidi-char-sets.la
endif # !FRIBIDI_CHARSETS
$(top_builddir)/lib/libfribidi.la:
cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) libfribidi.la
Oops, something went wrong.

0 comments on commit 63d12e5

Please sign in to comment.