Changeset 1077 for trunk/dll/init.c
- Timestamp:
- Jul 18, 2008, 8:11:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r1076 r1077 44 44 29 Feb 08 GKY Refactor global command line variables to notebook.h 45 45 08 Mar 08 JBS Ticket 230: Replace prefixless INI keys for default directory containers with 46 46 keys using a "DirCnr." prefix 47 47 20 Apr 08 GKY Change default cmd line length to 1024 Ask once if user wants to reset it. 48 48 11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 49 50 49 all the details view settings (both the global variables and those in the 50 DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 51 51 16 JUL 08 GKY Use TMP directory for temp files 52 52 17 Jul 08 SHL Reduce code bulk in fUseTmp setup … … 81 81 #include "strutil.h" // GetPString 82 82 #include "fm3dll.h" 83 #include "notebook.h" 83 #include "notebook.h" // command line variables (editor etc) 84 84 #include "fortify.h" 85 85 … … 660 660 if (fs3.attrFile & FILE_DIRECTORY) { 661 661 // 17 Jul 08 SHL fixme to check writable someday 662 662 pTmpDir = xstrdup(env, pszSrcFile, __LINE__); 663 663 } 664 664 } 665 665 } 666 BldFullPathName(ArcTempRoot, env, fAmAV2 ? "$AV$ARC$" : "$FM$ARC$");666 BldFullPathName(ArcTempRoot, pTmpDir, fAmAV2 ? "$AV$ARC$" : "$FM$ARC$"); 667 667 668 668 /* initialize random number generator */ … … 731 731 else { 732 732 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) { 733 734 735 736 737 738 739 740 741 733 saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING, 734 "Check INI header failed will attempt to replace with backup \\ 735 if backup fails or not found will open with new ini"); 736 DosCopy("FM3.INI", "FM3INI.BAD", DCPY_EXISTING); 737 DosCopy("FM3INI.BAK", "FM3.INI", DCPY_EXISTING); 738 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) { 739 DosCopy("FM3.INI", "FM3INI2.BAD", DCPY_EXISTING); 740 fWantFirstTimeInit = TRUE; 741 } 742 742 } 743 743 if (!fWantFirstTimeInit) { 744 745 746 747 748 749 750 751 752 744 fIniExisted = TRUE; 745 if (fs3.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) { 746 fs3.attrFile &= ~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM); 747 rc = xDosSetPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3), 0); 748 if (rc) { 749 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 750 GetPString(IDS_INIREADONLYTEXT), inipath); 751 } 752 } 753 753 } 754 754 } … … 763 763 if (!fmprof) { 764 764 Win_Error(NULLHANDLE, NULLHANDLE, pszSrcFile, __LINE__, 765 765 "PrfOpenProfile"); 766 766 return FALSE; 767 767 } … … 1019 1019 if (!MaxComLineChecked) { 1020 1020 ret = saymsg(MB_YESNO, 1021 1022 1023 1021 HWND_DESKTOP, 1022 NullStr, 1023 GetPString(IDS_CHANGECMDLINELENGTHDEFAULT)); 1024 1024 if (ret == MBID_YES) 1025 1025 MaxComLineStrg = 1024; 1026 1026 MaxComLineChecked = TRUE; 1027 1027 PrfWriteProfileData(fmprof, appname, "MaxComLineChecked", &MaxComLineChecked, sizeof(BOOL)); … … 1525 1525 if (!DosRead(handle, buffer, l, &len) && len == l) { 1526 1526 if (!memcmp(signature, buffer, l)) 1527 1527 ret = TRUE; // Matched 1528 1528 } 1529 1529 }
Note:
See TracChangeset
for help on using the changeset viewer.