From 6a4ae36fae56e66f3fd0517a249db2bc4f7118f9 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 19 Jun 2011 16:18:15 +0200 Subject: [PATCH] Fix compile errors WinBoard The patch to make non-existing options non-fatal broke WinBoard. All calls to ExitArgError from it now supply a third argument TRUE to fix it. --- winboard/winboard.c | 8 ++++---- winboard/winboard.h | 2 +- winboard/woptions.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index 502e6c1..38c7c3f 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -1231,7 +1231,7 @@ ParseFontName(char *name, MyFontParams *mfp) q = strchr(p, ':'); if (q) { if (q - p >= sizeof(mfp->faceName)) - ExitArgError(_("Font name too long:"), name); + ExitArgError(_("Font name too long:"), name, TRUE); memcpy(mfp->faceName, p, q - p); mfp->faceName[q - p] = NULLCHAR; p = q + 1; @@ -1240,12 +1240,12 @@ ParseFontName(char *name, MyFontParams *mfp) while (*p && !isdigit(*p)) { *q++ = *p++; if (q - mfp->faceName >= sizeof(mfp->faceName)) - ExitArgError(_("Font name too long:"), name); + ExitArgError(_("Font name too long:"), name, TRUE); } while (q > mfp->faceName && q[-1] == ' ') q--; *q = NULLCHAR; } - if (!*p) ExitArgError(_("Font point size missing:"), name); + if (!*p) ExitArgError(_("Font point size missing:"), name, TRUE); mfp->pointSize = (float) atof(p); mfp->bold = (strchr(p, 'b') != NULL); mfp->italic = (strchr(p, 'i') != NULL); @@ -1351,7 +1351,7 @@ ParseBoardSize(void *addr, char *name) } bs++; } - ExitArgError(_("Unrecognized board size value"), name); + ExitArgError(_("Unrecognized board size value"), name, TRUE); } void diff --git a/winboard/winboard.h b/winboard/winboard.h index 3ac652c..e2e4182 100644 --- a/winboard/winboard.h +++ b/winboard/winboard.h @@ -132,7 +132,7 @@ VOID ParseFontName(char *name, MyFontParams *mfp); void InitComboStrings(HANDLE hwndCombo, char **cd); BOOLEAN MyLoadSound(MySound *ms); BOOLEAN MyPlaySound(MySound *ms); -VOID ExitArgError(char *msg, char *badArg); +VOID ExitArgError(char *msg, char *badArg, Boolean quit); void SaveSettings(char* name); BOOL BrowseForFolder( const char * title, char * path ); VOID TourneyPopup(); diff --git a/winboard/woptions.c b/winboard/woptions.c index 9aa820f..ceea3df 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -2133,7 +2133,7 @@ ParseCommSettings(char *arg, DCB *dcb) if (cd->label == NULL) goto cant_parse; return; cant_parse: - ExitArgError(_("Can't parse com port settings"), arg); + ExitArgError(_("Can't parse com port settings"), arg, TRUE); } -- 1.7.0.4