src/main.c

changeset 87
d4d67105d4e1
parent 84
df47b7efb97d
equal deleted inserted replaced
86:f187e97f845e 87:d4d67105d4e1
110 "\nGeneral options\n" 110 "\nGeneral options\n"
111 " -c <PGN file> Continue the specified game\n" 111 " -c <PGN file> Continue the specified game\n"
112 " -h This help page\n" 112 " -h This help page\n"
113 " -p TCP port to use (default: 27015)\n" 113 " -p TCP port to use (default: 27015)\n"
114 " -U Disables unicode pieces\n" 114 " -U Disables unicode pieces\n"
115 // TODO: implement and activate feature
116 //" -S <PGN file> Compute and print statistics for the specified game\n"
117 " -v Print version information and exits\n" 115 " -v Print version information and exits\n"
118 "\nServer options\n" 116 "\nServer options\n"
119 " -a <time> Specifies the time to add after each move\n" 117 " -a <time> Specifies the time to add after each move\n"
120 " -b Server plays black pieces (default: white)\n" 118 " -b Server plays black pieces (default: white)\n"
121 " -r Distribute color randomly\n" 119 " -r Distribute color randomly\n"
152 150
153 return 0; 151 return 0;
154 } 152 }
155 153
156 static Settings default_settings() { 154 static Settings default_settings() {
157 Settings settings; 155 Settings settings = {0};
158 memset(&settings, 0, sizeof(Settings));
159 settings.gameinfo.servercolor = WHITE; 156 settings.gameinfo.servercolor = WHITE;
160 settings.port = "27015"; 157 settings.port = "27015";
161 settings.unicode = !!setlocale(LC_CTYPE, "C.UTF-8"); 158 settings.unicode = !!setlocale(LC_CTYPE, "C.UTF-8");
162 return settings; 159 return settings;
163 } 160 }

mercurial