/* xfont.c -- X core font driver.
- Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
- Copyright (C) 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
#include <setjmp.h>
#include <X11/Xlib.h>
NULL, /* filter_properties */
};
-extern Lisp_Object QCname;
-
static Lisp_Object
xfont_get_cache (FRAME_PTR f)
{
return (dpyinfo->name_list_element);
}
-extern Lisp_Object Vface_alternative_font_registry_alist;
-
static int
compare_font_names (const void *name1, const void *name2)
{
- return xstrcasecmp (*(const unsigned char **) name1,
- *(const unsigned char **) name2);
+ return xstrcasecmp (*(const char **) name1,
+ *(const char **) name2);
}
/* Decode XLFD as iso-8859-1 into OUTPUT, and return the byte length
while (*p0)
{
c = *(unsigned char *) p0++;
- p1 += CHAR_STRING (c, p1);
+ p1 += CHAR_STRING (c, (unsigned char *) p1);
if (--len == 0)
break;
}
/* Re-usable vector to store characteristic font properites. */
static Lisp_Object xfont_scratch_props;
-extern Lisp_Object Qlatin;
-
/* Return a list of scripts supported by the font of FONTNAME whose
characteristic properties are in PROPS and whose encoding charset
is ENCODING. A caller must call BLOCK_INPUT in advance. */
return scripts;
}
-extern Lisp_Object Vscalable_fonts_allowed;
-
static Lisp_Object
-xfont_list_pattern (Display *display, char *pattern,
+xfont_list_pattern (Display *display, const char *pattern,
Lisp_Object registry, Lisp_Object script)
{
Lisp_Object list = Qnil;
script = Qnil;
}
}
-
+
BLOCK_INPUT;
x_catch_errors (display);
if (STRINGP (XCAR (alter))
&& ((r - name) + SBYTES (XCAR (alter))) < 256)
{
- strcpy (r, (char *) SDATA (XCAR (alter)));
+ strcpy (r, SSDATA (XCAR (alter)));
list = xfont_list_pattern (display, name, registry, script);
if (! NILP (list))
break;
char **names;
int num_fonts, i;
Lisp_Object list;
- char *last_family;
+ char *last_family IF_LINT (= 0);
int last_len;
BLOCK_INPUT;
return list;
}
-extern Lisp_Object QCavgwidth;
-
static Lisp_Object
xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
{
ASET (font_object, FONT_TYPE_INDEX, Qx);
if (STRINGP (fullname))
{
- font_parse_xlfd ((char *) SDATA (fullname), font_object);
+ font_parse_xlfd (SSDATA (fullname), font_object);
ASET (font_object, FONT_NAME_INDEX, fullname);
}
else
val = Ffont_get (font_object, QCavgwidth);
if (INTEGERP (val))
- font->average_width = XINT (val);
+ font->average_width = XINT (val) / 10;
if (font->average_width < 0)
font->average_width = - font->average_width;
if (font->average_width == 0
xfont_driver.type = Qx;
register_font_driver (&xfont_driver, NULL);
}
-
-/* arch-tag: 23c5f366-a5ee-44b7-a3b7-90d6da7fd749
- (do not change this comment) */