Changeset 1860
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/dll/flesh.c
r1858 r1860 82 82 static INT tidFleshWorkListThread = -1; // 2015-08-08 SHL 83 83 84 static CHAR chFleshFocusDrive; // 2015-08-16 SHL A..Z or 0 85 84 static PCSZ pszFleshFocusPath; // 2015-08-20 SHL 86 85 87 86 BOOL fNoFleshDbgMsg; // 2015-08-09 SHL FIXME to be gone … … 693 692 #endif 694 693 { 695 APIRET rc;696 697 694 PFLESHWORKITEM item = xmallocz(sizeof(FLESHWORKITEM), pszSrcFile, __LINE__); 698 695 item->hwndCnr = hwndCnr; … … 751 748 #endif 752 749 753 rc = DosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 754 if (rc) 755 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosRequestMutexSem"); 750 xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 756 751 757 752 // Delete stale requests … … 761 756 List2Append(&FleshWorkList, (PLIST2)item); 762 757 763 rc = DosReleaseMutexSem(hmtxFleshWork); 764 if (rc) 765 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosReleaseMutexSem"); 766 767 rc = DosPostEventSem(hevFleshWorkListChanged); 768 if (rc && rc != ERROR_ALREADY_POSTED) 769 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosPostEventSem"); 758 xDosReleaseMutexSem(hmtxFleshWork); 759 xDosPostEventSem(hevFleshWorkListChanged); 770 760 771 761 return TRUE; … … 785 775 * Check if pci pathname is parent of child path name 786 776 * @param data is child path name 787 * @return TRUE if is parent777 * @return TRUE if is work item path is parent of given path 788 778 */ 789 779 … … 792 782 UINT c; 793 783 if (!((PFLESHWORKITEM)item)->pci->pszFileName) { 794 Runtime_Error(pszSrcFile, __LINE__, " MatchesFocusDrivecalled with pci %p pszFileName (null) by %s:%u", ((PFLESHWORKITEM)item)->pci);784 Runtime_Error(pszSrcFile, __LINE__, "IsParentOfChildPath called with pci %p pszFileName (null) by %s:%u", ((PFLESHWORKITEM)item)->pci); 795 785 return FALSE; 796 786 } … … 806 796 807 797 #if 0 // 2015-08-03 SHL FIXME debug 808 VOID WaitFleshWorkListEmpty(PCSZ psz FileName)798 VOID WaitFleshWorkListEmpty(PCSZ pszDirName) 809 799 #else 810 VOID WaitFleshWorkListEmptyDbg(PCSZ psz FileName, PCSZ pszSrcFile_, UINT uSrcLineNo_)800 VOID WaitFleshWorkListEmptyDbg(PCSZ pszDirName, PCSZ pszSrcFile_, UINT uSrcLineNo_) 811 801 #endif 812 802 { … … 814 804 PFLESHWORKITEM item; 815 805 INT tid = GetTidForThread(); 816 CHAR chSavedFleshFocusDrive = chFleshFocusDrive; 806 BOOL pathSaved = FALSE; 807 PCSZ pszSavedFleshFocusPath; 817 808 818 809 if (tid == 1 || tid == tidFleshWorkListThread) { … … 849 840 return; 850 841 851 // Just wait for dependents if path name given 852 if (pszFileName) { 853 rc = DosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 854 if (rc) { 855 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosRequestMutexSem"); 856 continue; 842 // Just wait for dependents to be gone if path name given 843 if (pszDirName) { 844 rc = xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 845 if (rc) 846 continue; // Maybe should return ??? 847 848 if (!pathSaved) { 849 // Give priority to work items for parents of this path 850 pathSaved = TRUE; 851 pszSavedFleshFocusPath = pszFleshFocusPath; 852 pszFleshFocusPath = pszDirName; 857 853 } 858 854 859 chFleshFocusDrive = *pszFileName; // Give priority to work on this drive 860 861 item = (PFLESHWORKITEM)List2Search(&FleshWorkList, IsParentOfChildPath, (PVOID)pszFileName); 862 863 rc = DosReleaseMutexSem(hmtxFleshWork); 864 if (rc) 865 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosReleaseMutexSem"); 855 item = (PFLESHWORKITEM)List2Search(&FleshWorkList, IsParentOfChildPath, (PVOID)pszDirName); 856 857 xDosReleaseMutexSem(hmtxFleshWork); 866 858 867 859 if (!item) 868 860 break; // Dependents gone from work list 869 } 861 } // if pszDirName 862 870 863 DosSleep(250); 871 864 } // while 872 865 873 chFleshFocusDrive = chSavedFleshFocusDrive; // In case overridden 866 if (!pathSaved) { 867 xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 868 pszFleshFocusPath = pszSavedFleshFocusPath; 869 xDosReleaseMutexSem(hmtxFleshWork); 870 } 874 871 875 872 } … … 880 877 */ 881 878 882 VOID SetFleshFocusDrive(CHAR chDriveLetter) { 883 chFleshFocusDrive = chDriveLetter; 884 DbgMsg(pszSrcFile, __LINE__, "SetFleshFocusDrive focus drive set to %c", chFleshFocusDrive); // 2015-08-03 SHL FIXME debug 885 886 } 887 888 /** 889 * Check pci pathname matches focus drive 890 * @param data is uppercase drive letter mapped to PVOID 891 * @return TRUE if drive letter matches 892 */ 893 894 BOOL MatchesFocusDrive(PLIST2 item, PVOID data) 895 { 896 if (!((PFLESHWORKITEM)item)->pci->pszFileName) { 897 Runtime_Error(pszSrcFile, __LINE__, "MatchesFocusDrive called with pci %p pszFileName (null) by %s:%u", ((PFLESHWORKITEM)item)->pci); 898 return FALSE; 899 } 900 return ((PFLESHWORKITEM)item)->pci->pszFileName[0] == (CHAR)data; 879 VOID SetFleshFocusPath(PCSZ pszPath) { 880 PCSZ pszOld; 881 PCSZ pszNew = strdup(pszPath); 882 xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 883 pszOld = pszFleshFocusPath; 884 pszFleshFocusPath = pszNew; 885 xDosReleaseMutexSem(hmtxFleshWork); 886 if (pszOld) 887 xfree((PVOID)pszOld, pszSrcFile, __LINE__); 888 DbgMsg(pszSrcFile, __LINE__, "SetFleshFocusPath focus path set to %s", pszFleshFocusPath); // 2015-08-03 SHL FIXME debug 889 901 890 } 902 891 … … 909 898 HAB thab; 910 899 HMQ hmq = (HMQ)0; 911 APIRET rc;912 900 913 901 // 2015-08-07 SHL FIXME to be gone … … 933 921 934 922 // 2015-08-07 SHL FIXME to use SMPSafe... 935 rc = DosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 936 if (rc) 937 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosRequestMutexSem"); 923 xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 938 924 939 925 // 2015-08-14 SHL 940 926 // Get next work list item and remove from list 941 // If focus drive known, process items for focus drive first 942 if (chFleshFocusDrive) { 943 item = (PFLESHWORKITEM)List2Search(&FleshWorkList, MatchesFocusDrive, (PVOID)chFleshFocusDrive); 944 if (!item) 945 chFleshFocusDrive = 0; // Revert to normal 927 // If focus path set, process parents of focus path first 928 if (pszFleshFocusPath) { 929 item = (PFLESHWORKITEM)List2Search(&FleshWorkList, IsParentOfChildPath, (PVOID)pszFleshFocusPath); 930 if (!item) { 931 xfree((PSZ)pszFleshFocusPath, pszSrcFile, __LINE__); 932 pszFleshFocusPath = NULL; // Revert to normal 933 } 946 934 else 947 935 List2Delete(&FleshWorkList, (PLIST2)item); … … 953 941 item = (PFLESHWORKITEM)List2DeleteFirst(&FleshWorkList); 954 942 955 rc = DosReleaseMutexSem(hmtxFleshWork); 956 if (rc) 957 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosReleaseMutexSem"); 943 xDosReleaseMutexSem(hmtxFleshWork); 958 944 959 945 // Wait for new items to be added to list … … 962 948 if (!fNoFleshDbgMsg) 963 949 DbgMsg(pszSrcFile, __LINE__, "FleshWorkThread work list empty - waiting"); // 2015-08-03 SHL FIXME debug 964 rc = DosWaitEventSem(hevFleshWorkListChanged, SEM_INDEFINITE_WAIT); 965 if (rc) 966 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosWaitEventSem"); 967 rc = DosResetEventSem(hevFleshWorkListChanged, &ul); 968 if (rc) 969 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, "DosResetEventSem"); 950 xDosWaitEventSem(hevFleshWorkListChanged, SEM_INDEFINITE_WAIT); 951 xDosResetEventSem(hevFleshWorkListChanged, &ul); 970 952 if (!fNoFleshDbgMsg) 971 953 DbgMsg(pszSrcFile, __LINE__, "FleshWorkThread work hev posted"); // 2015-08-03 SHL FIXME debug … … 1085 1067 } 1086 1068 1087 rc = DosCreateEventSem(NULL, &hevFleshWorkListChanged, 0 /* Not shared */, FALSE /* Reset */); 1088 if (rc) { 1089 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1090 PCSZ_DOSCREATEEVENTSEM); 1091 return FALSE; 1092 } 1069 rc = xDosCreateEventSem(NULL, &hevFleshWorkListChanged, 0 /* Not shared */, FALSE /* Reset */); 1070 if (rc) 1071 return FALSE; // Give up 1093 1072 1094 1073 /* DbgMsg is time consuming  - 
      
trunk/dll/flesh.h
r1858 r1860 23 23 BOOL IsFleshWorkListEmpty(); 24 24 25 VOID SetFleshFocus Drive(CHAR chDriveLetter);25 VOID SetFleshFocusPath(PCSZ pszPath); 26 26 27 27 #if 0 // 2015-08-03 SHL FIXME debug 28 VOID WaitFleshWorkListEmpty( );28 VOID WaitFleshWorkListEmpty(PCSZ pszDirName); 29 29 #else 30 #define WaitFleshWorkListEmpty(psz FileName) WaitFleshWorkListEmptyDbg(pszFileName, __FILE__, __LINE__)31 VOID WaitFleshWorkListEmptyDbg(PCSZ psz FileName, PCSZ pszSrcFile, UINT uSrcLineNo);30 #define WaitFleshWorkListEmpty(pszDirName) WaitFleshWorkListEmptyDbg(pszDirName, __FILE__, __LINE__) 31 VOID WaitFleshWorkListEmptyDbg(PCSZ pszDirName, PCSZ pszSrcFile, UINT uSrcLineNo); 32 32 #endif 33 33  - 
      
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 saved drive containers.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 command.com. Prevents hang (at least until a Dos program is started) on a system88 that has a broken MDOS install.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 fall back to config.sys is used to find it; use bstripcr to streamline code.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 profile calls for user settings that work and are setable in more than one94 miniapp; FM3Str should be used for setting only relavent to FM/2 or that95 aren't user settable; realappname should be used for setting applicable to96 one or more miniapp but not to FM/293 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 CONSTANT * as CHAR *.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 entries in the tree container, fix related semaphore performance using103 combination of event and mutex semaphores102 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 by temp file creation failures.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 or invalid108 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 copy, move and delete operations112 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 for delete of readonly files114 for delete of readonly files 115 115 09 Feb 14 GKY Fix separate parameters. Moved to general page renamed separate settings 116 for apps.116 for apps. 117 117 09 Feb 14 GKY Modified wipeallf to allow suppression of the readonly warning on delete 118 of temporary files118 of temporary files 119 119 16 Feb 14 GKY Add "#" command line switch to workaround problem with blank command shell 120 started from fm2 after fm2 has been started with stdout and stderr121 redirected to a file.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 delete and eliminated the check on additional temp file deletes123 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 described in this ticket. (Also changed it to strtoul.)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 So calls to these functions had to be changed.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 Added option to suppress message regarding missing bzip2.exe130 or gzip.exe on TAR.B/GZ archives.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 a trap when FM2 is shutdown while directory containers are still populating132 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 all other drive types in separate threads.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 Calls to unsafe Dos... functions have been changed to call the wrapped xDos... functions136 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 &ffb, sizeof(ffb), &num_matches, FIL_STANDARD)) {815 do {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 ul = strtoul(p, NULL, 16);828 ul = strtoul(p, NULL, 16); 821 829 GetDosPgmName(ul, temp); 822 830 if (!strstr(temp, "FM/2") && … … 826 834 } 827 835 } 828 }829 while (!DosFindNext(search_handle,830 &ffb, sizeof(ffb), &num_matches));831 DosFindClose(search_handle);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 pTmpDir = xstrdup(szTempName, pszSrcFile, __LINE__); // if writable839 else840 pTmpDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__);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 strcpy(inipath, szFullFilename);935 strcpy(inipath, szFullFilename); 928 936 } else { 929 strcpy(inipath, profile);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 DosCopy(PCSZ_FM3INIDOTBAK, PCSZ_FM3DOTINI, 0);946 DosCopy(PCSZ_FM3INIDOTBAK, PCSZ_FM3DOTINI, 0); 939 947 } 940 948 rc = DosQueryPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3)); 941 949 if (rc) 942 fWantFirstTimeInit = TRUE;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 saymsg(MB_ENTER,HWND_DESKTOP, GetPString(IDS_DEBUG_STRING),947 GetPString(IDS_INIFAILURETEXT));948 DosCopy(PCSZ_FM3DOTINI, PCSZ_FM3INIDOTBAD, DCPY_EXISTING);949 DosCopy(PCSZ_FM3INIDOTBAK, PCSZ_FM3DOTINI, DCPY_EXISTING);950 if (!CheckFileHeader(inipath, "\xff\xff\xff\xff\x14\x00\x00\x00", 0L)) {951 DosCopy(PCSZ_FM3DOTINI, PCSZ_FM3INIDOTBAD2, DCPY_EXISTING);952 fWantFirstTimeInit = TRUE;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 fs3.attrFile &= ~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM);962 rc = xDosSetPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3), 0);963 if (rc) {964 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,965 GetPString(IDS_INIREADONLYTEXT), inipath);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 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__,1013 "WinCreateHelpInstance failed for %s with error 0x%x",1014 hini.pszHelpLibraryName, hini.ulReturnCode);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 PCSZ_DOSCREATEMUTEXSEM);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 PCSZ_DOSCREATEMUTEXSEM);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 PCSZ_DOSCREATEMUTEXSEM);1194 PCSZ_DOSCREATEMUTEXSEM); 1187 1195 } 1188 1196  - 
      
trunk/dll/init.h
r1858 r1860 44 44 all other drive types in separate threads. 45 45 19 Aug 15 SHL Delete obsoletes 46 20 Aug 15 SHL Support PCSZ_DOS...SEM 46 47 47 48 ***********************************************************************/ … … 120 121 extern PCSZ PCSZ_CM_ALLOCRECORD; 121 122 extern PCSZ PCSZ_QUERYCNRINFO; 123 122 124 extern PCSZ PCSZ_DOSCREATEMUTEXSEM; 125 extern PCSZ PCSZ_DOSREQUESTMUTEXSEM; 126 extern PCSZ PCSZ_DOSRELEASEMUTEXSEM; 127 123 128 extern PCSZ PCSZ_DOSCREATEEVENTSEM; 129 extern PCSZ PCSZ_DOSWAITEVENTSEM; 130 extern PCSZ PCSZ_DOSPOSTEVENTSEM; 131 extern PCSZ PCSZ_DOSRESETEVENTSEM; 132 124 133 extern PCSZ PCSZ_DOSDUPHANDLE; 125 134 extern PCSZ PCSZ_DOSGETINFOBLOCKS;  - 
      
trunk/dll/treecnr.c
r1858 r1860 101 101 12 Jul 15 GKY Fixed trap caused by pci->pszFileName being NullStr 102 102 07 Aug 15 SHL Rework to use AddFleshWorkRequest rather than direct calls to Stubby/Flesh/Unflesh 103 20 Aug 15 SHL Sync with SetFleshFocusPath mods 103 104 104 105 ***********************************************************************/ … … 1092 1093 # endif 1093 1094 } 1094 DosPostEventSem(CompactSem);1095 xDosPostEventSem(CompactSem); 1095 1096 if (!PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID)) 1096 1097 WinSendMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID); … … 1981 1982 free(dir); 1982 1983 else 1983 SetFleshFocus Drive(*dir);1984 SetFleshFocusPath(dir); 1984 1985 } 1985 1986 }  - 
      
trunk/dll/wrappers.c
r1848 r1860 6 6 Wrappers with error checking 7 7 8 Copyright (c) 2006, 20 08Steven H.Levine8 Copyright (c) 2006, 2015 Steven H.Levine 9 9 10 10 22 Jul 06 SHL Baseline … … 28 28 "#if 0" block for quick implementation should FM/2 start to use them. 29 29 Among these. xDosOpenL and xWinUpper still need work. The rest are ready for use. 30 20 Aug 15 SHL Add xDos...MutexSem and xDos..EventSem wrappers 30 31 31 32 ***********************************************************************/ … … 68 69 { 69 70 APIRET rc; 70 HFILE hFileLow = *phFile;71 HFILE hFileLow = *phFile; 71 72 72 73 rc = DosDupHandle(hFile, &hFileLow); … … 324 325 return apiret; 325 326 } 327 328 /** 329 * DosRequestMutexSem wrapper 330 */ 331 332 APIRET xDosRequestMutexSem(HMTX hmtx, ULONG ulTimeout) 333 { 334 APIRET apiret = DosRequestMutexSem(hmtx, ulTimeout); 335 336 if (apiret && (ulTimeout == SEM_INDEFINITE_WAIT || apiret != ERROR_TIMEOUT)) { 337 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 338 PCSZ_DOSREQUESTMUTEXSEM); 339 } 340 return apiret; 341 } 342 343 /** 344 * DosReleaseMutexSem wrapper 345 */ 346 347 APIRET xDosReleaseMutexSem(HMTX hmtx) 348 { 349 APIRET apiret = DosReleaseMutexSem(hmtx); 350 351 if (apiret) { 352 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 353 PCSZ_DOSRELEASEMUTEXSEM); 354 } 355 return apiret; 356 } 357 358 /** 359 * DosCreateEventSem wrapper 360 */ 361 362 APIRET xDosCreateEventSem (PSZ pszName,PHEV phev, ULONG flAttr, BOOL32 fState) 363 { 364 APIRET apiret = DosCreateEventSem (pszName,phev, flAttr, fState); 365 if (apiret) { 366 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 367 PCSZ_DOSCREATEEVENTSEM); 368 } 369 return apiret; 370 } 371 372 /** 373 * DosWaitEventSem wrapper 374 */ 375 376 APIRET xDosWaitEventSem(HEV hev, ULONG ulTimeout) 377 { 378 APIRET apiret = DosWaitEventSem(hev, ulTimeout); 379 380 if (apiret && (ulTimeout == SEM_INDEFINITE_WAIT || apiret != ERROR_TIMEOUT)) { 381 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 382 PCSZ_DOSWAITEVENTSEM); 383 } 384 return apiret; 385 } 386 387 /** 388 * DosPostEventSem wrapper 389 */ 390 391 APIRET xDosPostEventSem(HEV hev) 392 { 393 APIRET apiret = DosPostEventSem(hev); 394 395 if (apiret && apiret != ERROR_ALREADY_POSTED) { 396 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 397 PCSZ_DOSPOSTEVENTSEM); 398 } 399 return apiret; 400 } 401 402 /** 403 * DosResetEventSem wrapper 404 */ 405 406 APIRET xDosResetEventSem(HEV hev, PULONG pulPostCt) 407 { 408 APIRET apiret = DosResetEventSem(hev, pulPostCt); 409 410 if (apiret && apiret != ERROR_ALREADY_RESET) { 411 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 412 PCSZ_DOSRESETEVENTSEM); 413 } 414 return apiret; 415 } 416 417 /** 418 * DosFindFirst wrapper 419 */ 326 420 327 421 APIRET xDosFindFirst(PSZ pszFileSpec, … … 731 825 /* 732 826 * JBS: Wrappers for functions which... 733 * - are identified by klibc as "highmem-unsafe"734 * - not yet used by FM/2827 * - are identified by klibc as "highmem-unsafe" 828 * - not yet used by FM/2 735 829 */ 736 830  - 
      
trunk/dll/wrappers.h
r1853 r1860 19 19 "#if 0" block in wrappers.c for quick implementation should FM/2 start to use them. 20 20 Among these. xDosOpenL and xWinUpper still need work. The rest are ready for use. 21 20 Aug 15 SHL Add xDos...MutexSem and xDos..EventSem wrappers 21 22 22 23 ***********************************************************************/ … … 81 82 ULONG ulInfoLevel); // 06 Oct 07 SHL Added 82 83 83 #ifdef INCL_DOSPROCESS // //PPIB PTIB84 #ifdef INCL_DOSPROCESS // PPIB PTIB 84 85 APIRET xDosGetInfoBlocks(PTIB *pptib, 85 86 PPIB *pppib); // 2015-08-09 SHL added 87 #endif 88 89 #ifdef INCL_DOSSEMAPHORES // HMTX HEV 90 APIRET xDosRequestMutexSem(HMTX hmtx, ULONG ulTimeout); 91 APIRET xDosReleaseMutexSem(HMTX hmtx); 92 APIRET xDosCreateEventSem (PSZ pszName,PHEV phev, ULONG flAttr, BOOL32 fState); 93 APIRET xDosWaitEventSem(HEV hev, ULONG ulTimeout); 94 APIRET xDosPostEventSem(HEV hev); 95 APIRET xDosResetEventSem(HEV hev, PULONG pulPostCt); 86 96 #endif 87 97  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  