changeset 88982:d50b0a9ea97a

(fontset_add): Make the type `int'. (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
author Kenichi Handa <handa@m17n.org>
date Thu, 15 Aug 2002 02:27:50 +0000
parents 28fee7bb4dab
children 2d504d707ce6
files src/fontset.c
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontset.c	Thu Aug 15 02:27:11 2002 +0000
+++ b/src/fontset.c	Thu Aug 15 02:27:50 2002 +0000
@@ -229,13 +229,28 @@
 
 
 /* Prototype declarations for static functions.  */
+static int fontset_add P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
+			    Lisp_Object));
 static Lisp_Object make_fontset P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
-static int fontset_id_valid_p P_ ((int));
 static Lisp_Object fontset_pattern_regexp P_ ((Lisp_Object));
 static void accumulate_script_ranges P_ ((Lisp_Object, Lisp_Object,
 					  Lisp_Object));
 static Lisp_Object find_font_encoding P_ ((char *));
 
+#ifdef FONTSET_DEBUG
+
+/* Return 1 if ID is a valid fontset id, else return 0.  */
+
+static int
+fontset_id_valid_p (id)
+     int id;
+{
+  return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
+}
+
+#endif
+
+
 
 /********** MACROS AND FUNCTIONS TO HANDLE FONTSET **********/
 
@@ -340,7 +355,7 @@
 			    Fmake_vector (make_number (1), (elt)))	\
    : fontset_add ((fontset), (range), (elt), (add)))
 
-static void
+static int
 fontset_add (fontset, range, elt, add)
      Lisp_Object fontset, range, elt, add;
 {
@@ -368,6 +383,7 @@
     char_table_set_range (fontset, from, to1, elt1);    
     from = to1 + 1;
   } while (from < to);
+  return 0;
 }