X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=c7b2a83266678531db00a7c31907194c69b57d93;hb=6ca7676cbc8e53c6d365339ba2fe270e46e9b543;hp=9533406408eafd4291d7a8c284519fdc6ab3a44f;hpb=4af4152da761b1cc91723fa60a6fdffd0c481a9f;p=xboard.git diff --git a/args.h b/args.h index 9533406..c7b2a83 100644 --- a/args.h +++ b/args.h @@ -907,7 +907,7 @@ ParseArgs(GetFunc get, void *cl) ch = get(cl); while (ch != '\n' && ch != NULLCHAR) ch = get(cl); continue; - } else if (ch == '/' || ch == '-') { + } else if (ch == SLASH || ch == '-') { /* Switch */ q = argName; while (ch != ' ' && ch != '=' && ch != ':' && ch != NULLCHAR && @@ -919,8 +919,10 @@ ParseArgs(GetFunc get, void *cl) for (ad = argDescriptors; ad->argName != NULL; ad++) if (strcmp(ad->argName, argName + 1) == 0) break; if (ad->argName == NULL) { + char endChar = (ch && ch != '\n' && (ch = get(cl)) == '{' ? '}' : '\n'); ExitArgError(_("Unrecognized argument %s"), argName, get != &FileGet); // [HGM] make unknown argument non-fatal - while (ch != '\n' && ch != NULLCHAR) ch = get(cl); // but skip rest of line it is on + while (ch != endChar && ch != NULLCHAR) ch = get(cl); // but skip rest of line it is on (or until closing '}' ) + if(ch == '}') ch = get(cl); continue; // so that when it is in a settings file, it is the only setting that will be purged from it } } else if (ch == '@') {