return result;\r
}\r
\r
+int\r
+IsMultiFormat(char *s)\r
+{\r
+ char *p = strchr(s, ':');\r
+ return p && p != s+1;\r
+}\r
+\r
LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
char buf[MAX_PATH];\r
/* Initialize the dialog items */\r
SetDlgItemText( hDlg, IDC_PolyglotDir, appData.polyglotDir );\r
SetDlgItemInt( hDlg, IDC_HashSize, appData.defaultHashSize, TRUE );\r
+ if(appData.defaultPathEGTB[0])\r
SetDlgItemText( hDlg, IDC_PathToEGTB, appData.defaultPathEGTB );\r
+ else\r
+ SetDlgItemText( hDlg, IDC_PathToEGTB, appData.egtFormats );\r
SetDlgItemInt( hDlg, IDC_SizeOfEGTB, appData.defaultCacheSizeEGTB, TRUE );\r
CheckDlgButton( hDlg, IDC_UseBook, (BOOL) appData.usePolyglotBook );\r
SetDlgItemText( hDlg, IDC_BookFile, appData.polyglotBook );\r
appData.defaultHashSize = GetDlgItemInt(hDlg, IDC_HashSize, NULL, FALSE );\r
appData.defaultCacheSizeEGTB = GetDlgItemInt(hDlg, IDC_SizeOfEGTB, NULL, FALSE );\r
GetDlgItemText( hDlg, IDC_PathToEGTB, buf, sizeof(buf) );\r
- appData.defaultPathEGTB = strdup(buf);\r
+ if(IsMultiFormat(buf)) {\r
+ ASSIGN(appData.egtFormats, buf);\r
+ } else {\r
+ ASSIGN(appData.defaultPathEGTB, buf);\r
+ }\r
GetDlgItemText( hDlg, IDC_BookFile, buf, sizeof(buf) );\r
appData.polyglotBook = strdup(buf);\r
appData.usePolyglotBook = (Boolean) IsDlgButtonChecked( hDlg, IDC_UseBook );\r