comparison src/objects-tty.c @ 5125:b5df3737028a ben-lisp-object

merge
author Ben Wing <ben@xemacs.org>
date Wed, 24 Feb 2010 01:58:04 -0600
parents d1247f3cc363 d95c102a96d3
children 2a462149bd6a
comparison
equal deleted inserted replaced
5124:623d57b7fbe8 5125:b5df3737028a
1 /* TTY-specific Lisp objects. 1 /* TTY-specific Lisp objects.
2 Copyright (C) 1995 Board of Trustees, University of Illinois. 2 Copyright (C) 1995 Board of Trustees, University of Illinois.
3 Copyright (C) 1995, 1996, 2001, 2002 Ben Wing. 3 Copyright (C) 1995, 1996, 2001, 2002, 2010 Ben Wing.
4 4
5 This file is part of XEmacs. 5 This file is part of XEmacs.
6 6
7 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
223 static void 223 static void
224 tty_finalize_color_instance (Lisp_Color_Instance *UNUSED_IF_NEW_GC (c)) 224 tty_finalize_color_instance (Lisp_Color_Instance *UNUSED_IF_NEW_GC (c))
225 { 225 {
226 #ifndef NEW_GC 226 #ifndef NEW_GC
227 if (c->data) 227 if (c->data)
228 xfree (c->data, void *); 228 xfree (c->data);
229 #endif /* not NEW_GC */ 229 #endif /* not NEW_GC */
230 } 230 }
231 231
232 static int 232 static int
233 tty_color_instance_equal (Lisp_Color_Instance *c1, 233 tty_color_instance_equal (Lisp_Color_Instance *c1,
270 { 270 {
271 #ifdef MULE 271 #ifdef MULE
272 if (*str != '/') 272 if (*str != '/')
273 return 0; 273 return 0;
274 str++; 274 str++;
275 charset = Ffind_charset (intern_int (str)); 275 charset = Ffind_charset (intern_istring (str));
276 if (NILP (charset)) 276 if (NILP (charset))
277 return 0; 277 return 0;
278 #else 278 #else
279 return 0; 279 return 0;
280 #endif 280 #endif
318 static void 318 static void
319 tty_finalize_font_instance (Lisp_Font_Instance *UNUSED_IF_NEW_GC (f)) 319 tty_finalize_font_instance (Lisp_Font_Instance *UNUSED_IF_NEW_GC (f))
320 { 320 {
321 #ifndef NEW_GC 321 #ifndef NEW_GC
322 if (f->data) 322 if (f->data)
323 xfree (f->data, void *); 323 xfree (f->data);
324 #endif /* not NEW_GC */ 324 #endif /* not NEW_GC */
325 } 325 }
326 326
327 static Lisp_Object 327 static Lisp_Object
328 tty_font_list (Lisp_Object UNUSED (pattern), Lisp_Object UNUSED (device), 328 tty_font_list (Lisp_Object UNUSED (pattern), Lisp_Object UNUSED (device),
329 Lisp_Object UNUSED (maxnumber)) 329 Lisp_Object UNUSED (maxnumber))
330 { 330 {
331 return list1 (build_string ("normal")); 331 return list1 (build_ascstring ("normal"));
332 } 332 }
333 333
334 #ifdef MULE 334 #ifdef MULE
335 335
336 static int 336 static int
339 Bytecount offset, Bytecount length, 339 Bytecount offset, Bytecount length,
340 enum font_specifier_matchspec_stages stage) 340 enum font_specifier_matchspec_stages stage)
341 { 341 {
342 const Ibyte *the_nonreloc = nonreloc; 342 const Ibyte *the_nonreloc = nonreloc;
343 343
344 if (stage) 344 if (stage == STAGE_FINAL)
345 return 0; 345 return 0;
346 346
347 if (!the_nonreloc) 347 if (!the_nonreloc)
348 the_nonreloc = XSTRING_DATA (reloc); 348 the_nonreloc = XSTRING_DATA (reloc);
349 fixup_internal_substring (nonreloc, reloc, offset, &length); 349 fixup_internal_substring (nonreloc, reloc, offset, &length);
368 Lisp_Object charset, 368 Lisp_Object charset,
369 enum font_specifier_matchspec_stages stage) 369 enum font_specifier_matchspec_stages stage)
370 { 370 {
371 Ibyte *fontname = XSTRING_DATA (font); 371 Ibyte *fontname = XSTRING_DATA (font);
372 372
373 if (stage) 373 if (stage == STAGE_FINAL)
374 return Qnil; 374 return Qnil;
375 375
376 if (strchr ((const char *) fontname, '/')) 376 if (strchr ((const char *) fontname, '/'))
377 { 377 {
378 if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0, 378 if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0,
379 font, 0, -1, initial)) 379 font, 0, -1, STAGE_INITIAL))
380 return font; 380 return font;
381 return Qnil; 381 return Qnil;
382 } 382 }
383 383
384 if (NILP (charset)) 384 if (NILP (charset))
385 return font; 385 return font;
386 386
387 return concat3 (font, build_string ("/"), 387 return concat3 (font, build_ascstring ("/"),
388 Fsymbol_name (XCHARSET_NAME (charset))); 388 Fsymbol_name (XCHARSET_NAME (charset)));
389 } 389 }
390 390
391 #endif /* MULE */ 391 #endif /* MULE */
392 392