Changeset 1860 for trunk/dll/init.c
- Timestamp:
- Aug 22, 2015, 4:30:34 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r1859 r1860 78 78 14 Mar 09 GKY PCSZ strings moved to compile time initialization 79 79 14 Mar 09 GKY Prevent execution of UM_SHOWME while drive scan is occuring replaces check for 80 80 saved drive containers. 81 81 06 Jun 09 GKY Add option to show file system type or drive label in tree 82 82 28 Jun 09 GKY Added AddBackslashToPath() to remove repeatative code. … … 85 85 22 Jul 09 GKY Fix failure to restore the notebook setting for saving container states or not 86 86 12 Sep 09 GKY Change protectonly check to check for VKBD being loaded instead of starting 87 88 87 command.com. Prevents hang (at least until a Dos program is started) on a system 88 that has a broken MDOS install. 89 89 15 Nov 09 GKY Add more PCSZs 90 90 22 Nov 09 GKY Fix FindSwapperDat so the check for large file support actually occurs if the 91 91 fall back to config.sys is used to find it; use bstripcr to streamline code. 92 92 13 Dec 09 GKY Fixed separate paramenters. Please note that appname should be used in 93 94 95 96 93 profile calls for user settings that work and are setable in more than one 94 miniapp; FM3Str should be used for setting only relavent to FM/2 or that 95 aren't user settable; realappname should be used for setting applicable to 96 one or more miniapp but not to FM/2 97 97 17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR 98 98 CONSTANT * as CHAR *. 99 99 09 MAY 10 JBS Ticket 434: Make fDontSuggestAgain a "global" flag, not a per app flag 100 100 23 Oct 10 GKY Changes to populate and utilize a HELPTABLE for context specific help 101 101 20 Nov 10 GKY Rework scanning code to remove redundant scans, prevent double directory 102 103 102 entries in the tree container, fix related semaphore performance using 103 combination of event and mutex semaphores 104 104 20 Nov 10 GKY Check that pTmpDir IsValid and recreate if not found; Fixes hangs caused 105 105 by temp file creation failures. 106 106 03 Mar 11 SHL Try using FM3INI to create help instance if fm3.hlp not in current directory 107 107 06 Aug 11 GKY Fixed failure to initalize pFM2SaveDirectory if TEMP and TMP were not present 108 108 or invalid 109 109 22 Oct 11 GKY Thread notes dialog now reopens on startup if it was open on shutdown. 110 110 08 Jan 12 GKY Add support for changing PresParams in the notify status window 111 111 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 112 112 copy, move and delete operations 113 113 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 114 114 for delete of readonly files 115 115 09 Feb 14 GKY Fix separate parameters. Moved to general page renamed separate settings 116 116 for apps. 117 117 09 Feb 14 GKY Modified wipeallf to allow suppression of the readonly warning on delete 118 118 of temporary files 119 119 16 Feb 14 GKY Add "#" command line switch to workaround problem with blank command shell 120 121 120 started from fm2 after fm2 has been started with stdout and stderr 121 redirected to a file. 122 122 22 Feb 14 GKY Cleanup of readonly check code suppress spurious error on blocked directory 123 123 delete and eliminated the check on additional temp file deletes 124 124 23 Feb 14 JBS Ticket #515: Corrected a mis-coded call to strtol which was causing the traps 125 125 described in this ticket. (Also changed it to strtoul.) 126 126 01 Mar 14 JBS Ticket #524: Made "searchapath" thread-safe. Function names and signatures were changed. 127 127 So calls to these functions had to be changed. 128 128 02 Mar 14 GKY Fixed typo that reversed the function of the saymsg dialog g/bzip check. 129 130 129 Added option to suppress message regarding missing bzip2.exe 130 or gzip.exe on TAR.B/GZ archives. 131 131 30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents 132 132 a trap when FM2 is shutdown while directory containers are still populating 133 133 02 Aug 15 GKY Serialize local hard drive scanning to reduce drive thrashing continue to scan 134 134 all other drive types in separate threads. 135 135 12 Aug 15 JBS Ticket #522: Ensure no "highmem-unsafe" functions are called directly 136 136 Calls to unsafe Dos... functions have been changed to call the wrapped xDos... functions 137 137 19 Aug 15 SHL Delete obsoletes 138 20 Aug 15 SHL Support PCSZ_DOS...SEM 138 139 139 140 ***********************************************************************/ … … 336 337 PCSZ PCSZ_CM_ALLOCRECORD = "CM_ALLOCRECORD"; 337 338 PCSZ PCSZ_QUERYCNRINFO = "CM_QUERYCNRINFO"; 338 PCSZ PCSZ_DOSCREATEMUTEXSEM = "DosCreateMutexSem"; 339 PCSZ PCSZ_DOSCREATEEVENTSEM = "DosCreateEventSem"; 339 340 PCSZ PCSZ_DOSCREATEMUTEXSEM = "DosCreateMutexSem"; 341 PCSZ PCSZ_DOSREQUESTMUTEXSEM = "DosRequestMutexSem"; 342 PCSZ PCSZ_DOSRELEASEMUTEXSEM = "DosReleaseMutexSem"; 343 PCSZ PCSZ_DOSCREATEEVENTSEM = "DosCreateEventSem"; 344 PCSZ PCSZ_DOSWAITEVENTSEM = "DosWaitEventSem"; 345 PCSZ PCSZ_DOSPOSTEVENTSEM = "DosPostEventSem"; 346 PCSZ PCSZ_DOSRESETEVENTSEM = "DosResetEventSem"; 347 340 348 PCSZ PCSZ_DOSDUPHANDLE = "DosDupHandle"; 341 349 PCSZ PCSZ_DOSGETINFOBLOCKS = "DosGetInfoBlocks"; … … 812 820 FILE_SYSTEM | FILE_READONLY | FILE_HIDDEN | 813 821 FILE_ARCHIVED, 814 815 822 &ffb, sizeof(ffb), &num_matches, FIL_STANDARD)) { 823 do { 816 824 strcpy(enddir, ffb.achName); 817 825 p = strrchr(szTempName, '.'); 818 826 if (p) { 819 827 p++; 820 828 ul = strtoul(p, NULL, 16); 821 829 GetDosPgmName(ul, temp); 822 830 if (!strstr(temp, "FM/2") && … … 826 834 } 827 835 } 828 829 830 831 836 } 837 while (!DosFindNext(search_handle, 838 &ffb, sizeof(ffb), &num_matches)); 839 DosFindClose(search_handle); 832 840 } 833 841 if (fs3.attrFile & FILE_DIRECTORY) { … … 836 844 rc = DosCreateDir(szTempName, 0); 837 845 if (!rc) 838 839 840 846 pTmpDir = xstrdup(szTempName, pszSrcFile, __LINE__); // if writable 847 else 848 pTmpDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__); 841 849 } 842 850 } … … 925 933 CHAR szFullFilename[CCHMAXPATH]; 926 934 if (!SearchMultiplePathsForFile(profile, szFullFilename)) { 927 935 strcpy(inipath, szFullFilename); 928 936 } else { 929 937 strcpy(inipath, profile); 930 938 } 931 939 } //fixme the DosCopies probably fail if the INI isn't in the FM2 directory GKY 06 Aug 11 … … 936 944 if (rc) { 937 945 if (rc == ERROR_FILE_NOT_FOUND) { 938 946 DosCopy(PCSZ_FM3INIDOTBAK, PCSZ_FM3DOTINI, 0); 939 947 } 940 948 rc = DosQueryPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3)); 941 949 if (rc) 942 950 fWantFirstTimeInit = TRUE; 943 951 } 944 952 if (!fWantFirstTimeInit) { //Check the ini file header and restore from backup if corupted 945 953 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) { 946 947 948 949 950 951 952 953 954 saymsg(MB_ENTER,HWND_DESKTOP, GetPString(IDS_DEBUG_STRING), 955 GetPString(IDS_INIFAILURETEXT)); 956 DosCopy(PCSZ_FM3DOTINI, PCSZ_FM3INIDOTBAD, DCPY_EXISTING); 957 DosCopy(PCSZ_FM3INIDOTBAK, PCSZ_FM3DOTINI, DCPY_EXISTING); 958 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) { 959 DosCopy(PCSZ_FM3DOTINI, PCSZ_FM3INIDOTBAD2, DCPY_EXISTING); 960 fWantFirstTimeInit = TRUE; 961 } 954 962 } 955 963 } … … 959 967 fIniExisted = TRUE; 960 968 if (fs3.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) { 961 962 963 964 965 966 969 fs3.attrFile &= ~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM); 970 rc = xDosSetPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3), 0); 971 if (rc) { 972 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 973 GetPString(IDS_INIREADONLYTEXT), inipath); 974 } 967 975 } 968 976 } … … 1010 1018 hwndHelp = WinCreateHelpInstance(hab, &hini); 1011 1019 if (!hwndHelp) 1012 1013 1014 1020 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, 1021 "WinCreateHelpInstance failed for %s with error 0x%x", 1022 hini.pszHelpLibraryName, hini.ulReturnCode); 1015 1023 } 1016 1024 } … … 1174 1182 if (rc) { 1175 1183 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1176 1184 PCSZ_DOSCREATEMUTEXSEM); 1177 1185 } 1178 1186 rc = DosCreateMutexSem(NULL, &hmtxFM2Delete, 0L, FALSE); 1179 1187 if (rc) { 1180 1188 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1181 1189 PCSZ_DOSCREATEMUTEXSEM); 1182 1190 } 1183 1191 rc = DosCreateMutexSem(NULL, &hmtxFiltering, 0L, FALSE); 1184 1192 if (rc) { 1185 1193 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1186 1194 PCSZ_DOSCREATEMUTEXSEM); 1187 1195 } 1188 1196
Note:
See TracChangeset
for help on using the changeset viewer.