Changeset 1570 for trunk/dll/dircnrs.c


Ignore:
Timestamp:
Jun 13, 2011, 12:09:19 AM (14 years ago)
Author:
Gregg Young
Message:

Added IdleIfNeeded to place load and free loops to idle priority when dealing with large numbers of items. Used SleepIfNeeded more places for a similar purpose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r1553 r1570  
    14121412          //DosEnterCritSec(); //GKY 11-27-08
    14131413          dcd->stopflag++;
    1414           //DosExitCritSec();
     1414          //DosExitCritSec();
     1415          //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    14151416          if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    14161417            strcpy(dcd->directory, dcd->previous);
     
    14681469      WinSetDlgItemText(dcd->hwndClient, DIR_SELECTED, s);
    14691470      if (hwndStatus &&
    1470           dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) {
     1471          dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) {
    14711472        PostMsg(dcd->hwndObject, UM_RESCAN2, MPVOID, MPVOID);
    14721473        if ((fSplitStatus && hwndStatus2) || fMoreButtons) {
     
    23132314        //DosEnterCritSec(); //GKY 11-27-08
    23142315        dcd->stopflag++;
    2315         //DosExitCritSec();
     2316        //DosExitCritSec();
     2317        //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    23162318        if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPVOID)) {
    23172319          //DosEnterCritSec(); //GKY 11-27-08
     
    24512453          //DosEnterCritSec(); // GKY 11-27-08
    24522454          dcd->stopflag++;
    2453           //DosExitCritSec();
     2455          //DosExitCritSec();
     2456          //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    24542457          if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    24552458            strcpy(dcd->directory, dcd->previous);
     
    24742477          strcpy(tempname1, dcd->directory);
    24752478          AddBackslashToPath(tempname1);
    2476           //if (tempname1[strlen(tempname1) - 1] != '\\')
    2477           //  strcat(tempname1, "\\");
    24782479          strcat(tempname1, "..");
    24792480          DosError(FERR_DISABLEHARDERR);
     
    24842485              strcpy(dcd->previous, dcd->directory);
    24852486              strcpy(dcd->directory, tempname2);
    2486               //DosEnterCritSec(); // GKY 11-27-08
    24872487              dcd->stopflag++;
    2488               //DosExitCritSec();
     2488              //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    24892489              if (!PostMsg(dcd->hwndObject,
    24902490                           UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    24912491                strcpy(dcd->directory, dcd->previous);
    2492                 //DosEnterCritSec();// GKY 11-27-08
    24932492                dcd->stopflag--;
    2494                 //DosExitCritSec();
    24952493              }
    24962494              else if (*dcd->directory) {
     
    25162514            strcpy(dcd->directory, dcd->previous);
    25172515            strcpy(dcd->previous, tempname);
    2518             //DosEnterCritSec(); // GKY 11-27-08
    2519             dcd->stopflag++;
    2520             //DosExitCritSec();
     2516            dcd->stopflag++; ;
     2517            //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    25212518            if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    25222519              strcpy(dcd->directory, dcd->previous);
    2523               //DosEnterCritSec(); // GKY 11-27-08
    25242520              dcd->stopflag--;
    2525               //DosExitCritSec();
    25262521            }
    25272522            else if (*dcd->directory) {
     
    25532548            strcpy(dcd->previous, dcd->directory);
    25542549            strcpy(dcd->directory, newdir);
    2555             //DosEnterCritSec(); //GKY 11-27-08
    25562550            dcd->stopflag++;
    2557             //DosExitCritSec();
     2551            //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    25582552            if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    25592553              strcpy(dcd->directory, dcd->previous);
    2560               //DosEnterCritSec(); // GKY 11-27-08
    25612554              dcd->stopflag--;
    2562               //DosExitCritSec();
    25632555            }
    25642556            else if (*dcd->directory) {
     
    33993391                  strcpy(dcd->previous, dcd->directory);
    34003392                  strcpy(dcd->directory, pci->pszFileName);
    3401                   //DosEnterCritSec();  // GKY 11-27-08
    34023393                  dcd->stopflag++;
    3403                   //DosExitCritSec();
     3394                  //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    34043395                  if (!PostMsg(dcd->hwndObject,
    34053396                               UM_RESCAN, MPVOID, MPFROMLONG(1))) {
    3406                     //DosEnterCritSec();  // GKY 11-27-08
    34073397                    dcd->stopflag--;
    3408                     //DosExitCritSec();
    34093398                  }
    34103399                  else if (*dcd->directory) {
     
    34463435              }
    34473436              else {
    3448                 //DosEnterCritSec();  // GKY 11-27-08
    34493437                dcd->stopflag++;
    3450                 //DosExitCritSec();
     3438                //DbgMsg(pszSrcFile, __LINE__, "WM_RESCAN");
    34513439                if (!PostMsg(dcd->hwndObject,
    34523440                             UM_RESCAN, MPVOID, MPFROMLONG(1L))) {
    3453                   //DosEnterCritSec(); // GKY 11-27-08
    34543441                  dcd->stopflag--;
    3455                   //DosExitCritSec();
    34563442                }
    34573443                else if (*dcd->directory) {
Note: See TracChangeset for help on using the changeset viewer.