Changeset 1856 for trunk/dll/init.c


Ignore:
Timestamp:
Aug 18, 2015, 7:12:52 PM (10 years ago)
Author:
Steven Levine
Message:

Rework Flesh/Stubby etc. to avoid running on thread 1
Should be ready for release after spurious traps resolved
DbgMsg calls retained - delete/disable before release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1846 r1856  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2010 Steven H. Levine
     9  Copyright (c) 2001, 2015 Steven H. Levine
    1010
    1111  11 Jun 02 SHL Add CheckVersion
     
    211211#include "excputil.h"                   // xbeginthread
    212212#include "systemf.h"                    // runemf2
     213
    213214#if 0
    214215#define  __PMPRINTF__
    215216#include "PMPRINTF.H"
    216217#endif
     218
    217219extern int _CRT_init(void);
    218220extern void _CRT_term(void);
     
    236238HMTX hmtxFM2Delete;
    237239HMTX hmtxFM2Globals;
     240
     241#if 0 // 2015-08-04 SHL FIXME to be gone
    238242HMTX hmtxScanning;
     243#endif // 2015-08-04 SHL FIXME to be gone
     244
     245#if 0 // 2015-08-07 SHL FIXME to be gone
    239246HMTX hmtxScanningLocalHD;
    240 HMTX hmtxScanningLocal;
     247#endif // 2015-08-07 SHL FIXME to be gone
     248
    241249HMTX hmtxFiltering;
     250
     251#if 0 // 2015-08-04 SHL FIXME to be gone
    242252HEV  hevTreeCnrScanComplete;
     253#endif // 2015-08-04 SHL FIXME to be gone
     254
    243255ULONG OS2ver[2];
    244256PFNWP PFNWPCnr;
     
    249261ULONG ulTimeFmt;
    250262ULONG ulDateFmt;
    251 ULONG ulScanPostCnt;
    252263BOOL fDontSuggestAgain;
    253264BOOL fInitialDriveScan;
     
    712723  }
    713724
    714     rc = DosExitList(EXLST_ADD, DeInitFM3DLL);
    715     if (rc) {
    716       Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    717                "DosExitList");
    718     }
    719 
    720     rcq = DosQueryProcAddr(FM3ModHandle, 1, "ResVersion", &pfnResVersion);
    721     if (!rcq)
    722       ret = pfnResVersion(&RVMajor, &RVMinor);
     725  rc = DosExitList(EXLST_ADD, DeInitFM3DLL);
     726  if (rc) {
     727    Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     728             "DosExitList");
     729  }
     730
     731  rcq = DosQueryProcAddr(FM3ModHandle, 1, "ResVersion", &pfnResVersion);
     732  if (!rcq)
     733    ret = pfnResVersion(&RVMajor, &RVMinor);
    723734  else {
    724735    ret = 0;
     
    739750    return FALSE;
    740751  }
     752
    741753#if 0
    742754  PmPrintfDisplayInterfaceVersionInfo();
    743755  PmPrintfQueueNameThisProcess(NULL);
    744756#endif
     757
    745758  if (!*profile)
    746759    strcpy(profile, PCSZ_FM3DOTINI);
     
    769782  }
    770783
    771   //Save the FM2 save directory name. This is the location of the ini, dat files etc.
     784  // Save the FM2 save directory name. This is the location of the ini, dat files etc.
    772785  rc = save_dir2(temp);
    773786  if (rc) {
     
    885898  }
    886899
     900  if (!StartFleshWorkThread())
     901    return FALSE;
     902
    887903  // timer messages are sent from a separate thread -- start it
    888904  if (!StartTimer()) {
     
    11661182                   sizeof(PVOID));
    11671183
    1168   if (DosCreateMutexSem(NULL, &hmtxFM2Globals, 0L, FALSE))
     1184  rc = DosCreateMutexSem(NULL, &hmtxFM2Globals, 0L, FALSE);
     1185  if (rc) {
    11691186    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    11701187              PCSZ_DOSCREATEMUTEXSEM);
     1188  }
     1189#if 0 // 2015-08-04 SHL FIXME to be gone
    11711190  if (DosCreateMutexSem(NULL, &hmtxScanning, 0L, TRUE))
    11721191    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    11731192              PCSZ_DOSCREATEMUTEXSEM);
    1174   if (DosCreateMutexSem(NULL, &hmtxScanningLocalHD, 0L, FALSE))
     1193#endif // 2015-08-04 SHL FIXME to be gone
     1194#if 0 // 2015-08-07 SHL FIXME to be gone
     1195  rc = DosCreateMutexSem(NULL, &hmtxScanningLocalHD, 0L, FALSE);
     1196  if (rc) {
    11751197    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    11761198              PCSZ_DOSCREATEMUTEXSEM);
    1177     if (DosCreateMutexSem(NULL, &hmtxScanningLocal, 0L, FALSE))
    1178     Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    1179               PCSZ_DOSCREATEMUTEXSEM);
    1180   if (DosCreateMutexSem(NULL, &hmtxFM2Delete, 0L, FALSE))
     1199  }
     1200#endif // 2015-08-07 SHL FIXME to be gone
     1201  rc = DosCreateMutexSem(NULL, &hmtxFM2Delete, 0L, FALSE);
     1202  if (rc) {
    11811203    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    11821204              PCSZ_DOSCREATEMUTEXSEM);
    1183   if (DosCreateMutexSem(NULL, &hmtxFiltering, 0L, FALSE))
     1205  }
     1206  rc = DosCreateMutexSem(NULL, &hmtxFiltering, 0L, FALSE);
     1207  if (rc) {
    11841208    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    11851209              PCSZ_DOSCREATEMUTEXSEM);
    1186   if (DosCreateEventSem(NULL, &hevTreeCnrScanComplete, 0L, TRUE))
     1210  }
     1211#if 0 // 2015-08-04 SHL FIXME to be gone
     1212  rc = DosCreateEventSem(NULL, &hevTreeCnrScanComplete, 0L, TRUE);
     1213  if (rc) {
    11871214    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    11881215              PCSZ_DOSCREATEEVENTSEM);
     1216  }
     1217#endif // 2015-08-04 SHL FIXME to be gone
    11891218
    11901219  /**
     
    16531682  PrfQueryProfileData(fmprof, FM3Str, "DontAskGzip", &fDontAskGzip, &size);
    16541683
     1684  // 2015-08-11 SHL FIXME debug
     1685  DbgMsg(pszSrcFile, __LINE__, "ShowEnv %u SwitchTree %u SwitchTreeExpand %u SwitchTreeOnFocus %u CollapseFirst %u", fShowEnv, fSwitchTreeOnDirChg, fSwitchTreeExpand, fSwitchTreeOnFocus, fCollapseFirst);
     1686  DbgMsg(pszSrcFile, __LINE__, "RScanLocal %u RScanRemote %u RScanVirtual %u RScanSlow RScanNoWrite %u", fRScanLocal, fRScanRemote, fRScanVirtual, fRScanSlow, fRScanNoWrite);
     1687
    16551688  LoadDetailsSwitches(PCSZ_DIRCNR, &dsDirCnrDefault, FALSE);
    16561689
Note: See TracChangeset for help on using the changeset viewer.