Mercurial > hg > xemacs-beta
diff src/objects-tty.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 131b0175ea99 |
children | 8626e4521993 |
line wrap: on
line diff
--- a/src/objects-tty.c Mon Aug 13 09:54:24 2007 +0200 +++ b/src/objects-tty.c Mon Aug 13 09:55:28 2007 +0200 @@ -161,7 +161,7 @@ } /* Don't allocate the data until we're sure that we will succeed. */ - c->data = malloc_type (struct tty_color_instance_data); + c->data = xnew (struct tty_color_instance_data); COLOR_INSTANCE_TTY_SYMBOL (c) = name; return 1; @@ -239,7 +239,7 @@ } /* Don't allocate the data until we're sure that we will succeed. */ - f->data = malloc_type (struct tty_font_instance_data); + f->data = xnew (struct tty_font_instance_data); FONT_INSTANCE_TTY_CHARSET (f) = charset; #ifdef MULE if (CHARSETP (charset)) @@ -290,21 +290,20 @@ Bytecount offset, Bytecount length) { CONST Bufbyte *the_nonreloc = nonreloc; - + if (!the_nonreloc) the_nonreloc = XSTRING_DATA (reloc); fixup_internal_substring (nonreloc, reloc, offset, &length); the_nonreloc += offset; - + if (UNBOUNDP (charset)) return !memchr (the_nonreloc, '/', length); - the_nonreloc = memchr (the_nonreloc, '/', length); + the_nonreloc = (CONST Bufbyte *) memchr (the_nonreloc, '/', length); if (!the_nonreloc) return 0; the_nonreloc++; { - struct Lisp_String *s = - symbol_name (XSYMBOL (XCHARSET_NAME (charset))); + struct Lisp_String *s = symbol_name (XSYMBOL (XCHARSET_NAME (charset))); return !strcmp ((CONST char *) the_nonreloc, (CONST char *) string_data (s)); }