Changeset 1395 for trunk/dll/init.c
- Timestamp:
- Feb 8, 2009, 2:48:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r1394 r1395 71 71 11 Jan 09 GKY Move strings that shouldn't be translated (font names etc) compile time variables 72 72 03 Feb 09 SHL Switch to STRINGTABLE 73 07 Feb 09 GKY Move repeated strings to PCSZs. 74 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale 75 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 73 76 74 77 ***********************************************************************/ … … 179 182 PFNWP PFNWPMLE; 180 183 CHAR ThousandsSeparator[2]; 184 CHAR DateSeparator[2]; 185 CHAR TimeSeparator[2]; 186 ULONG ulTimeFmt; 187 ULONG ulDateFmt; 181 188 BOOL fInitialDriveScan; 182 189 BOOL fAmAV2; … … 229 236 CHAR *LONGNAME; 230 237 CHAR *NullStr; 238 PCSZ PCSZ_WINCREATEWINDOW; 239 PCSZ PCSZ_INIQUERYPRFTEXT; 240 PCSZ PCSZ_FILLDIRQCURERRTEXT; 241 PCSZ PCSZ_STARDOTEXE; 242 PCSZ PCSZ_STARDOTINI; 243 PCSZ PCSZ_STARDOTLST; 231 244 CHAR *Settings; 232 245 CHAR SwapperDat[CCHMAXPATH]; … … 433 446 FNT_10SYSTEMVIO = "10.System VIO"; 434 447 FNT_8TIMESNEWROMAN = "8.Times New Roman"; 448 PCSZ_WINCREATEWINDOW = "WinCreateWindow"; 449 PCSZ_INIQUERYPRFTEXT = "PrfQueryProfile"; 450 PCSZ_FILLDIRQCURERRTEXT = "DosQCurDisk"; 451 PCSZ_STARDOTEXE = "*.EXE"; 452 PCSZ_STARDOTINI = "*.INI"; 453 PCSZ_STARDOTLST = "*.LST"; 435 454 WC_OBJECTWINDOW = "WC_OBJECTWINDOW"; 436 455 WC_BUBBLE = "WC_BUBBLE"; … … 534 553 FNT_10SYSTEMVIO = "10.System VIO"; 535 554 FNT_8TIMESNEWROMAN = "8.Times New Roman"; 555 PCSZ_WINCREATEWINDOW = "WinCreateWindow"; 556 PCSZ_INIQUERYPRFTEXT = "PrfQueryProfile"; 557 PCSZ_FILLDIRQCURERRTEXT = "DosQCurDisk"; 558 PCSZ_STARDOTEXE = "*.EXE"; 559 PCSZ_STARDOTINI = "*.INI"; 560 PCSZ_STARDOTLST = "*.LST"; 536 561 WC_OBJECTWINDOW = "WC_OBJECTWINDOW"; 537 562 WC_BUBBLE = "WC_BUBBLE"; … … 935 960 strcpy(inipath, profile); 936 961 DosError(FERR_DISABLEHARDERR); 937 962 // fixme to check for backup if ini not found GKY 1-30-09 938 963 rc = DosQueryPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3)); 939 964 if (rc) { … … 941 966 fWantFirstTimeInit = TRUE; 942 967 } 943 else { 968 else { //Check the ini file header and restore from backup if corupted 944 969 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) { 945 saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING, 946 "Check INI header failed will attempt to replace with backup \\ 947 if backup fails or not found will open with new ini"); 970 saymsg(MB_ENTER,HWND_DESKTOP, GetPString(IDS_DEBUG_STRING), 971 GetPString(IDS_INIFAILURETEXT)); 948 972 DosCopy("FM3.INI", "FM3INI.BAD", DCPY_EXISTING); 949 973 DosCopy("FM3INI.BAK", "FM3.INI", DCPY_EXISTING); … … 1227 1251 COUNTRYINFO CtryInfo = {0}; 1228 1252 1229 DosQueryCtryInfo(sizeof(CtryInfo), &Country, 1230 &CtryInfo, &ulInfoLen); 1231 *ThousandsSeparator = CtryInfo.szThousandsSeparator[0]; 1253 if (!DosQueryCtryInfo(sizeof(CtryInfo), &Country, &CtryInfo, &ulInfoLen)) { 1254 *ThousandsSeparator = CtryInfo.szThousandsSeparator[0]; 1255 strcpy(DateSeparator, CtryInfo.szDateSeparator); 1256 strcpy(TimeSeparator, CtryInfo.szTimeSeparator); 1257 ulDateFmt = CtryInfo.fsDateFmt; 1258 ulTimeFmt = CtryInfo.fsTimeFmt; 1259 //DbgMsg(pszSrcFile, __LINE__, "Date Fmt %x", ulDateFmt); 1260 } 1261 else { 1262 strcpy(ThousandsSeparator, ","); 1263 strcpy(DateSeparator, "/"); 1264 strcpy(TimeSeparator, ":"); 1265 ulDateFmt = 0; 1266 ulTimeFmt = 0; 1267 } 1232 1268 } 1233 1269 { // Check for the existance of various partitioning tools to set up menu items … … 1365 1401 PrfQueryProfileData(fmprof, FM3Str, "NoFinger", &fNoFinger, &size); 1366 1402 size = sizeof(BOOL); 1403 PrfQueryProfileData(fmprof, FM3Str, "AlertBeepOff", &fAlertBeepOff, &size); 1404 size = sizeof(BOOL); 1405 PrfQueryProfileData(fmprof, FM3Str, "ErrorBeepOff", &fErrorBeepOff, &size); 1406 size = sizeof(BOOL); 1367 1407 PrfQueryProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, &size); 1368 1408 size = sizeof(BOOL);
Note:
See TracChangeset
for help on using the changeset viewer.