~ubuntu-branches/ubuntu/vivid/fribidi/vivid

« back to all changes in this revision

Viewing changes to fribidi_char_type.c

  • Committer: Bazaar Package Importer
  • Author(s): Lior Kaplan
  • Date: 2006-09-16 10:37:10 UTC
  • mfrom: (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20060916103710-1ktngzyx9azkujhl
Tags: 0.10.7-4
* Fix manual page name section (Closes: #368632)
* debian/control: Upgrade standards version to 3.7.2 (no changes needed).
* debian/copyright: Update Dov Grobgeld's contact address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* FriBidi - Library of BiDi algorithm
 
2
 * Copyright (C) 2001,2002 Behdad Esfahbod. 
 
3
 * 
 
4
 * This library is free software; you can redistribute it and/or 
 
5
 * modify it under the terms of the GNU Lesser General Public 
 
6
 * License as published by the Free Software Foundation; either 
 
7
 * version 2.1 of the License, or (at your option) any later version. 
 
8
 * 
 
9
 * This library is distributed in the hope that it will be useful, 
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
 
12
 * Lesser General Public License for more details. 
 
13
 * 
 
14
 * You should have received a copy of the GNU Lesser General Public License 
 
15
 * along with this library, in a file named COPYING; if not, write to the 
 
16
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
 
17
 * Boston, MA 02111-1307, USA  
 
18
 * 
 
19
 * For licensing issues, contact <fwpg@sharif.edu>. 
 
20
 */
 
21
 
 
22
#ifdef HAVE_CONFIG_H
 
23
#include <config.h>
 
24
#endif
 
25
#include "fribidi.h"
 
26
 
 
27
/*======================================================================
 
28
 *  fribidi_get_type() returns the bidi type of a character.
 
29
 *----------------------------------------------------------------------*/
 
30
FRIBIDI_API FriBidiCharType fribidi_get_type_internal (FriBidiChar uch);
 
31
 
 
32
FRIBIDI_API FriBidiCharType
 
33
fribidi_get_type (FriBidiChar uch)
 
34
{
 
35
  return fribidi_get_type_internal (uch);
 
36
}
 
37
 
 
38
FRIBIDI_API void
 
39
fribidi_get_types (             /* input */
 
40
                    FriBidiChar *str, FriBidiStrIndex len,
 
41
                    /* output */
 
42
                    FriBidiCharType *type)
 
43
{
 
44
  FriBidiStrIndex i;
 
45
 
 
46
  for (i = 0; i < len; i++)
 
47
    type[i] = fribidi_get_type (str[i]);
 
48
}
 
49
 
 
50
#ifdef MEM_OPTIMIZED
 
51
 
 
52
#if   HAS_FRIBIDI_TAB_CHAR_TYPE_9_I
 
53
#include "fribidi_tab_char_type_9.i"
 
54
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_8_I
 
55
#include "fribidi_tab_char_type_8.i"
 
56
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_7_I
 
57
#include "fribidi_tab_char_type_7.i"
 
58
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_6_I
 
59
#include "fribidi_tab_char_type_6.i"
 
60
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_5_I
 
61
#include "fribidi_tab_char_type_5.i"
 
62
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_4_I
 
63
#include "fribidi_tab_char_type_4.i"
 
64
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_3_I
 
65
#include "fribidi_tab_char_type_3.i"
 
66
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_2_I
 
67
#include "fribidi_tab_char_type_2.i"
 
68
#else
 
69
#error You have no fribidi_tab_char_type_*.i file, please first make one by \
 
70
       make fribidi_tab_char_type_n.i which n is the compress level, a digit \
 
71
       between 2 and 9, or simply run make fribidi_tab_char_type_small, \
 
72
       retry to make.
 
73
#endif
 
74
 
 
75
#else
 
76
 
 
77
#if   HAS_FRIBIDI_TAB_CHAR_TYPE_2_I
 
78
#include "fribidi_tab_char_type_2.i"
 
79
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_3_I
 
80
#include "fribidi_tab_char_type_3.i"
 
81
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_4_I
 
82
#include "fribidi_tab_char_type_4.i"
 
83
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_5_I
 
84
#include "fribidi_tab_char_type_5.i"
 
85
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_6_I
 
86
#include "fribidi_tab_char_type_6.i"
 
87
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_7_I
 
88
#include "fribidi_tab_char_type_7.i"
 
89
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_8_I
 
90
#include "fribidi_tab_char_type_8.i"
 
91
#elif HAS_FRIBIDI_TAB_CHAR_TYPE_9_I
 
92
#include "fribidi_tab_char_type_9.i"
 
93
#else
 
94
#error You have no fribidi_tab_char_type_*.i file, please first make one by \
 
95
       make fribidi_tab_char_type_n.i which n is the compress level, a digit \
 
96
       between 2 and 9, or simply run make fribidi_tab_char_type_large, \
 
97
       retry to make.
 
98
#endif
 
99
 
 
100
#endif