From f37dda1a9dcf0e864d556b086809d3561806b9e3 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 12 Apr 2011 10:13:40 +0200 Subject: [PATCH] Fix saving of XBoard fonts with spaces in name SaveFontArg now prints quotes around the saved font string, so that the general option-argument parser doesnot stop at the first space it sees. --- xboard.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/xboard.c b/xboard.c index 452255e..d216fe8 100644 --- a/xboard.c +++ b/xboard.c @@ -1509,7 +1509,7 @@ SaveFontArg(FILE *f, ArgDescriptor *ad) break; } for(i=0; iargName, i, fontTable[n][i]); + fprintf(f, OPTCHAR "%s" SEPCHAR "\"size%d:%s\"\n", ad->argName, i, fontTable[n][i]); } void @@ -3062,7 +3062,6 @@ FindFont(pattern, targetPxlSize) char *def_string, *base_fnt_lst, strInt[3]; XFontSet fntSet; XFontStruct **fnt_list; - base_fnt_lst = calloc(1, strlen(pattern) + 3); snprintf(strInt, sizeof(strInt)/sizeof(strInt[0]), "%d", targetPxlSize); p = strstr(pattern, "--"); -- 1.7.0.4