Fix -Wimplicit warnings.
[bpt/emacs.git] / src / fontset.c
index 3e5278b..53cb240 100644 (file)
@@ -32,7 +32,8 @@ Boston, MA 02111-1307, USA.  */
 Lisp_Object Vglobal_fontset_alist;
 Lisp_Object Vfont_encoding_alist;
 Lisp_Object Vuse_default_ascent;
-Lisp_Object Valternative_fontname_alist;
+Lisp_Object Vignore_relative_composition;
+Lisp_Object Valternate_fontname_alist;
 Lisp_Object Vfontset_alias_alist;
 Lisp_Object Vhighlight_wrong_size_font;
 Lisp_Object Vclip_large_size_font;
@@ -59,25 +60,27 @@ my_strcasecmp (s0, s1)
    the comments in src/fontset.h for more detail.  */
 
 /* Return a pointer to struct font_info of font FONT_IDX of frame F.  */
-struct font_info *(*get_font_info_func) (/* FRAME_PTR f; int font_idx */);
+struct font_info *(*get_font_info_func) P_ ((FRAME_PTR f, int font_idx));
 
 /* Return a list of font names which matches PATTERN.  See the document of
    `x-list-fonts' for more detail.  */
-Lisp_Object (*list_fonts_func) (/* Lisp_Object pattern, face, frame, width */);
+Lisp_Object (*list_fonts_func) P_ ((Lisp_Object pattern, Lisp_Object face,
+                                   Lisp_Object frame, Lisp_Object width));
 
 /* Load a font named NAME for frame F and return a pointer to the
    information of the loaded font.  If loading is failed, return 0.  */
-struct font_info *(*load_font_func) (/* FRAME_PTR f; char *name */);
+struct font_info *(*load_font_func) P_ ((FRAME_PTR f, char *name, int));
 
 /* Return a pointer to struct font_info of a font named NAME for frame F.  */
-struct font_info *(*query_font_func) (/* FRAME_PTR f; char *name */);
+struct font_info *(*query_font_func) P_ ((FRAME_PTR f, char *name));
 
 /* Additional function for setting fontset or changing fontset
    contents of frame F.  */
-void (*set_frame_fontset_func) (/* FRAME_PTR f; Lisp_Object arg, oldval */);
+void (*set_frame_fontset_func) P_ ((FRAME_PTR f, Lisp_Object arg,
+                                   Lisp_Object oldval));
 
 /* Check if any window system is used now.  */
-void (*check_window_system_func) ();
+void (*check_window_system_func) P_ ((void));
 
 struct fontset_data *
 alloc_fontset_data ()
@@ -94,19 +97,22 @@ void
 free_fontset_data (fontset_data)
      struct fontset_data *fontset_data;
 {
-  int i;
-
-  for (i = 0; i < fontset_data->n_fontsets; i++)
+  if (fontset_data->fontset_table)
     {
-      int j;
+      int i;
 
-      xfree (fontset_data->fontset_table[i]->name);
-      for (j = 0; j <= MAX_CHARSET; j++)
-       if (fontset_data->fontset_table[i]->fontname[j])
-         xfree (fontset_data->fontset_table[i]->fontname[j]);
-      xfree (fontset_data->fontset_table[i]);
+      for (i = 0; i < fontset_data->n_fontsets; i++)
+       {
+         int j;
+         
+         xfree (fontset_data->fontset_table[i]->name);
+         for (j = 0; j <= MAX_CHARSET; j++)
+           if (fontset_data->fontset_table[i]->fontname[j])
+             xfree (fontset_data->fontset_table[i]->fontname[j]);
+         xfree (fontset_data->fontset_table[i]);
+       }
+      xfree (fontset_data->fontset_table);
     }
-  xfree (fontset_data->fontset_table);
 
   xfree (fontset_data);
 }
@@ -429,7 +435,7 @@ fontset_pattern_regexp (pattern)
              *p1++ = '*';
            }
          else if (*p0 == '?')
-           *p1++ == '.';
+           *p1++ = '.';
          else
            *p1++ = *p0;
        }
@@ -486,8 +492,6 @@ just like X's font name matching algorithm allows.")
   return Qnil;
 }
 
-Lisp_Object Fframe_char_width ();
-
 /* Return a list of names of available fontsets matching PATTERN on
    frame F.  If SIZE is not 0, it is the size (maximum bound width) of
    fontsets to be listed. */
@@ -594,7 +598,6 @@ FONTLIST is an alist of charsets vs corresponding font names.")
   return Qnil;
 }
 
-extern Lisp_Object Fframe_parameters ();
 extern Lisp_Object Qfont;
 Lisp_Object Qfontset;
 
@@ -796,6 +799,7 @@ loading failed.")
   return info;
 }
 
+void
 syms_of_fontset ()
 {
   int i;
@@ -834,14 +838,25 @@ ENCODING is one of the following integer values:\n\
   DEFVAR_LISP ("use-default-ascent", &Vuse_default_ascent,
      "Char table of characters whose ascent values should be ignored.\n\
 If an entry for a character is non-nil, the ascent value of the glyph\n\
-is assumed to be what specified by _MULE_DEFAULT_ASCENT property of a font.");
+is assumed to be what specified by _MULE_DEFAULT_ASCENT property of a font.\n\
+\n\
+This affects how a composite character which contains\n\
+such a character is displayed on screen.");
+  Vuse_default_ascent = Qnil;
+
+  DEFVAR_LISP ("ignore-relative-composition", &Vignore_relative_composition,
+     "Char table of characters which is not composed relatively.\n\
+If an entry for a character is non-nil, a composite character\n\
+which contains that character is displayed so that\n\
+the glyph of that character is put without considering\n\
+an ascent and descent value of a previous character.");
   Vuse_default_ascent = Qnil;
 
-  DEFVAR_LISP ("alternative-fontname-alist", &Valternative_fontname_alist,
-     "Alist of fontname vs list of the alternative fontnames.\n\
+  DEFVAR_LISP ("alternate-fontname-alist", &Valternate_fontname_alist,
+     "Alist of fontname vs list of the alternate fontnames.\n\
 When a specified font name is not found, the corresponding\n\
-alternative fontnames (if any) are tried instead.");
-  Valternative_fontname_alist = Qnil;
+alternate fontnames (if any) are tried instead.");
+  Valternate_fontname_alist = Qnil;
 
   DEFVAR_LISP ("fontset-alias-alist", &Vfontset_alias_alist,
      "Alist of fontset names vs the aliases.");