Update copyright years
[m17n/m17n-lib.git] / src / internal.h
1 /* internal.h -- common header file for the internal CORE and SHELL APIs.
2    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3      National Institute of Advanced Industrial Science and Technology (AIST)
4      Registration Number H15PRO112
5
6    This file is part of the m17n library.
7
8    The m17n library is free software; you can redistribute it and/or
9    modify it under the terms of the GNU Lesser General Public License
10    as published by the Free Software Foundation; either version 2.1 of
11    the License, or (at your option) any later version.
12
13    The m17n library is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    Lesser General Public License for more details.
17
18    You should have received a copy of the GNU Lesser General Public
19    License along with the m17n library; if not, write to the Free
20    Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21    02111-1307, USA.  */
22
23 #ifndef _M17N_INTERNAL_H_
24 #define _M17N_INTERNAL_H_
25
26 /** @file internal.h
27     @brief a documentation for internal.h
28
29     longer version of internal.h description 
30 */
31
32 extern int m17n__core_initialized;
33 extern int m17n__shell_initialized;
34 extern int m17n__gui_initialized;
35
36 extern int mdebug_hook ();
37
38 #if ENABLE_NLS
39 #include <libintl.h>
40 #define _(String) dgettext ("m17n-lib", String)
41 #else
42 #define _(String) (String)
43 #endif
44
45 /** Return with code RET while setting merror_code to ERR.  */
46
47 #define MERROR(err, ret)        \
48   do {                          \
49     merror_code = (err);        \
50     mdebug_hook ();             \
51     return (ret);               \
52   } while (0)
53
54
55 #define MERROR_GOTO(err, label) \
56   do {                          \
57     if ((err))                  \
58       merror_code = (err);      \
59     mdebug_hook ();             \
60     goto label;                 \
61   } while (0)
62
63
64 #define MWARNING(err)   \
65   do {                  \
66     mdebug_hook ();     \
67     goto warning;       \
68   } while (0)
69
70 #define MFATAL(err)     \
71   do {                  \
72     mdebug_hook ();     \
73     exit (err);         \
74   } while (0)
75
76 #define MFAILP(cond) ((cond) ? 0 : mdebug_hook ())
77
78 #define M_CHECK_CHAR(c, ret)            \
79   if ((c) < 0 || (c) > MCHAR_MAX)       \
80     MERROR (MERROR_CHAR, (ret));        \
81   else
82
83 \f
84 /** Memory allocation stuffs.  */
85
86 /* Call a handler function for memory full situation with argument
87    ERR.  ERR must be one of enum MErrorCode.  By default, the
88    handler function just calls exit () with argument ERR.  */
89
90 #define MEMORY_FULL(err)                \
91   do {                                  \
92     (*m17n_memory_full_handler) (err);  \
93     exit (err);                         \
94   } while (0)
95
96
97 /** The macro MTABLE_MALLOC () allocates memory (by malloc) for an
98     array of SIZE objects.  The size of each object is determined by
99     the type of P.  Then, it sets P to the allocated memory.  ERR must
100     be one of enum MErrorCode.  If the allocation fails, the macro
101     MEMORY_FULL () is called with argument ERR.  */
102
103 #define MTABLE_MALLOC(p, size, err)                             \
104   do {                                                          \
105     if (! ((p) = (void *) malloc (sizeof (*(p)) * (size))))     \
106       MEMORY_FULL (err);                                        \
107   } while (0)
108
109
110 /** The macro MTABLE_CALLOC() is like the macro MTABLE_MALLOC but use
111     calloc instead of malloc, thus the allocated memory are zero
112     cleared.  */
113
114 #define MTABLE_CALLOC(p, size, err)                             \
115   do {                                                          \
116     if (! ((p) = (void *) calloc (sizeof (*(p)), size)))        \
117       MEMORY_FULL (err);                                        \
118   } while (0)
119
120 #define MTABLE_CALLOC_SAFE(p, size)     \
121   ((p) = (void *) calloc (sizeof (*(p)), (size)))
122
123
124 /** The macro MTABLE_REALLOC () changes the size of memory block
125     pointed to by P to a size suitable for an array of SIZE objects.
126     The size of each object is determined by the type of P.  ERR must
127     be one of enum MErrorCode.  If the allocation fails, the macro
128     MEMORY_FULL () is called with argument ERR.  */
129
130 #define MTABLE_REALLOC(p, size, err)                                    \
131   do {                                                                  \
132     if (! ((p) = (void *) realloc ((p), sizeof (*(p)) * (size))))       \
133       MEMORY_FULL (err);                                                \
134   } while (0)
135
136
137 /** The macro MTABLE_ALLOCA () allocates memory (by alloca) for an
138     array of SIZE objects.  The size of each object is determined by
139     the type of P.  Then, it sets P to the allocated memory.  ERR must
140     be one of enum MErrorCode.  If the allocation fails, the macro
141     MEMORY_FULL () is called with argument ERR.  */
142
143 #define MTABLE_ALLOCA(p, size, err)             \
144   do {                                          \
145     int allocasize = sizeof (*(p)) * (size);    \
146     if (! ((p) = (void *) alloca (allocasize))) \
147       MEMORY_FULL (err);                        \
148     memset ((p), 0, allocasize);                \
149   } while (0)
150
151
152 /** short description of MSTRUCT_MALLOC */
153 /** The macro MSTRUCT_MALLOC () allocates memory (by malloc) for an
154     object whose size is determined by the type of P, and sets P to
155     the allocated memory.  ERR must be one of enum MErrorCode.  If
156     the allocation fails, the macro MEMORY_FULL () is called with
157     argument ERR.  */
158
159 #define MSTRUCT_MALLOC(p, err)                          \
160   do {                                                  \
161     if (! ((p) = (void *) malloc (sizeof (*(p)))))      \
162       MEMORY_FULL (err);                                \
163   } while (0)
164
165
166 #define MSTRUCT_CALLOC(p, err) MTABLE_CALLOC ((p), 1, (err))
167
168 #define MSTRUCT_CALLOC_SAFE(p) MTABLE_CALLOC_SAFE ((p), 1)
169
170 #define USE_SAFE_ALLOCA \
171   int sa_must_free = 0, sa_size = 0
172
173 /* P must be the same in all calls to SAFE_ALLOCA and SAFE_FREE in a
174    function.  */
175
176 #define SAFE_ALLOCA(P, SIZE)            \
177   do {                                  \
178     if (sa_size < (SIZE))               \
179       {                                 \
180         if (sa_must_free)               \
181           (P) = realloc ((P), (SIZE));  \
182         else                            \
183           {                             \
184             (P) = alloca ((SIZE));      \
185             if (! (P))                  \
186               {                         \
187                 (P) = malloc (SIZE);    \
188                 sa_must_free = 1;       \
189               }                         \
190           }                             \
191         if (! (P))                      \
192           MEMORY_FULL (1);              \
193         sa_size = (SIZE);               \
194       }                                 \
195   } while (0)
196
197 #define SAFE_FREE(P)                    \
198   do {                                  \
199     if (sa_must_free && sa_size > 0)    \
200       {                                 \
201         free ((P));                     \
202         sa_must_free = sa_size = 0;     \
203       }                                 \
204   } while (0)
205
206 \f
207 /** Extendable array.  */
208
209 #define MLIST_RESET(list)       \
210   ((list)->used = 0)
211
212
213 #define MLIST_INIT1(list, mem, increment)       \
214   do {                                          \
215     (list)->size = (list)->used = 0;            \
216     (list)->inc = (increment);                  \
217     (list)->mem = NULL;                         \
218   } while (0)
219
220
221 #define MLIST_APPEND1(list, mem, elt, err)                      \
222   do {                                                          \
223     if ((list)->inc <= 0)                                       \
224       mdebug_hook ();                                           \
225     if ((list)->size == (list)->used)                           \
226       {                                                         \
227         (list)->size += (list)->inc;                            \
228         MTABLE_REALLOC ((list)->mem, (list)->size, (err));      \
229       }                                                         \
230     (list)->mem[(list)->used++] = (elt);                        \
231   } while (0)
232
233
234 #define MLIST_PREPEND1(list, mem, elt, err)                     \
235   do {                                                          \
236     if ((list)->inc <= 0)                                       \
237       mdebug_hook ();                                           \
238     if ((list)->size == (list)->used)                           \
239       {                                                         \
240         (list)->size += (list)->inc;                            \
241         MTABLE_REALLOC ((list)->mem, (list)->size, (err));      \
242       }                                                         \
243     memmove ((list)->mem + 1, (list)->mem,                      \
244              sizeof *((list)->mem) * ((list)->used));           \
245     (list)->mem[0] = (elt);                                     \
246     (list)->used++;                                             \
247   } while (0)
248
249
250 #define MLIST_INSERT1(list, mem, idx, len, err)                         \
251   do {                                                                  \
252     while ((list)->used + (len) > (list)->size)                         \
253       {                                                                 \
254         (list)->size += (list)->inc;                                    \
255         MTABLE_REALLOC ((list)->mem, (list)->size, (err));              \
256       }                                                                 \
257     memmove ((list)->mem + ((idx) + (len)), (list)->mem + (idx),        \
258              (sizeof *((list)->mem)) * ((list)->used - (idx)));         \
259     (list)->used += (len);                                              \
260   } while (0)
261
262
263 #define MLIST_DELETE1(list, mem, idx, len)                              \
264   do {                                                                  \
265     memmove ((list)->mem + (idx), (list)->mem + (idx) + (len),          \
266              (sizeof *((list)->mem)) * ((list)->used - (idx) - (len))); \
267     (list)->used -= (len);                                              \
268   } while (0)
269
270
271 #define MLIST_COPY1(list0, list1, mem, err)                     \
272   do {                                                          \
273     (list0)->size = (list0)->used = (list1)->used;              \
274     (list0)->inc = 1;                                           \
275     MTABLE_MALLOC ((list0)->mem, (list0)->used, (err));         \
276     memcpy ((list0)->mem, (list1)->mem,                         \
277             (sizeof (list0)->mem) * (list0)->used);             \
278   } while (0)
279
280
281 #define MLIST_FREE1(list, mem)          \
282   if ((list)->size)                     \
283     {                                   \
284       free ((list)->mem);               \
285       (list)->mem = NULL;               \
286       (list)->size = (list)->used = 0;  \
287     }                                   \
288   else
289
290 \f
291
292 typedef struct
293 {
294   void (*freer) (void *);
295   int size, inc, used;
296   unsigned *counts;
297 } M17NObjectRecord;
298
299 typedef struct
300 {
301   /**en Reference count of the object.  */
302   /**ja ¥ª¥Ö¥¸¥§¥¯¥È¤Î»²¾È¿ô.  */
303   unsigned ref_count : 16;
304
305   unsigned ref_count_extended : 1;
306
307   /**en A flag bit used for various perpose.  */
308   /**ja ¤µ¤Þ¤¶¤Þ¤ÊÌÜŪ¤ËÍѤ¤¤é¤ì¤ë¥Õ¥é¥°¥Ó¥Ã¥È.  */
309   unsigned flag : 15;
310
311   union {
312     /**en If <ref_count_extended> is zero, a function to free the
313        object.  */
314     /**ja <ref_count_extended> ¤¬ 0 ¤Ê¤é¤Ð¥ª¥Ö¥¸¥§¥¯¥È¤ò²òÊü¤¹¤ë´Ø¿ô.  */
315     void (*freer) (void *);
316     /**en If <ref_count_extended> is nonzero, a pointer to the
317        struct M17NObjectRecord.  */
318     /**ja <ref_count_extended> ¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¹½Â¤ÂΠM17NObjectRecord ¤Ø¤Î¥Ý¥¤¥ó¥¿.  */
319     M17NObjectRecord *record;
320   } u;
321 } M17NObject;
322
323
324 /** Allocate a managed object OBJECT which has freer FREE_FUNC.  */
325
326 #define M17N_OBJECT(object, free_func, err)             \
327   do {                                                  \
328     MSTRUCT_CALLOC ((object), (err));                   \
329     ((M17NObject *) (object))->ref_count = 1;           \
330     ((M17NObject *) (object))->u.freer = free_func;     \
331   } while (0)
332
333
334 /**en Increment the reference count of OBJECT if the count is not
335    0.  */
336 /**ja OBJECT ¤Î»²¾È¿ô¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð 1 Áý¤ä¤¹.  */
337
338 #define M17N_OBJECT_REF(object)                         \
339   do {                                                  \
340     if (((M17NObject *) (object))->ref_count_extended)  \
341       m17n_object_ref (object);                         \
342     else if (((M17NObject *) (object))->ref_count > 0)  \
343       {                                                 \
344         ((M17NObject *) (object))->ref_count++;         \
345         if (! ((M17NObject *) (object))->ref_count)     \
346           {                                             \
347             ((M17NObject *) (object))->ref_count--;     \
348             m17n_object_ref (object);                   \
349           }                                             \
350       }                                                 \
351   } while (0)
352
353
354 #define M17N_OBJECT_REF_NTIMES(object, n)                               \
355   do {                                                                  \
356     int i;                                                              \
357                                                                         \
358     if (((M17NObject *) (object))->ref_count_extended)                  \
359       for (i = 0; i < n; i++)                                           \
360         m17n_object_ref (object);                                       \
361     else if (((M17NObject *) (object))->ref_count > 0)                  \
362       {                                                                 \
363         int orig_ref_count = ((M17NObject *) (object))->ref_count;      \
364                                                                         \
365         for (i = 0; i < n; i++)                                         \
366           if (! ++((M17NObject *) (object))->ref_count)                 \
367             {                                                           \
368               ((M17NObject *) (object))->ref_count = orig_ref_count;    \
369               for (i = 0; i < n; i++)                                   \
370                 m17n_object_ref (object);                               \
371             }                                                           \
372       }                                                                 \
373   } while (0)
374
375
376 /**en Decrement the reference count of OBJECT if the count is greater
377       than 0.  In that case, if the count becomes 0, free OBJECT.  */
378 /**ja OBJECT ¤Î»²¾È¿ô¤¬ 0 ¤è¤êÂ礭¤±¤ì¤Ð 1 ¸º¤é¤¹¡£¸º¤é¤·¤Æ 0 ¤Ë¤Ê¤ì¤Ð
379       OBJECT ¤ò²òÊü¤¹¤ë.  */
380
381 #define M17N_OBJECT_UNREF(object)                                       \
382   do {                                                                  \
383     if (object)                                                         \
384       {                                                                 \
385         if (((M17NObject *) (object))->ref_count_extended)              \
386           m17n_object_unref (object);                                   \
387         else if (((M17NObject *) (object))->ref_count == 0)             \
388           break;                                                        \
389         else                                                            \
390           {                                                             \
391             ((M17NObject *) (object))->ref_count--;                     \
392             if (((M17NObject *) (object))->ref_count == 0)              \
393               {                                                         \
394                 if (((M17NObject *) (object))->u.freer)                 \
395                   (((M17NObject *) (object))->u.freer) (object);        \
396                 else                                                    \
397                   free (object);                                        \
398                 (object) = NULL;                                        \
399               }                                                         \
400           }                                                             \
401       }                                                                 \
402   } while (0)
403
404 typedef struct _M17NObjectArray M17NObjectArray;
405
406 struct _M17NObjectArray
407 {
408   char *name;
409   int count;
410   int size, inc, used;
411   void **objects;
412   M17NObjectArray *next;
413 };
414
415 extern void mdebug__add_object_array (M17NObjectArray *array, char *name);
416
417 #define M17N_OBJECT_ADD_ARRAY(array, name)      \
418   if (mdebug__flags[MDEBUG_FINI])               \
419     mdebug__add_object_array (&array, name);    \
420   else
421
422 extern void mdebug__register_object (M17NObjectArray *array, void *object);
423
424 #define M17N_OBJECT_REGISTER(array, object)     \
425   if (mdebug__flags[MDEBUG_FINI])               \
426     mdebug__register_object (&array, object);   \
427   else
428
429 extern void mdebug__unregister_object (M17NObjectArray *array, void *object);
430
431 #define M17N_OBJECT_UNREGISTER(array, object)   \
432   if (mdebug__flags[MDEBUG_FINI])               \
433     mdebug__unregister_object (&array, object); \
434   else
435
436 \f
437
438 struct MTextPlist;
439
440 enum MTextCoverage
441   {
442     MTEXT_COVERAGE_ASCII,
443     MTEXT_COVERAGE_UNICODE,
444     MTEXT_COVERAGE_FULL
445   };
446
447 struct MText
448 {
449   M17NObject control;
450
451   unsigned format : 16;
452   unsigned coverage : 16;
453
454   /**en Number of characters in the M-text */
455   /**ja M-text Ãæ¤Îʸ»ú¿ô */
456   int nchars;
457
458   /**en Number of bytes used to represent the characters in the M-text. */
459   /**ja M-text Ãæ¤Îʸ»ú¤òɽ¤ï¤¹¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¥Ð¥¤¥È¿ô */
460   int nbytes;
461
462   /**en Character sequence of the M-text. */
463   /**ja M-text Ãæ¤Îʸ»úÎó */
464   unsigned char *data;
465
466   /**en Number of bytes allocated for the @c data member. */
467   /**ja ¥á¥ó¥Ð @c data ¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥Ð¥¤¥È¿ô */
468   int allocated;
469
470   /**en Pointer to the property list of the M-text. */
471   /**ja M-text ¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿ */
472   struct MTextPlist *plist;
473
474   /**en Caches of the character position and the corresponding byte position. */
475   /**ja Ê¸»ú°ÌÃÖ¤ª¤è¤ÓÂбþ¤¹¤ë¥Ð¥¤¥È°ÌÃ֤Υ­¥ã¥Ã¥·¥å */
476   int cache_char_pos, cache_byte_pos;
477 };
478
479 /** short description of M_CHECK_POS */
480 /** longer description of M_CHECK_POS */
481
482 #define M_CHECK_POS(mt, pos, ret)               \
483   do {                                          \
484     if ((pos) < 0 || (pos) >= (mt)->nchars)     \
485       MERROR (MERROR_RANGE, (ret));             \
486   } while (0)
487
488
489 /** short description of M_CHECK_POS_X */
490 /** longer description of M_CHECK_POS_X */
491
492 #define M_CHECK_POS_X(mt, pos, ret)             \
493   do {                                          \
494     if ((pos) < 0 || (pos) > (mt)->nchars)      \
495       MERROR (MERROR_RANGE, (ret));             \
496   } while (0)
497
498
499 /** short description of M_CHECK_RANGE */
500 /** longer description of M_CHECK_RANGE */
501
502 #define M_CHECK_RANGE(mt, from, to, ret, ret2)                  \
503   do {                                                          \
504     if ((from) < 0 || (to) < (from) || (to) > (mt)->nchars)     \
505       MERROR (MERROR_RANGE, (ret));                             \
506     if ((from) == (to))                                         \
507       return (ret2);                                            \
508   } while (0)
509
510 #define M_CHECK_RANGE_X(mt, from, to, ret)                      \
511   do {                                                          \
512     if ((from) < 0 || (to) < (from) || (to) > (mt)->nchars)     \
513       MERROR (MERROR_RANGE, (ret));                             \
514   } while (0)
515
516
517 #define M_CHECK_POS_NCHARS(mt, pos, nchars, ret, ret2)  \
518   do {                                                  \
519     int to = (pos) + (nchars);                  \
520                                                         \
521     M_CHECK_RANGE ((mt), (pos), (to), (ret), (ret2));   \
522   } while (0)
523
524
525 #define MTEXT_READ_ONLY_P(mt) ((mt)->allocated < 0)
526
527 #define M_CHECK_READONLY(mt, ret)       \
528   do {                                  \
529     if ((mt)->allocated < 0)            \
530       MERROR (MERROR_MTEXT, (ret));     \
531   } while (0)
532
533 #define mtext_nchars(mt) ((mt)->nchars)
534
535 #define mtext_nbytes(mt) ((mt)->nbytes)
536
537 #define mtext_allocated(mt) ((mt)->allocated)
538
539 #define mtext_reset(mt) (mtext_del ((mt), 0, (mt)->nchars))
540
541 \f
542
543 enum MDebugFlag
544   {
545     MDEBUG_INIT,
546     MDEBUG_FINI,
547     MDEBUG_CHARSET,
548     MDEBUG_CODING,
549     MDEBUG_DATABASE,
550     MDEBUG_FONT,
551     MDEBUG_FLT,
552     MDEBUG_FONTSET,
553     MDEBUG_INPUT,
554     MDEBUG_ALL,
555     MDEBUG_MAX = MDEBUG_ALL
556   };
557
558 extern int mdebug__flags[MDEBUG_MAX];
559 extern FILE *mdebug__output;
560 extern void mdebug__push_time ();
561 extern void mdebug__pop_time ();
562 extern void mdebug__print_time ();
563
564 #define MDEBUG_FLAG() mdebug__flags[mdebug_flag]
565
566 #define MDEBUG_PRINT0(FPRINTF)          \
567   do {                                  \
568     if (MDEBUG_FLAG ())                 \
569       {                                 \
570         FPRINTF;                        \
571         fflush (mdebug__output);        \
572       }                                 \
573   } while (0)
574
575 #define MDEBUG_PRINT(msg) \
576   MDEBUG_PRINT0 (fprintf (mdebug__output, "%s", (msg)))
577
578 #define MDEBUG_PRINT1(fmt, arg) \
579   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg)))
580
581 #define MDEBUG_PRINT2(fmt, arg1, arg2) \
582   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2)))
583
584 #define MDEBUG_PRINT3(fmt, arg1, arg2, arg3) \
585   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2), (arg3)))
586
587 #define MDEBUG_PRINT4(fmt, arg1, arg2, arg3, arg4)      \
588   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2), (arg3), (arg4)))
589
590 #define MDEBUG_PRINT5(fmt, arg1, arg2, arg3, arg4, arg5)        \
591   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2), (arg3), (arg4), (arg5)))
592
593 #define MDEBUG_DUMP(prefix, postfix, call)              \
594   do {                                                  \
595     if (MDEBUG_FLAG ())                                 \
596       {                                                 \
597         fprintf (mdebug__output, "%s", prefix);         \
598         call;                                           \
599         fprintf (mdebug__output, "%s", postfix);        \
600         fflush (mdebug__output);                        \
601       }                                                 \
602   } while (0)
603
604 #define MDEBUG_PUSH_TIME()      \
605   do {                          \
606     if (MDEBUG_FLAG ())         \
607       mdebug__push_time ();     \
608   } while (0)
609
610
611 #define MDEBUG_POP_TIME()       \
612   do {                          \
613     if (MDEBUG_FLAG ())         \
614       mdebug__pop_time ();      \
615   } while (0)
616
617
618 #define MDEBUG_PRINT_TIME(tag, ARG_LIST)                \
619   do {                                                  \
620     if (MDEBUG_FLAG ())                                 \
621       {                                                 \
622         fprintf (mdebug__output, " [%s] ", tag);        \
623         mdebug__print_time ();                          \
624         fprintf ARG_LIST;                               \
625         fprintf (mdebug__output, "\n");                 \
626       }                                                 \
627   } while (0)
628
629
630 #define SWAP_16(c) (((c) >> 8) | (((c) & 0xFF) << 8))
631
632 #define SWAP_32(c)                      \
633   (((c) >> 24) | (((c) >> 8) & 0xFF00)  \
634    | (((c) & 0xFF00) << 8) | (((c) & 0xFF) << 24))
635
636
637 /* Initialize/finalize function.  */
638
639 extern int msymbol__init ();
640 extern void msymbol__fini ();
641
642 extern int mplist__init ();
643 extern void mplist__fini ();
644
645 extern int mtext__init ();
646 extern void mtext__fini ();
647
648 extern int mtext__prop_init ();
649 extern void mtext__prop_fini ();
650
651 extern int mchartable__init ();
652 extern void mchartable__fini ();
653
654 extern int mcharset__init ();
655 extern void mcharset__fini ();
656
657 extern int mcoding__init ();
658 extern void mcoding__fini ();
659
660 extern int mdatabase__init (void);
661 extern void mdatabase__fini (void);
662
663 extern int mchar__init ();
664 extern void mchar__fini ();
665
666 extern int mlang__init ();
667 extern void mlang__fini ();
668
669 extern int mlocale__init ();
670 extern void mlocale__fini ();
671
672 extern int minput__init ();
673 extern void minput__fini ();
674
675 #endif /* _M17N_INTERNAL_H_ */
676
677 /*
678   Local Variables:
679   coding: euc-japan
680   End:
681 */