Mercurial > hg > xemacs-beta
annotate src/objects-tty.c @ 5179:14fda1dbdb26
add memory usage info for specifiers
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-03-29 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (lisp_object_storage_size):
* alloc.c (Fobject_memory_usage):
* alloc.c (lisp_object_memory_usage_full):
Don't crash if passed a non-record object (int or char).
* alloc.c (tree_memory_usage_1):
* lrecord.h:
New function tree_memory_usage() to return the memory usage of
a tree of conses and/or vectors.
* lisp.h:
* lisp.h (PRIVATE_UNVERIFIED_LIST_LOOP_7):
Add SAFE_LIST_LOOP_* functions for looping over a list not known
to be correct or non-circular, but without signalling an error --
instead, just stop enumerating when an error detected.
* emacs.c (main_1):
* specifier.c:
* specifier.c (specifier_memory_usage):
* specifier.c (vars_of_specifier):
* symsinit.h:
Add memory usage info for specifiers.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 29 Mar 2010 22:47:55 -0500 |
parents | 6c6d78781d59 |
children |
rev | line source |
---|---|
428 | 1 /* TTY-specific Lisp objects. |
2 Copyright (C) 1995 Board of Trustees, University of Illinois. | |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4976
diff
changeset
|
3 Copyright (C) 1995, 1996, 2001, 2002, 2010 Ben Wing. |
428 | 4 |
5 This file is part of XEmacs. | |
6 | |
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 | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* Synched up with: Not in FSF. */ | |
23 | |
24 #include <config.h> | |
25 #include "lisp.h" | |
26 | |
872 | 27 #include "console-tty-impl.h" |
428 | 28 #include "insdel.h" |
872 | 29 #include "objects-tty-impl.h" |
428 | 30 #include "device.h" |
771 | 31 #include "charset.h" |
428 | 32 |
33 /* An alist mapping from color names to a cons of (FG-STRING, BG-STRING). */ | |
34 Lisp_Object Vtty_color_alist; | |
35 #if 0 /* This stuff doesn't quite work yet */ | |
36 Lisp_Object Vtty_dynamic_color_fg; | |
37 Lisp_Object Vtty_dynamic_color_bg; | |
38 #endif | |
39 | |
1204 | 40 static const struct memory_description tty_color_instance_data_description_1 [] = { |
41 { XD_LISP_OBJECT, offsetof (struct tty_color_instance_data, symbol) }, | |
42 { XD_END } | |
43 }; | |
44 | |
3092 | 45 #ifdef NEW_GC |
5118
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
46 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("tty-color-instance-data", |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
47 tty_color_instance_data, |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
48 0, tty_color_instance_data_description_1, |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
49 struct tty_color_instance_data); |
3092 | 50 #else /* not NEW_GC */ |
1204 | 51 const struct sized_memory_description tty_color_instance_data_description = { |
52 sizeof (struct tty_color_instance_data), tty_color_instance_data_description_1 | |
53 }; | |
3092 | 54 #endif /* not NEW_GC */ |
1204 | 55 |
56 static const struct memory_description tty_font_instance_data_description_1 [] = { | |
57 { XD_LISP_OBJECT, offsetof (struct tty_font_instance_data, charset) }, | |
58 { XD_END } | |
59 }; | |
60 | |
3092 | 61 #ifdef NEW_GC |
5118
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
62 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("tty-font-instance-data", |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
63 tty_font_instance_data, 0, |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
64 tty_font_instance_data_description_1, |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
65 struct tty_font_instance_data); |
3092 | 66 #else /* not NEW_GC */ |
1204 | 67 const struct sized_memory_description tty_font_instance_data_description = { |
68 sizeof (struct tty_font_instance_data), tty_font_instance_data_description_1 | |
69 }; | |
3092 | 70 #endif /* not NEW_GC */ |
1204 | 71 |
428 | 72 DEFUN ("register-tty-color", Fregister_tty_color, 3, 3, 0, /* |
73 Register COLOR as a recognized TTY color. | |
74 COLOR should be a string. | |
75 Strings FG-STRING and BG-STRING should specify the escape sequences to | |
76 set the foreground and background to the given color, respectively. | |
77 */ | |
78 (color, fg_string, bg_string)) | |
79 { | |
80 CHECK_STRING (color); | |
81 CHECK_STRING (fg_string); | |
82 CHECK_STRING (bg_string); | |
83 | |
84 color = Fintern (color, Qnil); | |
85 Vtty_color_alist = Fremassq (color, Vtty_color_alist); | |
86 Vtty_color_alist = Fcons (Fcons (color, Fcons (fg_string, bg_string)), | |
87 Vtty_color_alist); | |
88 | |
89 return Qnil; | |
90 } | |
91 | |
92 DEFUN ("unregister-tty-color", Funregister_tty_color, 1, 1, 0, /* | |
93 Unregister COLOR as a recognized TTY color. | |
94 */ | |
95 (color)) | |
96 { | |
97 CHECK_STRING (color); | |
98 | |
99 color = Fintern (color, Qnil); | |
100 Vtty_color_alist = Fremassq (color, Vtty_color_alist); | |
101 return Qnil; | |
102 } | |
103 | |
104 DEFUN ("find-tty-color", Ffind_tty_color, 1, 1, 0, /* | |
105 Look up COLOR in the list of registered TTY colors. | |
106 If it is found, return a list (FG-STRING BG-STRING) of the escape | |
107 sequences used to set the foreground and background to the color, respectively. | |
108 If it is not found, return nil. | |
109 */ | |
110 (color)) | |
111 { | |
112 Lisp_Object result; | |
113 | |
114 CHECK_STRING (color); | |
115 | |
116 result = Fassq (Fintern (color, Qnil), Vtty_color_alist); | |
117 if (!NILP (result)) | |
118 return list2 (Fcar (Fcdr (result)), Fcdr (Fcdr (result))); | |
119 else | |
120 return Qnil; | |
121 } | |
122 | |
2527 | 123 static Lisp_Object |
124 tty_color_list (void) | |
428 | 125 { |
126 Lisp_Object result = Qnil; | |
127 Lisp_Object rest; | |
128 | |
129 LIST_LOOP (rest, Vtty_color_alist) | |
130 { | |
131 result = Fcons (Fsymbol_name (XCAR (XCAR (rest))), result); | |
132 } | |
133 | |
134 return Fnreverse (result); | |
135 } | |
136 | |
137 #if 0 | |
138 | |
139 /* This approach is too simplistic. The problem is that the | |
140 dynamic color settings apply to *all* text in the default color, | |
141 not just the text output after the escape sequence has been given. */ | |
142 | |
143 DEFUN ("set-tty-dynamic-color-specs", Fset_tty_dynamic_color_specs, 2, 2, 0, /* | |
144 Set the dynamic color specifications for TTY's. | |
145 FG and BG should be either nil or vaguely printf-like strings, | |
146 where each occurrence of %s is replaced with the color name and each | |
147 occurrence of %% is replaced with a single % character. | |
148 */ | |
149 (fg, bg)) | |
150 { | |
151 if (!NILP (fg)) | |
152 CHECK_STRING (fg); | |
153 if (!NILP (bg)) | |
154 CHECK_STRING (bg); | |
155 | |
156 Vtty_dynamic_color_fg = fg; | |
157 Vtty_dynamic_color_bg = bg; | |
158 | |
159 return Qnil; | |
160 } | |
161 | |
162 DEFUN ("tty-dynamic-color-specs", Ftty_dynamic_color_specs, 0, 0, 0, /* | |
163 Return the dynamic color specifications for TTY's as a list of (FG BG). | |
164 See `set-tty-dynamic-color-specs'. | |
165 */ | |
166 ()) | |
167 { | |
168 return list2 (Vtty_dynamic_color_fg, Vtty_dynamic_color_bg); | |
169 } | |
170 | |
171 #endif /* 0 */ | |
172 | |
173 static int | |
440 | 174 tty_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name, |
2286 | 175 Lisp_Object UNUSED (device), |
176 Error_Behavior UNUSED (errb)) | |
428 | 177 { |
178 Lisp_Object result; | |
179 | |
180 name = Fintern (name, Qnil); | |
181 result = assq_no_quit (name, Vtty_color_alist); | |
182 | |
183 if (NILP (result)) | |
184 { | |
185 #if 0 | |
186 if (!STRINGP (Vtty_dynamic_color_fg) | |
187 && !STRINGP (Vtty_dynamic_color_bg)) | |
188 #endif | |
189 return 0; | |
190 } | |
191 | |
192 /* Don't allocate the data until we're sure that we will succeed. */ | |
3092 | 193 #ifdef NEW_GC |
5120
d1247f3cc363
latest work on lisp-object workspace;
Ben Wing <ben@xemacs.org>
parents:
5118
diff
changeset
|
194 c->data = |
5127
a9c41067dd88
more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents:
5126
diff
changeset
|
195 XTTY_COLOR_INSTANCE_DATA (ALLOC_NORMAL_LISP_OBJECT (tty_color_instance_data)); |
3092 | 196 #else /* not NEW_GC */ |
428 | 197 c->data = xnew (struct tty_color_instance_data); |
3092 | 198 #endif /* not NEW_GC */ |
428 | 199 COLOR_INSTANCE_TTY_SYMBOL (c) = name; |
200 | |
201 return 1; | |
202 } | |
203 | |
204 static void | |
440 | 205 tty_mark_color_instance (Lisp_Color_Instance *c) |
428 | 206 { |
207 mark_object (COLOR_INSTANCE_TTY_SYMBOL (c)); | |
208 } | |
209 | |
210 static void | |
2286 | 211 tty_print_color_instance (Lisp_Color_Instance *UNUSED (c), |
212 Lisp_Object UNUSED (printcharfun), | |
213 int UNUSED (escapeflag)) | |
428 | 214 { |
215 } | |
216 | |
217 static void | |
4710
3a87551bfeb5
Fixes for a number of minor warnings issued by gcc. See xemacs-patches message
Jerry James <james@xemacs.org>
parents:
4353
diff
changeset
|
218 tty_finalize_color_instance (Lisp_Color_Instance *UNUSED_IF_NEW_GC (c)) |
428 | 219 { |
4141 | 220 #ifndef NEW_GC |
428 | 221 if (c->data) |
5169
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
222 { |
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
223 xfree (c->data); |
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
224 c->data = 0; |
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
225 } |
4141 | 226 #endif /* not NEW_GC */ |
4117 | 227 } |
428 | 228 |
229 static int | |
440 | 230 tty_color_instance_equal (Lisp_Color_Instance *c1, |
231 Lisp_Color_Instance *c2, | |
2286 | 232 int UNUSED (depth)) |
428 | 233 { |
234 return (EQ (COLOR_INSTANCE_TTY_SYMBOL (c1), | |
235 COLOR_INSTANCE_TTY_SYMBOL (c2))); | |
236 } | |
237 | |
2515 | 238 static Hashcode |
2286 | 239 tty_color_instance_hash (Lisp_Color_Instance *c, int UNUSED (depth)) |
428 | 240 { |
241 return LISP_HASH (COLOR_INSTANCE_TTY_SYMBOL (c)); | |
242 } | |
243 | |
244 static int | |
2286 | 245 tty_valid_color_name_p (struct device *UNUSED (d), Lisp_Object color) |
428 | 246 { |
247 return (!NILP (assoc_no_quit (Fintern (color, Qnil), Vtty_color_alist))); | |
248 #if 0 | |
249 || STRINGP (Vtty_dynamic_color_fg) | |
250 || STRINGP (Vtty_dynamic_color_bg) | |
251 #endif | |
252 } | |
253 | |
254 | |
255 static int | |
440 | 256 tty_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, |
2286 | 257 Lisp_Object UNUSED (device), |
258 Error_Behavior UNUSED (errb)) | |
428 | 259 { |
867 | 260 Ibyte *str = XSTRING_DATA (name); |
428 | 261 Lisp_Object charset = Qnil; |
262 | |
2367 | 263 if (qxestrncmp_ascii (str, "normal", 6)) |
428 | 264 return 0; |
265 str += 6; | |
266 if (*str) | |
267 { | |
268 #ifdef MULE | |
269 if (*str != '/') | |
270 return 0; | |
271 str++; | |
4953
304aebb79cd3
function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents:
4952
diff
changeset
|
272 charset = Ffind_charset (intern_istring (str)); |
428 | 273 if (NILP (charset)) |
274 return 0; | |
275 #else | |
276 return 0; | |
277 #endif | |
278 } | |
279 | |
280 /* Don't allocate the data until we're sure that we will succeed. */ | |
3092 | 281 #ifdef NEW_GC |
5120
d1247f3cc363
latest work on lisp-object workspace;
Ben Wing <ben@xemacs.org>
parents:
5118
diff
changeset
|
282 f->data = |
5127
a9c41067dd88
more cleanups, terminology clarification, lots of doc work
Ben Wing <ben@xemacs.org>
parents:
5126
diff
changeset
|
283 XTTY_FONT_INSTANCE_DATA (ALLOC_NORMAL_LISP_OBJECT (tty_font_instance_data)); |
3092 | 284 #else /* not NEW_GC */ |
428 | 285 f->data = xnew (struct tty_font_instance_data); |
3092 | 286 #endif /* not NEW_GC */ |
428 | 287 FONT_INSTANCE_TTY_CHARSET (f) = charset; |
288 #ifdef MULE | |
289 if (CHARSETP (charset)) | |
290 f->width = XCHARSET_COLUMNS (charset); | |
291 else | |
292 #endif | |
293 f->width = 1; | |
294 | |
295 f->proportional_p = 0; | |
296 f->ascent = f->height = 1; | |
297 f->descent = 0; | |
298 | |
299 return 1; | |
300 } | |
301 | |
302 static void | |
440 | 303 tty_mark_font_instance (Lisp_Font_Instance *f) |
428 | 304 { |
305 mark_object (FONT_INSTANCE_TTY_CHARSET (f)); | |
306 } | |
307 | |
308 static void | |
2286 | 309 tty_print_font_instance (Lisp_Font_Instance *UNUSED (f), |
310 Lisp_Object UNUSED (printcharfun), | |
311 int UNUSED (escapeflag)) | |
428 | 312 { |
313 } | |
314 | |
315 static void | |
4710
3a87551bfeb5
Fixes for a number of minor warnings issued by gcc. See xemacs-patches message
Jerry James <james@xemacs.org>
parents:
4353
diff
changeset
|
316 tty_finalize_font_instance (Lisp_Font_Instance *UNUSED_IF_NEW_GC (f)) |
428 | 317 { |
4141 | 318 #ifndef NEW_GC |
428 | 319 if (f->data) |
5169
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
320 { |
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
321 xfree (f->data); |
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
322 f->data = 0; |
6c6d78781d59
cleanup of code related to xfree(), better KKCC backtrace capabilities, document XD_INLINE_LISP_OBJECT_BLOCK_PTR, fix some memory leaks, other code cleanup
Ben Wing <ben@xemacs.org>
parents:
5127
diff
changeset
|
323 } |
4141 | 324 #endif /* not NEW_GC */ |
4117 | 325 } |
428 | 326 |
327 static Lisp_Object | |
2527 | 328 tty_font_list (Lisp_Object UNUSED (pattern), Lisp_Object UNUSED (device), |
2286 | 329 Lisp_Object UNUSED (maxnumber)) |
428 | 330 { |
4952
19a72041c5ed
Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
331 return list1 (build_ascstring ("normal")); |
428 | 332 } |
333 | |
334 #ifdef MULE | |
335 | |
336 static int | |
2286 | 337 tty_font_spec_matches_charset (struct device *UNUSED (d), Lisp_Object charset, |
867 | 338 const Ibyte *nonreloc, Lisp_Object reloc, |
872 | 339 Bytecount offset, Bytecount length, |
3841 | 340 enum font_specifier_matchspec_stages stage) |
428 | 341 { |
867 | 342 const Ibyte *the_nonreloc = nonreloc; |
428 | 343 |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4976
diff
changeset
|
344 if (stage == STAGE_FINAL) |
872 | 345 return 0; |
346 | |
428 | 347 if (!the_nonreloc) |
348 the_nonreloc = XSTRING_DATA (reloc); | |
349 fixup_internal_substring (nonreloc, reloc, offset, &length); | |
350 the_nonreloc += offset; | |
351 | |
4353
4143b78d0df0
Merge an old patch of Ben's, involving font instantiation and charsets.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4141
diff
changeset
|
352 if (NILP (charset)) |
428 | 353 return !memchr (the_nonreloc, '/', length); |
867 | 354 the_nonreloc = (const Ibyte *) memchr (the_nonreloc, '/', length); |
428 | 355 if (!the_nonreloc) |
356 return 0; | |
357 the_nonreloc++; | |
358 { | |
793 | 359 Lisp_Object s = symbol_name (XSYMBOL (XCHARSET_NAME (charset))); |
360 return !qxestrcmp (the_nonreloc, XSTRING_DATA (s)); | |
428 | 361 } |
362 } | |
363 | |
364 /* find a font spec that matches font spec FONT and also matches | |
365 (the registry of) CHARSET. */ | |
366 static Lisp_Object | |
367 tty_find_charset_font (Lisp_Object device, Lisp_Object font, | |
3659 | 368 Lisp_Object charset, |
369 enum font_specifier_matchspec_stages stage) | |
428 | 370 { |
867 | 371 Ibyte *fontname = XSTRING_DATA (font); |
428 | 372 |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4976
diff
changeset
|
373 if (stage == STAGE_FINAL) |
872 | 374 return Qnil; |
375 | |
442 | 376 if (strchr ((const char *) fontname, '/')) |
428 | 377 { |
378 if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0, | |
5015
d95c102a96d3
cleanups for specifier font stages, from ben-unicode-internal (preparation for eliminating shadowed warnings)
Ben Wing <ben@xemacs.org>
parents:
4976
diff
changeset
|
379 font, 0, -1, STAGE_INITIAL)) |
428 | 380 return font; |
381 return Qnil; | |
382 } | |
383 | |
4353
4143b78d0df0
Merge an old patch of Ben's, involving font instantiation and charsets.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4141
diff
changeset
|
384 if (NILP (charset)) |
428 | 385 return font; |
386 | |
4952
19a72041c5ed
Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
387 return concat3 (font, build_ascstring ("/"), |
428 | 388 Fsymbol_name (XCHARSET_NAME (charset))); |
389 } | |
390 | |
391 #endif /* MULE */ | |
392 | |
393 | |
394 /************************************************************************/ | |
395 /* initialization */ | |
396 /************************************************************************/ | |
397 | |
398 void | |
399 syms_of_objects_tty (void) | |
400 { | |
3092 | 401 #ifdef NEW_GC |
5118
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
402 INIT_LISP_OBJECT (tty_color_instance_data); |
e0db3c197671
merge up to latest default branch, doesn't compile yet
Ben Wing <ben@xemacs.org>
parents:
4710
diff
changeset
|
403 INIT_LISP_OBJECT (tty_font_instance_data); |
3092 | 404 #endif /* NEW_GC */ |
405 | |
428 | 406 DEFSUBR (Fregister_tty_color); |
407 DEFSUBR (Funregister_tty_color); | |
408 DEFSUBR (Ffind_tty_color); | |
409 #if 0 | |
410 DEFSUBR (Fset_tty_dynamic_color_specs); | |
411 DEFSUBR (Ftty_dynamic_color_specs); | |
412 #endif | |
413 } | |
414 | |
415 void | |
416 console_type_create_objects_tty (void) | |
417 { | |
418 /* object methods */ | |
419 CONSOLE_HAS_METHOD (tty, initialize_color_instance); | |
420 CONSOLE_HAS_METHOD (tty, mark_color_instance); | |
421 CONSOLE_HAS_METHOD (tty, print_color_instance); | |
422 CONSOLE_HAS_METHOD (tty, finalize_color_instance); | |
423 CONSOLE_HAS_METHOD (tty, color_instance_equal); | |
424 CONSOLE_HAS_METHOD (tty, color_instance_hash); | |
425 CONSOLE_HAS_METHOD (tty, valid_color_name_p); | |
2527 | 426 CONSOLE_HAS_METHOD (tty, color_list); |
428 | 427 |
428 CONSOLE_HAS_METHOD (tty, initialize_font_instance); | |
429 CONSOLE_HAS_METHOD (tty, mark_font_instance); | |
430 CONSOLE_HAS_METHOD (tty, print_font_instance); | |
431 CONSOLE_HAS_METHOD (tty, finalize_font_instance); | |
2527 | 432 CONSOLE_HAS_METHOD (tty, font_list); |
428 | 433 #ifdef MULE |
434 CONSOLE_HAS_METHOD (tty, font_spec_matches_charset); | |
435 CONSOLE_HAS_METHOD (tty, find_charset_font); | |
436 #endif | |
437 } | |
438 | |
439 void | |
440 vars_of_objects_tty (void) | |
441 { | |
442 staticpro (&Vtty_color_alist); | |
443 Vtty_color_alist = Qnil; | |
444 | |
445 #if 0 | |
446 staticpro (&Vtty_dynamic_color_fg); | |
447 Vtty_dynamic_color_fg = Qnil; | |
448 | |
449 staticpro (&Vtty_dynamic_color_bg); | |
450 Vtty_dynamic_color_bg = Qnil; | |
451 #endif | |
452 } |