Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / src / objects-tty.c
index 513349d..ea76e6f 100644 (file)
@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA.  */
 #include "objects-tty.h"
 #ifdef MULE
 #include "device.h"
 #include "objects-tty.h"
 #ifdef MULE
 #include "device.h"
-#include "mule-charset.h"
+#include "character.h"
 #endif
 
 /* An alist mapping from color names to a cons of (FG-STRING, BG-STRING). */
 #endif
 
 /* An alist mapping from color names to a cons of (FG-STRING, BG-STRING). */
@@ -143,7 +143,7 @@ See `set-tty-dynamic-color-specs'.
 #endif /* 0 */
 
 static int
 #endif /* 0 */
 
 static int
-tty_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
+tty_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
                               Lisp_Object device, Error_behavior errb)
 {
   Lisp_Object result;
                               Lisp_Object device, Error_behavior errb)
 {
   Lisp_Object result;
@@ -168,29 +168,28 @@ tty_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
 }
 
 static void
 }
 
 static void
-tty_mark_color_instance (struct Lisp_Color_Instance *c,
-                        void (*markobj) (Lisp_Object))
+tty_mark_color_instance (Lisp_Color_Instance *c)
 {
 {
-  ((markobj) (COLOR_INSTANCE_TTY_SYMBOL (c)));
+  mark_object (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
 
 static void
 }
 
 static void
-tty_print_color_instance (struct Lisp_Color_Instance *c,
+tty_print_color_instance (Lisp_Color_Instance *c,
                          Lisp_Object printcharfun,
                          int escapeflag)
 {
 }
 
 static void
                          Lisp_Object printcharfun,
                          int escapeflag)
 {
 }
 
 static void
-tty_finalize_color_instance (struct Lisp_Color_Instance *c)
+tty_finalize_color_instance (Lisp_Color_Instance *c)
 {
   if (c->data)
     xfree (c->data);
 }
 
 static int
 {
   if (c->data)
     xfree (c->data);
 }
 
 static int
-tty_color_instance_equal (struct Lisp_Color_Instance *c1,
-                         struct Lisp_Color_Instance *c2,
+tty_color_instance_equal (Lisp_Color_Instance *c1,
+                         Lisp_Color_Instance *c2,
                          int depth)
 {
   return (EQ (COLOR_INSTANCE_TTY_SYMBOL (c1),
                          int depth)
 {
   return (EQ (COLOR_INSTANCE_TTY_SYMBOL (c1),
@@ -198,7 +197,7 @@ tty_color_instance_equal (struct Lisp_Color_Instance *c1,
 }
 
 static unsigned long
 }
 
 static unsigned long
-tty_color_instance_hash (struct Lisp_Color_Instance *c, int depth)
+tty_color_instance_hash (Lisp_Color_Instance *c, int depth)
 {
   return LISP_HASH (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
 {
   return LISP_HASH (COLOR_INSTANCE_TTY_SYMBOL (c));
 }
@@ -215,13 +214,13 @@ tty_valid_color_name_p (struct device *d, Lisp_Object color)
 
 \f
 static int
 
 \f
 static int
-tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
+tty_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
                              Lisp_Object device, Error_behavior errb)
 {
   Bufbyte *str = XSTRING_DATA (name);
   Lisp_Object charset = Qnil;
 
                              Lisp_Object device, Error_behavior errb)
 {
   Bufbyte *str = XSTRING_DATA (name);
   Lisp_Object charset = Qnil;
 
-  if (strncmp ((CONST char *) str, "normal", 6))
+  if (strncmp ((const char *) str, "normal", 6))
     return 0;
   str += 6;
   if (*str)
     return 0;
   str += 6;
   if (*str)
@@ -230,7 +229,7 @@ tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
       if (*str != '/')
        return 0;
       str++;
       if (*str != '/')
        return 0;
       str++;
-      charset = Ffind_charset (intern ((CONST char *) str));
+      charset = Ffind_charset (intern ((const char *) str));
       if (NILP (charset))
        return 0;
 #else
       if (NILP (charset))
        return 0;
 #else
@@ -243,7 +242,7 @@ tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
   FONT_INSTANCE_TTY_CHARSET (f) = charset;
 #ifdef MULE
   if (CHARSETP (charset))
   FONT_INSTANCE_TTY_CHARSET (f) = charset;
 #ifdef MULE
   if (CHARSETP (charset))
-    f->width = XCHARSET_COLUMNS (charset);
+    f->width = CHARSET_COLUMNS (XCHARSET (charset));
   else
 #endif
     f->width = 1;
   else
 #endif
     f->width = 1;
@@ -256,21 +255,20 @@ tty_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name,
 }
 
 static void
 }
 
 static void
-tty_mark_font_instance (struct Lisp_Font_Instance *f,
-                       void (*markobj) (Lisp_Object))
+tty_mark_font_instance (Lisp_Font_Instance *f)
 {
 {
-  ((markobj) (FONT_INSTANCE_TTY_CHARSET (f)));
+  mark_object (FONT_INSTANCE_TTY_CHARSET (f));
 }
 
 static void
 }
 
 static void
-tty_print_font_instance (struct Lisp_Font_Instance *f,
+tty_print_font_instance (Lisp_Font_Instance *f,
                         Lisp_Object printcharfun,
                         int escapeflag)
 {
 }
 
 static void
                         Lisp_Object printcharfun,
                         int escapeflag)
 {
 }
 
 static void
-tty_finalize_font_instance (struct Lisp_Font_Instance *f)
+tty_finalize_font_instance (Lisp_Font_Instance *f)
 {
   if (f->data)
     xfree (f->data);
 {
   if (f->data)
     xfree (f->data);
@@ -286,10 +284,10 @@ tty_list_fonts (Lisp_Object pattern, Lisp_Object device)
 
 static int
 tty_font_spec_matches_charset (struct device *d, Lisp_Object charset,
 
 static int
 tty_font_spec_matches_charset (struct device *d, Lisp_Object charset,
-                              CONST Bufbyte *nonreloc, Lisp_Object reloc,
+                              const Bufbyte *nonreloc, Lisp_Object reloc,
                               Bytecount offset, Bytecount length)
 {
                               Bytecount offset, Bytecount length)
 {
-  CONST Bufbyte *the_nonreloc = nonreloc;
+  const Bufbyte *the_nonreloc = nonreloc;
 
   if (!the_nonreloc)
     the_nonreloc = XSTRING_DATA (reloc);
 
   if (!the_nonreloc)
     the_nonreloc = XSTRING_DATA (reloc);
@@ -298,14 +296,14 @@ tty_font_spec_matches_charset (struct device *d, Lisp_Object charset,
 
   if (UNBOUNDP (charset))
     return !memchr (the_nonreloc, '/', length);
 
   if (UNBOUNDP (charset))
     return !memchr (the_nonreloc, '/', length);
-  the_nonreloc = (CONST Bufbyte *) memchr (the_nonreloc, '/', length);
+  the_nonreloc = (const Bufbyte *) memchr (the_nonreloc, '/', length);
   if (!the_nonreloc)
     return 0;
   the_nonreloc++;
   {
   if (!the_nonreloc)
     return 0;
   the_nonreloc++;
   {
-    struct Lisp_String *s = symbol_name (XSYMBOL (XCHARSET_NAME (charset)));
-    return !strcmp ((CONST char *) the_nonreloc,
-                   (CONST char *) string_data (s));
+    Lisp_String *s = symbol_name (XSYMBOL (XCHARSET_NAME (charset)));
+    return !strcmp ((const char *) the_nonreloc,
+                   (const char *) string_data (s));
   }
 }
 
   }
 }
 
@@ -317,7 +315,7 @@ tty_find_charset_font (Lisp_Object device, Lisp_Object font,
 {
   Bufbyte *fontname = XSTRING_DATA (font);
 
 {
   Bufbyte *fontname = XSTRING_DATA (font);
 
-  if (strchr ((CONST char *) fontname, '/'))
+  if (strchr ((const char *) fontname, '/'))
     {
       if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0,
                                         font, 0, -1))
     {
       if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0,
                                         font, 0, -1))