# HG changeset patch # User Jason Rumney # Date 1022096148 0 # Node ID 84120e75baa003606f5469f0b81d4bdaaae5a3e2 # Parent f45806ed64796da5399d316045f901f35c122602 * w32fns.c (enumfont_t): Remove tail, make pattern a normal Lisp_Object. (enum_font_cb2, enum_font_maybe_add_to_list, w32_list_fonts): Use modified enumfont_t struct. * w32fns.c (Qhbar): New variable. (x_specified_cursor_type): Use it. diff -r f45806ed6479 -r 84120e75baa0 src/w32fns.c --- a/src/w32fns.c Wed May 22 09:40:48 2002 +0000 +++ b/src/w32fns.c Wed May 22 19:35:48 2002 +0000 @@ -201,7 +201,7 @@ Lisp_Object Qauto_raise; Lisp_Object Qauto_lower; -Lisp_Object Qbar; +Lisp_Object Qbar, Qhbar; Lisp_Object Qborder_color; Lisp_Object Qborder_width; Lisp_Object Qbox; @@ -2368,6 +2368,19 @@ type = BAR_CURSOR; *width = XINT (XCDR (arg)); } + else if (EQ (arg, Qhbar)) + { + type = HBAR_CURSOR; + *width = 2; + } + else if (CONSP (arg) + && EQ (XCAR (arg), Qhbar) + && INTEGERP (XCDR (arg)) + && XINT (XCDR (arg)) >= 0) + { + type = HBAR_CURSOR; + *width = XINT (XCDR (arg)); + } else if (NILP (arg)) type = NO_CURSOR; else @@ -7093,9 +7106,8 @@ int numFonts; LOGFONT logfont; XFontStruct *size_ref; - Lisp_Object *pattern; + Lisp_Object pattern; Lisp_Object list; - Lisp_Object *tail; } enumfont_t; @@ -7151,7 +7163,7 @@ /* Truetype fonts do not report their true metrics until loaded */ if (FontType != RASTER_FONTTYPE) { - if (!NILP (*(lpef->pattern))) + if (!NILP (lpef->pattern)) { /* Scalable fonts are as big as you want them to be. */ lplf->elfLogFont.lfHeight = lpef->logfont.lfHeight; @@ -7176,9 +7188,9 @@ lplf->elfLogFont.lfHeight = -lplf->elfLogFont.lfHeight; } - if (!NILP (*(lpef->pattern))) + if (!NILP (lpef->pattern)) { - charset = xlfd_charset_of_font (XSTRING(*(lpef->pattern))->data); + charset = xlfd_charset_of_font (XSTRING(lpef->pattern)->data); /* We already checked charsets above, but DEFAULT_CHARSET slipped through. So only allow exact matches for DEFAULT_CHARSET. */ @@ -7242,8 +7254,8 @@ if (!w32_to_x_font (logfont, buf, 100, match_charset)) return; - if (NILP (*(lpef->pattern)) - || w32_font_match (buf, XSTRING (*(lpef->pattern))->data)) + if (NILP (lpef->pattern) + || w32_font_match (buf, XSTRING (lpef->pattern)->data)) { /* Check if we already listed this font. This may happen if w32_enable_synthesized_fonts is non-nil, and there are real @@ -7251,8 +7263,8 @@ Lisp_Object font_name = build_string (buf); if (NILP (Fmember (font_name, lpef->list))) { - *lpef->tail = Fcons (Fcons (build_string (buf), width), Qnil); - lpef->tail = &(XCDR_AS_LVALUE (*lpef->tail)); + Lisp_Object entry = Fcons (font_name, width); + lpef->list = Fcons (entry, lpef->list); lpef->numFonts++; } } @@ -7397,10 +7409,8 @@ BLOCK_INPUT; /* At first, put PATTERN in the cache. */ - list = Qnil; - ef.pattern = &tpat; - ef.list = list; - ef.tail = &list; + ef.pattern = tpat; + ef.list = Qnil; ef.numFonts = 0; /* Use EnumFontFamiliesEx where it is available, as it knows @@ -7435,6 +7445,7 @@ } UNBLOCK_INPUT; + list = ef.list; /* Make a list of the fonts we got back. Store that in the font cache for the display. */ @@ -14812,6 +14823,8 @@ staticpro (&Qauto_lower); Qbar = intern ("bar"); staticpro (&Qbar); + Qhbar = intern ("hbar"); + staticpro (&Qhbar); Qborder_color = intern ("border-color"); staticpro (&Qborder_color); Qborder_width = intern ("border-width");