Mercurial > hg > xemacs-beta
comparison src/faces.c @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | bbff43aa5eb7 |
children | a86b2b5e0111 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
55 calling Ffind_face. */ | 55 calling Ffind_face. */ |
56 Lisp_Object Vdefault_face, Vmodeline_face, Vgui_element_face; | 56 Lisp_Object Vdefault_face, Vmodeline_face, Vgui_element_face; |
57 Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face; | 57 Lisp_Object Vleft_margin_face, Vright_margin_face, Vtext_cursor_face; |
58 Lisp_Object Vpointer_face, Vvertical_divider_face, Vtoolbar_face, Vwidget_face; | 58 Lisp_Object Vpointer_face, Vvertical_divider_face, Vtoolbar_face, Vwidget_face; |
59 | 59 |
60 /* Qdefault, Qhighlight defined in general.c */ | 60 /* Qdefault, Qhighlight, Qleft_margin, Qright_margin defined in general.c */ |
61 Lisp_Object Qmodeline, Qgui_element, Qleft_margin, Qright_margin, Qtext_cursor; | 61 Lisp_Object Qmodeline, Qgui_element, Qtext_cursor, Qvertical_divider; |
62 Lisp_Object Qvertical_divider; | |
63 | 62 |
64 /* In the old implementation Vface_list was a list of the face names, | 63 /* In the old implementation Vface_list was a list of the face names, |
65 not the faces themselves. We now distinguish between permanent and | 64 not the faces themselves. We now distinguish between permanent and |
66 temporary faces. Permanent faces are kept in a regular hash table, | 65 temporary faces. Permanent faces are kept in a regular hash table, |
67 temporary faces in a weak hash table. */ | 66 temporary faces in a weak hash table. */ |
71 Lisp_Object Vbuilt_in_face_specifiers; | 70 Lisp_Object Vbuilt_in_face_specifiers; |
72 | 71 |
73 | 72 |
74 | 73 |
75 static Lisp_Object | 74 static Lisp_Object |
76 mark_face (Lisp_Object obj, void (*markobj) (Lisp_Object)) | 75 mark_face (Lisp_Object obj) |
77 { | 76 { |
78 struct Lisp_Face *face = XFACE (obj); | 77 Lisp_Face *face = XFACE (obj); |
79 | 78 |
80 markobj (face->name); | 79 mark_object (face->name); |
81 markobj (face->doc_string); | 80 mark_object (face->doc_string); |
82 | 81 |
83 markobj (face->foreground); | 82 mark_object (face->foreground); |
84 markobj (face->background); | 83 mark_object (face->background); |
85 markobj (face->font); | 84 mark_object (face->font); |
86 markobj (face->display_table); | 85 mark_object (face->display_table); |
87 markobj (face->background_pixmap); | 86 mark_object (face->background_pixmap); |
88 markobj (face->underline); | 87 mark_object (face->underline); |
89 markobj (face->strikethru); | 88 mark_object (face->strikethru); |
90 markobj (face->highlight); | 89 mark_object (face->highlight); |
91 markobj (face->dim); | 90 mark_object (face->dim); |
92 markobj (face->blinking); | 91 mark_object (face->blinking); |
93 markobj (face->reverse); | 92 mark_object (face->reverse); |
94 | 93 |
95 markobj (face->charsets_warned_about); | 94 mark_object (face->charsets_warned_about); |
96 | 95 |
97 return face->plist; | 96 return face->plist; |
98 } | 97 } |
99 | 98 |
100 static void | 99 static void |
101 print_face (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) | 100 print_face (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) |
102 { | 101 { |
103 struct Lisp_Face *face = XFACE (obj); | 102 Lisp_Face *face = XFACE (obj); |
104 | 103 |
105 if (print_readably) | 104 if (print_readably) |
106 { | 105 { |
107 write_c_string ("#s(face name ", printcharfun); | 106 write_c_string ("#s(face name ", printcharfun); |
108 print_internal (face->name, printcharfun, 1); | 107 print_internal (face->name, printcharfun, 1); |
128 This isn't concerned with "unspecified" attributes, that's what | 127 This isn't concerned with "unspecified" attributes, that's what |
129 #'face-differs-from-default-p is for. */ | 128 #'face-differs-from-default-p is for. */ |
130 static int | 129 static int |
131 face_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) | 130 face_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) |
132 { | 131 { |
133 struct Lisp_Face *f1 = XFACE (obj1); | 132 Lisp_Face *f1 = XFACE (obj1); |
134 struct Lisp_Face *f2 = XFACE (obj2); | 133 Lisp_Face *f2 = XFACE (obj2); |
135 | 134 |
136 depth++; | 135 depth++; |
137 | 136 |
138 return | 137 return |
139 (internal_equal (f1->foreground, f2->foreground, depth) && | 138 (internal_equal (f1->foreground, f2->foreground, depth) && |
152 } | 151 } |
153 | 152 |
154 static unsigned long | 153 static unsigned long |
155 face_hash (Lisp_Object obj, int depth) | 154 face_hash (Lisp_Object obj, int depth) |
156 { | 155 { |
157 struct Lisp_Face *f = XFACE (obj); | 156 Lisp_Face *f = XFACE (obj); |
158 | 157 |
159 depth++; | 158 depth++; |
160 | 159 |
161 /* No need to hash all of the elements; that would take too long. | 160 /* No need to hash all of the elements; that would take too long. |
162 Just hash the most common ones. */ | 161 Just hash the most common ones. */ |
166 } | 165 } |
167 | 166 |
168 static Lisp_Object | 167 static Lisp_Object |
169 face_getprop (Lisp_Object obj, Lisp_Object prop) | 168 face_getprop (Lisp_Object obj, Lisp_Object prop) |
170 { | 169 { |
171 struct Lisp_Face *f = XFACE (obj); | 170 Lisp_Face *f = XFACE (obj); |
172 | 171 |
173 return | 172 return |
174 ((EQ (prop, Qforeground)) ? f->foreground : | 173 (EQ (prop, Qforeground) ? f->foreground : |
175 (EQ (prop, Qbackground)) ? f->background : | 174 EQ (prop, Qbackground) ? f->background : |
176 (EQ (prop, Qfont)) ? f->font : | 175 EQ (prop, Qfont) ? f->font : |
177 (EQ (prop, Qdisplay_table)) ? f->display_table : | 176 EQ (prop, Qdisplay_table) ? f->display_table : |
178 (EQ (prop, Qbackground_pixmap)) ? f->background_pixmap : | 177 EQ (prop, Qbackground_pixmap) ? f->background_pixmap : |
179 (EQ (prop, Qunderline)) ? f->underline : | 178 EQ (prop, Qunderline) ? f->underline : |
180 (EQ (prop, Qstrikethru)) ? f->strikethru : | 179 EQ (prop, Qstrikethru) ? f->strikethru : |
181 (EQ (prop, Qhighlight)) ? f->highlight : | 180 EQ (prop, Qhighlight) ? f->highlight : |
182 (EQ (prop, Qdim)) ? f->dim : | 181 EQ (prop, Qdim) ? f->dim : |
183 (EQ (prop, Qblinking)) ? f->blinking : | 182 EQ (prop, Qblinking) ? f->blinking : |
184 (EQ (prop, Qreverse)) ? f->reverse : | 183 EQ (prop, Qreverse) ? f->reverse : |
185 (EQ (prop, Qdoc_string)) ? f->doc_string : | 184 EQ (prop, Qdoc_string) ? f->doc_string : |
186 external_plist_get (&f->plist, prop, 0, ERROR_ME)); | 185 external_plist_get (&f->plist, prop, 0, ERROR_ME)); |
187 } | 186 } |
188 | 187 |
189 static int | 188 static int |
190 face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value) | 189 face_putprop (Lisp_Object obj, Lisp_Object prop, Lisp_Object value) |
191 { | 190 { |
192 struct Lisp_Face *f = XFACE (obj); | 191 Lisp_Face *f = XFACE (obj); |
193 | 192 |
194 if (EQ (prop, Qforeground) || | 193 if (EQ (prop, Qforeground) || |
195 EQ (prop, Qbackground) || | 194 EQ (prop, Qbackground) || |
196 EQ (prop, Qfont) || | 195 EQ (prop, Qfont) || |
197 EQ (prop, Qdisplay_table) || | 196 EQ (prop, Qdisplay_table) || |
217 } | 216 } |
218 | 217 |
219 static int | 218 static int |
220 face_remprop (Lisp_Object obj, Lisp_Object prop) | 219 face_remprop (Lisp_Object obj, Lisp_Object prop) |
221 { | 220 { |
222 struct Lisp_Face *f = XFACE (obj); | 221 Lisp_Face *f = XFACE (obj); |
223 | 222 |
224 if (EQ (prop, Qforeground) || | 223 if (EQ (prop, Qforeground) || |
225 EQ (prop, Qbackground) || | 224 EQ (prop, Qbackground) || |
226 EQ (prop, Qfont) || | 225 EQ (prop, Qfont) || |
227 EQ (prop, Qdisplay_table) || | 226 EQ (prop, Qdisplay_table) || |
244 } | 243 } |
245 | 244 |
246 static Lisp_Object | 245 static Lisp_Object |
247 face_plist (Lisp_Object obj) | 246 face_plist (Lisp_Object obj) |
248 { | 247 { |
249 struct Lisp_Face *face = XFACE (obj); | 248 Lisp_Face *face = XFACE (obj); |
250 Lisp_Object result = face->plist; | 249 Lisp_Object result = face->plist; |
251 | 250 |
252 result = cons3 (Qreverse, face->reverse, result); | 251 result = cons3 (Qreverse, face->reverse, result); |
253 result = cons3 (Qblinking, face->blinking, result); | 252 result = cons3 (Qblinking, face->blinking, result); |
254 result = cons3 (Qdim, face->dim, result); | 253 result = cons3 (Qdim, face->dim, result); |
262 result = cons3 (Qforeground, face->foreground, result); | 261 result = cons3 (Qforeground, face->foreground, result); |
263 | 262 |
264 return result; | 263 return result; |
265 } | 264 } |
266 | 265 |
266 static const struct lrecord_description face_description[] = { | |
267 { XD_LISP_OBJECT, offsetof (Lisp_Face, name) }, | |
268 { XD_LISP_OBJECT, offsetof (Lisp_Face, doc_string) }, | |
269 { XD_LISP_OBJECT, offsetof (Lisp_Face, foreground) }, | |
270 { XD_LISP_OBJECT, offsetof (Lisp_Face, background) }, | |
271 { XD_LISP_OBJECT, offsetof (Lisp_Face, font) }, | |
272 { XD_LISP_OBJECT, offsetof (Lisp_Face, display_table) }, | |
273 { XD_LISP_OBJECT, offsetof (Lisp_Face, background_pixmap) }, | |
274 { XD_LISP_OBJECT, offsetof (Lisp_Face, underline) }, | |
275 { XD_LISP_OBJECT, offsetof (Lisp_Face, strikethru) }, | |
276 { XD_LISP_OBJECT, offsetof (Lisp_Face, highlight) }, | |
277 { XD_LISP_OBJECT, offsetof (Lisp_Face, dim) }, | |
278 { XD_LISP_OBJECT, offsetof (Lisp_Face, blinking) }, | |
279 { XD_LISP_OBJECT, offsetof (Lisp_Face, reverse) }, | |
280 { XD_LISP_OBJECT, offsetof (Lisp_Face, plist) }, | |
281 { XD_LISP_OBJECT, offsetof (Lisp_Face, charsets_warned_about) }, | |
282 { XD_END } | |
283 }; | |
284 | |
267 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face, | 285 DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS ("face", face, |
268 mark_face, print_face, 0, face_equal, | 286 mark_face, print_face, 0, face_equal, |
269 face_hash, face_getprop, | 287 face_hash, face_description, face_getprop, |
270 face_putprop, face_remprop, | 288 face_putprop, face_remprop, |
271 face_plist, struct Lisp_Face); | 289 face_plist, Lisp_Face); |
272 | 290 |
273 /************************************************************************/ | 291 /************************************************************************/ |
274 /* face read syntax */ | 292 /* face read syntax */ |
275 /************************************************************************/ | 293 /************************************************************************/ |
276 | 294 |
332 /**************************************************************************** | 350 /**************************************************************************** |
333 * utility functions * | 351 * utility functions * |
334 ****************************************************************************/ | 352 ****************************************************************************/ |
335 | 353 |
336 static void | 354 static void |
337 reset_face (struct Lisp_Face *f) | 355 reset_face (Lisp_Face *f) |
338 { | 356 { |
339 f->name = Qnil; | 357 f->name = Qnil; |
340 f->doc_string = Qnil; | 358 f->doc_string = Qnil; |
341 f->dirty = 0; | 359 f->dirty = 0; |
342 f->foreground = Qnil; | 360 f->foreground = Qnil; |
352 f->reverse = Qnil; | 370 f->reverse = Qnil; |
353 f->plist = Qnil; | 371 f->plist = Qnil; |
354 f->charsets_warned_about = Qnil; | 372 f->charsets_warned_about = Qnil; |
355 } | 373 } |
356 | 374 |
357 static struct Lisp_Face * | 375 static Lisp_Face * |
358 allocate_face (void) | 376 allocate_face (void) |
359 { | 377 { |
360 struct Lisp_Face *result = | 378 Lisp_Face *result = alloc_lcrecord_type (Lisp_Face, &lrecord_face); |
361 alloc_lcrecord_type (struct Lisp_Face, lrecord_face); | |
362 | 379 |
363 reset_face (result); | 380 reset_face (result); |
364 return result; | 381 return result; |
365 } | 382 } |
366 | 383 |
477 | 494 |
478 UNGCPRO; | 495 UNGCPRO; |
479 } | 496 } |
480 | 497 |
481 static int | 498 static int |
482 update_face_inheritance_mapper (CONST void *hash_key, void *hash_contents, | 499 update_face_inheritance_mapper (const void *hash_key, void *hash_contents, |
483 void *face_inheritance_closure) | 500 void *face_inheritance_closure) |
484 { | 501 { |
485 Lisp_Object key, contents; | 502 Lisp_Object key, contents; |
486 struct face_inheritance_closure *fcl = | 503 struct face_inheritance_closure *fcl = |
487 (struct face_inheritance_closure *) face_inheritance_closure; | 504 (struct face_inheritance_closure *) face_inheritance_closure; |
751 If TEMPORARY is non-nil, this face will cease to exist if not in use. | 768 If TEMPORARY is non-nil, this face will cease to exist if not in use. |
752 */ | 769 */ |
753 (name, doc_string, temporary)) | 770 (name, doc_string, temporary)) |
754 { | 771 { |
755 /* This function can GC if initialized is non-zero */ | 772 /* This function can GC if initialized is non-zero */ |
756 struct Lisp_Face *f; | 773 Lisp_Face *f; |
757 Lisp_Object face; | 774 Lisp_Object face; |
758 | 775 |
759 CHECK_SYMBOL (name); | 776 CHECK_SYMBOL (name); |
760 if (!NILP (doc_string)) | 777 if (!NILP (doc_string)) |
761 CHECK_STRING (doc_string); | 778 CHECK_STRING (doc_string); |
979 */ | 996 */ |
980 | 997 |
981 /* mark for GC a dynarr of face cachels. */ | 998 /* mark for GC a dynarr of face cachels. */ |
982 | 999 |
983 void | 1000 void |
984 mark_face_cachels (face_cachel_dynarr *elements, | 1001 mark_face_cachels (face_cachel_dynarr *elements) |
985 void (*markobj) (Lisp_Object)) | |
986 { | 1002 { |
987 int elt; | 1003 int elt; |
988 | 1004 |
989 if (!elements) | 1005 if (!elements) |
990 return; | 1006 return; |
996 { | 1012 { |
997 int i; | 1013 int i; |
998 | 1014 |
999 for (i = 0; i < NUM_LEADING_BYTES; i++) | 1015 for (i = 0; i < NUM_LEADING_BYTES; i++) |
1000 if (!NILP (cachel->font[i]) && !UNBOUNDP (cachel->font[i])) | 1016 if (!NILP (cachel->font[i]) && !UNBOUNDP (cachel->font[i])) |
1001 markobj (cachel->font[i]); | 1017 mark_object (cachel->font[i]); |
1002 } | 1018 } |
1003 markobj (cachel->face); | 1019 mark_object (cachel->face); |
1004 markobj (cachel->foreground); | 1020 mark_object (cachel->foreground); |
1005 markobj (cachel->background); | 1021 mark_object (cachel->background); |
1006 markobj (cachel->display_table); | 1022 mark_object (cachel->display_table); |
1007 markobj (cachel->background_pixmap); | 1023 mark_object (cachel->background_pixmap); |
1008 } | 1024 } |
1009 } | 1025 } |
1010 | 1026 |
1011 /* ensure that the given cachel contains an updated font value for | 1027 /* ensure that the given cachel contains an updated font value for |
1012 the given charset. Return the updated font value. */ | 1028 the given charset. Return the updated font value. */ |
1120 { | 1136 { |
1121 if (charsets[i]) | 1137 if (charsets[i]) |
1122 { | 1138 { |
1123 Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE); | 1139 Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i + MIN_LEADING_BYTE); |
1124 Lisp_Object font_instance = FACE_CACHEL_FONT (cachel, charset); | 1140 Lisp_Object font_instance = FACE_CACHEL_FONT (cachel, charset); |
1125 struct Lisp_Font_Instance *fi = XFONT_INSTANCE (font_instance); | 1141 Lisp_Font_Instance *fi = XFONT_INSTANCE (font_instance); |
1126 | 1142 |
1127 assert (CHARSETP (charset)); | 1143 assert (CHARSETP (charset)); |
1128 assert (FONT_INSTANCEP (font_instance)); | 1144 assert (FONT_INSTANCEP (font_instance)); |
1129 | 1145 |
1130 if (fm->ascent < (int) fi->ascent) fm->ascent = (int) fi->ascent; | 1146 if (fm->ascent < (int) fi->ascent) fm->ascent = (int) fi->ascent; |
1672 or makes an already-existing face be exactly like another. | 1688 or makes an already-existing face be exactly like another. |
1673 LOCALE, TAG-SET, EXACT-P, and HOW-TO-ADD are as in `copy-specifier'. | 1689 LOCALE, TAG-SET, EXACT-P, and HOW-TO-ADD are as in `copy-specifier'. |
1674 */ | 1690 */ |
1675 (old_face, new_name, locale, tag_set, exact_p, how_to_add)) | 1691 (old_face, new_name, locale, tag_set, exact_p, how_to_add)) |
1676 { | 1692 { |
1677 struct Lisp_Face *fold, *fnew; | 1693 Lisp_Face *fold, *fnew; |
1678 Lisp_Object new_face = Qnil; | 1694 Lisp_Object new_face = Qnil; |
1679 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 1695 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
1680 | 1696 |
1681 old_face = Fget_face (old_face); | 1697 old_face = Fget_face (old_face); |
1682 | 1698 |
1734 | 1750 |
1735 | 1751 |
1736 void | 1752 void |
1737 syms_of_faces (void) | 1753 syms_of_faces (void) |
1738 { | 1754 { |
1739 /* Qdefault & Qwidget defined in general.c */ | 1755 /* Qdefault, Qwidget, Qleft_margin, Qright_margin defined in general.c */ |
1740 defsymbol (&Qmodeline, "modeline"); | 1756 defsymbol (&Qmodeline, "modeline"); |
1741 defsymbol (&Qgui_element, "gui-element"); | 1757 defsymbol (&Qgui_element, "gui-element"); |
1742 defsymbol (&Qleft_margin, "left-margin"); | |
1743 defsymbol (&Qright_margin, "right-margin"); | |
1744 defsymbol (&Qtext_cursor, "text-cursor"); | 1758 defsymbol (&Qtext_cursor, "text-cursor"); |
1745 defsymbol (&Qvertical_divider, "vertical-divider"); | 1759 defsymbol (&Qvertical_divider, "vertical-divider"); |
1746 | 1760 |
1747 DEFSUBR (Ffacep); | 1761 DEFSUBR (Ffacep); |
1748 DEFSUBR (Ffind_face); | 1762 DEFSUBR (Ffind_face); |
1825 syms[n++] = Qhighlight; | 1839 syms[n++] = Qhighlight; |
1826 syms[n++] = Qdim; | 1840 syms[n++] = Qdim; |
1827 syms[n++] = Qblinking; | 1841 syms[n++] = Qblinking; |
1828 syms[n++] = Qreverse; | 1842 syms[n++] = Qreverse; |
1829 | 1843 |
1830 Vbuilt_in_face_specifiers = pure_list (n, syms); | 1844 Vbuilt_in_face_specifiers = Flist (n, syms); |
1831 staticpro (&Vbuilt_in_face_specifiers); | 1845 staticpro (&Vbuilt_in_face_specifiers); |
1832 } | 1846 } |
1833 } | 1847 } |
1834 | 1848 |
1835 void | 1849 void |
1860 #ifdef HAVE_TTY | 1874 #ifdef HAVE_TTY |
1861 fg_fb = acons (list1 (Qtty), Fvector (0, 0), fg_fb); | 1875 fg_fb = acons (list1 (Qtty), Fvector (0, 0), fg_fb); |
1862 bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb); | 1876 bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb); |
1863 #endif | 1877 #endif |
1864 #ifdef HAVE_MS_WINDOWS | 1878 #ifdef HAVE_MS_WINDOWS |
1879 fg_fb = acons (list1 (Qmsprinter), build_string ("black"), fg_fb); | |
1880 bg_fb = acons (list1 (Qmsprinter), build_string ("white"), bg_fb); | |
1865 fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb); | 1881 fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb); |
1866 bg_fb = acons (list1 (Qmswindows), build_string ("white"), bg_fb); | 1882 bg_fb = acons (list1 (Qmswindows), build_string ("white"), bg_fb); |
1867 #endif | 1883 #endif |
1868 set_specifier_fallback (Fget (Vdefault_face, Qforeground, Qnil), fg_fb); | 1884 set_specifier_fallback (Fget (Vdefault_face, Qforeground, Qnil), fg_fb); |
1869 set_specifier_fallback (Fget (Vdefault_face, Qbackground, Qnil), bg_fb); | 1885 set_specifier_fallback (Fget (Vdefault_face, Qbackground, Qnil), bg_fb); |
1876 #ifdef HAVE_X_WINDOWS | 1892 #ifdef HAVE_X_WINDOWS |
1877 /* The same gory list from x-faces.el. | 1893 /* The same gory list from x-faces.el. |
1878 (#### Perhaps we should remove the stuff from x-faces.el | 1894 (#### Perhaps we should remove the stuff from x-faces.el |
1879 and only depend on this stuff here? That should work.) | 1895 and only depend on this stuff here? That should work.) |
1880 */ | 1896 */ |
1881 CONST char *fonts[] = | 1897 const char *fonts[] = |
1882 { | 1898 { |
1883 "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", | 1899 "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", |
1884 "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", | 1900 "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", |
1885 "-*-courier-*-r-*-*-*-120-*-*-*-*-iso8859-*", | 1901 "-*-courier-*-r-*-*-*-120-*-*-*-*-iso8859-*", |
1886 "-*-*-medium-r-*-*-*-120-*-*-m-*-iso8859-*", | 1902 "-*-*-medium-r-*-*-*-120-*-*-m-*-iso8859-*", |
1894 "-*-*-*-r-*-*-*-120-*-*-c-*-*-*", | 1910 "-*-*-*-r-*-*-*-120-*-*-c-*-*-*", |
1895 "-*-*-*-r-*-*-*-120-*-*-*-*-*-*", | 1911 "-*-*-*-r-*-*-*-120-*-*-*-*-*-*", |
1896 "-*-*-*-*-*-*-*-120-*-*-*-*-*-*", | 1912 "-*-*-*-*-*-*-*-120-*-*-*-*-*-*", |
1897 "*" | 1913 "*" |
1898 }; | 1914 }; |
1899 CONST char **fontptr; | 1915 const char **fontptr; |
1900 | 1916 |
1901 for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) | 1917 for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) |
1902 inst_list = Fcons (Fcons (list1 (Qx), build_string (*fontptr)), | 1918 inst_list = Fcons (Fcons (list1 (Qx), build_string (*fontptr)), |
1903 inst_list); | 1919 inst_list); |
1904 #endif /* HAVE_X_WINDOWS */ | 1920 #endif /* HAVE_X_WINDOWS */ |
1906 #ifdef HAVE_TTY | 1922 #ifdef HAVE_TTY |
1907 inst_list = Fcons (Fcons (list1 (Qtty), build_string ("normal")), | 1923 inst_list = Fcons (Fcons (list1 (Qtty), build_string ("normal")), |
1908 inst_list); | 1924 inst_list); |
1909 #endif /* HAVE_TTY */ | 1925 #endif /* HAVE_TTY */ |
1910 #ifdef HAVE_MS_WINDOWS | 1926 #ifdef HAVE_MS_WINDOWS |
1927 /* Fixedsys does not exist for printers */ | |
1928 inst_list = Fcons (Fcons (list1 (Qmsprinter), | |
1929 build_string ("Courier:Regular:10::Western")), inst_list); | |
1930 inst_list = Fcons (Fcons (list1 (Qmsprinter), | |
1931 build_string ("Courier New:Regular:10::Western")), inst_list); | |
1932 | |
1911 inst_list = Fcons (Fcons (list1 (Qmswindows), | 1933 inst_list = Fcons (Fcons (list1 (Qmswindows), |
1912 build_string ("Fixedsys:Regular:9::Western")), inst_list); | 1934 build_string ("Fixedsys:Regular:9::Western")), inst_list); |
1913 inst_list = Fcons (Fcons (list1 (Qmswindows), | 1935 inst_list = Fcons (Fcons (list1 (Qmswindows), |
1914 build_string ("Courier:Regular:10::Western")), inst_list); | 1936 build_string ("Courier:Regular:10::Western")), inst_list); |
1915 inst_list = Fcons (Fcons (list1 (Qmswindows), | 1937 inst_list = Fcons (Fcons (list1 (Qmswindows), |
1949 #ifdef HAVE_TTY | 1971 #ifdef HAVE_TTY |
1950 fg_fb = acons (list1 (Qtty), Fvector (0, 0), fg_fb); | 1972 fg_fb = acons (list1 (Qtty), Fvector (0, 0), fg_fb); |
1951 bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb); | 1973 bg_fb = acons (list1 (Qtty), Fvector (0, 0), bg_fb); |
1952 #endif | 1974 #endif |
1953 #ifdef HAVE_MS_WINDOWS | 1975 #ifdef HAVE_MS_WINDOWS |
1976 fg_fb = acons (list1 (Qmsprinter), build_string ("black"), fg_fb); | |
1977 bg_fb = acons (list1 (Qmsprinter), build_string ("white"), bg_fb); | |
1954 fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb); | 1978 fg_fb = acons (list1 (Qmswindows), build_string ("black"), fg_fb); |
1955 bg_fb = acons (list1 (Qmswindows), build_string ("Gray75"), bg_fb); | 1979 bg_fb = acons (list1 (Qmswindows), build_string ("Gray75"), bg_fb); |
1956 #endif | 1980 #endif |
1957 set_specifier_fallback (Fget (Vgui_element_face, Qforeground, Qnil), fg_fb); | 1981 set_specifier_fallback (Fget (Vgui_element_face, Qforeground, Qnil), fg_fb); |
1958 set_specifier_fallback (Fget (Vgui_element_face, Qbackground, Qnil), bg_fb); | 1982 set_specifier_fallback (Fget (Vgui_element_face, Qbackground, Qnil), bg_fb); |