Changeset 1301 for trunk/dll


Ignore:
Timestamp:
Nov 30, 2008, 6:25:27 AM (17 years ago)
Author:
Gregg Young
Message:

Add flag to tell CheckListProc file is in an archive so it won't try to open it. (Ticket 283) Part of remove or replace with a mutex semaphore DosEnterCriSec where appropriate. (Ticket 308)

Location:
trunk/dll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1298 r1301  
    6262                the archiver process closes. (Ticket 58)
    6363  23 Nov 08 JBS Ticket 284: Support archivers with no Start or End of list strings
     64  29 Nov 08 GKY Add flag to tell CheckListProc file is in an archive so it won't try to open it.
     65  29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate.
    6466
    6567***********************************************************************/
     
    676678//       gotend =   !info->endlist ||
    677679//                       !*info->endlist ||     // If list has no end marker
    678 //                       (stricmp(info->endlist, "*#* None *#*") == 0); 
     680//                       (stricmp(info->endlist, "*#* None *#*") == 0);
    679681
    680682      while (!feof(fp) && !gotend && !*pStopFlag) {
     
    17271729            ck.list = li->list;
    17281730            ck.cmd = li->type;
    1729             ck.prompt = prompt;
     1731            ck.prompt = prompt;
     1732            ck.flags = CHECK_ARCHIVE;
    17301733            sprintf(prompt, GetPString(IDS_ARCCNRDELREFTEXT),
    17311734                    (li->type == IDM_DELETE) ?
     
    18241827                }
    18251828              }
    1826               if (exfiles && numfiles) {
     1829              if (exfiles && numfiles) {
    18271830
    18281831                CHECKLIST ckl;
     
    18331836                ckl.list = exfiles;
    18341837                ckl.prompt = prompt;
    1835                 ckl.cmd = li->type;
     1838                ckl.cmd = li->type;
     1839                ckl.flags = CHECK_ARCHIVE;
    18361840                sprintf(prompt,
    18371841                        GetPString(IDS_REPLACEWARNTEXT),
     
    26172621          if (!SetDir(dcd->hwndParent, hwnd, s, 0)) {
    26182622            if (stricmp(dcd->directory, s)) {
    2619               DosEnterCritSec();
    2620               strcpy(lastextractpath, s);
    2621               DosExitCritSec();
     2623              //DosEnterCritSec();  //GKY 11-29-08
     2624              DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
     2625              strcpy(lastextractpath, s);
     2626              DosReleaseMutexSem(hmtxFM2Globals);
     2627              //DosExitCritSec();
    26222628            }
    26232629            strcpy(dcd->directory, s);
     
    30553061        if (mp2) {
    30563062          if (stricmp(dcd->directory, (CHAR *) mp2)) {
    3057             DosEnterCritSec();
     3063            //DosEnterCritSec(); //GKY 11-29-08
     3064            DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
    30583065            strcpy(lastextractpath, (CHAR *) mp2);
    3059             MakeValidDir(lastextractpath);
    3060             DosExitCritSec();
     3066            MakeValidDir(lastextractpath);
     3067            DosReleaseMutexSem(hmtxFM2Globals);
     3068            //DosExitCritSec();
    30613069          }
    30623070          strcpy(dcd->directory, (CHAR *) mp2);
     
    37083716        }
    37093717        if (!*dcd->directory && *lastextractpath) {
    3710           DosEnterCritSec();
    3711           strcpy(dcd->directory, lastextractpath);
    3712           DosExitCritSec();
     3718          //DosEnterCritSec();  //GKY 11-29-08
     3719          DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
     3720          strcpy(dcd->directory, lastextractpath);
     3721          DosReleaseMutexSem(hmtxFM2Globals);
     3722          //DosExitCritSec();
    37133723        }
    37143724        if (!*dcd->directory) {
  • trunk/dll/chklist.c

    r1221 r1301  
    1313  22 Mar 07 GKY Use QWL_USER
    1414  20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
     15  29 Nov 08 GKY Add flag to tell CheckListProc file is in an archive so it won't try to open it.
    1516
    1617***********************************************************************/
     
    171172            *szBuffer = 0;
    172173            WinSendDlgItemMsg(hwnd, CHECK_LISTBOX, LM_QUERYITEMTEXT,
    173                               MPFROM2SHORT(x, CCHMAXPATH), MPFROMP(szBuffer));
    174             if (*szBuffer)
     174                              MPFROM2SHORT(x, CCHMAXPATH), MPFROMP(szBuffer));
     175            cl = WinQueryWindowPtr(hwnd, QWL_USER);
     176            if (*szBuffer && !(cl->flags & CHECK_ARCHIVE))
    175177              QuickView(hwnd, szBuffer);
    176178          }
  • trunk/dll/chklist.h

    r1221 r1301  
    1010
    1111  05 Sep 08 JBS Ticket 187: Refactor FM3DLL.H
     12  29 Nov 08 GKY Add flag to tell CheckListProc file is in an archive so it won't try to open it.
    1213
    1314***********************************************************************/
     
    1718#define CHKLIST_H
    1819
    19 #define CHECK_FILES 1
     20#define CHECK_FILES 1    //CHECKLIST flag
     21#define CHECK_ARCHIVE 2  //CHECKLIST flag file in archive
    2022
    2123typedef struct
Note: See TracChangeset for help on using the changeset viewer.