2 * fribidi-char-sets-iso8859-6.c - ISO8859-6 character set conversion routines
4 * $Id: fribidi-char-sets-iso8859-6.c,v 1.2 2004-05-03 22:05:19 behdad Exp $
6 * $Date: 2004-05-03 22:05:19 $
8 * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-iso8859-6.c,v $
11 * Behdad Esfahbod, 2001, 2002, 2004
12 * Dov Grobgeld, 1999, 2000
14 * Copyright (C) 2004 Sharif FarsiWeb, Inc
15 * Copyright (C) 2001,2002 Behdad Esfahbod
16 * Copyright (C) 1999,2000 Dov Grobgeld
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
28 * You should have received a copy of the GNU Lesser General Public License
29 * along with this library, in a file named COPYING; if not, write to the
30 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
31 * Boston, MA 02110-1301, USA
33 * For licensing issues, contact <license@farsiweb.info>.
38 #include <fribidi-char-sets-iso8859-6.h>
40 #define ISO_HAMZA 0xc1
41 #define ISO_SUKUN 0xf2
43 #define UNI_HAMZA 0x0621
44 #define UNI_SUKUN 0x0652
47 fribidi_iso8859_6_to_unicode_c (
52 register unsigned char ch = (unsigned char) sch;
53 if (ch >= ISO_HAMZA && ch <= ISO_SUKUN)
54 return ch - ISO_HAMZA + UNI_HAMZA;
60 fribidi_unicode_to_iso8859_6_c (
65 if (uch >= UNI_HAMZA && uch <= UNI_SUKUN)
66 return (char) (uch - UNI_HAMZA + ISO_HAMZA);
69 else if (uch == 0x060c)
71 else if (uch == 0x061b)
73 else if (uch == 0x061f)
80 * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent