Changeset 575 for trunk/dll


Ignore:
Timestamp:
Mar 24, 2007, 11:34:09 PM (19 years ago)
Author:
Steven Levine
Message:

Correct FileInfoProc binary file detect (Steven)
Correct FileInfoProc/IconProc race crash (Steven)

Location:
trunk/dll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/info.c

    r552 r575  
    1616  05 Jun 05 SHL Use QWL_USER
    1717  14 Jul 06 SHL Use Runtime_Error
     18  24 Mar 07 SHL Correct FileInfoProc binary file detect
     19  24 Mar 07 SHL Correct FileInfoProc/IconProc race crash
    1820
    1921***********************************************************************/
     
    125127                GetPString(IDS_DRIVEINFOTITLETEXT), toupper(*pszFileName));
    126128        WinSetWindowText(hwnd, FileSystem);
    127         if (CheckDrive(toupper(*pszFileName), FileSystem, &type) != -1){
     129        if (CheckDrive(toupper(*pszFileName), FileSystem, &type) != -1){
    128130
    129131          FSALLOCATE fsa;
     
    175177              WinSetDlgItemText(hwnd, INFO_LABEL, volser.volumelabel);
    176178              sprintf(s, "%lx", volser.serial);
    177               WinSetDlgItemText(hwnd, INFO_SERIAL, s);
    178               FlagMsg(*pszFileName, s);
     179              WinSetDlgItemText(hwnd, INFO_SERIAL, s);
     180              FlagMsg(*pszFileName, s);
    179181              WinSetDlgItemText(hwnd, INFO_FLAGS, s);
    180               if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOSTATS)){
     182              if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOSTATS)){
    181183              CommaFmtULL(szMB, sizeof(szMB),
    182184                          (ULONGLONG) fsa.cUnit *
     
    229231              WinSetDlgItemText(hwnd, INFO_USEDPERCENT, s);
    230232              sprintf(s, "%u%%", percentfree);
    231               WinSetDlgItemText(hwnd, INFO_FREEPERCENT, s);
    232               }
    233               else
    234                 WinSetDlgItemText(hwnd, INFO_AVAILABLE, GetPString(IDS_STATSMEANINGLESSTEXT));
     233              WinSetDlgItemText(hwnd, INFO_FREEPERCENT, s);
     234              }
     235              else
     236                WinSetDlgItemText(hwnd, INFO_AVAILABLE, GetPString(IDS_STATSMEANINGLESSTEXT));
    235237            }
    236238            else {
     
    328330}
    329331
    330 typedef struct
    331 {
     332typedef struct {
    332333  USHORT size;
    333   USHORT dummy;
    334   PFNWP oldproc;
    335   HWND lasthwndMenu;
    336334  CHAR szFileName[CCHMAXPATH];
    337335  CHAR **list;
    338336  BOOL madechanges;
    339 }
    340 ICONSTUF;
     337} FILESTUF;
     338
     339typedef struct {
     340  USHORT size;
     341  PFNWP oldproc;
     342  FILESTUF *pfs;
     343  HWND lasthwndMenu;
     344} ICONSTUF;
    341345
    342346/*
     
    346350MRESULT EXPENTRY IconProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    347351{
    348   ICONSTUF *is;
     352  ICONSTUF *pis = (ICONSTUF *)WinQueryWindowPtr(hwnd, QWL_USER);
     353  MRESULT mr;
     354  CHAR *p;
     355
    349356  static BOOL emphasized = FALSE;
    350357
    351   is = (ICONSTUF *) WinQueryWindowPtr(hwnd, QWL_USER);
     358  if (!pis) {
     359    Runtime_Error(pszSrcFile, __LINE__, "no data");
     360    if (msg != WM_DESTROY)
     361      return WinDefWindowProc(hwnd, msg, mp1, mp2);
     362  }
    352363
    353364  switch (msg) {
     
    383394        ici.fFormat = ICON_FILE;
    384395        ici.pszFileName = szFrom;
    385         if (!WinSetFileIcon((PSZ) is->szFileName, (PICONINFO) & ici)) {
     396        if (!WinSetFileIcon((PSZ) pis->pfs->szFileName, (PICONINFO) & ici)) {
    386397          ici.fFormat = ICON_CLEAR;
    387           WinSetFileIcon((PSZ) is->szFileName, (PICONINFO) & ici);
    388         }
    389         hptr = WinLoadFileIcon(is->szFileName, FALSE);
     398          WinSetFileIcon((PSZ) pis->pfs->szFileName, (PICONINFO) & ici);
     399        }
     400        hptr = WinLoadFileIcon(pis->pfs->szFileName, FALSE);
    390401        if (!hptr)
    391           hptr = (!IsFile(is->szFileName)) ? hptrDir : hptrFile;
    392         if (is && is->oldproc) {
     402          hptr = (!IsFile(pis->pfs->szFileName)) ? hptrDir : hptrFile;
     403        if (pis && pis->oldproc) {
    393404          WinShowWindow(hwnd, FALSE);
    394           is->oldproc(hwnd, SM_SETHANDLE, MPFROMLONG(hptr), MPVOID);
     405          pis->oldproc(hwnd, SM_SETHANDLE, MPFROMLONG(hptr), MPVOID);
    395406          WinShowWindow(hwnd, TRUE);
    396407          WinInvalidateRect(WinQueryWindow(hwnd, QW_PARENT), NULL, TRUE);
     
    401412
    402413  case WM_PAINT:
    403     if (is) {
    404 
    405       MRESULT mr;
    406 
    407       mr = is->oldproc(hwnd, msg, mp1, mp2);
    408       PaintRecessedWindow(hwnd, (HPS) 0, FALSE, FALSE);
    409       return mr;
    410     }
     414    mr = pis->oldproc(hwnd, msg, mp1, mp2);
     415    PaintRecessedWindow(hwnd, (HPS) 0, FALSE, FALSE);
     416    return mr;
    411417    break;
    412418
    413419  case WM_MENUEND:
    414     if (is) {
    415       if (is->lasthwndMenu == (HWND) mp2)
    416         WinDestroyWindow(is->lasthwndMenu);
    417       is->lasthwndMenu = (HWND) 0;
    418     }
     420    if (pis->lasthwndMenu == (HWND)mp2)
     421      WinDestroyWindow(pis->lasthwndMenu);
     422    pis->lasthwndMenu = (HWND) 0;
    419423    break;
    420424
    421425  case WM_CONTEXTMENU:
    422     if (is) {
    423 
    424       CHAR *p;
    425 
    426       if (is->lasthwndMenu)
    427         WinDestroyWindow(is->lasthwndMenu);
    428       is->lasthwndMenu = WinLoadMenu(hwnd, FM3ModHandle, FLE_FRAME);
    429       if (is->lasthwndMenu) {
    430         p = strrchr(is->szFileName, '.');
    431         if (!p || (stricmp(p, ".ICO") && stricmp(p, ".PTR")))
    432           WinSendMsg(is->lasthwndMenu,
    433                      MM_DELETEITEM,
    434                      MPFROM2SHORT(IDM_SELECTALL, TRUE), MPVOID);
    435         PopupMenu(hwnd, hwnd, is->lasthwndMenu);
    436       }
     426    if (pis->lasthwndMenu)
     427      WinDestroyWindow(pis->lasthwndMenu);
     428    pis->lasthwndMenu = WinLoadMenu(hwnd, FM3ModHandle, FLE_FRAME);
     429    if (pis->lasthwndMenu) {
     430      p = strrchr(pis->pfs->szFileName, '.');
     431      if (!p || (stricmp(p, ".ICO") && stricmp(p, ".PTR")))
     432        WinSendMsg(pis->lasthwndMenu,
     433                   MM_DELETEITEM,
     434                   MPFROM2SHORT(IDM_SELECTALL, TRUE), MPVOID);
     435      PopupMenu(hwnd, hwnd, pis->lasthwndMenu);
    437436    }
    438437    break;
     
    448447                SETICON_FRAME,
    449448                (PVOID) ((SHORT1FROMMP(mp1) == IDM_SELECTALL) ?
    450                          is->szFileName : NULL));
     449                         pis->pfs->szFileName : NULL));
    451450      break;
    452451    }
     
    455454  case WM_DESTROY:
    456455    emphasized = FALSE;
    457     if (is && is->lasthwndMenu) {
    458       WinDestroyWindow(is->lasthwndMenu);
    459       is->lasthwndMenu = (HWND) 0;
    460     }
     456    if (pis && pis->lasthwndMenu) {
     457      WinDestroyWindow(pis->lasthwndMenu);
     458      pis->lasthwndMenu = (HWND)0;
     459    }
     460    if (!pis)
     461      return WinDefWindowProc(hwnd, msg, mp1, mp2);
    461462    break;
    462463  }
    463464
    464   if (is && is->oldproc)
    465     return is->oldproc(hwnd, msg, mp1, mp2);
    466   else
    467     return WinDefWindowProc(hwnd, msg, mp1, mp2);
     465  return pis->oldproc(hwnd, msg, mp1, mp2);
    468466}
    469467
    470468MRESULT EXPENTRY FileInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    471469{
    472   ICONSTUF *is;
     470  FILESTUF *pfs;
     471  ICONSTUF *pis;
    473472
    474473  switch (msg) {
     
    478477      break;
    479478    }
    480     is = xmallocz(sizeof(ICONSTUF), pszSrcFile, __LINE__);
    481     if (!is) {
     479    pfs = xmallocz(sizeof(FILESTUF), pszSrcFile, __LINE__);
     480    if (!pfs) {
    482481      WinDismissDlg(hwnd, 1);
    483482      break;
    484483    }
    485     is->list = (CHAR **) mp2;
    486     is->size = sizeof(ICONSTUF);
    487     WinSetWindowPtr(hwnd, QWL_USER, is);
     484    pfs->list = (CHAR **) mp2;
     485    pfs->size = sizeof(FILESTUF);
     486    WinSetWindowPtr(hwnd, QWL_USER, pfs);
    488487    {
    489488      USHORT ids[] = { FLE_SIZES, FLE_SLACK, FLE_LASTWRITE, FLE_CREATE,
     
    493492      CHAR s[CCHMAXPATH];
    494493
    495       for (x = 0; is->list[x]; x++) {
    496         if (DosQueryPathInfo(is->list[x], FIL_QUERYFULLNAME, s, sizeof(s)))
    497           strcpy(s, is->list[x]);
     494      for (x = 0; pfs->list[x]; x++) {
     495        if (DosQueryPathInfo(pfs->list[x], FIL_QUERYFULLNAME, s, sizeof(s)))
     496          strcpy(s, pfs->list[x]);
    498497        WinSendDlgItemMsg(hwnd,
    499498                          FLE_NAME,
     
    512511                      &RGBGREY, &RGBBLACK, &RGBBLACK, NULL);
    513512    }
    514     WinSetWindowPtr(WinWindowFromID(hwnd, FLE_ICON), QWL_USER, (PVOID) is);
    515     is->oldproc = WinSubclassWindow(WinWindowFromID(hwnd, FLE_ICON),
     513    pis = xmallocz(sizeof(ICONSTUF), pszSrcFile, __LINE__);
     514    if (!pis) {
     515      WinDismissDlg(hwnd, 1);
     516      break;
     517    }
     518    WinSetWindowPtr(WinWindowFromID(hwnd, FLE_ICON), QWL_USER, (PVOID) pis);
     519    pis->size = sizeof(ICONSTUF);
     520    pis->pfs = pfs;
     521    pis->oldproc = WinSubclassWindow(WinWindowFromID(hwnd, FLE_ICON),
    516522                                    IconProc);
    517523    break;
     
    525531      switch (SHORT2FROMMP(mp1)) {
    526532      case BN_CLICKED:
    527         is = WinQueryWindowPtr(hwnd, QWL_USER);
    528         if (is && *is->szFileName) {
     533        pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     534        if (pfs && *pfs->szFileName) {
    529535
    530536          LISTINFO li;
     
    532538
    533539          memset(&li, 0, sizeof(LISTINFO));
    534           if (!AddToList(is->szFileName, &li.list, &numfiles, &numalloc)) {
     540          if (!AddToList(pfs->szFileName, &li.list, &numfiles, &numalloc)) {
    535541            if (WinDlgBox(HWND_DESKTOP,
    536542                          hwnd,
     
    538544                          FM3ModHandle,
    539545                          ATR_FRAME, MPFROMP(&li)) && li.list && li.list[0]) {
    540               is->madechanges = TRUE;
     546              pfs->madechanges = TRUE;
    541547              WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
    542548            }
     
    551557      case LN_ENTER:
    552558      case LN_SELECT:
    553         is = WinQueryWindowPtr(hwnd, QWL_USER);
    554         if (!is) {
     559        pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     560        if (!pfs) {
    555561          Runtime_Error(pszSrcFile, __LINE__, "no data");
    556562          WinDismissDlg(hwnd, 1);
     
    565571                                              MPFROMSHORT(LIT_FIRST), MPVOID);
    566572          if (sSelect >= 0) {
    567             *is->szFileName = 0;
     573            *pfs->szFileName = 0;
    568574            WinSendDlgItemMsg(hwnd,
    569575                              FLE_NAME,
    570576                              LM_QUERYITEMTEXT,
    571577                              MPFROM2SHORT(sSelect, CCHMAXPATH),
    572                               MPFROMP(is->szFileName));
    573             if (*is->szFileName) {
     578                              MPFROMP(pfs->szFileName));
     579            if (*pfs->szFileName) {
    574580              if (SHORT2FROMMP(mp1) == LN_SELECT)
    575581                WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
    576582              else
    577583                DefaultView(hwnd,
    578                             (HWND) 0, (HWND) 0, NULL, 32, is->szFileName);
     584                            (HWND) 0, (HWND) 0, NULL, 32, pfs->szFileName);
    579585            }
    580586          }
     
    610616    WinCheckButton(hwnd, FLE_VIRTDRV, FALSE);
    611617    WinCheckButton(hwnd, FLE_PROTDLL, FALSE);
    612     is = WinQueryWindowPtr(hwnd, QWL_USER);
    613     if (is && *is->szFileName) {
     618    pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     619    if (pfs && *pfs->szFileName) {
    614620      CHAR s[97];
    615621      FILEFINDBUF4 fs;
     
    621627
    622628      DosError(FERR_DISABLEHARDERR);
    623       if (DosFindFirst(is->szFileName,
     629      if (DosFindFirst(pfs->szFileName,
    624630                       &hdir,
    625631                       FILE_NORMAL | FILE_ARCHIVED |
     
    700706        WinCheckButton(hwnd, FLE_SYSTEM, ((fs.attrFile & FILE_SYSTEM) != 0));
    701707        DosError(FERR_DISABLEHARDERR);
    702         if (!DosQueryAppType(is->szFileName, &apptype)) {
     708        if (!DosQueryAppType(pfs->szFileName, &apptype)) {
    703709          WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), TRUE);
    704710          WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), TRUE);
     
    754760          WinEnableWindow(WinWindowFromID(hwnd, FLE_PROTDLL), FALSE);
    755761        }
    756         hptr = WinLoadFileIcon(is->szFileName, FALSE);
     762        hptr = WinLoadFileIcon(pfs->szFileName, FALSE);
    757763        WinShowWindow(WinWindowFromID(hwnd, FLE_ICON), FALSE);
    758764        if (hptr) {
     
    768774          WinEnableWindow(WinWindowFromID(hwnd, FLE_ISARCHIVE), TRUE);
    769775          WinEnableWindow(WinWindowFromID(hwnd, FLE_BINARY), TRUE);
    770           fp = _fsopen(is->szFileName, "rb", SH_DENYNO);
     776          fp = _fsopen(pfs->szFileName, "rb", SH_DENYNO);
    771777          if (fp) {
    772778            char buff[512];
     
    781787                           ((len && rc) ? IsBinary(buff, len) : 2));
    782788            WinCheckButton(hwnd, FLE_READABLE, TRUE);
    783             info = find_type(is->szFileName, NULL);
     789            info = find_type(pfs->szFileName, NULL);
    784790            if (info) {
    785791              WinCheckButton(hwnd, FLE_ISARCHIVE, 1);
     
    792798            WinCheckButton(hwnd, FLE_BINARY, 2);
    793799          }
    794           fp = _fsopen(is->szFileName, "ab", SH_DENYNO);
     800          fp = _fsopen(pfs->szFileName, "ab", SH_DENYNO);
    795801          if (fp) {
    796802            WinCheckButton(hwnd, FLE_WRITEABLE, TRUE);
    797803            fclose(fp);
    798804          }
    799           fp = _fsopen(is->szFileName, "rb", SH_DENYRW);
     805          fp = _fsopen(pfs->szFileName, "rb", SH_DENYRW);
    800806          if (!fp)
    801807            WinCheckButton(hwnd, FLE_OPEN, TRUE);
     
    817823    switch (SHORT1FROMMP(mp1)) {
    818824    case DID_OK:
    819       is = WinQueryWindowPtr(hwnd, QWL_USER);
    820       WinDismissDlg(hwnd, (is && is->madechanges) ? 2 : 1);
     825      pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     826      WinDismissDlg(hwnd, (pfs && pfs->madechanges) ? 2 : 1);
    821827      break;
    822828    case IDM_HELP:
     
    827833      break;
    828834    case FLE_SETTINGS:
    829       is = WinQueryWindowPtr(hwnd, QWL_USER);
    830       if (is && *is->szFileName)
    831         OpenObject(is->szFileName, Settings, hwnd);
     835      pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     836      if (pfs && *pfs->szFileName)
     837        OpenObject(pfs->szFileName, Settings, hwnd);
    832838      break;
    833839    case FLE_EAS:
    834       is = WinQueryWindowPtr(hwnd, QWL_USER);
    835       if (is && *is->szFileName) {
     840      pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     841      if (pfs && *pfs->szFileName) {
    836842
    837843        CHAR *list[2];
    838844
    839         list[0] = is->szFileName;
     845        list[0] = pfs->szFileName;
    840846        list[1] = NULL;
    841847        WinDlgBox(HWND_DESKTOP,
     
    844850      break;
    845851    case DID_CANCEL:
    846       is = WinQueryWindowPtr(hwnd, QWL_USER);
    847       WinDismissDlg(hwnd, (is && is->madechanges) ? 2 : 0);
     852      pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     853      WinDismissDlg(hwnd, (pfs && pfs->madechanges) ? 2 : 0);
    848854      break;
    849855    }
     
    851857
    852858  case WM_DESTROY:
    853     is = WinQueryWindowPtr(hwnd, QWL_USER);
    854     if (is)
    855       free(is);
     859    pfs = WinQueryWindowPtr(hwnd, QWL_USER);
     860    if (pfs)
     861      free(pfs);
    856862    break;
    857863  }
     
    873879      WinSetWindowText(hwnd, s);
    874880/*
    875         WinEnableWindow(WinWindowFromID(hwnd,DVS_REMOVABLE),FALSE);
    876         WinEnableWindow(WinWindowFromID(hwnd,DVS_NOTWRITEABLE),FALSE);
    877         WinEnableWindow(WinWindowFromID(hwnd,DVS_IGNORE),FALSE);
    878         WinEnableWindow(WinWindowFromID(hwnd,DVS_CDROM),FALSE);
    879         WinEnableWindow(WinWindowFromID(hwnd,DVS_NOLONGNAMES),FALSE);
    880         WinEnableWindow(WinWindowFromID(hwnd,DVS_REMOTE),FALSE);
    881         WinEnableWindow(WinWindowFromID(hwnd,DVS_VIRTUAL),FALSE);
    882         WinEnableWindow(WinWindowFromID(hwnd,DVS_RAMDISK),FALSE);
    883         WinEnableWindow(WinWindowFromID(hwnd,DVS_BOOT),FALSE);
    884         WinEnableWindow(WinWindowFromID(hwnd,DVS_INVALID),FALSE);
    885         WinEnableWindow(WinWindowFromID(hwnd,DVS_ZIPSTREAM),FALSE);
    886         WinEnableWindow(WinWindowFromID(hwnd,DVS_NOSTATS),FALSE);
     881        WinEnableWindow(WinWindowFromID(hwnd,DVS_REMOVABLE),FALSE);
     882        WinEnableWindow(WinWindowFromID(hwnd,DVS_NOTWRITEABLE),FALSE);
     883        WinEnableWindow(WinWindowFromID(hwnd,DVS_IGNORE),FALSE);
     884        WinEnableWindow(WinWindowFromID(hwnd,DVS_CDROM),FALSE);
     885        WinEnableWindow(WinWindowFromID(hwnd,DVS_NOLONGNAMES),FALSE);
     886        WinEnableWindow(WinWindowFromID(hwnd,DVS_REMOTE),FALSE);
     887        WinEnableWindow(WinWindowFromID(hwnd,DVS_VIRTUAL),FALSE);
     888        WinEnableWindow(WinWindowFromID(hwnd,DVS_RAMDISK),FALSE);
     889        WinEnableWindow(WinWindowFromID(hwnd,DVS_BOOT),FALSE);
     890        WinEnableWindow(WinWindowFromID(hwnd,DVS_INVALID),FALSE);
     891        WinEnableWindow(WinWindowFromID(hwnd,DVS_ZIPSTREAM),FALSE);
     892        WinEnableWindow(WinWindowFromID(hwnd,DVS_NOSTATS),FALSE);
    887893*/
    888894      PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
     
    907913                     ((driveflags[drive] & DRIVE_REMOTE) != 0));
    908914      WinCheckButton(hwnd,DVS_VIRTUAL,
    909                      ((driveflags[drive] & DRIVE_VIRTUAL) != 0));
     915                     ((driveflags[drive] & DRIVE_VIRTUAL) != 0));
    910916      WinCheckButton(hwnd,DVS_RAMDISK,
    911                      ((driveflags[drive] & DRIVE_RAMDISK) != 0));
     917                     ((driveflags[drive] & DRIVE_RAMDISK) != 0));
    912918      WinCheckButton(hwnd, DVS_BOOT,
    913                      ((driveflags[drive] & DRIVE_BOOT) != 0));
     919                     ((driveflags[drive] & DRIVE_BOOT) != 0));
    914920      WinCheckButton(hwnd, DVS_INVALID,
    915921                     ((driveflags[drive] & DRIVE_INVALID) != 0));
     
    928934                     ((driveflags[drive] & DRIVE_INCLUDEFILES) != 0));
    929935      WinCheckButton(hwnd,DVS_NOSTATS,
    930                      ((driveflags[drive] & DRIVE_NOSTATS) != 0));
     936                     ((driveflags[drive] & DRIVE_NOSTATS) != 0));
    931937    }
    932938    return 0;
     
    965971        else
    966972          driveflags[drive] &= (~DRIVE_INCLUDEFILES);
    967         if (WinQueryButtonCheckstate(hwnd,DVS_NOSTATS))
    968           driveflags[drive] |= DRIVE_NOSTATS;
    969         else
    970           driveflags[drive] &= (~DRIVE_NOSTATS);
     973        if (WinQueryButtonCheckstate(hwnd,DVS_NOSTATS))
     974          driveflags[drive] |= DRIVE_NOSTATS;
     975        else
     976          driveflags[drive] &= (~DRIVE_NOSTATS);
    971977        {
    972978          ULONG flags;
     
    978984                      DRIVE_IGNORE | DRIVE_CDROM |
    979985                      DRIVE_NOLONGNAMES | DRIVE_REMOTE |
    980                       DRIVE_BOOT | DRIVE_INVALID | DRIVE_ZIPSTREAM |
    981                       DRIVE_VIRTUAL  | DRIVE_RAMDISK));
     986                      DRIVE_BOOT | DRIVE_INVALID | DRIVE_ZIPSTREAM |
     987                      DRIVE_VIRTUAL  | DRIVE_RAMDISK));
    982988          PrfWriteProfileData(fmprof, appname, s, &flags, sizeof(ULONG));
    983989        }
  • trunk/dll/notebook.c

    r551 r575  
    816816    WinCheckButton(hwnd, CFGG_DEFAULTDELETEPERM, fDefaultDeletePerm);
    817817    {
    818       long th;
    819 
    820       th = (fNoFinger) ? 2 : (fNoDead) ? 1 : 0;
     818      long th = fNoFinger ? 2 : (fNoDead ? 1 : 0);
    821819      WinCheckButton(hwnd, CFGG_NODEAD, th);
    822820    }
  • trunk/dll/worker.c

    r559 r575  
    458458                                   HWND_DESKTOP,
    459459                                   FileInfoProc,
    460                                    FM3ModHandle, FLE_FRAME, (PVOID) list))
     460                                   FM3ModHandle, FLE_FRAME, (PVOID) list)) {
    461461                      goto Abort;
     462                    }
    462463                  }
    463464                  else {
     
    9991000                          FileInfoProc,
    10001001                          FM3ModHandle, FLE_FRAME, (PVOID) wk->li->list) != 2)
     1002            {
    10011003              break;
     1004            }
    10021005            /* else intentional fallthru */
    10031006          case IDM_UPDATE:
Note: See TracChangeset for help on using the changeset viewer.