*** empty log message ***
[m17n/m17n-lib.git] / src / font.c
index 40782c8..5ebdaa0 100644 (file)
@@ -1,5 +1,5 @@
 /* font.c -- font module.
-   Copyright (C) 2003, 2004, 2005, 2006
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H15PRO112
 
@@ -1154,7 +1154,7 @@ mfont__init ()
   default_encoding.repertory_name = Mnil;
   default_encoding.repertory_charset = NULL;
   {
-    char *path, *buf;
+    char *path, *buf = NULL;
     int bufsize;
     USE_SAFE_ALLOCA;
 
@@ -1219,7 +1219,7 @@ mfont__fini ()
 MSymbol
 mfont__id (MFont *font)
 {
-  char *buf, *p;
+  char *buf = NULL, *p;
   int i;
   int file_len = (font->file == Mnil ? 0 : MSYMBOL_NAMELEN (font->file));
   int capability_len  = (font->capability == Mnil ? 0
@@ -1686,13 +1686,13 @@ mfont__get_glyph_id (MFLTFont *font, MFLTGlyphString *gstring,
       if (g->g.encoded)
        continue;
       if (mfont->source == MFONT_SOURCE_X && encoding->repertory_charset)
-       g->g.code = ENCODE_CHAR (encoding->repertory_charset, g->g.code);
+       g->g.code = ENCODE_CHAR (encoding->repertory_charset, g->g.c);
       else
        {
          unsigned code;
 
          if (encoding->encoding_charset)
-           code = ENCODE_CHAR (encoding->encoding_charset, g->g.code);
+           code = ENCODE_CHAR (encoding->encoding_charset, g->g.c);
          else
            code = g->g.code;
 
@@ -1711,9 +1711,8 @@ mfont__get_glyph_id (MFLTFont *font, MFLTGlyphString *gstring,
                        MFATAL (MERROR_FONT);
                    }
                }
-             g->g.code
-               = (driver->encode_char) (rfont->frame, rfont->font, mfont,
-                                        g->g.code);
+             g->g.code = (driver->encode_char) (rfont->frame, rfont->font,
+                                                mfont, code);
            }
        }
       g->g.encoded = 1;