Changeset 1394 for trunk/dll/worker.c


Ignore:
Timestamp:
Feb 5, 2009, 5:17:25 AM (17 years ago)
Author:
Steven Levine
Message:

Ticket 340: Convert GetPString to use STRINGTABLE.

Drop fm3dll.str and mkstr.exe from makefiles and wpi builders

Convert many functions to expect PCSZ arguments.
Correct walk, compare and dirsizes dialog setups to ignore saved dialog size
Drop copyright.c logic from makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/worker.c

    r1358 r1394  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2008 Steven H. Levine
     9  Copyright (c) 2001, 2009 Steven H. Levine
    1010
    1111  16 Oct 02 SHL Comments
     
    3737  25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
    3838  25 Dec 08 GKY Add DRIVE_RSCANNED flag to monitor for the first recursive drive scan per session
    39                 to prevent duplicate directory names in tree following a copy before initial scan.
     39                to prevent duplicate directory names in tree following a copy before initial scan.
    4040
    4141***********************************************************************/
     
    678678                Retry:
    679679                  {
    680                     CHAR newname[CCHMAXPATH], *moving, *move, *moved;
     680                    CHAR newname[CCHMAXPATH];
     681                    PCSZ moving, move, moved;
    681682                    APIRET rc;
    682683                    INT type;
     
    808809                            (usedtarget) ? GetPString(IDS_TOTARGETTEXT) :
    809810                            NullStr);
    810                     AddNote(message);
    811                     if (fVerify && (driveflags[toupper(*wk->li->targetpath) - 'A'] & DRIVE_WRITEVERIFYOFF) |
    812                         (driveflags[toupper(*wk->li->list[x]) - 'A'] & DRIVE_WRITEVERIFYOFF)) {
    813                       DosSetVerify(FALSE);
    814                       fResetVerify = TRUE;
    815                     }
     811                    AddNote(message);
     812                    if (fVerify && (driveflags[toupper(*wk->li->targetpath) - 'A'] & DRIVE_WRITEVERIFYOFF) |
     813                        (driveflags[toupper(*wk->li->list[x]) - 'A'] & DRIVE_WRITEVERIFYOFF)) {
     814                      DosSetVerify(FALSE);
     815                      fResetVerify = TRUE;
     816                    }
    816817                    if (plen) {
    817818                      /* make directory/ies, if required */
     
    830831                    if (fRealIdle)
    831832                      priority_idle();
    832                     rc = docopyf(type, wk->li->list[x], "%s", newname);
    833                     if (fResetVerify) {
    834                       DosSetVerify(fVerify);
    835                       fResetVerify = FALSE;
    836                     }
     833                    rc = docopyf(type, wk->li->list[x], "%s", newname);
     834                    if (fResetVerify) {
     835                      DosSetVerify(fVerify);
     836                      fResetVerify = FALSE;
     837                    }
    837838                    priority_normal();
    838839                    if (rc) {
     
    923924                                    &files, &numfiles, &numalloc))
    924925                        Broadcast(hab2,
    925                                   wk->hwndCnr,
     926                                  wk->hwndCnr,
    926927                                  UM_UPDATERECORD,
    927                                   MPFROMP(wk->li->list[x]), MPVOID);
     928                                  MPFROMP(wk->li->list[x]), MPVOID);
    928929                      if ((driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED) &&
    929930                          AddToList(newname, &files, &numfiles, &numalloc))
    930931                        Broadcast(hab2,
    931                                   wk->hwndCnr,
    932                                   UM_UPDATERECORD, MPFROMP(newname), MPVOID);
     932                                  wk->hwndCnr,
     933                                  UM_UPDATERECORD, MPFROMP(newname), MPVOID);
    933934                    }
    934935                  }
     
    938939              case IDM_COMPARE:
    939940                if ((!IsFile(wk->li->targetpath) ||
    940                      IsRoot(wk->li->targetpath)) &&
     941                     IsRoot(wk->li->targetpath)) &&
    941942                    (!IsFile(wk->li->list[x]) || IsRoot(wk->li->list[x]))) {
    942943                  if (!*dircompare && WinIsWindow(hab2, wk->hwndCnr))
     
    10311032        Abort:
    10321033
    1033           if (files) {
    1034             if (driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED)
     1034          if (files) {
     1035            if (driveflags[*wk->li->targetpath - 'A'] & DRIVE_RSCANNED)
    10351036              Broadcast(hab2,
    1036                         wk->hwndCnr,
    1037                         UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
    1038            // DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", *files);
     1037                        wk->hwndCnr,
     1038                        UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
     1039           // DbgMsg(pszSrcFile, __LINE__, "UM_UPDATERECORD %s", *files);
    10391040            FreeList(files);
    10401041          }
     
    11021103            Broadcast(hab2,
    11031104                      wk->hwndCnr,
    1104                       UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
     1105                      UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
    11051106            break;
    11061107
     
    12251226                Broadcast(hab2,
    12261227                          wk->hwndCnr,
    1227                           UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
     1228                          UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
    12281229            }
    12291230            break;
     
    12451246              Broadcast(hab2,
    12461247                        wk->hwndCnr,
    1247                         UM_UPDATERECORD, MPFROMP(wk->li->targetpath), MPVOID);
     1248                        UM_UPDATERECORD, MPFROMP(wk->li->targetpath), MPVOID);
    12481249            }
    12491250            break;
     
    15141515                Broadcast(hab2,
    15151516                          wk->hwndCnr,
    1516                           UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
     1517                          UM_UPDATERECORDLIST, MPFROMP(wk->li->list), MPVOID);
    15171518            }
    15181519            break;
     
    15291530              HOBJECT hObjectdest, hObjectofObject;
    15301531              BYTE G_abSupportedDrives[24] = {0};
    1531               ULONG cbSupportedDrives = sizeof(G_abSupportedDrives);
     1532              ULONG cbSupportedDrives = sizeof(G_abSupportedDrives);
    15321533
    15331534              for (x = 0; wk->li->list[x]; x++) {
     
    16241625                if (!wk->li->list || !wk->li->list[0])
    16251626                  break;
    1626               }
    1627               if (fVerify && driveflags[toupper(*wk->li->list[0]) - 'A'] & DRIVE_WRITEVERIFYOFF)
    1628                 DosSetVerify(FALSE);
     1627              }
     1628              if (fVerify && driveflags[toupper(*wk->li->list[0]) - 'A'] & DRIVE_WRITEVERIFYOFF)
     1629                DosSetVerify(FALSE);
    16291630              DosRequestMutexSem(hmtxFM2Delete, SEM_INDEFINITE_WAIT); // Prevent race 12-3-08 GKY
    16301631              for (x = 0; wk->li->list[x]; x++) {
     
    16471648                    DosDeleteDir(wk->li->list[x]);
    16481649                }
    1649                 else {
     1650                else {
    16501651
    16511652                  DosError(FERR_DISABLEHARDERR);
     
    16661667                        error = WinMoveObject(hObjectofObject, hObjectdest, 0);
    16671668                    }
    1668                     else {
    1669                       error = DosDelete(wk->li->list[x]);
    1670                     }
    1671                   }
    1672                   else {
    1673                     error = DosForceDelete(wk->li->list[x]); ;
    1674                   }
    1675                   if (error) {
    1676                     DosError(FERR_DISABLEHARDERR);
     1669                    else {
     1670                      error = DosDelete(wk->li->list[x]);
     1671                    }
     1672                  }
     1673                  else {
     1674                    error = DosForceDelete(wk->li->list[x]); ;
     1675                  }
     1676                  if (error) {
     1677                    DosError(FERR_DISABLEHARDERR);
    16771678                    make_deleteable(wk->li->list[x]);
    16781679                    if (wk->li->type == IDM_DELETE){
     
    16921693                          error = WinMoveObject(hObjectofObject, hObjectdest, 0);
    16931694                      }
    1694                       else {
    1695                         error = DosDelete(wk->li->list[x]);
     1695                      else {
     1696                        error = DosDelete(wk->li->list[x]);
    16961697                      }
    16971698                    }
    1698                     else {
    1699                       error = DosForceDelete(wk->li->list[x]);
     1699                    else {
     1700                      error = DosForceDelete(wk->li->list[x]);
    17001701                    }
    17011702                  }
     
    17141715                                GetPString(IDS_DELETEFAILED2TEXT),
    17151716                                wk->li->list[x]) == MBID_CANCEL) {
    1716                     DosSetVerify(fVerify);
    1717                     break;
    1718                   }
     1717                    DosSetVerify(fVerify);
     1718                    break;
     1719                  }
    17191720                }
    17201721                else {
     
    17341735                }
    17351736              } // for
    1736             }
    1737             if (fVerify)
    1738               DosSetVerify(fVerify);
     1737            }
     1738            if (fVerify)
     1739              DosSetVerify(fVerify);
    17391740            break;
    17401741          } // switch
     
    17421743            Broadcast(hab2,
    17431744                      wk->hwndCnr,
    1744                       UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
     1745                      UM_UPDATERECORDLIST, MPFROMP(files), MPVOID);
    17451746            FreeList(files);
    17461747          }
Note: See TracChangeset for help on using the changeset viewer.