(struct MText): Types of members format and coverage
[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                             
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
121 /** The macro MTABLE_REALLOC () changes the size of memory block
122     pointed to by P to a size suitable for an array of SIZE objects.
123     The size of each object is determined by the type of P.  ERR must
124     be one of enum MErrorCode.  If the allocation fails, the macro
125     MEMORY_FULL () is called with argument ERR.  */
126
127 #define MTABLE_REALLOC(p, size, err)                                    \
128   do {                                                                  \
129     if (! ((p) = (void *) realloc ((p), sizeof (*(p)) * (size))))       \
130       MEMORY_FULL (err);                                                \
131   } while (0)
132
133
134 /** The macro MTABLE_ALLOCA () allocates memory (by alloca) for an
135     array of SIZE objects.  The size of each object is determined by
136     the type of P.  Then, it sets P to the allocated memory.  ERR must
137     be one of enum MErrorCode.  If the allocation fails, the macro
138     MEMORY_FULL () is called with argument ERR.  */
139
140 #define MTABLE_ALLOCA(p, size, err)             \
141   do {                                          \
142     int allocasize = sizeof (*(p)) * (size);    \
143     if (! ((p) = (void *) alloca (allocasize))) \
144       MEMORY_FULL (err);                        \
145     memset ((p), 0, allocasize);                \
146   } while (0)
147
148
149 /** short description of MSTRUCT_MALLOC */
150 /** The macro MSTRUCT_MALLOC () allocates memory (by malloc) for an
151     object whose size is determined by the type of P, and sets P to
152     the allocated memory.  ERR must be one of enum MErrorCode.  If
153     the allocation fails, the macro MEMORY_FULL () is called with
154     argument ERR.  */
155
156 #define MSTRUCT_MALLOC(p, err)                          \
157   do {                                                  \
158     if (! ((p) = (void *) malloc (sizeof (*(p)))))      \
159       MEMORY_FULL (err);                                \
160   } while (0)
161
162
163 #define MSTRUCT_CALLOC(p, err) MTABLE_CALLOC ((p), 1, (err))
164
165 #define USE_SAFE_ALLOCA \
166   int sa_must_free = 0, sa_size = 0
167
168 /* P must be the same in all calls to SAFE_ALLOCA and SAFE_FREE in a
169    function.  */
170
171 #define SAFE_ALLOCA(P, SIZE)            \
172   do {                                  \
173     if (sa_size < (SIZE))               \
174       {                                 \
175         if (sa_must_free)               \
176           (P) = realloc ((P), (SIZE));  \
177         else                            \
178           {                             \
179             (P) = alloca ((SIZE));      \
180             if (! (P))                  \
181               {                         \
182                 (P) = malloc (SIZE);    \
183                 sa_must_free = 1;       \
184               }                         \
185           }                             \
186         if (! (P))                      \
187           MEMORY_FULL (1);              \
188         sa_size = (SIZE);               \
189       }                                 \
190   } while (0)
191
192 #define SAFE_FREE(P)                    \
193   do {                                  \
194     if (sa_must_free && sa_size > 0)    \
195       {                                 \
196         free ((P));                     \
197         sa_must_free = sa_size = 0;     \
198       }                                 \
199   } while (0)
200
201 \f
202 /** Extendable array.  */
203
204 #define MLIST_RESET(list)       \
205   ((list)->used = 0)
206
207
208 #define MLIST_INIT1(list, mem, increment)       \
209   do {                                          \
210     (list)->size = (list)->used = 0;            \
211     (list)->inc = (increment);                  \
212     (list)->mem = NULL;                         \
213   } while (0)
214
215
216 #define MLIST_APPEND1(list, mem, elt, err)                      \
217   do {                                                          \
218     if ((list)->inc <= 0)                                       \
219       mdebug_hook ();                                           \
220     if ((list)->size == (list)->used)                           \
221       {                                                         \
222         (list)->size += (list)->inc;                            \
223         MTABLE_REALLOC ((list)->mem, (list)->size, (err));      \
224       }                                                         \
225     (list)->mem[(list)->used++] = (elt);                        \
226   } while (0)
227
228
229 #define MLIST_PREPEND1(list, mem, elt, err)                     \
230   do {                                                          \
231     if ((list)->inc <= 0)                                       \
232       mdebug_hook ();                                           \
233     if ((list)->size == (list)->used)                           \
234       {                                                         \
235         (list)->size += (list)->inc;                            \
236         MTABLE_REALLOC ((list)->mem, (list)->size, (err));      \
237       }                                                         \
238     memmove ((list)->mem + 1, (list)->mem,                      \
239              sizeof *((list)->mem) * ((list)->used));           \
240     (list)->mem[0] = (elt);                                     \
241     (list)->used++;                                             \
242   } while (0)
243
244
245 #define MLIST_INSERT1(list, mem, idx, len, err)                         \
246   do {                                                                  \
247     while ((list)->used + (len) > (list)->size)                         \
248       {                                                                 \
249         (list)->size += (list)->inc;                                    \
250         MTABLE_REALLOC ((list)->mem, (list)->size, (err));              \
251       }                                                                 \
252     memmove ((list)->mem + ((idx) + (len)), (list)->mem + (idx),        \
253              (sizeof *((list)->mem)) * ((list)->used - (idx)));         \
254     (list)->used += (len);                                              \
255   } while (0)
256
257
258 #define MLIST_DELETE1(list, mem, idx, len)                              \
259   do {                                                                  \
260     memmove ((list)->mem + (idx), (list)->mem + (idx) + (len),          \
261              (sizeof *((list)->mem)) * ((list)->used - (idx) - (len))); \
262     (list)->used -= (len);                                              \
263   } while (0)
264
265
266 #define MLIST_COPY1(list0, list1, mem, err)                     \
267   do {                                                          \
268     (list0)->size = (list0)->used = (list1)->used;              \
269     (list0)->inc = 1;                                           \
270     MTABLE_MALLOC ((list0)->mem, (list0)->used, (err));         \
271     memcpy ((list0)->mem, (list1)->mem,                         \
272             (sizeof (list0)->mem) * (list0)->used);             \
273   } while (0)
274
275
276 #define MLIST_FREE1(list, mem)          \
277   if ((list)->size)                     \
278     {                                   \
279       free ((list)->mem);               \
280       (list)->mem = NULL;               \
281       (list)->size = (list)->used = 0;  \
282     }                                   \
283   else
284
285 \f
286
287 typedef struct
288 {
289   void (*freer) (void *);
290   int size, inc, used;
291   unsigned *counts;
292 } M17NObjectRecord;
293
294 typedef struct
295 {
296   /**en Reference count of the object.  */
297   /**ja ¥ª¥Ö¥¸¥§¥¯¥È¤Î»²¾È¿ô.  */
298   unsigned ref_count : 16;
299
300   unsigned ref_count_extended : 1;
301
302   /**en A flag bit used for various perpose.  */
303   /**ja ¤µ¤Þ¤¶¤Þ¤ÊÌÜŪ¤ËÍѤ¤¤é¤ì¤ë¥Õ¥é¥°¥Ó¥Ã¥È.  */
304   unsigned flag : 15;
305
306   union {
307     /**en If <ref_count_extended> is zero, a function to free the
308        object.  */
309     /**ja <ref_count_extended> ¤¬ 0 ¤Ê¤é¤Ð¥ª¥Ö¥¸¥§¥¯¥È¤ò²òÊü¤¹¤ë´Ø¿ô.  */
310     void (*freer) (void *);
311     /**en If <ref_count_extended> is nonzero, a pointer to the
312        struct M17NObjectRecord.  */
313     /**ja <ref_count_extended> ¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¹½Â¤ÂΠM17NObjectRecord ¤Ø¤Î¥Ý¥¤¥ó¥¿.  */
314     M17NObjectRecord *record;
315   } u;
316 } M17NObject;
317
318
319 /** Allocate a managed object OBJECT which has freer FREE_FUNC.  */
320
321 #define M17N_OBJECT(object, free_func, err)             \
322   do {                                                  \
323     MSTRUCT_CALLOC ((object), (err));                   \
324     ((M17NObject *) (object))->ref_count = 1;           \
325     ((M17NObject *) (object))->u.freer = free_func;     \
326   } while (0)
327
328
329 /**en Increment the reference count of OBJECT if the count is not
330    0.  */
331 /**ja OBJECT ¤Î»²¾È¿ô¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð 1 Áý¤ä¤¹.  */
332
333 #define M17N_OBJECT_REF(object)                         \
334   do {                                                  \
335     if (((M17NObject *) (object))->ref_count_extended)  \
336       m17n_object_ref (object);                         \
337     else if (((M17NObject *) (object))->ref_count > 0)  \
338       {                                                 \
339         ((M17NObject *) (object))->ref_count++;         \
340         if (! ((M17NObject *) (object))->ref_count)     \
341           {                                             \
342             ((M17NObject *) (object))->ref_count--;     \
343             m17n_object_ref (object);                   \
344           }                                             \
345       }                                                 \
346   } while (0)
347
348
349 #define M17N_OBJECT_REF_NTIMES(object, n)                               \
350   do {                                                                  \
351     int i;                                                              \
352                                                                         \
353     if (((M17NObject *) (object))->ref_count_extended)                  \
354       for (i = 0; i < n; i++)                                           \
355         m17n_object_ref (object);                                       \
356     else if (((M17NObject *) (object))->ref_count > 0)                  \
357       {                                                                 \
358         int orig_ref_count = ((M17NObject *) (object))->ref_count;      \
359                                                                         \
360         for (i = 0; i < n; i++)                                         \
361           if (! ++((M17NObject *) (object))->ref_count)                 \
362             {                                                           \
363               ((M17NObject *) (object))->ref_count = orig_ref_count;    \
364               for (i = 0; i < n; i++)                                   \
365                 m17n_object_ref (object);                               \
366             }                                                           \
367       }                                                                 \
368   } while (0)
369
370
371 /**en Decrement the reference count of OBJECT if the count is greater
372       than 0.  In that case, if the count becomes 0, free OBJECT.  */
373 /**ja OBJECT ¤Î»²¾È¿ô¤¬ 0 ¤è¤êÂ礭¤±¤ì¤Ð 1 ¸º¤é¤¹¡£¸º¤é¤·¤Æ 0 ¤Ë¤Ê¤ì¤Ð
374       OBJECT ¤ò²òÊü¤¹¤ë.  */
375
376 #define M17N_OBJECT_UNREF(object)                                       \
377   do {                                                                  \
378     if (object)                                                         \
379       {                                                                 \
380         if (((M17NObject *) (object))->ref_count_extended)              \
381           m17n_object_unref (object);                                   \
382         else if (((M17NObject *) (object))->ref_count == 0)             \
383           break;                                                        \
384         else                                                            \
385           {                                                             \
386             ((M17NObject *) (object))->ref_count--;                     \
387             if (((M17NObject *) (object))->ref_count == 0)              \
388               {                                                         \
389                 if (((M17NObject *) (object))->u.freer)                 \
390                   (((M17NObject *) (object))->u.freer) (object);        \
391                 else                                                    \
392                   free (object);                                        \
393                 (object) = NULL;                                        \
394               }                                                         \
395           }                                                             \
396       }                                                                 \
397   } while (0)
398
399 typedef struct _M17NObjectArray M17NObjectArray;
400
401 struct _M17NObjectArray
402 {
403   char *name;
404   int count;
405   int size, inc, used;
406   void **objects;
407   M17NObjectArray *next;
408 };
409
410 extern void mdebug__add_object_array (M17NObjectArray *array, char *name);
411
412 #define M17N_OBJECT_ADD_ARRAY(array, name)      \
413   if (mdebug__flag & MDEBUG_FINI)               \
414     mdebug__add_object_array (&array, name);    \
415   else
416
417 extern void mdebug__register_object (M17NObjectArray *array, void *object);
418
419 #define M17N_OBJECT_REGISTER(array, object)     \
420   if (mdebug__flag & MDEBUG_FINI)               \
421     mdebug__register_object (&array, object);   \
422   else
423
424 extern void mdebug__unregister_object (M17NObjectArray *array, void *object);
425
426 #define M17N_OBJECT_UNREGISTER(array, object)   \
427   if (mdebug__flag & MDEBUG_FINI)               \
428     mdebug__unregister_object (&array, object); \
429   else
430
431 \f
432
433 struct MTextPlist;
434
435 enum MTextCoverage
436   {
437     MTEXT_COVERAGE_ASCII,
438     MTEXT_COVERAGE_UNICODE,
439     MTEXT_COVERAGE_FULL
440   };
441
442 struct MText
443 {
444   M17NObject control;
445
446   unsigned format : 16;
447   unsigned coverage : 16;
448
449   /**en Number of characters in the M-text */
450   /**ja M-text Ãæ¤Îʸ»ú¿ô */
451   int nchars;
452
453   /**en Number of bytes used to represent the characters in the M-text. */
454   /**ja M-text Ãæ¤Îʸ»ú¤òɽ¤ï¤¹¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¥Ð¥¤¥È¿ô */
455   int nbytes;
456
457   /**en Character sequence of the M-text. */
458   /**ja M-text Ãæ¤Îʸ»úÎó */
459   unsigned char *data;
460
461   /**en Number of bytes allocated for the @c data member. */
462   /**ja ¥á¥ó¥Ð @c data ¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥Ð¥¤¥È¿ô */
463   int allocated;
464
465   /**en Pointer to the property list of the M-text. */
466   /**ja M-text ¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ø¤Î¥Ý¥¤¥ó¥¿ */
467   struct MTextPlist *plist;
468
469   /**en Caches of the character position and the corresponding byte position. */
470   /**ja Ê¸»ú°ÌÃÖ¤ª¤è¤ÓÂбþ¤¹¤ë¥Ð¥¤¥È°ÌÃ֤Υ­¥ã¥Ã¥·¥å */
471   int cache_char_pos, cache_byte_pos;
472 };
473
474 /** short description of M_CHECK_POS */
475 /** longer description of M_CHECK_POS */
476
477 #define M_CHECK_POS(mt, pos, ret)               \
478   do {                                          \
479     if ((pos) < 0 || (pos) >= (mt)->nchars)     \
480       MERROR (MERROR_RANGE, (ret));             \
481   } while (0)
482
483
484 /** short description of M_CHECK_POS_X */
485 /** longer description of M_CHECK_POS_X */
486
487 #define M_CHECK_POS_X(mt, pos, ret)             \
488   do {                                          \
489     if ((pos) < 0 || (pos) > (mt)->nchars)      \
490       MERROR (MERROR_RANGE, (ret));             \
491   } while (0)
492
493
494 /** short description of M_CHECK_RANGE */
495 /** longer description of M_CHECK_RANGE */
496
497 #define M_CHECK_RANGE(mt, from, to, ret, ret2)                  \
498   do {                                                          \
499     if ((from) < 0 || (to) < (from) || (to) > (mt)->nchars)     \
500       MERROR (MERROR_RANGE, (ret));                             \
501     if ((from) == (to))                                         \
502       return (ret2);                                            \
503   } while (0)
504
505 #define M_CHECK_RANGE_X(mt, from, to, ret)                      \
506   do {                                                          \
507     if ((from) < 0 || (to) < (from) || (to) > (mt)->nchars)     \
508       MERROR (MERROR_RANGE, (ret));                             \
509   } while (0)
510
511
512 #define M_CHECK_POS_NCHARS(mt, pos, nchars, ret, ret2)  \
513   do {                                                  \
514     int to = (pos) + (nchars);                  \
515                                                         \
516     M_CHECK_RANGE ((mt), (pos), (to), (ret), (ret2));   \
517   } while (0)
518
519
520 #define MTEXT_READ_ONLY_P(mt) ((mt)->allocated < 0)
521
522 #define M_CHECK_READONLY(mt, ret)       \
523   do {                                  \
524     if ((mt)->allocated < 0)            \
525       MERROR (MERROR_MTEXT, (ret));     \
526   } while (0)
527
528 #define mtext_nchars(mt) ((mt)->nchars)
529
530 #define mtext_nbytes(mt) ((mt)->nbytes)
531
532 #define mtext_allocated(mt) ((mt)->allocated)
533
534 #define mtext_reset(mt) (mtext_del ((mt), 0, (mt)->nchars))
535
536 \f
537
538 enum MDebugMaskBit
539   {
540     MDEBUG_INIT =       0x01,
541     MDEBUG_FINI =       0x02,
542     MDEBUG_CHARSET =    0x04,
543     MDEBUG_CODING =     0x08,
544     MDEBUG_DATABASE =   0x10,
545     MDEBUG_FONT =       0x0100,
546     MDEBUG_FONT_FLT =   0x0200,
547     MDEBUG_FONT_OTF =   0x0400,
548     MDEBUG_INPUT =      0x0800,
549     MDEBUG_ALL =        0xFFFF,
550     MDEBUG_MAX
551   };
552
553 extern int mdebug__flag;
554 extern FILE *mdebug__output;
555 extern void mdebug__push_time ();
556 extern void mdebug__pop_time ();
557 extern void mdebug__print_time ();
558
559 #define MDEBUG_PRINT0(FPRINTF)          \
560   do {                                  \
561     if (mdebug__flag & mdebug_mask)     \
562       {                                 \
563         FPRINTF;                        \
564         fflush (mdebug__output);        \
565       }                                 \
566   } while (0)
567
568 #define MDEBUG_PRINT(msg) \
569   MDEBUG_PRINT0 (fprintf (mdebug__output, "%s", (msg)))
570
571 #define MDEBUG_PRINT1(fmt, arg) \
572   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg)))
573
574 #define MDEBUG_PRINT2(fmt, arg1, arg2) \
575   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2)))
576
577 #define MDEBUG_PRINT3(fmt, arg1, arg2, arg3) \
578   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2), (arg3)))
579
580 #define MDEBUG_PRINT4(fmt, arg1, arg2, arg3, arg4)      \
581   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2), (arg3), (arg4)))
582
583 #define MDEBUG_PRINT5(fmt, arg1, arg2, arg3, arg4, arg5)        \
584   MDEBUG_PRINT0 (fprintf (mdebug__output, (fmt), (arg1), (arg2), (arg3), (arg4), (arg5)))
585
586 #define MDEBUG_DUMP(prefix, postfix, call)              \
587   do {                                                  \
588     if (mdebug__flag & mdebug_mask)                     \
589       {                                                 \
590         fprintf (mdebug__output, "%s", prefix);         \
591         call;                                           \
592         fprintf (mdebug__output, "%s", postfix);        \
593         fflush (mdebug__output);                        \
594       }                                                 \
595   } while (0)
596
597 #define MDEBUG_PUSH_TIME()              \
598   do {                                  \
599     if (mdebug__flag & mdebug_mask)     \
600       mdebug__push_time ();             \
601   } while (0)
602
603
604 #define MDEBUG_POP_TIME()               \
605   do {                                  \
606     if (mdebug__flag & mdebug_mask)     \
607       mdebug__pop_time ();              \
608   } while (0)
609
610
611 #define MDEBUG_PRINT_TIME(tag, ARG_LIST)                \
612   do {                                                  \
613     if (mdebug__flag & mdebug_mask)                     \
614       {                                                 \
615         fprintf (mdebug__output, " [%s] ", tag);        \
616         mdebug__print_time ();                          \
617         fprintf ARG_LIST;                               \
618         fprintf (mdebug__output, "\n");                 \
619       }                                                 \
620   } while (0)
621
622
623 #define SWAP_16(c) (((c) >> 8) | (((c) & 0xFF) << 8))
624
625 #define SWAP_32(c)                      \
626   (((c) >> 24) | (((c) >> 8) & 0xFF00)  \
627    | (((c) & 0xFF00) << 8) | (((c) & 0xFF) << 24))
628
629
630 extern void *(*mdatabase__finder) (MSymbol tag1, MSymbol tag2,
631                                    MSymbol tag3, MSymbol tag4);
632 extern void *(*mdatabase__loader) (void *);
633
634 /* Initialize/finalize function.  */
635
636 extern int msymbol__init ();
637 extern void msymbol__fini ();
638
639 extern int mplist__init ();
640 extern void mplist__fini ();
641
642 extern int mtext__init ();
643 extern void mtext__fini ();
644
645 extern int mtext__prop_init ();
646 extern void mtext__prop_fini ();
647
648 extern int mchartable__init ();
649 extern void mchartable__fini ();
650
651 extern int mcharset__init ();
652 extern void mcharset__fini ();
653
654 extern int mcoding__init ();
655 extern void mcoding__fini ();
656
657 extern int mdatabase__init (void);
658 extern void mdatabase__fini (void);
659
660 extern int mchar__init ();
661 extern void mchar__fini ();
662
663 extern int mlang__init ();
664 extern void mlang__fini ();
665
666 extern int mlocale__init ();
667 extern void mlocale__fini ();
668
669 extern int minput__init ();
670 extern void minput__fini ();
671
672 #endif /* _M17N_INTERNAL_H_ */
673
674 /*
675   Local Variables:
676   coding: euc-japan
677   End:
678 */