// constants\r
\r
\r
-static const char * const Version = "1.4.39b";\r
+static const char * const Version = "1.4.41b";\r
static const char * const HelpMessage = "\\r
SYNTAX\n\\r
* polyglot [configfile] [-noini] [-ec engine] [-ed enginedirectory] [-en enginename] [-log] [-lf logfile] [-hash value] [-bk book] [-pg <name>=<value>]* [-uci <name>=<value>]*\n\\r
if(!f){\r
my_fatal("ini_create_pg(): Cannot open %s for writing.\n",filename);\r
}\r
+ fprintf(f,"; You may edit this file to set options for the\n"\r
+ "; UCI engine whose PolyGlot name is %s.\n"\r
+ "; You may also safely delete this file\n"\r
+ "; to restore the default options.\n",\r
+ option_get_string(Option,"EngineName"));\r
fprintf(f,"[PolyGlot]\n");\r
option_start_iter(pg_options);\r
while((opt=option_next(pg_options))){\r
- if(opt->mode & XBOARD){\r
+ if(!my_string_case_equal(opt->type,"button") && (opt->mode & XBOARD)){\r
snprintf(tmp,sizeof(tmp),"%s=%s\n",opt->name,opt->value);\r
tmp[sizeof(tmp)-1]='\0';\r
fprintf(f,"%s",tmp);\r
fprintf(f,"[Engine]\n");\r
option_start_iter(uci_options);\r
while((opt=option_next(uci_options))){\r
- snprintf(tmp,sizeof(tmp),"%s=%s\n",opt->name,opt->value);\r
- tmp[sizeof(tmp)-1]='\0';\r
- fprintf(f,"%s",tmp);\r
+ if(!my_string_case_equal(opt->type,"button")){\r
+ snprintf(tmp,sizeof(tmp),"%s=%s\n",opt->name,opt->value);\r
+ tmp[sizeof(tmp)-1]='\0';\r
+ fprintf(f,"%s",tmp);\r
+ }\r
}\r
fclose(f);\r
}\r
\r
if(my_string_equal(option_get_string(Option,"SaveFile"),"<empty>")){\r
char tmp[StringSize];\r
- snprintf(tmp,sizeof(tmp),"%s.ini",\r
+ snprintf(tmp,sizeof(tmp),"PG_%s.ini",\r
option_get_string(Option,"EngineName"));\r
tmp[sizeof(tmp)-1]='\0';\r
option_set(Option,"SaveFile",tmp);\r
}\r
// start if it was enabled in the SaveFile\r
\r
+ my_log_close();\r
if (option_get_bool(Option,"Log")) {\r
- my_log_close();\r
my_log_open(option_get_string(Option,"LogFile"));\r
}\r
// remind the user of the options that are now in effect\r