aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
authorKen Raeburn1999-10-25 04:58:18 +0000
committerKen Raeburn1999-10-25 04:58:18 +0000
commit7539e11fca07e5837010aaae18eaaefc7e51cf52 (patch)
tree679815b93c740067026d3a86165a2433f71fbad6 /src/fontset.c
parent3a7093d84fa090b8f2458cef0376b81de4bd77ff (diff)
downloademacs-7539e11fca07e5837010aaae18eaaefc7e51cf52.tar.gz
emacs-7539e11fca07e5837010aaae18eaaefc7e51cf52.zip
more XCAR/XCDR/XFLOAT_DATA uses, to help isolete lisp engine
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 2a73ab2ccdc..7b602092610 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -218,24 +218,24 @@ fs_load_font (f, font_table, charset, fontname, fontset)
218 for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++) 218 for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
219 fontp->encoding[i] = 1; 219 fontp->encoding[i] = 1;
220 /* Then override them by a specification in Vfont_encoding_alist. */ 220 /* Then override them by a specification in Vfont_encoding_alist. */
221 for (list = Vfont_encoding_alist; CONSP (list); list = XCONS (list)->cdr) 221 for (list = Vfont_encoding_alist; CONSP (list); list = XCDR (list))
222 { 222 {
223 elt = XCONS (list)->car; 223 elt = XCAR (list);
224 if (CONSP (elt) 224 if (CONSP (elt)
225 && STRINGP (XCONS (elt)->car) && CONSP (XCONS (elt)->cdr) 225 && STRINGP (XCAR (elt)) && CONSP (XCDR (elt))
226 && (fast_c_string_match_ignore_case (XCONS (elt)->car, fontname) 226 && (fast_c_string_match_ignore_case (XCAR (elt), fontname)
227 >= 0)) 227 >= 0))
228 { 228 {
229 Lisp_Object tmp; 229 Lisp_Object tmp;
230 230
231 for (tmp = XCONS (elt)->cdr; CONSP (tmp); tmp = XCONS (tmp)->cdr) 231 for (tmp = XCDR (elt); CONSP (tmp); tmp = XCDR (tmp))
232 if (CONSP (XCONS (tmp)->car) 232 if (CONSP (XCAR (tmp))
233 && ((i = get_charset_id (XCONS (XCONS (tmp)->car)->car)) 233 && ((i = get_charset_id (XCAR (XCAR (tmp))))
234 >= 0) 234 >= 0)
235 && INTEGERP (XCONS (XCONS (tmp)->car)->cdr) 235 && INTEGERP (XCDR (XCAR (tmp)))
236 && XFASTINT (XCONS (XCONS (tmp)->car)->cdr) < 4) 236 && XFASTINT (XCDR (XCAR (tmp))) < 4)
237 fontp->encoding[i] 237 fontp->encoding[i]
238 = XFASTINT (XCONS (XCONS (tmp)->car)->cdr); 238 = XFASTINT (XCDR (XCAR (tmp)));
239 } 239 }
240 } 240 }
241 } 241 }
@@ -328,12 +328,12 @@ fs_register_fontset (f, fontset_info)
328 int i; 328 int i;
329 329
330 if (!CONSP (fontset_info) 330 if (!CONSP (fontset_info)
331 || !STRINGP (XCONS (fontset_info)->car) 331 || !STRINGP (XCAR (fontset_info))
332 || !CONSP (XCONS (fontset_info)->cdr)) 332 || !CONSP (XCDR (fontset_info)))
333 /* Invalid data in FONTSET_INFO. */ 333 /* Invalid data in FONTSET_INFO. */
334 return -1; 334 return -1;
335 335
336 name = XCONS (fontset_info)->car; 336 name = XCAR (fontset_info);
337 if ((fontset = fs_query_fontset (f, XSTRING (name)->data)) >= 0) 337 if ((fontset = fs_query_fontset (f, XSTRING (name)->data)) >= 0)
338 /* This fontset already exists on frame F. */ 338 /* This fontset already exists on frame F. */
339 return fontset; 339 return fontset;
@@ -351,21 +351,21 @@ fs_register_fontset (f, fontset_info)
351 fontsetp->font_indexes[i] = FONT_NOT_OPENED; 351 fontsetp->font_indexes[i] = FONT_NOT_OPENED;
352 } 352 }
353 353
354 for (fontlist = XCONS (fontset_info)->cdr; CONSP (fontlist); 354 for (fontlist = XCDR (fontset_info); CONSP (fontlist);
355 fontlist = XCONS (fontlist)->cdr) 355 fontlist = XCDR (fontlist))
356 { 356 {
357 Lisp_Object tem = Fcar (fontlist); 357 Lisp_Object tem = Fcar (fontlist);
358 int charset; 358 int charset;
359 359
360 if (CONSP (tem) 360 if (CONSP (tem)
361 && (charset = get_charset_id (XCONS (tem)->car)) >= 0 361 && (charset = get_charset_id (XCAR (tem))) >= 0
362 && STRINGP (XCONS (tem)->cdr)) 362 && STRINGP (XCDR (tem)))
363 { 363 {
364 fontsetp->fontname[charset] 364 fontsetp->fontname[charset]
365 = (char *) xmalloc (XSTRING (XCONS (tem)->cdr)->size + 1); 365 = (char *) xmalloc (XSTRING (XCDR (tem))->size + 1);
366 bcopy (XSTRING (XCONS (tem)->cdr)->data, 366 bcopy (XSTRING (XCDR (tem))->data,
367 fontsetp->fontname[charset], 367 fontsetp->fontname[charset],
368 XSTRING (XCONS (tem)->cdr)->size + 1); 368 XSTRING (XCDR (tem))->size + 1);
369 } 369 }
370 else 370 else
371 /* Broken or invalid data structure. */ 371 /* Broken or invalid data structure. */
@@ -400,8 +400,8 @@ fs_register_fontset (f, fontset_info)
400 the corresponding regular expression. */ 400 the corresponding regular expression. */
401static Lisp_Object Vcached_fontset_data; 401static Lisp_Object Vcached_fontset_data;
402 402
403#define CACHED_FONTSET_NAME (XSTRING (XCONS (Vcached_fontset_data)->car)->data) 403#define CACHED_FONTSET_NAME (XSTRING (XCAR (Vcached_fontset_data))->data)
404#define CACHED_FONTSET_REGEX (XCONS (Vcached_fontset_data)->cdr) 404#define CACHED_FONTSET_REGEX (XCDR (Vcached_fontset_data))
405 405
406/* If fontset name PATTERN contains any wild card, return regular 406/* If fontset name PATTERN contains any wild card, return regular
407 expression corresponding to PATTERN. */ 407 expression corresponding to PATTERN. */
@@ -473,9 +473,9 @@ If REGEXPP is non-nil, PATTERN is a regular expression.")
473 else 473 else
474 regexp = pattern; 474 regexp = pattern;
475 475
476 for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCONS (tem)->cdr) 476 for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
477 { 477 {
478 Lisp_Object fontset_name = XCONS (XCONS (tem)->car)->car; 478 Lisp_Object fontset_name = XCAR (XCAR (tem));
479 if (!NILP (regexp)) 479 if (!NILP (regexp))
480 { 480 {
481 if (fast_c_string_match_ignore_case (regexp, 481 if (fast_c_string_match_ignore_case (regexp,
@@ -574,14 +574,14 @@ FONTLIST is an alist of charsets vs corresponding font names.")
574 XSTRING (name)->data, XSTRING (fullname)->data); 574 XSTRING (name)->data, XSTRING (fullname)->data);
575 575
576 /* Check the validity of FONTLIST. */ 576 /* Check the validity of FONTLIST. */
577 for (tail = fontlist; CONSP (tail); tail = XCONS (tail)->cdr) 577 for (tail = fontlist; CONSP (tail); tail = XCDR (tail))
578 { 578 {
579 Lisp_Object tem = XCONS (tail)->car; 579 Lisp_Object tem = XCAR (tail);
580 int charset; 580 int charset;
581 581
582 if (!CONSP (tem) 582 if (!CONSP (tem)
583 || (charset = get_charset_id (XCONS (tem)->car)) < 0 583 || (charset = get_charset_id (XCAR (tem))) < 0
584 || !STRINGP (XCONS (tem)->cdr)) 584 || !STRINGP (XCDR (tem)))
585 error ("Elements of fontlist must be a cons of charset and font name"); 585 error ("Elements of fontlist must be a cons of charset and font name");
586 } 586 }
587 587
@@ -632,14 +632,14 @@ If FRAME is omitted or nil, all frames are affected.")
632 if (NILP (frame)) 632 if (NILP (frame))
633 { 633 {
634 Lisp_Object fontset_info = Fassoc (fullname, Vglobal_fontset_alist); 634 Lisp_Object fontset_info = Fassoc (fullname, Vglobal_fontset_alist);
635 Lisp_Object tem = Fassq (charset_symbol, XCONS (fontset_info)->cdr); 635 Lisp_Object tem = Fassq (charset_symbol, XCDR (fontset_info));
636 636
637 if (NILP (tem)) 637 if (NILP (tem))
638 XCONS (fontset_info)->cdr 638 XCDR (fontset_info)
639 = Fcons (Fcons (charset_symbol, fontname), 639 = Fcons (Fcons (charset_symbol, fontname),
640 XCONS (fontset_info)->cdr); 640 XCDR (fontset_info));
641 else 641 else
642 XCONS (tem)->cdr = fontname; 642 XCDR (tem) = fontname;
643 } 643 }
644 644
645 /* Then, update information in the specified frame or all existing 645 /* Then, update information in the specified frame or all existing
@@ -671,7 +671,7 @@ If FRAME is omitted or nil, all frames are affected.")
671 if (set_frame_fontset_func 671 if (set_frame_fontset_func
672 && !NILP (font_param) 672 && !NILP (font_param)
673 && !strcmp (XSTRING (fullname)->data, 673 && !strcmp (XSTRING (fullname)->data,
674 XSTRING (XCONS (font_param)->cdr)->data)) 674 XSTRING (XCDR (font_param))->data))
675 /* This fontset is the default fontset on frame TEM. 675 /* This fontset is the default fontset on frame TEM.
676 We may have to resize this frame because of new 676 We may have to resize this frame because of new
677 ASCII font. */ 677 ASCII font. */