8464c139264c814092318c6cc8c5020663349ca3
[m17n/m17n-lib.git] / src / ChangeLog
1 2005-09-01  Kenichi Handa  <handa@m17n.org>
2
3         * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
4
5         * m17n-core.h (mtext_insert, mtext_replace): Extern them.
6
7         * textprop.c (prepare_to_modify): New arg deleting.  Callers changed.
8         (mtext__adjust_plist_for_change): Argument changed.  Callers changed.
9
10         * internal.h (enum MTextCoverage): New enum.
11         (MText): New member coverage.
12
13         * mtext.c (FORMAT_COVERAGE): New macro.
14         (insert): Copy mt2->coverage.
15         (mtext__from_data): Initialize mt->coverage.
16         (mtext__adjust_format): Update mt->coverage.
17         (mtext): Initialize mt->coverage.
18         (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
19         Update mt->coverage if necessary.
20         (mtext_duplicate): Copy mt->coverage.
21         (mtext_insert, mtext_replace): New functions.
22
23 2005-08-25  Kenichi Handa  <handa@m17n.org>
24
25         * font.h (MFont): New member for_full_width.
26
27         * font.c (compare_font_score): Prefer a font of not
28         for_full_width.
29
30         * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
31         registry charset of a font is one of CJK charsets.
32
33         * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
34         supports some of CJK.
35
36 2005-08-24  Kenichi Handa  <handa@m17n.org>
37
38         * m17n-gui.h (Mascent, Mdescent): Don't extern them.
39
40         * m17n-gui.c (null_device_open): Check Mresolution param and set
41         frame->dpi.
42
43         * m17n-gd.c (device_open): Check Mresolution param and set
44         frame->dpi.
45
46         * m17n-X.c (MWDevice): New member resy.
47         (xfont_open): Set ascent, descent, and max_advance members of
48         rfont.
49         (xft_open): Likewise.
50         (device_open): Compare also screen_num to find a device.  Set
51         device->resy and frame->dpi.
52
53         * internal-gui.h (MFrame): New member dpi.
54
55         * font.h (MRealizedFont): New member max_advance.
56
57         * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
58         (mfont__init): Don't initialize Mascent, Mdescent.
59         (Mascent, Mdescent): Delete these variables.
60         (mfont_get_prop): Fix previous change.  Check Mfont_ascent and
61         Mfont_descent instead of Mascent and Mdescent.
62         (mfont_put_prop): Allow negative size.
63         (mfont_find): Handle the case of spec->size < 0.  Fix previous
64         change.
65         (mfont_list): Handle the case of spec->size < 0.
66         (mfont_check): Likewise.
67
68         * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
69         (fc_get_pattern): Handle the case of font->size < 0.
70         (ft_open): Set ascent, descent, and max_advance members of rfont.
71         (ft_find_metric): Improve rounding.
72         (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
73         FC_SIZE.
74
75         * face.c (mface__realize): Handle the case of font->size < 0.
76
77 2005-08-22  Kenichi Handa  <handa@m17n.org>
78
79         * coding.c (MConverterStatus): Change the member buf to union.
80         (mconv_buffer_converter): Add const to the arg buf.
81         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
82         (mconv_decode): Adjusted for the change of MConverterStatus.
83         (mconv_encode_range): Likewise.
84
85         * m17n.h (mconv_buffer_converter): Prototype adjusted.
86         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
87
88 2005-08-20  Kenichi Handa  <handa@m17n.org>
89
90         * m17n-gui.h (mfont_from_name): Prototype adjusted.
91         (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
92
93         * m17n-X.c (xfont_open): Set members ascent, descent, and
94         max_advance of rfont.
95         (xft_open): Likewise.
96
97         * font-ft.c (ft_open): Set members ascent, descent, and max_advance
98         of rfont.
99         (mfont__ft_parse_name): Add const to the arg name.
100
101         * font.c (xlfd_parse_name): Add const to the arg name.  Call
102         mfont__set_property instead of mfont_set_spec.  Set font->spacing.
103         (xlfd_unparse_name): Handle spacing.
104         (mfont__init): Initialize new variables.
105         (mfont__id): Handle spacing.
106         (mfont__merge): Likewise.
107         (mfont__set_spec): This function deleted.
108         (mfont__parse_name_into_font): Add const to the arg name.  Fix the
109         condition of calling mfont__ft_parse_name.
110         (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
111         (mfont_get_prop): Handle properties spacing, ascent, descent,
112         and max-advance.
113         (mfont_find): Return a realized font.
114         (mfont_from_name): Add const to the arg name.
115
116         * font.h (enum MFontProperty): New member MFONT_SPACING.
117         (enum MFontSpacing): New enum.
118         (MFont): New members spacing and max_advance.
119         (mfont__ft_parse_name): Prototype adjusted.
120         (mfont__set_spec): Extern deleted.
121         (mfont__parse_name_into_font): Prototype adjusted.
122
123 2005-08-19  Kenichi Handa  <handa@m17n.org>
124
125         * m17n-gui.h (mfont_parse_name): Prototype adjusted.
126
127         * font.c (mfont_list): If FONT is null, use a temporary font.
128         (mfont_parse_name): Add const to the arg name.
129
130 2005-08-18  Kenichi Handa  <handa@m17n.org>
131
132         * word-thai.c: Surround code by #ifdef and #endif to escape from
133         doxygen.
134
135         * font-ft.c: Mostly re-written.
136
137         * font-flt.c (FontLayoutCmdOTF): This type deleted.
138         (FontLayoutCmd): Type of the member otf changed..
139         (load_otf_command): Adjusted for the format change of otf command.
140         (load_command): Likewise.
141         (free_flt_command): Unref cmd->body.otf.
142         (run_otf): Ajusted for the type change of otf_cmd.
143         (run_command): Ajusted for the type change of otf_cmd.  On
144         debugging, print ctx->combining_code.
145         (mfont__flt_run): Initialize ctx's members code_offset,
146         combining_code, and left_padding to 0.
147
148         * face.h (struct MRealizedFace): New member font.
149         (mface__realize): Prototype adjusted.
150
151         * face.c (find_realized_face): New arg font.
152         (find_realized_face): Adjusted for the change of MFont.
153         (mface__init): Call M17N_OBJECT_ADD_ARRAY.
154         (mface__fini): Don't call mdebug__report_object.
155         (mface__realize): New arg font.
156         (mface__for_chars): Adjusted for the change of mfont__encode_char.
157         Optimize the latin case.
158         (mface__free_realized): Free rface->font.
159         (mface__update_frame_face): Adjusted for the change of mface__realize.
160         (mface_equal): New function.
161
162         * draw.c (Mcommon): New variable.
163         (visual_order): Args to mfont__encode_char changed.
164         (compose_glyph_string): Handle Mfont text property.
165         (layout_glyphs): Adjusted for the change of MFont.
166         (mdraw__init): Initialize Mcommon.
167         (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
168
169         * font.h (enum MFontType): Members completely changed.
170         (enum MFontProperty): Move MFONT_SIZE to the tail.
171         (enum MFontSource): New enum.
172         (struct MFont): New members type, source, sizes, file, capability,
173         and encoding.
174         (struct MRealizedFont): Type of member font changed. Members
175         score, status, and encoding deleted.
176         (MFontScore): New type.
177         (MFontList): Member changed.
178         (struct MFontDriver): New member has_char.  Types of members
179         changed.
180         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
181         (Mapple_roman): Extern them.
182         (OTF_Tag): Typedefed if not HAVE_OTF.
183         (enum MFontOpenTypeTable): New enum.
184         (MFontCapability): New type.
185         (mfont__ft_drive_otf): Prototype adjusted.
186         (mfont__score): Extern deleted.
187         (mfont__merge): Extern it.
188         (mfont__has_char): Extern it.
189         (mfont__encode_char): Prototype adjusted.
190         (mfont__open): Extern it.
191         (mfont__set_spec): Prototype adjusted.
192         (mfont__get_capability): Extern it.
193
194         * font.c: Include "fontset.h".
195         (M_font_capability, M_font_list, M_font_list_len): New variables.
196         (font_score_priority): Change order of initial elements.
197         (font_score_shift_bits): Fix array size.
198         (common_weight): Add "thin", "semibold", and "heavy".
199         (common_stretch): Add "ultracondensed", "extracondensed",
200         "extraexpanded", and "utltraexpand".
201         (font_weight_regular, font_weight_normal, font_weight_medium): New
202         variables.
203         (gen_font_name): This function deleted.
204         (find_encoding): Set font->encoding.
205         (OTF_tag): New function.
206         (otf_script_list): New variable.
207         (load_otf_script_list): New function.
208         (find_script_from_otf_tag): New function.
209         (xlfd_parse_name): Set font->type and font->source.
210         (mfont__free_realized): Free chains rfonts.
211         (font_score): Renamed from mfont__score.
212         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
213         (Mapple_roman): New variables.
214         (mfont__init): Initilize new variables.  Initalize
215         default_encoding.encoding_name and
216         default_encoding.encoding_charset to Municode_full and
217         mcharset__unicode.  Use SAFE* macros for allocating filepath
218         buffer.
219         (mfont__fini): Free otf_script_list.
220         (mfont__id): New function.
221         (mfont__match_p): Check also capability member of MFont.
222         (mfont__merge): New funciton.
223         (mfont__set_spec_from_face): Set type and source members.
224         (mfont__set_spec_from_plist): Set capability and type members.
225         (mfont__select): Argument changed.
226         (mfont__available): New function.
227         (compare_font_score): New function.
228         (mfont__list): New function.
229         (mfont__open): Return a realized font.
230         (mfont__resize): Adjusted for the change of MFont.
231         (mfont__has_char): New function.
232         (mfont__encode_char): Argument changed.
233         (mfont__set_spec): Argument changed.
234         (free_font_capability): New function.
235         (mfont__get_capability): New function.
236         (MFontfile): New variable.
237         (mfont_get_prop): Adjusted for the change of MFont.
238         (mfont_put_prop): Likewise.
239         (mfont_set_selection_priority): Fix the way of setting
240         font_score_priority[].
241         (mfont_find): Use mfont__list instead of mfont__select.
242         (mfont_resize_ratio): Adjusted for the change of MFont.
243         (mfont_list): Use mfont__list.
244         (mfont_check): New function.
245         (font_score): Make it static.
246
247         * fontset.h (mfont__realize_fontset): Prototype adjusted.
248         (mfont__lookup_fontset): Likewise.
249
250         * fontset.c (struct MFontset): Delete member font_spec_list.
251         (struct MRealizedFontset): Type of member spec changed.  New
252         member request.
253         (load_font_group): Arg spec_list deleted.
254         (load_fontset_contents): Adjusted for the change of fontset_def.
255         (free_fontset): Fix the way of freeing fontset elements.
256         (realize_fontset_elements): Argument changed.
257         (get_per_script): New function.
258         (free_realized_fontset_elements): Fix the way of feeing rfontset
259         elements.
260         (update_fontset_elements): Fix args to realize_fontset_elements.
261         (mfont__realize_fontset): New arg spec.
262         (try_font_list): New function.
263         (try_font_group): New arg request.  Use try_font_list.
264         (mfont__lookup_fontset): New arg ignore_fallback.  Fix arg to
265         try_font_group.
266         (mfontset): Adjusted for the change of MFontset.
267         (mfontset_copy): Likewise.  Don't share plists.
268         (mfontset_modify_entry): Adjusted for the change of MFontset.
269         (mfontset_lookup): Call get_per_script.
270         (mdebug_dump_fontset): Print also the address of fonts.
271
272         * input.c (shift_state): Don't reset ic_info->vars.
273         (take_action_list): Call MDEBUG_PRINT fore calling
274         take_action_list.
275
276         * internal-gui.h (MFontDriver): Don't typedef it here.
277
278         * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
279         (MXFont): This type deleted.
280         (MFontX): New type.
281         (struct _MFontX): New struct.
282         (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
283         (MDisplayInfo): Member base_font_list deleted.
284         (DEFAULT_FONT): Definition changed.
285         (FALLBACK_FONT): This maclr deleted.
286         (free_display_info): Adjusted for the change of MDisplayInfo.
287         (free_device): Argument to mfont__free_realized changed.
288         (xfont_driver): Adjusted for the change of MFontDriver.
289         (xfont_registry_list): Use MFontX instead of MXFont.
290         (MRealizedFontX): Renamed from MXFontInfo.
291         (xfont_select): Return the font found first.
292         (close_xfont): Change MXFontInfo to MRealizedFontX.
293         (xfont_open): Return the realized font.
294         (xfont_find_metric): Get xfont from rfont->fontp.
295         (xfont_has_char): New function.
296         (xfont_encode_char): Adjusted for the argument change.
297         (xfont_render): Get xfont from rfont->fontp.
298         (xfont_list): Adjusted for the argument change.
299         (MRealizedFontXft): Renamed from MXftFontInfo.
300         (xft_driver): Ajusted for the change of MFontDriver.
301         (close_xft): Change MXtfFontInfo to MRealizedFontXft
302         (xft_open_font): Argument changed.
303         (xft_open): Argument changed.  Return the realized font.
304         (xft_find_metric): Get xft_font from rfont->fontp.
305         (xft_has_char, xft_encode_char): New functions.
306         (xft_render): Change MXftFontInfo to MRealizedFontXft.  Open a
307         font if not yet opened.
308         (device_open): Don't set frame->font.
309
310         * m17n-gd.c (gd_font_driver): Adjusted for the change of
311         MFontDriver.
312         (gd_font_open): New function.
313         (gd_render): Don't use the local variable ft_info.
314         (device_init): Adjusted for the change of gd_font_driver.
315
316         * textprop.c (mtext__prop_init): Initialize text_property_table.
317         Call M17N_OBJECT_ADD_ARRAY.
318         (mtext__prop_fini): Don't call mdebug__report_object.
319
320         * plist.c (mplist__init): Initialize plist_table.
321         (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
322         (mplist__fini): Don't call mdebug__report_object.
323
324         * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
325         (mtext__fini): Don't call mdebug__report_object.
326         (MTEXT_FORMAT_UTF_16): Correct type.
327         (mtext_data): New function.
328         (mtext_text): Fix calculation of limit and args to
329         find_char_backward.
330
331         * language.c: Include "plist.h".
332         (M_script_lang_list): New variable.
333         (mlang__init): Read languages and their information from m17n
334         database.
335         (mlanguage__list): New function.
336         (Miso639_1, Miso639_2): New variables.
337
338         * language.h (mlanguage__list): Extern it.
339
340         * database.c (get_database_stream): Use SAFE_* macros for
341         allocating and freeing path.
342         (mdatabase__init): Likewise.
343
344         * symbol.c (msymbol__fini): Don't free symbols here.
345         (msymbol__free_table): New function.
346         (msymbol_is_managing_key): New function.
347
348         * symbol.h (msymbol__free_table): Extern it.
349         (msymbol__list): Extern it.
350
351         * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
352         New macros.
353         (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
354         (struct _M17NObjectArray): New member name and next.
355         (mdebug__add_object_array): Extern it.
356         (M17N_OBJECT_ADD_ARRAY): New macro.
357         (mdebug__report_object): Don't extern it.
358
359         * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
360
361         * m17n-gui.c (free_frame): Don't free frame->font.
362         (null_device_fini): Fix code for freeing
363         null_device.realized_font_list.
364         (m17n_fini_win): Free interface.
365         (mframe): Cast the return value of dlsym.  Set frame->font here.
366         (mframe_get_prop): Check frame->rface->rfont before accessing the
367         member font.
368
369         * m17n-gui.h (Mfontfile): Extern it.
370         (mfont_check): Extern it.
371         (mface_equal): Extern it.
372
373         * m17n-core.c: Include "symbol.h".
374         (report_header_printed): This variable deleted.
375         (object_array_root): New variable.
376         (report_object_array): New function.
377         (mdebug__report_object): This function deleted.
378         (mdebug__add_object_array): New function.
379         (m17n_init_core): Call mchartable_init () before mtext_init ().
380         (m17n_fini_core): Call report_object_array (if necessary) and
381         msymbol__free_atable at the end.
382
383         * m17n-core.h (msymbol_is_managing_key): Extern it.
384         (mtext_data): Extern it.
385         (MTEXT_FORMAT_UTF_16): Correct type.
386         (M17NLIB_MINOR_VERSION): Changed to 3.
387         (M17NLIB_VERSION_NAME): Changed to "1.3.0".
388         
389         * chartab.c (mchartable__init): Initalize chartable_table.count.
390         (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
391         mdebug__report_object.
392
393 2005-05-26  Kenichi Handa  <handa@m17n.org>
394
395         * m17n.h (Miso639_1, Miso639_2): Extern them.
396
397         * symbol.h (msymbol__list): Extern it.
398
399         * symbol.c (msymbol__list): New function.
400
401 2005-05-19  Kenichi Handa  <handa@m17n.org>
402
403         * input-gui.c (minput__win_init): Don't change the value of
404         minput_driver.
405
406 2005-05-16  Kenichi Handa  <handa@m17n.org>
407
408         * m17n-core.c (m17n_object): Be sure to initialize all members.
409
410         * font-ft.c (fc_decode_prop): Fix args to msymbol.
411
412 2005-05-09  Kenichi Handa  <handa@m17n.org>
413
414         * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
415
416 2005-04-27  Kenichi Handa  <handa@m17n.org>
417
418         * language.c (mlang__init): Add "an" (Aragonese).
419
420         * word-thai.c: Add support for libthai.
421         (mtext__word_thai_init): Initialize wordseg library conditionaly.
422         (mtext__word_thai_fini): Finalize wordseg library conditionaly.
423
424         * mtext.c: Include "word-thai.h" conditionaly.
425         (mtext__init): Call mtext__word_thai_init conditionaly.
426         (mtext__fini): Call mtext__word_thai_fini conditionaly.
427
428         * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
429         not WORDCUT_LD_FLAGS.
430
431 2005-04-19  Kenichi Handa  <handa@m17n.org>
432
433         * word-thai.c (wordseg_propertize): Always unref the attached
434         property.
435         (thai_wordseg): Don't unref the property.
436
437 2005-04-18  Kenichi Handa  <handa@m17n.org>
438
439         * word-thai.c: Include stdlib.h.
440         (wordseg_propertize): Add dummy function for the case that wordcut
441         library doesn't exist.
442         (wordseg_propertize): Fix for old wordcut library.
443
444 2005-04-16  Kenichi Handa  <handa@m17n.org>
445
446         * word-thai.c: Include <stdio.h>.
447
448 2005-04-15  Kenichi Handa  <handa@m17n.org>
449
450         * draw.c: Include mtext.h.
451         (linebreak_table, M_break_at_space, M_break_at_word)
452         (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
453         (compose_glyph_string): Check POS before getting Mface text
454         property.
455         (truncate_gstring): Give correct TO arg to line_break function.
456         (GET_LB_TYPE): New macro.
457         (find_break_backward, find_break_forward): New functions.
458         (mdraw__init): Initialize the above new variables.
459         (mdraw__fini): Free linebreak_table.
460         (mdraw_default_line_break): Use find_break_backward and
461         find_break_forward.
462
463         * word-thai.c: New file.
464
465         * word-thai.h: New file.
466
467         * mtext.c: Include word-thai.h.
468         (wordseg_func_table): New variable.
469         (mtext__init): Initialize wordseg_func_table and call
470         mtext__word_thai_init.
471         (mtext__fini): Call mtext__word_thai_fini, free
472         wordseg_func_table.
473         (MTextWordsegFunc): New type.
474         (mtext__word_segment): New function.
475
476         * mtext.h (wordseg_func_table): Extern it.
477         (mtext__word_segment): Extern it.
478
479         * m17n.c (m17n_init): Fix typo (== -> =).
480
481         * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
482         (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
483
484         * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
485         (MTEXTPROP_VAL): New macros.
486
487         * input.c (DLOPEN_SHLIB_EXT): Don't define it.
488
489 2005-04-07  Kenichi Handa  <handa@m17n.org>
490
491         * database.c (load_chartable): Fix pursing of symbol name.
492
493 2005-03-24  Kenichi Handa  <handa@m17n.org>
494
495         * m17n.c (m17n_init): Fix typo (== -> =).
496
497 2005-03-11  Kenichi Handa  <handa@m17n.org>
498
499         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
500
501         * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
502
503         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
504         first.
505
506 2005-03-09  handa  <handa@m17n.org>
507
508         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
509         calling m17n_init ().
510
511         * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
512         calling m17n_init_core ().
513
514 2005-02-28  Kenichi Handa  <handa@m17n.org>
515
516         * font-flt.c (mfont__flt_run): Add resulting code sequence in
517         debug info.
518
519 2005-02-17  Kenichi Handa  <handa@m17n.org>
520
521         * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
522         (M_description, M_command, M_variable): New variables.
523         (load_im_info_keys): New variables.
524         (load_im_info, check_command_keyseq, get_description_advance)
525         (parse_command_list, get_command_list, parse_variable_list)
526         (get_variable_list, input_method_hook): New functions.
527         (command_list, variable_list): New variables.
528         (minput__init): Put input_method_hook to Minput_method.
529         Initialize M_description, M_command, M_variable, Mdetail_text,
530         load_im_info_keys, command_list, variable_list.
531         (minput__fini): Unref command_list, variable_list, load_im_info_keys.
532         (Mdetail_text): New variable.
533         (minput_get_description, minput_get_commands)
534         (minput_assign_command_keys, minput_get_variables)
535         (minput_set_variable): New functions.
536
537         * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
538         (minput_assign_command_keys, minput_get_variables)
539         (minput_set_variable): Extern them.
540
541         * plist.c (UNGETC): Just decrement st->p.
542         (read_mtext_element): New arg skip.
543         (read_integer_element): Likewise.
544         (read_symbol_element): Likewise.
545         (read_element): New arg KEYS.
546         (mplist__from_plist): Don't increment ref-count of NULL object.
547         (mplist__from_file): New arg KEYS.
548         (mplist_put): Don't increment ref-count of NULL object.
549         (mplist_add): Likewise.
550         (mplist_push): Likewise.
551         (mplist_set): Likewise.  Call M17N_OBJECT_UNREF unconditionally.
552
553         * plist.h (mplist__from_file): Prototype adjusted.
554
555         * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
556         (get_database_stream): New function.
557         (load_database): Use get_database_stream.
558         (M_database_hook): New variable
559         (mdatabase__init): Initialize M_database_hook.
560         (mdatabase__load_for_keys): New function.
561         (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
562         function.
563         (mdatabase_define): Free mdb->extra_info if necessary.
564
565         * database.h (mdatabase__dir_list, M_database_hook)
566         (mdatabase__load_for_keys): Extern them.
567         (MDatabaseHookFunc): New type.
568
569         * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
570
571 2004-12-27  Kenichi Handa  <handa@m17n.org>
572
573         * Version 1.2.0 released.
574
575 2004-12-27  Kenichi Handa  <handa@m17n.org>
576
577         * input.c (minput_filter): Don't reset ic->xxx_changed.
578
579         * mtext.c (mtext_from_data): Fix documentation.
580
581 2004-12-25  Kenichi Handa  <handa@m17n.org>
582
583         * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
584         (M17NLIB_VERSION_NAME): Update to "1.2.".
585
586 2004-12-24  Kenichi Handa  <handa@m17n.org>
587
588         * input.c (reset_ic): Set key_unhandled to 0.
589
590 2004-12-21  Kenichi Handa  <handa@m17n.org>
591
592         * m17n-gui.h (mfont_from_spec): Delete extern.
593
594         * input-gui.c (win_callback): Handle Minput_reset.
595         (minput__win_init): Register reset_ic as a callback for
596         Minput_reset.
597
598         * input.c (reset_ic): New arg IGNORE which is ignored.  Caller
599         changed.  At first, shift to the initial state.
600         (minput__init): Initialize Minput_reset.  Register reset_ic as a
601         callback for Minput_reset.
602         (Minput_reset): New variable.
603         (minput_filter): Always set ic->xxx_changed to 0.
604         (minput_reset_ic): New function.
605         (integer_value): Fix typo ('>' -> '<') and calculation of length
606         of preedit text.
607
608         * m17n-core.c (merror_code): Change type to `int'.
609
610         * m17n-misc.h (merror_code): Adjust type.
611
612         * m17n.h (Minput_reset, minput_reset_ic): Extern them.
613
614         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
615         (mtext_change_prop): Delete extern.
616
617         * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
618         to `int'.  Move the documents to m17n-core.h.
619
620 2004-12-13  Kenichi Handa  <handa@m17n.org>
621
622         * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
623         (MTextProperty): Document it.
624
625 2004-12-09  Kenichi Handa  <handa@m17n.org>
626
627         * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
628
629 2004-12-03  Kenichi Handa  <handa@m17n.org>
630
631         * internal.h (m17n__core_initialized, m17n__shell_initialized,
632         m17n__gui_initialized): New externs.
633
634         * m17n-core.h (enum M17NStatus): New enum.
635         (m17n_status): Extern it.
636
637         * m17n-core.c (core_initialized): Delete this variable.
638         (m17n__core_initialized, m17n__shell_initialized,
639         m17n__gui_initialized): New variables.
640         (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
641         instead of core_initialized.
642         (m17n_status): New function.
643
644         * m17n.c (shell_initialized): Delete this variable.
645         (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
646         shell_initialized.
647
648         * m17n-gui.h (m17n_init_win): Adjust the prototype.
649
650         * m17n-gui.c (win_initialized): Delete this variable.
651         (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
652         instead of gui_initialized.
653
654 2004-11-19  Kenichi Handa  <handa@m17n.org>
655
656         * input.c (reset_ic): Check if ic_info->state is NULL.
657         (filter): If ic_info->state is NULL, return 0.
658         (load_input_method): Don't unref `maps' it it's not created.
659
660 2004-11-15  Kenichi Handa  <handa@m17n.org>
661
662         * input.c (find_candidates_group): If INDEX is -1, find the last
663         candidate group.
664         (take_action_list): If the previous of the first candidate is
665         requested, select the last candidate.
666
667 2004-11-08  Kenichi Handa  <handa@m17n.org>
668
669         * m17n-X.c (device_open): Try at most 32 fonts to find a
670         non-autoscaled font.
671
672         * font.c (xlfd_parse_name): Fix previous change.
673
674 2004-11-05  Kenichi Handa  <handa@m17n.org>
675
676         * font.c: (commont_style): Include dummy elements "slanted" and
677         "rslanted" to prefer "o" to "r" if "i" is requested.
678
679         * font-ft.c (ft_to_prop): Fix "oblique" entry.
680
681 2004-10-29  Kenichi Handa  <handa@m17n.org>
682
683         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
684
685         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
686         New members smallest and larger.
687         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
688         (xfont_registry_list): Likewise.
689         (xfont_select): Likewise.
690         
691
692 2004-10-28  Kenichi Handa  <handa@m17n.org>
693
694         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
695         font name comparison.
696         (xfont_select): Fix logic for selecting a larger size font.
697
698 2004-10-25  Kenichi Handa  <handa@m17n.org>
699
700         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
701         ">" actions.
702
703 2004-10-22  Kenichi Handa  <handa@m17n.org>
704
705         * input.c (update_candidate): Renamed from udpate_candidate.
706         (take_action_list): Show more debugging info on arithmetic commands.
707
708         * m17n-X.c (device_open): Fix previous change.
709
710         * draw.c (compose_glyph_string): Don't get face property at the
711         end of M-text.
712
713 2004-10-21  Kenichi Handa  <handa@m17n.org>
714
715         * draw.c (compose_glyph_string): Fix for the case of category
716         being Mnil.
717
718 2004-10-19  Kenichi Handa  <handa@m17n.org>
719
720         * input.c (mdebug_mask): New variable.
721         (shift_state): Print debug information.
722         (take_action_list): Likewise.
723         (handle_key): Likewise.
724
725 2004-10-14  Kenichi Handa  <handa@m17n.org>
726
727         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
728
729 2004-10-13  Kenichi Handa  <handa@m17n.org>
730
731         * m17n-X.c (device_open): Be sure to register at least one font
732         driver.
733
734         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
735         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
736
737 2004-10-12  Kenichi Handa  <handa@m17n.org>
738
739         * draw.c (alloc_gstring): Fix previous change.
740
741         * font-ft.c (ft_list_generic): Fix for the case of not
742         HAVE_FONTCONFIG.
743
744         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
745
746         * font.c (mfont_list): If no font is found, return NULL.
747         (load_font_encoding_table): Put entries of nil registry first.
748         (find_encoding): Adjust for the above change.
749
750 2004-10-11  Kenichi Handa  <handa@m17n.org>
751
752         * m17n-gui.h (mfont_list): Adjust prototype.
753
754         * m17n-X.c (xfont_list): New arg maxnum.
755
756         * font.h (struct MFontDriver): Change prototype of <list>.
757
758         * font-ft.c (fc_generic_family_list): Delete it.
759         (Mserif, Msans_serif, Mmonospace): Delete them.
760         (M_generic_family_info): New variable.
761         (enum GenericFamilyType): New enum.
762         (struct GenericFamilyInfo): New struct.
763         (generic_family_table): New variable.
764         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
765         iso8859-1.
766         (add_font_info): Get style here.
767         (ft_list_family): Don't initialize fc_config here.  Don't list
768         generic families.
769         (ft_list_generic): New function.
770         (ft_select): Pay attention to generic familes here.
771         (ft_open): Fix calculation of ascent and descent.
772         (ft_list): Pay attention to generic families.
773         (mfont__ft_init): Initialize M_generic_family_info,
774         generic_family_table, and fc_config..
775         (mfont__ft_fini): Finalize generic_family_table.
776
777         * draw.c (compose_glyph_string): Use more constant font for
778         glyphs.  Adjust for the member change in MGlyph.
779         (layout_glyph_string): Adjust for the member change in MGlyph.
780         (alloc_gstring): Intilize scracth_glyph to avoid
781         compose_glyph_string on it.
782         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
783         (mdraw_coordinates_position): Fix previous change.
784
785         * internal-gui.h (glyph_category): New enum.
786         (MGlyph): Change type of <category> to enum glyph_category.
787
788         * face.c (mface__realize): Delete args langauge and charset.
789         (mface__for_chars): Fix for the case that glyphs have different
790         rfaces.
791         (mface__update_frame_face): Adjust for mface__realize change.
792
793         * face.h (mface__realize): Adjust prototype.
794
795 2004-10-05  Kenichi Handa  <handa@m17n.org>
796
797         * language.c (mlang__init): Add Akan.
798
799 2004-10-04  Kenichi Handa  <handa@m17n.org>
800
801         * font-ft.c (add_font_info): Add instead of push the element.
802         (ft_list_family): For generic fonts, try all
803         substituted. families.
804
805         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
806         (run_rule): Don't update cluster range here.
807         (run_command): Update cluster range on appending a glyph.
808         (run_otf): Update cluster range for glyphs generated by OTF.
809
810 2004-10-02  Kenichi Handa  <handa@m17n.org>
811
812         * m17n-X.c (device_open): Handle Mfont key in PLIST.
813
814 2004-09-30  Kenichi Handa  <handa@m17n.org>
815
816         * font-ft.c (ft_select): Ignore family on calling mfont__score.
817
818 2004-09-30  Kenichi Handa  <handa@m17n.org>
819
820         * font.h: Include <fontconfig/fontconfig.h>.
821         (MFTInfo): New member langset.
822         (mfont__encoding_list): Extern it.
823
824         * font.c (mfont__encoding_list): New function.
825         (mdebug_dump_font_list): New function.
826
827         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
828         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
829         variables.
830         (ft_family_list): New variable.
831         (set_font_info): New arg basep.  Callers changed.
832         (fc_list): Check the return value of FcPatternGetString.
833         (add_font_info): New arg plist.  Callers changed. Update
834         ft_family_list.
835         (ft_list_family): New function (merged fc_list and ft_list_all).
836         (ft_select): Use ft_list_family.
837         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
838         typo (== -> !=).
839         (mfont__ft_init): Initialize above new variables.
840         (mfont__ft_fini): Free ft_family_list.
841         (STRDUP_LOWER): New macro.
842         (set_font_info): Use STRDUP_LOWER.
843         (ft_list_family): Avoid duplicate addition of font path.  Use
844         STRDUP_LOWER.
845         (fc_decode_prop): Fix typo.
846
847         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
848         (xfont_registry_list): Change argument disp_info to frame.
849         Callers changed.
850         (xfont_list_all): New function.
851         (xfont_list): If FONT is not NULL, check all fonts.
852
853 2004-09-28  Kenichi Handa  <handa@m17n.org>
854
855         * m17n-X.c (MXFont, MXFontList): New types.
856         (MDisplayInfo): Delete members font_registry_list,
857         iso8859_1_family_list, iso10646_1_family_list, new members
858         font_list, base_font_list.
859         (free_display_info): Adusted for the change of MDisplayInfo.
860         (xfont_driver): Initialize with xfont_list.
861         (font_compare): New function.
862         (build_font_list): Deleted.
863         (xfont_registry_list): New function.
864         (xfont_select): Use xfont_registry_list.
865         (xfont_list): New function.
866         (device_open): Adusted for the change of MDisplayInfo.
867
868         * font-ft.c (add_font_info): New arg languages.  Callers changed.
869         (fc_list): Get languages from fonts..
870         (ft_list_all): Renamed from ft_list.  Callers changed.
871         (ft_list): New function.
872         (mfont__ft_driver): Initalize with ft_list.
873
874         * font.c (mfont_list): New function.
875
876         * font.h (struct MFontDriver): New member `list'.
877         (MFTInfo): New member languages.
878
879         * m17n-gui.h (mfont_list): Extern it.
880
881 2004-09-27  Kenichi Handa  <handa@m17n.org>
882
883         * internal-gui.h (struct MGlyphString): Delete members mt,
884         sub_width, sub_lbrearing, sub_rbearing, and region.
885
886         * draw.c (MSubTextExtents): New type.
887         (layout_glyphs): New arg extents.  Set its members.
888         (layout_glyph_string): Adjusted for the above change.
889         (alloc_gstring): Don't set gstring->mt.
890         (truncate_gstring): Call line_break function with mt instead of
891         gstring->mt.
892
893 2004-09-22  Kenichi Handa  <handa@m17n.org>
894
895         * mtext.c (count_utf_16_chars): Count each code of invalid
896         surrogates as one.
897
898 2004-09-19  Kenichi Handa  <handa@m17n.org>
899
900         * mtext.c (default_utf_16, default_utf_32): Rename them to
901         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
902         changed.
903
904         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
905         them.
906
907 2004-09-13  Kenichi Handa  <handa@m17n.org>
908
909         * draw.c (Mlatin): Don't declare it here.
910         (visual_order): Fix reordering of combining characters.
911         (compose_glyph_string): Fix detection of script.
912         (layout_glyphs): Don't fix reordering of combining characters
913         here.
914         (layout_glyph_string): Pay attention to
915         control->disable_overlapping_adjustment.
916         (truncate_gstring): Include at least on character in a line.
917         (get_gstring): Always scan one full line.
918         (mdraw__init): Don't initialize Mlatin here.
919         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
920         have a font, use ascent/descent of an ASCII font.  Allow
921         ink_array_return and logical_array_return to be NULL.
922         (mdraw_coordinates_position): Fix iteration.
923
924         * font-ft.c (MFTtoProp): Member completely changed.
925         (ft_to_prop): Adjusted for the above change.
926         (ft_to_prop_size): Likewise.
927         (set_font_info): Adjusted for the change of MFTtoProp.
928         (fc_generic_family_list): New variable.
929         (fc_list): Add special handling of generic font names.
930         (mfont__ft_init): Adjusted for the change of MFTtoProp.
931         Initialize fc_generic_family_list.
932         (mfont__ft_fini): Don't free ft_to_prop.  Free
933         fc_generic_family_list.
934         (FC_vs_M17N_font_prop): New type.
935         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
936         (fc_decode_prop, fc_encode_prop): New functions.
937         (mfont__ft_parse_name): Use fc_decode_prop.
938         (mfont__ft_unparse_name): Use fc_encode_prop.
939
940         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
941         (MWDevice): Add member realized_font_list.
942         (free_display_info): Don't free disp_info->realized_font_list.
943         (free_device): Free device->realized_fontset_list.
944         (xft_find_metric): Use gstring->frame instead of rfont->frame.
945         (device_open): Don't initialize disp_info->realized_font_list.
946         (device_open): Initialize device->realized_font_list and set it to
947         frame->realized_font_list.
948
949         * fontset.c (try_font_group): New function.
950         (mfont__lookup_fontset): Use try_font_group.
951
952         * font.c (common_weight): Change the order of "regular".
953
954         * face.c (Mlatin): Don't make it static.
955         (mface__realize): Be sure to set work_gstring.frame.
956         (mface__for_chars): Likewise.
957
958         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
959         MTEXT_FORMAT_UTF_8.
960
961         * internal-gui.h (Mlatin): Extern it.
962
963         * m17n-gui.h (MDrawControl): New member
964         disable_overlapping_adjustment.
965
966 2004-09-06  Kenichi Handa  <handa@m17n.org>
967
968         * font-flt.c (run_otf): Fix typo ('}'->']').
969
970         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
971         (COMBINING_PRECOMPUTED_P): New macros.
972
973         * draw.c (layout_glyphs): Handle precomputed combining code.
974
975         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
976         precomupted combining code.
977
978 2004-09-03  Kenichi Handa  <handa@m17n.org>
979
980         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
981         otf_gstring.glyphs.
982
983 2004-08-27  Kenichi Handa  <handa@m17n.org>
984
985         * face.c (mface_put_prop): If the new value is the same as the
986         current one, don't increment frame->tick.
987
988 2004-08-25  Kenichi Handa  <handa@m17n.org>
989
990         * fontset.c (mfontset): Initialize font_spec_list member.
991         (mfontset_copy): Load fontset if necessary.
992
993         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
994         'metrics' to for C++.
995
996         * draw.c (mdraw_glyph_info): Adjusted for the member name change
997         (this -> metics).
998
999 2004-08-16  Kenichi Handa  <handa@m17n.org>
1000
1001         * Version 1.1.0 released.
1002
1003 2004-08-13  Kenichi Handa  <handa@m17n.org>
1004
1005         * language.c (mlang__init): Add Dhivehi.
1006
1007         * m17n-gui.c (Mx, Mfreetype): Delete it.
1008         (m17n_init_win): Don't initialize Mx and Mfreetype here.
1009
1010         * m17n-gui.h (Mfreetype, Mxft): Extern them.
1011         (mfont_resize_ratio): Extern it.
1012         (MDrawGlyphInfo): New member logical_width;
1013         (MDrawGlyph): New type.
1014         (mdraw_glyph_list): Prototype adjusted.
1015
1016         * m17n-X.c (xfont_open): Set type and fontp members.
1017         (xft_open): Likewise.
1018
1019         * internal-gui.h (Mx, Mfreetype): Delete extern.
1020
1021         * font.h (struct MRealizedFont): New member type and fontp.
1022
1023         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1024         (Mx, Mfreetype): Declare here.
1025         (Mxft): New variable.
1026         (mfont_resize_ratio): New function.
1027
1028         * font-ft.c (ft_open): Set type and fontp members.
1029
1030         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
1031         glyph_code member.
1032
1033 2004-08-11  Kenichi Handa  <handa@m17n.org>
1034
1035         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1036         FT_LOAD_DEFAULT.
1037
1038 2004-08-06  Kenichi Handa  <handa@m17n.org>
1039
1040         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1041         feature to apply.
1042
1043         * font-flt.c (run_otf): Print debugging information if necessary.
1044
1045 2004-08-05  Kenichi Handa  <handa@m17n.org>
1046
1047         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
1048         positioning_type 5 and 6.  Switch simplified.
1049
1050 2004-08-04  Kenichi Handa  <handa@m17n.org>
1051
1052         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1053
1054 2004-08-02  Kenichi Handa  <handa@m17n.org>
1055
1056         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1057         set val to 1 even if it is greater than 1.
1058
1059         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1060
1061 2004-07-29  Kenichi Handa  <handa@m17n.org>
1062
1063         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1064         debugging information.
1065
1066         * internal.h (MDEBUG_PRINT5): New macro.
1067
1068         * draw.c (layout_glyphs): Don't combine a zero width glyph with
1069         the previous one if the zero width glyph has left or right
1070         padding.
1071
1072 2004-07-26  Kenichi Handa  <handa@m17n.org>
1073
1074         * m17n-X.c (xft_render): Pay attention to members left_padding and
1075         right_padding of MGlyph.
1076
1077         * draw.c (visual_order): Allocate one more elements for arrays as
1078         a workaround of fribidi bug.
1079         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1080         instead of MGlyph->bidi_sensitive.
1081         (layout_glyph_string): Pay attentinon to
1082         control->orientation_reversed when padding at the head or tail.
1083         Fix adjustment of space glyph width.
1084         (get_gstring): If cursor_width or cursor_bidi is changed, don't
1085         use a cache.
1086
1087         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1088         instead of MGlyph->bidi_sensitive.
1089
1090         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1091
1092 2004-07-26  Kenichi Handa  <handa@m17n.org>
1093
1094         * draw.c (visual_order): Don't treat combined glyphs specially.
1095         (layout_glyphs): Don't get metrics glyphs that are already ready.
1096         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
1097         width with the previous one. 
1098         (draw_background): Fix bar cursor position on a r2l glyph.
1099
1100         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1101         (run_rule): Fix place of updating cluster_begin_pos and
1102         cluster_end_pos here.
1103         (run_otf): Don't set left_padding.
1104
1105         * font-ft.c (adjust_anchor): Type of argument `code' changed.
1106         Caller changed.
1107         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1108         Fix handling of GPOS.
1109         (mfont__ft_drive_gpos): Delete this function.
1110
1111         * font.h (mfont__ft_drive_otf): Renamed back from
1112         mfont__ft_drive_gsub.
1113         (mfont__ft_drive_gpos): Delete extern.
1114
1115         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1116         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1117
1118 2004-07-23  Kenichi Handa  <handa@m17n.org>
1119
1120         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1121         the same bidi level.
1122
1123         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1124
1125 2004-07-22  Kenichi Handa  <handa@m17n.org>
1126
1127         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1128
1129 2004-07-20  Kenichi Handa  <handa@m17n.org>
1130
1131         * draw.c (render_glyphs): Fix checking of g->code validity.
1132
1133         * face.c (mface__realize): Set g.type.
1134
1135 2004-07-18  Kenichi Handa  <handa@m17n.org>
1136
1137         * Makefile.am: Prepend ${top_srcdir} to all *.la in
1138         *_LIBADD/*_LDADD.
1139
1140         * m17n-gui.c (mframe): Print error message give by dlopen to
1141         stderr.
1142
1143 2004-07-16  Kenichi Handa  <handa@m17n.org>
1144
1145         * draw.c (compose_glyph_string): Improve the way of deciding a
1146         script.  For a character that doesn't have script property, use
1147         the last non-latin script.
1148
1149         * font-ft.c (fc_list): Cancel previous change.
1150         (mfont__ft_init): Add more entries in ft_to_prop_name.
1151
1152 2004-07-15  Kenichi Handa  <handa@m17n.org>
1153
1154         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1155         previous or next character glyphs.
1156
1157 2004-07-14  Kenichi Handa  <handa@m17n.org>
1158
1159         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1160         of type GLYPH_SPACE.
1161
1162         * fontset.c (mfont__lookup_fontset): If glyph type is
1163         GLYPH_SPACE, get codes for SPACE.
1164
1165         * internal-gui.h (Mfont): Delete extern.
1166
1167         * m17n-gui.h (Mfont): Delete duplicated extern.
1168
1169 2004-07-13  Kenichi Handa  <handa@m17n.org>
1170
1171         * font-ft.c (DEVICE_DELTA): New macro.
1172         (adjust_anchor): New function.
1173         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
1174         only GSUB.
1175         (mfont__ft_drive_gpos): New function.
1176
1177         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1178         (FontLayoutContext): Delete member `rfont'.
1179         (run_otf): Set g->otf_cmd.  Call 
1180         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
1181         only whne HAVE_OTF is defined.
1182
1183         * fontset.c: Include "config.h".
1184
1185         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1186         (MGlyph): New member otf_cmd.
1187
1188         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1189         (mfont__ft_drive_gpos): Extern it.
1190
1191         * face.c: Include "config.h".
1192
1193         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1194
1195         * input-gui.c: Include "config.h".
1196
1197         * plist.c: Include "config.h".
1198
1199 2004-07-06  Kenichi Handa  <handa@m17n.org>
1200
1201         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1202         internal-gui.h: Cancel previous changes.
1203
1204         * m17n-gd.h: Delete it.
1205
1206         * Makefile.am (libm17n_core_la_LIBADD): New variable.
1207         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1208         @XML2_LD_FLAGS@ to above.
1209         (libm17n_la_LIBADD): Add -ldl.
1210         (libm17n_la_LDFLAGS): Add -export-dynamic.
1211         (X_LD_FLAGS): Fix the order of linking.
1212         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1213         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1214         (libm17n_X_la_LDFLAGS): Add -module.
1215         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1216         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1217         (libm17n_gd_la_LDFLAGS): Add -module.
1218         (include_HEADERS): Delete m17n-gd.h.
1219
1220 2004-06-30  Kenichi Handa  <handa@m17n.org>
1221
1222         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1223         (MDeviceLibraryInterface): Delete it.
1224         (register_device_library): Delete it.
1225         (m17n__device_library_list): Renamed from device_library_list.
1226
1227         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1228         (m17n_init_win): Adjust prototype.
1229
1230         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1231         (m17n_init_gd): New function. 
1232
1233         * m17n-gd.h: New file.
1234
1235         * m17n-X.h: Include <m17n-gui.h>.
1236         (m17n_init_X): Extern it.
1237         (M17N_INIT): Redefine it.
1238
1239         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1240         (m17n_init_X): New function.
1241
1242         * internal-gui.h (m17n__device_library_list): Extern it.
1243         (struct MDeviceDriver): New members initialized, init, and fini.
1244
1245         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1246         @XFT2_LD_FLAGS@.
1247         (libm17n_X_la_LIBADD): Delete aboves.
1248         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1249         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1250         (libm17n_gd_la_LDFLAGS): Delete it.
1251         (include_HEADERS): Add m17n-gd.h.
1252
1253 2004-06-25  Kenichi Handa  <handa@m17n.org>
1254
1255         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1256         (libm17n_gd_la_LDFLAGS): Cancel previous change.
1257
1258         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1259
1260         * font-ft.c (fc_list): If FcFontList finds no font, try
1261         FcFontMatch.
1262
1263         * draw.c (compose_glyph_string): Terminate the last loop after
1264         doing default combining if necessary.
1265
1266 2004-06-24  Kenichi Handa  <handa@m17n.org>
1267
1268         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1269
1270         * character.c (mchar_define_property): Add const to an arg.
1271
1272         * charset.c (mchar_define_charset): Add const to an arg.
1273
1274         * coding.c (MCodingSystem): Add const to an arg or decoder.
1275         (finish_decoding): Add const to an arg.
1276         (decode_coding_charset, decode_coding_utf_8)
1277         (decode_coding_utf_16, decode_coding_utf_32)
1278         (decode_coding_iso_2022, decode_coding_sjis)
1279         (mconv_define_coding): Likewise.
1280
1281         * m17n-X.c (xft_find_metric): Delete unused variable.
1282
1283         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1284         prototypes.
1285
1286         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1287         prototypes.
1288
1289         * mtext.c (count_utf_8_chars, count_utf_16_chars)
1290         (mtext__from_data, mtext_from_data): Add `const' to an arg.
1291
1292         * mtext.h (mtext__from_data): Ajust prototype.
1293
1294 2004-06-23  Kenichi Handa  <handa@m17n.org>
1295
1296         * draw.c (compose_glyph_string): Always get glyph codes by
1297         mface__for_char.
1298         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1299         (mdraw_glyph_list): New function.
1300
1301         * font-flt.c (mfont__flt_run): Be sure to call
1302         rfont->driver->encode_char.
1303
1304         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1305         (ft_encode_char): Delete arg C.
1306         (ft_render): Don't call FT_Get_Char_Index.
1307
1308         * font.c (mfont__encodable_p): Delete it.
1309         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
1310
1311         * font.h (struct MFontDriver): Delete arg C of encode_char.
1312         (mfont__encodable_p): Delete extern.
1313
1314         * m17n-X.c (xfont_encode_char): Delete arg C.
1315         (xft_find_metric): Don't cal FT_Get_Char_Index.
1316         (xft_render): Likewise.
1317
1318         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
1319         logical_width.
1320         (mdraw_glyph_list): Extern it.
1321
1322         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
1323
1324 2004-06-22  Kenichi Handa  <handa@m17n.org>
1325
1326         * m17n-gui.h (mfontset_lookup): Extern it.
1327
1328         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
1329
1330         * fontset.c (realize_fontset_elements)
1331         (free_realized_fontset_elements, update_fontset_elements): New
1332         functions.
1333         (mfont__realize_fontset): Call realize_fontset_elements.
1334         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
1335         (mfont__lookup_fontset): If a fontset was modified, update
1336         the realized fontset.
1337         (mfontset_modify_entry): Increment fontset->tick.
1338         (mfontset_lookup): New function.
1339
1340 2004-06-21  Kenichi Handa  <handa@m17n.org>
1341
1342         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
1343
1344         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
1345         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
1346         length of source text 0.
1347
1348 2004-06-21  Kenichi Handa  <handa@m17n.org>
1349
1350         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
1351         (compare): Pay attention to format other than utf-8.
1352         (copy): Delete this function.
1353         (count_by_utf_8, count_by_utf_16, insert): New functions.
1354         (count_utf_16_chars): Fix handling of a surrogate pair.
1355         (find_char_forward, find_char_backward): Likewise.
1356         (mtext__from_data): Delete unnecessary check.  Fix number of
1357         allocated bytes.
1358         (mtext_from_data): Don't count items.
1359         (mtext_ref_char): Optimize the code.
1360         (mtext_set_char): Pay attention to format other than utf-8.
1361         (mtext_cat_char): Likewise.
1362         (mtext_dup): Don't call copy, instead do allocation here.
1363         (mtext_cat): Call insert instead of copy.
1364         (mtext_ncat): Likewise.
1365         (mtext_cpy): Delete character at first and call insert instead of
1366         copy.
1367         (mtext_ncpy): Likewise.
1368         (mtext_copy): Likewise.
1369         (mtext_duplicate): Call insert instead of copy.
1370         (mtext_del): Pay attention to format other than utf-8.
1371         (mtext_ins): Simply call insert.
1372         (mtext_ins_char): Pay attention to format other than utf-8.
1373         (mtext_tok): Call insert instead of copy.
1374         (mtext_text): Call UNIT_BYTES.
1375
1376         * textprop.c (mtext__adjust_plist_for_change): New function.
1377
1378         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
1379         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
1380         (CHAR_UNITS_AT): Fix typo.
1381         (CHAR_UNITS_BY_HEAD): Fix typo.
1382         (STRING_CHAR_AND_UNITS): Fix typo.
1383
1384         * internal.h (MTEXT_READ_ONLY_P): New macro. 
1385
1386         * mtext.h (mtext__replace): Delete the extern.
1387         (mtext__adjust_foramt): Adjust prototype.
1388
1389         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
1390         if possible.  Otherwise make a copy of mmt.
1391
1392         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
1393         utf-8.
1394
1395 2004-06-18  Kenichi Handa  <handa@m17n.org>
1396
1397         * character.h (CHAR_STRING_UTF16): Fix syntax.
1398
1399 2004-06-16  Kenichi Handa  <handa@m17n.org>
1400
1401         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
1402         (libm17n_X_la_LIBADD): Delete it.
1403         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
1404
1405         * m17n-X.c (device_open): Add parens in `if' condition.
1406
1407         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
1408         (DEC_POSITION): Likewise.
1409         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
1410
1411 2004-06-15  Kenichi Handa  <handa@m17n.org>
1412
1413         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
1414         by language.
1415
1416         * draw.c (compose_glyph_string): If langauge is specified, call
1417         mface__for_chars even if a text is all latin.  Fix condition for
1418         setting non_ascii_found.
1419
1420         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
1421
1422         * m17n.h (minput_char_to_key): Delete extern.
1423
1424         * m17n-gui.h (minput_event_to_key): Cancel previous change.
1425
1426         * m17n-gui.c (null_device_open): Set several members of frame.
1427
1428 2004-06-14  Kenichi Handa  <handa@m17n.org>
1429
1430         * m17n-gui.h (minput_event_to_key): Delete extern.
1431
1432         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
1433
1434         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
1435
1436         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
1437
1438 2004-06-08  Kenichi Handa  <handa@m17n.org>
1439
1440         * character.c (mchar_put_prop): Don't increment the ref-count of
1441         record->table.
1442
1443 2004-06-04  Kenichi Handa  <handa@m17n.org>
1444
1445         * m17n-core.c (mdebug__register_object): New function.
1446         (mdebug__unregister_object): Likewise.
1447
1448         * internal.h (mdebug__register_object, mdebug__unregister_object):
1449         Extern them.
1450         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1451         respectively.
1452
1453         * charset.c (mcharset__load_from_database): Don't call
1454         mconv__register_charset_coding here.
1455
1456         * coding.c (find_coding): Get a real name from an element of
1457         coding_definition_list.
1458         (mconv__register_charset_coding): Set the real name at the top of
1459         param.
1460         (mcoding__load_from_database): Likewise.
1461         (mconv_list_codings): Adjusted for the above change.
1462
1463 2004-06-03  Kenichi Handa  <handa@m17n.org>
1464
1465         * coding.c (find_coding): Find by canonicalized name.  Don't have
1466         to modify the element of coding_definition_list by
1467         mplist__from_plist.
1468         (mconv__define_coding_from_charset): Delete it.
1469         (mconv__register_charset_coding): Canonicalize sym.
1470         (mcoding__load_from_database): Register plist modified by
1471         mplist__from_plist.
1472
1473         * coding.h (mconv__define_coding_from_charset): Don't extern it.
1474
1475         * font-ft.c (ft_open): Fix setting of rfont->descent.
1476
1477 2004-06-02  Kenichi Handa  <handa@m17n.org>
1478
1479         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1480         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1481         (xlfd_unparse_name): Renamed from xfont_build_name.
1482         (mfont__init): Initialized Mfontconfig.
1483         (mfont__free_realized): Unconditionally unref rfont->info.
1484         (mfont__select): Free `this' if it's not best.
1485         (mfont__open): Don't check frame->realized_font_list.
1486         (mfont__parse_name_into_font): New function.
1487         (Mfontconfig): New variable.
1488         (mfont_from_name): Call mfont_parse_name.
1489         (mfont_name): Call mfont_unparse_name.
1490         (mdebug_dump_font): Likewise.
1491
1492         * font.h (struct MFontDriver): Delete members parse_name and
1493         build_name.
1494         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1495         (mfont__parse_name_into_font): Extern it.
1496
1497         * font-ft.c: Include "symbol.h".
1498         (close_ft): Unconditionally free filename and charmap_list of
1499         ft_into.
1500         (ft_open): Duplicate base->filename.  Increment ref-count of
1501         ft_info->charmap_list.  Free ft_info->charmap_list and
1502         ft_info->filename on error.
1503         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
1504
1505         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
1506         xfont_build_name.
1507         (enum xlfd_field_idx): Moved to font.c.
1508         (split_font_name, build_font_name): Likewise.
1509         (build_font_list): Call mfont__parse_name_info_font.
1510         (xfont_open): Call mfont__unparse_name.  Free name.
1511         (xfont_parse_name, xfont_build_name): Moved to font.c
1512         (xft_select): Prototype deleted.
1513         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
1514         Call mfont_pase_name.
1515
1516         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
1517         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
1518         (mframe): Likewise.
1519
1520         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
1521         Extern them.
1522
1523         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
1524
1525 2004-06-01  Kenichi Handa  <handa@m17n.org>
1526
1527         * fontset.c (mfontset_modify_entry): Pay attention to the case
1528         that fontset->font_spec_list is NULL.
1529
1530 2004-05-31  Kenichi Handa  <handa@m17n.org>
1531
1532         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1533
1534         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1535
1536         * font.c (mfont__select): Print score the a font for debugging.
1537
1538         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
1539
1540         * coding.c (reset_coding_sjis): Check kanji and kana instead of
1541         kanji_sym and kana_sym.
1542
1543 2004-05-28  Kenichi Handa  <handa@m17n.org>
1544
1545         * Makefile.am (VINFO): New variable.
1546         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
1547         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
1548
1549 2004-05-27  Kenichi Handa  <handa@m17n.org>
1550
1551         The following chanages are to make device dependent functions
1552         accessible only from MDeviceDriver structure, and to add GD and
1553         null device drivers.  Font drivers get also device dependent.
1554
1555         * m17n.c (m17n_init): Increament shell_initialized.
1556         (m17n_fini): Decremented shell_initialized.
1557
1558         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
1559
1560         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
1561         (Mwidget, Mcolormap, Mx): Extern them.
1562
1563         * m17n-gui.c: Include <dlfcn.h> and "config.h".
1564         (free_frame): Call frame->driver->close instead of
1565         mwin__close_device.
1566         (DLOPEN_SHLIB_EXT): New macro.
1567         (MDeviceLibraryInterface): New type.
1568         (device_library_list): New variable.
1569         (register_device_library): New function.
1570         (null_device): New variable.
1571         (null_device_close, null_device_get_prop)
1572         (null_device_realize_face, null_device_free_realized_face): New
1573         function.
1574         (null_driver): New variable.
1575         (null_device_init, null_device_fini, null_device_open): New
1576         functions.
1577         (null_interface): New variable.
1578         (Mfreetype, Mdevice): Declare them.
1579         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
1580         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1581         Mwin__Close_Device.  Register drivers for Mx and Mgd.
1582         (m17n_fini_win): Decremented win_initialized.  Call "fini"
1583         function of all opened devices.  Don't call mwin__fini.
1584         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1585         Declare them here.
1586         (mframe): Handle Mdevice key of PLIST.
1587         (mframe_get_prop): Call frame->device->get_prop instead of
1588         mwin__device_get_prop.
1589
1590         * m17n-gd.c: New file.
1591
1592         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1593         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1594
1595         * m17n-core.c (m17n_init_core): Increate core_initialized.
1596         (m17n_fini_core): Decremented core_initialized.
1597
1598         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1599         (Mcolormap): Don't extern them here.
1600
1601         * m17n-X.c (FRAME_DEVICE): New macro.
1602         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1603         (free_display_info): Use MPLIST_DO.
1604         (free_device): Free rface->info.
1605         (xft_close): Delete it.
1606         (device_init): Renamed from mwin__init.
1607         (device_fini): Renamed from mwin__fini.
1608         (device_open): Renamed from mwin__open_device.
1609         (x_driver): New variable.
1610         (MXFontInfo): Delete member frame, add member display.
1611         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1612         Don't declare them here.
1613
1614         * internal-gui.h (MDeviceType): New enum.
1615         (MWDefice): Delete it.
1616         (struct MFrame): Change type of device to void *.  New members
1617         device_type, driver, font_driver_list.
1618         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1619         (MDeviceDriver): New type.
1620         (Mx, Mgd, Mfreetype): Extern them.
1621         (mwin__XXX): Delete all of them.
1622
1623         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
1624         mwin__XXX.
1625         (win_destroy_ic): Likewise.
1626         (adjust_window_and_draw): Likewise.
1627         (win_callback): Likewise.
1628         (Mxim): Declare it here.
1629         (minput_event_to_key): Call M_CHECK_READABLE.
1630
1631         * fontset.c (mfont__lookup_fontset): Delete local variable
1632         font_group.
1633
1634         * font.h (struct MFontDriver): Delete member close, add members
1635         parse_name and build_name.
1636         (mfont__driver_list): Delete extern.
1637         (mfont__close): Delete extern.
1638
1639         * font.c (mfont__init): Don't set mfont__driver_list.
1640         (mfont__fini): Don't unref mfont__driver_list.
1641         (mfont__select): Try font drivers in frame->font_driver_list.  Set
1642         driver member of a realized font.
1643         (mfont__close): Delete it.
1644         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
1645         functions of the default frame.
1646
1647         * font-ft.c (close_ft): Check ft_info->ft_face and work
1648         differently.
1649         (add_font_info): Allocate ft_info by M17N_OBJECT.
1650         (ft_close): Delete it.
1651         (mfont__ft_driver): Don't set ft_close.
1652         (ft_select): Increment ref-count of best_font.
1653         (ft_open): Decremented ref-count of base.  On error, call
1654         FT_Done_Face and free ft_info.
1655         (ft_find_metric): Always use XXX_MONO in load_flags.
1656         (ft_render): Fix setting of width.  Call
1657         frame->driver->draw_points instead of mwin__draw_points.
1658         (ft_to_prop): Don't set mfont__driver_list.
1659         (mfont__ft_fini): Just unref ft_info.
1660
1661         * face.c (mface__init): Exchange foreground and background of
1662         mface__default.  Call mface_put_prop to set hline of
1663         mface_underline,
1664         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
1665         (mface__free_realized): Don't call mwin__free_realized_face.
1666
1667         * draw.c (Mdepth): Don't declare it here.
1668         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
1669         (render_glyphs, render_glyph_string): Likewise.
1670         (mdraw__init): Don't set Mdepth.
1671         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
1672         M_CHECK_WRITABLE.
1673         (mdraw_text_per_char_extents): Return 0 on success and -1 on
1674         error.
1675         (mdraw_text_items): Check FRAME is writable.
1676         (mdraw_per_char_extents): Implement body.
1677
1678         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1679         libm17n-gd.la.
1680         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1681         (GUI_SOURCES): Delete it.
1682         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1683         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1684         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1685         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1686         (linkgui_LDADD): Set to libm17n-gui.la
1687         (linkgui_LDFLAGS): New target.
1688         (SRC): Include ${libm17n_gui_la_SOURCES} and
1689         ${libm17n_gd_la_SOURCES}.
1690
1691 2004-05-24  Kenichi Handa  <handa@m17n.org>
1692
1693         * draw.c (draw_background): Don't draw background even if
1694         rface->face.property[MFACE_BACKGROUND] is not Mnil.
1695
1696 2004-05-22  Kenichi Handa  <handa@m17n.org>
1697
1698         * m17n-X.c (xft_open_font): Fix anti_alias setting.
1699
1700 2004-05-20  Kenichi Handa  <handa@m17n.org>
1701
1702         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1703
1704         * m17n-gui.c: Include "plist.h".
1705         (mframe): If PLIST is NULL, initialize it to emply plist.
1706
1707         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1708         (xft_driver): New variable.
1709         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1710         (xft_find_metric, xft_render): New function.
1711         (mwin__init): Adjusted for the new mfont__driver_list.
1712         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
1713         generated face to PARAM.
1714         (mwin__realize_face): Fix setting of box colors.  Don't call hook
1715         function here.
1716         (mwin__draw_hline): New function.
1717         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1718         (mwin__xft_render): Delete these function.
1719
1720         * internal-gui.h (struct MFrame): New member tick.
1721         (struct MGlyphString): New member tick.
1722         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1723         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1724         (mwin__xft_render): Delete extern.
1725
1726         * fontset.c (mfont__lookup_fontset): Make the code simpler.
1727         (mfontset): Always increment the reference count of returned
1728         object.
1729
1730         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1731         (MFTInfo): Moved to font.h.
1732         (ft_iso8859_1_font_list): Delete this variable.
1733         (set_font_info): Don't set font->property[MFONT_TYPE].
1734         (set_font_info): Don't udpate ft_iso8859_1_font_list.
1735         (add_font_info): Change type to void.
1736         (fc_list): Change anme from xft_list.  Caller changed.  Include
1737         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1738         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
1739         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1740         (close_ft): Don't call mwin__xft_close.  Unref
1741         ft_info->extra_info.
1742         (ft_open): Don't setup ft_info->fontname.  Don't call
1743         mwin__xft_open.
1744         (ft_find_metric): Don't call mwin__xft_get_metric.
1745         (ft_encode_char): Call rfont->driver->open instead of ft_open.
1746         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
1747         (mfont__ft_init): Adjusted for new mfont__driver_list.
1748         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1749
1750         * font.c (mfont__driver_list): Make it MPlist.
1751         (mfont__init): Adjust initialization of mfont__driver_list.
1752         (mfont__fini): Free mfont__driver_list.
1753         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1754         (mfont__select): Adjusted for the new mfont__driver_list.
1755
1756         * font.h (enum MFontProperty): Delete MFONT_TYPE.
1757         (mfont__drirver_list): Adjust prototype.
1758         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
1759
1760         * face.h (struct MFace): Delete member realized_face_list, add
1761         member frame_list.
1762         (struct MRealizedFace): Delete member need_update
1763         andnofont_rface, add member non_ascii_list.
1764         (mface__update_frame_face): Extern it.
1765
1766         * face.c (hline_prop_list, box_prop_list, noop_hook): New
1767         variables.
1768         (get_hline_create, get_box_create): New functions.
1769         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
1770         Use memcmp.
1771         (free_face): Cancep previous change.  Free face->frame_list.
1772         (serialize_hline): Do nothing if hline->width is zero.
1773         (serialize_box): Do nothing if box->width is zero.
1774         (mface__init): Setup all properties of mface__default.
1775         (mface__fini): Free hline_prop_list and box_prop_list.
1776         (mface__realize): Cancel previous change.  Update
1777         face->frame_list.  Setup rface->non_ascii_list.
1778         (mface__for_chars): Update rface->non_ascii_list.
1779         (mface__free_realized): Free rface->non_ascii_list.
1780         (mface__update_frame_face): New function.
1781         (mface): Initialize face->frame_list.
1782         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
1783         properties.
1784         (mface_merge): Likewise.
1785         (mface_put_prop): If key is Mhline or Mbox, get value by
1786         get_hline_create or get_box_create respectively.
1787         (mface_put_prop): Update frame->tick and call
1788         mface__update_frame_face if necessary.
1789         (mface_update): Do nothing if func is noop_hook.
1790
1791         * draw.c (render_glyphs): If a font is not found, use
1792         mwin__draw_empty_boxes.
1793         (alloc_gstring): Initialize gstring->tick.
1794         (get_gstring): Check gstring->tick.
1795
1796 2004-05-17  Kenichi Handa  <handa@m17n.org>
1797
1798         * face.c (find_realized_face): Return value changed.  If RFONT is
1799         NULL, avoid unnecessary checking.
1800         (free_face): Free face->realized_face_list.
1801         (mface__realize): Adjusted for the change of find_realized_face.
1802         If it returns a realized face that needs update, free it and
1803         realize a new one.  Push a new realized face to
1804         frame->realized_face_list instead of appending.
1805         (mface__for_chars): Adjusted for the change of find_realized_face.
1806         Short cut if the required font is in rface->ascii_rface.
1807         (mface_put_prop): Free old value if necessary.  Set need_update
1808         member of realized faces to 1.
1809
1810         * face.h (struct MFace): Delete member tick, add member
1811         realized_face_list.
1812         (struct MRealizedFace): Delete member tick, add member
1813         need_update.
1814
1815 2004-05-13  Kenichi Handa  <handa@m17n.org>
1816
1817         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1818
1819 2004-05-12  Kenichi Handa  <handa@m17n.org>
1820
1821         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1822
1823         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1824         parse it XftNameParse.
1825
1826         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1827         (all_fonts_scaned): New variable.
1828         (set_font_info): FAMILY may be Mnil.
1829         (add_font_info): Argument changed.
1830         (xft_list): Call add_font_info in it.
1831         (ft_list): Likewise.
1832         (ft_select): Make it work in the case family is Mnil.
1833         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1834         (mfont__ft_fini): Set all_fonts_scaned to 0.
1835
1836         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1837         that is failed to open.
1838
1839 2004-05-10  Kenichi Handa  <handa@m17n.org>
1840
1841         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1842         device's depth is 1 (i.e. monochrome).
1843
1844         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1845         to work around the problem of libtool.
1846
1847         * font-ft.c: Include <freetype/ftbdf.h>.
1848         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1849         variables.
1850         (mfont__ft_init): Initialize them.
1851         (ft_iso8859_1_font_list): New variable.
1852         (set_font_info): Detect a font containing iso8859-1 glyphs and
1853         register it in ft_iso8859_1_font_list.  If the font is not
1854         scalable, assume it as BDF or PCF font and setup SIZE and RESY
1855         properties of the font from its properties.
1856         (add_font_list): If the font is not scalable, check if it is BDF
1857         or PCF font.  If not, ignore it.
1858         (ft_select): If FAMILY is Mnil, return NULL only if the requested
1859         registry is not iso8859-1.
1860         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1861         ft_iso8859_1_font_list.
1862         (ft_find_metric): If the font is not scalable, assume it as BDF
1863         or PCF, and get a metric from its properties.
1864         (mfont__ft_fini): Free ft_iso8859_1_font_list.
1865
1866 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
1867
1868         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1869         (libm17n_la_LDFLAGS): Delete it.
1870         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1871         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1872
1873 2004-05-06  Kenichi Handa  <handa@m17n.org>
1874
1875         * draw.c (compose_glyph_string): Fix previous change.
1876
1877 2004-04-30  Kenichi Handa  <handa@m17n.org>
1878
1879         * font-ft.c (ft_list): Delete unused variable `result'.
1880         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1881
1882 2004-04-27  Kenichi Handa  <handa@m17n.org>
1883
1884         * m17n-X.c: Include config.h
1885         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1886         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1887         (MWDevice) [HAVE_XFT2]: New member xft_draw.
1888         (FRAME_CMAP, FRAME_VISUAL): New macros.
1889         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1890         (xfont_driver): Make it static.
1891         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1892         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1893         info->xft_color_back.
1894         (MXftFontInfo) [HAVE_XFT2]: New type.
1895         (mwin__xft_close) [HAVE_XFT2]: New function.
1896         (mwin__xft_open) [HAVE_XFT2]: New function.
1897         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1898         (mwin__xft_render) [HAVE_XFT2]: New function.
1899
1900         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1901         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1902         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1903         externs.
1904
1905         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1906
1907         * font-ft.c: Don't include FT_FREETYPE_H here.
1908         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1909         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1910         (MFTInfo): New member charmap_index.
1911         (MFTInfo) [HAVE_XFT2]: New member xft_info.
1912         (check_otf_filename): Renamed from check_filename.  Return value
1913         changed.
1914         (ft_set_property): This function deleted.
1915         (set_font_info): New function.
1916         (add_font_list): Argument changed.  Add multiple fonts.
1917         (xft_list) [HAVE_XFT2]: New function.
1918         (ft_list) [not HAVE_XFT2]: New function.
1919         (ft_select): Add code for Xft.
1920         (close_ft): Likewise.
1921         (ft_open): Likewise.
1922         (ft_find_metric): Likewise.
1923         (ft_encode_char): Likewise.
1924         (ft_render): Likewise.
1925
1926         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1927
1928 2004-04-26  Kenichi Handa  <handa@m17n.org>
1929
1930         * textprop.c (mtext_attach_property): Declare the return type as
1931         `int'.
1932
1933 2004-04-21  Kenichi Handa  <handa@m17n.org>
1934
1935         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1936
1937 2004-04-09  Kenichi Handa  <handa@m17n.org>
1938
1939         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1940         seq_to.
1941         (load_command): Setup above members.
1942
1943 2004-04-05  Kenichi Handa  <handa@m17n.org>
1944
1945         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1946
1947 2004-03-30  Kenichi Handa  <handa@m17n.org>
1948
1949         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1950         >= 0x10000.
1951
1952         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1953         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1954
1955 2004-03-29  Kenichi Handa  <handa@m17n.org>
1956
1957         * Version 1.0 Patch Level 2 released.
1958
1959 2004-03-29  Kenichi Handa  <handa@m17n.org>
1960
1961         * charset.c (make_charset): Set charset->fully_loaded and
1962         charset->simple correctly.  Don't try to get charset->min_char and
1963         charset->max_char for a charset of method subset and superset.
1964         Don't load a mapping file here.
1965         (mcharset__init): Set unified_max.
1966         (mcharset__load_from_database): Free a working plist.
1967
1968         * coding.c (mcoding__fini): Free all malloced data.
1969
1970         * input-gui.c (win_create_ic): Set control.as_image for preediting
1971         to 0.
1972
1973         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1974         `count') to initialize the array.
1975
1976         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1977         M17N_OBJECT_UNREF.
1978
1979         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1980         rectangle.
1981         (mwin__create_window): Fix bug of setting a background pixel of a
1982         new window.
1983         (mwin__adjust_window): Clear the window before drawing.
1984
1985         * m17n-core.c (mdebug__report_object): Free array->objectes if
1986         necessary.
1987         (m17n_init_core): Don't set report_header_printed to 0 here.
1988         Fix debugging information.
1989         (m17n_fini_core): Set report_header_printed to 0 here.
1990
1991         * m17n-core.h (mplist_deserialize): Extern it.
1992
1993         * m17n-gui.c (m17n_fini_win): Fix debugging information.
1994
1995         * m17n.c (m17n_fini): Fix debugging information.
1996
1997         * mtext.c (mtext__adjust_foramt): New function.
1998
1999         * mtext.h (mtext__adjust_foramt): Extern it.
2000
2001         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2002
2003         * plist.h (mplist__deserialize): Don't extern it.
2004
2005         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
2006         elements of symbol_table to NULL.  Report about created and freed
2007         symbols if MDEBUG_FINI is set.
2008
2009 2004-03-22  Kenichi Handa  <handa@m17n.org>
2010
2011         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2012
2013         * m17n.c (m17n_init): Fix the way of checking merror_code.
2014
2015         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2016
2017 2004-03-22  Kenichi Handa  <handa@m17n.org>
2018
2019         * fontset.c (realize_font_group): Adjust the font size by
2020         mfont__resize before selecting a font.
2021
2022         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2023
2024 2004-03-19  Kenichi Handa  <handa@m17n.org>
2025
2026         * Version 1.0 Patch Level 1 released.
2027
2028 2004-03-19  Kenichi Handa  <handa@m17n.org>
2029
2030         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2031
2032         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2033
2034 2004-03-19  Kenichi Handa  <handa@m17n.org>
2035
2036         Re-apply the changes forgotten in the released version.
2037
2038         * charset.c (mcharset__load_from_database): Call
2039         mchar_define_charset.
2040
2041         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2042         (mconv_encode_range): Put Mcoding text property.
2043
2044 2004-03-18  Kenichi Handa  <handa@m17n.org>
2045
2046         * draw.c (Mdepth): New variable.
2047         (visual_order): Delete unused local var `pos'.
2048         (compose_glyph_string): Fix for the case that gstring->glyphs is
2049         realloced.  Stop generating glyphs at TO.  Fix handling of
2050         control charaters.
2051         (layout_glyphs): Get metrics of all glyphs in advance.  Set
2052         lbearing and rbearing of base of composition glyph correctly.
2053         Handle left-overhang glyphs correctly.
2054         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
2055         changed.
2056         (dump_combining_code): Change the defualt off_x character to ".".
2057         (mdraw__init): Initialize Mdepth.
2058
2059         * face.c (work_gstring): New variable
2060         (mface__init): Initialize work_gstring.
2061         (mface__fini): Free work_gstring.glyphs.
2062         (mface__realize): Don't handle videomode property here.  Adjusted
2063         for the change of mfont__get_metric.
2064         (mface__for_chars): Adjusted for the change of mfont__get_metric.
2065
2066         * face.h (enum face_gc): Moved to m17n-X.c.
2067
2068         * font.h (struct MFontDriver): Arguments of find_metric changed.
2069         (mfont__select): Prototype adjusted.
2070         (mfont__get_metric): Likewise.
2071         (mfont__ft_drive_otf): Likewise.
2072         (mfont__flt_run): Likewise.
2073         
2074         * font.c (mfont__select): New argument layouter.  If layouter is
2075         different in the registered font, make a new copy of realized
2076         font.
2077         (mfont__get_metric): Argument changed.  Get metrics of multiple
2078         glyphs.
2079         (mfont_find): Call mfont__select with layouter as Mnil.
2080
2081         * font-flt.c (FontLayoutContext): New member rfont.
2082         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2083         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
2084
2085         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
2086         multiple glyphs.
2087         (NUM_POINTS): New macro.
2088         (MPointTable): New type.
2089         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2090         (mfont__ft_drive_otf): New argument rfont.
2091
2092         * fontset.c (realize_font_group): Adjusted for the changed of
2093         mfont__select.
2094         (check_fontset_element): This function deleted.
2095
2096         * input-gui.c (adjust_window_and_draw): Locate a preedit window
2097         off the parent window if the preedit text is zero length.
2098
2099         * internal-gui.h (struct MFrame): New members foreground,
2100         background, videomode, font.
2101         (struct MGlyphString): New member anti_alias.
2102         (MDrawPoint): New type.
2103         (mwin__draw_bitmap): Prototype deleted.
2104         (mwin__draw_points): Prototype added.
2105
2106         * m17n-gui.h (MDrawControl): New member anti_alias.
2107
2108         * m17n-gui.c (free_frame): Free frame->font.
2109         (mframe): Set the fontset of frame->face to the default fontset.
2110
2111         * m17n-X.c (RGB_GC): New type.
2112         (enum gc_index): Renamed from enum face_gc.  Member names changed.
2113         (GCInfo): New typel
2114         (struct MWDevice): Members foreground and background deleted.  New
2115         member scratch_gc, gc_list.
2116         (DEFAULT_FONT, FALLBACK_FONT): New macros.
2117         (free_device): Free GCs in device->gc_list.
2118         (get_rgb_gc): New function.
2119         (get_gc): Renamed and argument changed from get_color.
2120         (get_gc_for_anti_alias): New function.
2121         (xfont_find_metric): Arguments changed.  Get metrics of multiple
2122         glyphs.
2123         (set_region): Argument changed.  Caller changed.
2124         (xfont_render): Allways set a font in gc.
2125         (x_error_handler, x_io_error_handler): Define only if
2126         X_SET_ERROR_HANDLER is defined.
2127         (mwin__open_device): Create device->scratch_gc.  Set members
2128         foreground, background, and videomode of frame.  Call
2129         XSetErrorHandler and XSetIOErrorHandler only if
2130         X_SET_ERROR_HANDLER is defined.
2131         (struct gc_list): Deleted.
2132         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2133         (mwin__realize_face): Adjusted for the change of the format of
2134         rface->info and the charge of set_region.
2135         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2136         (mwin__draw_box): Likewise.
2137         (mwin__draw_bitmap): This function deleted.
2138         (mwin__draw_points): New function.
2139         (mwin__verify_region): Adjusted for the change of the format of
2140         rface->info and the charge of set_region.
2141         (mwin__create_window): Inherit backgound pixel from parent.
2142         (mwin__dump_gc): Adjusted for the change of the format of
2143         rface->info.
2144
2145 2004-03-16  Kenichi Handa  <handa@m17n.org>
2146
2147         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2148
2149         * input.c (M_key_alias): New variable.
2150         (handle_key): Try M_key_alias property of a key too.
2151         (minput__init): Initialize M_key_alias.  Give that property to
2152         symbols in one_char_symbol.  Fix bug of initializing
2153         one_char_symbol.
2154
2155         * draw.c (compose_glyph_string): Don't handle
2156         ignore_formatting_char here.  Include formatting characters in the
2157         range processed by a FTL.
2158         (layout_glyph_string): Handle ignore_formatting_char here.
2159
2160 2004-03-12  Kenichi Handa  <handa@m17n.org>
2161
2162         * input-gui.c (win_create_ic): Enable bidi in status control.
2163
2164         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2165
2166 2004-03-09  Kenichi Handa  <handa@m17n.org>
2167
2168         * input.c (load_input_method): If title is not specified, use the
2169         input method name as title.
2170
2171         * m17n-X.c (get_color): Make it static.
2172         (xim_create_ic, xim_destroy_ic, x_error_handler)
2173         (x_io_error_handler): Likewise.
2174
2175 2004-03-01  Kenichi Handa  <handa@m17n.org>
2176
2177         * Version 1.0 released.
2178
2179 \f
2180 Copyright (C) 2003, 2004
2181   National Institute of Advanced Industrial Science and Technology (AIST)
2182   Registration Number H15PRO112
2183
2184 This file is part of the m17n library.
2185
2186 The m17n library is free software; you can redistribute it and/or
2187 modify it under the terms of the GNU Lesser General Public License
2188 as published by the Free Software Foundation; either version 2.1 of
2189 the License, or (at your option) any later version.
2190
2191 The m17n library is distributed in the hope that it will be useful,
2192 but WITHOUT ANY WARRANTY; without even the implied warranty of
2193 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2194 Lesser General Public License for more details.
2195
2196 You should have received a copy of the GNU Lesser General Public
2197 License along with the m17n library; if not, write to the Free
2198 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2199 02111-1307, USA.