Changeset 1335 for trunk/dll/mle.c
- Timestamp:
- Dec 13, 2008, 12:49:02 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mle.c
r1225 r1335 7 7 8 8 Copyright (c) 1993-97 M. Kimes 9 Copyright (c) 2004, 200 7Steven H.Levine9 Copyright (c) 2004, 2008 Steven H.Levine 10 10 11 11 01 Aug 04 SHL Rework lstrip/rstrip usage … … 21 21 22 Jun 08 GKY Fixed memory buffer access after it had been freed 22 22 06 Jul 08 GKY Rework LoadThread logic with Steven's help 23 10 Dec 08 SHL Integrate exception handler support 23 24 24 25 ***********************************************************************/ … … 28 29 #include <ctype.h> 29 30 #include <share.h> 30 #include <process.h> // _beginthread31 // #include <process.h> // _beginthread 31 32 32 33 #define INCL_DOS … … 55 56 #include "misc.h" // PostMsg 56 57 #include "fortify.h" 58 #include "excputil.h" // xbeginthread 57 59 58 60 static PSZ pszSrcFile = __FILE__; … … 60 62 #define FAKEROT 1 61 63 #define DOROT13(c) (!isalpha((c)))?(c):((((c) >= (char) 'A') && \ 62 63 64 64 ((c) <= (char) 'M')) || (((c) >= (char) 'a') && ((c) <= (char) 'm')))?((c) + (char) 0xd)\ 65 :((((c) >= (char) 'N') && ((c) <= (char) 'Z')) || (((c) >= (char) 'n') && ((c) <= (char) 'z')))?\ 66 ((c) - (char) 0xd):(c) 65 67 66 68 /*((FAKEROT==0)?(c):(FAKEROT==1)?(!isalpha((c)))?(c):((((c) >= (char) 'A') && \ 67 68 69 70 69 ((c) <= (char) 'M')) || (((c) >= (char) 'a') && ((c) <= (char) 'm')))?((c) + (char) 0xd)\ 70 :((((c) >= (char) 'N') && ((c) <= (char) 'Z')) || (((c) >= (char) 'n') && ((c) <= (char) 'z')))?\ 71 ((c) - (char) 0xd):(c):((c) >= (char) '!') ? ((((c) + (char) 47) > (char) '~') ? ((c) - (char) 47) :\ 72 ((c) + (char) 47)) : (c))*/ 71 73 72 74 LONG MLEgetlinetext(HWND h, LONG l, CHAR * buf, INT maxlen) … … 196 198 bstripcr(temp); 197 199 if (*temp) { 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 200 if (ftp) { 201 if (fFtpRunWPSDefault) { 202 CHAR WPSDefaultFtpRun[CCHMAXPATH], WPSDefaultFtpRunDir[CCHMAXPATH]; 203 204 size = sizeof(WPSDefaultFtpRun); 205 PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS", 206 "DefaultBrowserExe", WPSDefaultFtpRun, &size); 207 size = sizeof(WPSDefaultFtpRunDir); 208 PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS", 209 "DefaultWorkingDir", WPSDefaultFtpRunDir, &size); 210 runemf2(SEPARATE | WINDOWED, 211 h, pszSrcFile, __LINE__, 212 WPSDefaultFtpRunDir, 213 fLibPathStrictFtpRun ? "SET LIBPATHSTRICT=TRUE" : NULL, 214 "%s %s", WPSDefaultFtpRun, temp); 215 } 216 else 217 runemf2(SEPARATE | WINDOWED, 218 h, pszSrcFile, __LINE__, 219 ftprundir, NULL, "%s %s", ftprun, temp); 220 } 221 else 222 if (fHttpRunWPSDefault) { 223 CHAR WPSDefaultHttpRun[CCHMAXPATH], WPSDefaultHttpRunDir[CCHMAXPATH]; 224 225 size = sizeof(WPSDefaultHttpRun); 226 PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS", 227 "DefaultBrowserExe", WPSDefaultHttpRun, &size); 228 size = sizeof(WPSDefaultHttpRunDir); 229 PrfQueryProfileData(HINI_USERPROFILE, "WPURLDEFAULTSETTINGS", 230 "DefaultWorkingDir", WPSDefaultHttpRunDir, &size); 231 runemf2(SEPARATE | WINDOWED, 232 h, pszSrcFile, __LINE__, 233 WPSDefaultHttpRunDir, 234 fLibPathStrictHttpRun ? "SET LIBPATHSTRICT=TRUE" : NULL, 235 "%s %s", WPSDefaultHttpRun, temp); 236 } 237 else 238 runemf2(SEPARATE | WINDOWED, 239 h, pszSrcFile, __LINE__, 240 httprundir, NULL, "%s %s", httprun, temp); 239 241 } 240 242 } … … 609 611 free(buffer); 610 612 # ifdef FORTIFY 611 613 Fortify_LeaveScope(); 612 614 # endif 613 615 } … … 813 815 } 814 816 else 815 817 PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID); 816 818 DecrThreadUsage(); 817 819 WinTerminate(thab); … … 826 828 Fortify_LeaveScope(); 827 829 # endif 828 _endthread();830 // _endthread(); // 10 Dec 08 SHL 829 831 } 830 832 … … 837 839 838 840 BKGLOAD *bkg; 839 INT rc;840 841 841 842 bkg = xmallocz(sizeof(BKGLOAD), pszSrcFile, __LINE__); … … 848 849 bkg->h = h; 849 850 strcpy(bkg->filename, filename); 850 r c = _beginthread(LoadThread, NULL, 65536, bkg);851 if (rc == -1) 852 Runtime_Error(pszSrcFile, __LINE__,853 GetPString(IDS_COULDNTSTARTTHREADTEXT));854 return rc;851 return xbeginthread(LoadThread, 852 65536, 853 bkg, 854 pszSrcFile, 855 __LINE__); 855 856 } 856 857
Note:
See TracChangeset
for help on using the changeset viewer.