diff options
Diffstat (limited to 'src/FSWrap.c')
-rw-r--r-- | src/FSWrap.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/FSWrap.c b/src/FSWrap.c index 98e02de..d16068e 100644 --- a/src/FSWrap.c +++ b/src/FSWrap.c @@ -56,7 +56,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/FSWrap.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FSWrap.c,v 1.9 2003/11/17 22:20:06 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -67,13 +67,13 @@ from The Open Group. #define XMAXLIST 256 char ** -_XParseBaseFontNameList(str, num) - char *str; - int *num; +_XParseBaseFontNameList( + char *str, + int *num) { char *plist[XMAXLIST]; char **list; - char *ptr; + char *ptr, *psave; *num = 0; if (!str || !*str) { @@ -89,6 +89,7 @@ _XParseBaseFontNameList(str, num) } strcpy(ptr, str); + psave = ptr; /* somebody who specifies more than XMAXLIST basefontnames will lose */ while (*num < (sizeof plist / sizeof plist[0])) { char *back; @@ -112,7 +113,7 @@ _XParseBaseFontNameList(str, num) break; } if (!(list = (char **) Xmalloc((unsigned)sizeof(char *) * (*num + 1)))) { - Xfree(ptr); + Xfree(psave); return (char **)NULL; } memcpy((char *)list, (char *)plist, sizeof(char *) * (*num)); @@ -122,9 +123,9 @@ _XParseBaseFontNameList(str, num) } static char ** -copy_string_list(string_list, list_count) - char **string_list; - int list_count; +copy_string_list( + char **string_list, + int list_count) { char **string_list_ret, **list_src, **list_dst, *dst; int length, count; @@ -159,7 +160,6 @@ copy_string_list(string_list, list_count) return string_list_ret; } -#if NeedFunctionPrototypes XFontSet XCreateFontSet ( Display *dpy, @@ -167,16 +167,6 @@ XCreateFontSet ( char ***missing_charset_list, int *missing_charset_count, char **def_string) -#else -XFontSet -XCreateFontSet (dpy, base_font_name_list, missing_charset_list, - missing_charset_count, def_string) - Display *dpy; - char *base_font_name_list; - char ***missing_charset_list; - int *missing_charset_count; - char **def_string; -#endif { XOM om; XOC oc; |