Changeset 1159

Show
Ignore:
Timestamp:
09/05/08 23:41:13 (3 months ago)
Author:
jbs
Message:

Ticket 187: Draft 1: Functions only

Location:
trunk/dll
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/dll/autoview.c

    r1078 r1159  
    4343#include "errutil.h"                    // Dos_Error... 
    4444#include "strutil.h"                    // GetPString 
     45#include "autoview.h" 
     46#include "defview.h"                    // DefaultView 
     47#include "valid.h"                      // IsBinary 
    4548#include "fm3dll.h" 
    4649 
     
    5457static CHAR stopflag; 
    5558static CHAR currfile[CCHMAXPATH]; 
     59 
     60static BOOL PutComments(HWND hwnd, CHAR * filename, CHAR * comments); 
     61static BOOL WriteEA(HWND hwnd, CHAR * filename, CHAR * eaname, USHORT type, 
     62             CHAR * data); 
    5663 
    5764BOOL WriteEA(HWND hwnd, CHAR * filename, CHAR * eaname, USHORT type, 
  • trunk/dll/codepage.c

    r907 r1159  
    2525#include "strutil.h"                    // GetPString 
    2626#include "errutil.h"                    // Runtime_Error 
     27#include "codepage.h" 
    2728#include "fm3dll.h" 
    2829 
  • trunk/dll/collect.c

    r1120 r1159  
    1  
    21/*********************************************************************** 
    32 
     
    8382#include "notebook.h"                   // CfgDlgProc 
    8483#include "command.h"                    // RunCommand 
     84#include "worker.h"                     // Action, MassAction 
     85#include "notify.h"                     // AddNote 
     86#include "misc.h"                       // AdjustCnrColsForPref, AdjustDetailsSwitches, CnrDirectEdit, 
     87                                        // LoadDetailsSwitches, OpenEdit, QuickPopup, SayFilter 
     88                                        // SaySort, SayView, SetCnrCols, SetDetailsSwitches 
     89                                        // SetSortChecks, SetViewMenu, disable_menuitem 
     90#include "chklist.h"                    // CenterOverWindow, DropListProc 
     91#include "collect.h" 
     92#include "common.h"                     // CommonCnrProc, CommonCreateTextChildren, CommonFrameWndProc 
     93                                        // CommonTextPaint 
     94#include "select.h"                     // DeselectAll, HideAll, RemoveAll, SelectAll, SelectList 
     95#include "dirsize.h"                    // DirSizeProc 
     96#include "grep2.h"                      // GrepDlgProc 
     97#include "mainwnd.h"                    // MakeBubble 
     98#include "objwin.h"                     // MakeObjWin 
     99#include "saveclip.h"                   // SaveListDlgProc 
     100#include "findrec.h"                    // ShowCnrRecord 
     101#include "sortcnr.h"                    // SortCollectorCnr 
     102#include "seeall.h"                     // StartSeeAll 
     103#include "update.h"                     // UpdateCnrList, UpdateCnrRecord 
    85104#include "fm3dll.h" 
     105#include "select.h"                     // InvertAll 
    86106 
    87107#include "fortify.h" 
  • trunk/dll/common.c

    r1041 r1159  
    4141#include "errutil.h"                    // Dos_Error... 
    4242#include "strutil.h"                    // GetPString 
     43#include "autoview.h"                   // AutoViewProc 
     44#include "mainwnd.h"                    // BuildDriveBarButtons, TopWindow 
     45#include "common.h" 
     46#include "dirsize.h"                    // DirSizeProc 
     47#include "info.h"                       // DrvInfoProc, SetDrvProc 
     48#include "seeall.h"                     // StartSeeAll 
    4349#include "fm3dll.h" 
    4450#include "fortify.h" 
  • trunk/dll/dirs.c

    r907 r1159  
    1717#include <ctype.h> 
    1818 
    19 #define INCL_LONGLONG                   // dircnrs.h 
     19#define INCL_LONGLONG                   // dircnrs.h 
    2020 
    2121#include "fm3dll.h" 
     22#include "dirs.h" 
     23#include "valid.h"                      // IsValidDir 
    2224 
    2325APIRET save_dir2(CHAR * curdir) 
     
    3335      env = strrchr(curdir, '\\'); 
    3436      if (env) { 
    35         *env = 0; 
    36         if (IsValidDir(curdir)) 
    37           return 0; 
     37        *env = 0; 
     38        if (IsValidDir(curdir)) 
     39          return 0; 
    3840      } 
    3941    } 
     
    5052  *curdir = 0; 
    5153  ret = DosQCurDisk(&curdrive, &drivemap); 
    52   curdirlen = CCHMAXPATH - 4;           /* NOTE!!!!!!!!! */ 
     54  curdirlen = CCHMAXPATH - 4;           /* NOTE!!!!!!!!! */ 
    5355  ret += DosQCurDir(curdrive, &curdir[3], &curdirlen); 
    5456  *curdir = (CHAR) ('@' + (INT) curdrive); 
     
    7173      p = strrchr(path, '\\'); 
    7274      if (p) 
    73         *p = 0; 
     75        *p = 0; 
    7476      else { 
    75         strcpy(path, s); 
    76         break; 
     77        strcpy(path, s); 
     78        break; 
    7779      } 
    7880    } 
     
    8688    if (!DosQCurDisk(&curdrive, &drivemap)) { 
    8789      if ((CHAR) ((CHAR) curdrive + '@') != (CHAR) toupper(*HomePath) && 
    88           (CHAR) ((CHAR) curdrive + '@') != (CHAR) toupper(*path)) 
    89         DosChDir("\\"); 
     90          (CHAR) ((CHAR) curdrive + '@') != (CHAR) toupper(*path)) 
     91        DosChDir("\\"); 
    9092    } 
    9193    ret = DosSelectDisk(toupper(*path) - '@'); 
  • trunk/dll/droplist.c

    r1063 r1159  
    3333#include "errutil.h"                    // Dos_Error... 
    3434#include "strutil.h"                    // GetPString 
     35#include "droplist.h" 
    3536#include "fm3dll.h" 
    3637 
     
    4041 
    4142static ULONG GetDropCount(HWND hwnd, MPARAM mp1); 
     43static BOOL TwoDrgNames(PDRAGITEM pDItem, CHAR * buffer1, ULONG buflen1, 
     44                 char *buffer2, ULONG buflen2); 
    4245 
    4346BOOL CheckPmDrgLimit(PDRAGINFO pDInfo) 
  • trunk/dll/filldir.c

    r1154 r1159  
    6969#include "fortify.h"                    // 06 May 08 SHL 
    7070#include "notebook.h"                   // INI file fields 
     71#include "flesh.h"                      // FleshEnv, Stubby 
     72#include "update.h"                     // SelectDriveIcon 
    7173#include "fm3dll.h" 
    7274 
  • trunk/dll/misc.c

    r1120 r1159  
    1  
    21/*********************************************************************** 
    32 
     
    4241  29 Feb 08 GKY Use xfree where appropriate 
    4342  08 Mar 08 JBS Ticket 230: Replace prefixless INI keys for default directory containers with 
    44                 keys using a "DirCnr." prefix 
     43                keys using a "DirCnr." prefix 
    4544  19 Jun 08 JBS Ticket 239: Fix LoadDetailsSwitches so INI file is read correctly and details 
    46                 switches are set correctly. 
     45                switches are set correctly. 
    4746  11 Jul 08 JBS Ticket 230: Simplified code and eliminated some local variables by incorporating 
    48                 all the details view settings (both the global variables and those in the 
    49                 DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
     47                all the details view settings (both the global variables and those in the 
     48                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS. 
    5049  17 Jul 08 SHL Add GetTidForWindow for Fortify support 
    5150  20 Jul 08 GKY Add save/append filename to clipboard. 
     
    5958#include <ctype.h> 
    6059#include <share.h> 
    61 #include <malloc.h>                     // _heapmin 
     60#include <malloc.h>                     // _heapmin 
    6261 
    6362#define INCL_DOS 
     
    6867#include "fm3dlg.h" 
    6968#include "fm3str.h" 
    70 #include "pathutil.h"                   // BldQuotedFileName 
    71 #include "errutil.h"                    // Dos_Error... 
    72 #include "strutil.h"                    // GetPString 
    73 #include "command.h"                    // LINKCMDS 
     69#include "pathutil.h"                   // BldQuotedFileName 
     70#include "errutil.h"                    // Dos_Error... 
     71#include "strutil.h"                    // GetPString 
     72#include "command.h"                    // LINKCMDS 
     73#include "cmdline.h"                    // CmdLineDlgProc 
     74#include "defview.h"                    // QuickView 
     75#include "copyf.h"                      // WriteLongName 
     76#include "strips.h"                     // chop_at_crnl 
    7477#include "fm3dll.h" 
     78#include "fortify.h" 
    7579#include "misc.h" 
    76 #include "fortify.h" 
    7780 
    7881#pragma data_seg(DATA1) 
     
    8184 
    8285#ifndef BEGIN_LIBPATH 
    83 #define BEGIN_LIBPATH       1 
     86#define BEGIN_LIBPATH       1 
    8487#endif 
    8588 
    8689#ifndef END_LIBPATH 
    87 #define END_LIBPATH           2 
     90#define END_LIBPATH           2 
    8891#endif 
    8992 
     
    101104    if (rc) { 
    102105      Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 
    103                 "DosGetInfoBlocks"); 
     106                "DosGetInfoBlocks"); 
    104107      yes = FALSE; 
    105108    } 
     
    112115      // OK for window to be dead - just return FALSE 
    113116      yes = WinQueryWindowProcess(hwnd, &pid, &tid) && 
    114             pid == ppib->pib_ulpid && 
    115             (!chkTid || tid == ptib->tib_ptib2->tib2_ultid); 
     117            pid == ppib->pib_ulpid && 
     118            (!chkTid || tid == ptib->tib_ptib2->tib2_ultid); 
    116119    } 
    117120    return yes; 
     
    136139    if (rc) { 
    137140      Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 
    138                 "DosGetInfoBlocks"); 
     141                "DosGetInfoBlocks"); 
    139142    } 
    140143    else { 
     
    142145      TID tid; 
    143146      if (!WinQueryWindowProcess(hwnd, &pid, &tid)) 
    144         Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__, "WinQueryWindowProcess failed for %X", hwnd); 
     147        Win_Error(hwnd, HWND_DESKTOP, pszSrcFile, __LINE__, "WinQueryWindowProcess failed for %X", hwnd); 
    145148      else if (pid != ppib->pib_ulpid) 
    146         Runtime_Error(pszSrcFile, __LINE__, "hwnd %X not created by fm/2", hwnd); 
     149        Runtime_Error(pszSrcFile, __LINE__, "hwnd %X not created by fm/2", hwnd); 
    147150      else 
    148         ordinal = ptib->tib_ptib2->tib2_ultid; 
     151        ordinal = ptib->tib_ptib2->tib2_ultid; 
    149152    } 
    150153    return ordinal; 
     
    165168    if (rc) { 
    166169      Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 
    167                 "DosGetInfoBlocks"); 
     170                "DosGetInfoBlocks"); 
    168171    } 
    169172    else 
     
    272275      WinQueryWindowText(hwnd, CCHMAXPATH, s); 
    273276      if (*s) { 
    274         rcl.xRight -= 3; 
    275         p = s; 
    276         GpiQueryTextBox(hps, 3, "...", TXTBOX_COUNT, aptl); 
    277         len = aptl[TXTBOX_TOPRIGHT].x; 
    278         do { 
    279           GpiQueryTextBox(hps, strlen(p), p, TXTBOX_COUNT, aptl); 
    280           if (aptl[TXTBOX_TOPRIGHT].x > (rcl.xRight - (p != s ? len : 0))) 
    281             p++; 
    282           else 
    283             break; 
    284         } 
    285         while (*p); 
    286         if (*p) { 
    287           GpiSetMix(hps, FM_OVERPAINT); 
    288           GpiSetColor(hps, CLR_BLACK); 
    289           ptl.x = 3; 
    290           ptl.y = ((rcl.yTop / 2) - 
    291                    ((aptl[TXTBOX_TOPRIGHT].y + 
    292                      aptl[TXTBOX_BOTTOMLEFT].y) / 2)); 
    293           GpiMove(hps, &ptl); 
    294           if (p != s) 
    295             GpiCharString(hps, 3, "..."); 
    296           GpiCharString(hps, strlen(p), p); 
    297         } 
     277        rcl.xRight -= 3; 
     278        p = s; 
     279        GpiQueryTextBox(hps, 3, "...", TXTBOX_COUNT, aptl); 
     280        len = aptl[TXTBOX_TOPRIGHT].x; 
     281        do { 
     282          GpiQueryTextBox(hps, strlen(p), p, TXTBOX_COUNT, aptl); 
     283          if (aptl[TXTBOX_TOPRIGHT].x > (rcl.xRight - (p != s ? len : 0))) 
     284            p++; 
     285          else 
     286            break; 
     287        } 
     288        while (*p); 
     289        if (*p) { 
     290          GpiSetMix(hps, FM_OVERPAINT); 
     291          GpiSetColor(hps, CLR_BLACK); 
     292          ptl.x = 3; 
     293          ptl.y = ((rcl.yTop / 2) - 
     294                   ((aptl[TXTBOX_TOPRIGHT].y + 
     295                     aptl[TXTBOX_BOTTOMLEFT].y) / 2)); 
     296          GpiMove(hps, &ptl); 
     297          if (p != s) 
     298            GpiCharString(hps, 3, "..."); 
     299          GpiCharString(hps, strlen(p), p); 
     300        } 
    298301      } 
    299302      free(s); 
     
    379382{ 
    380383  PFIELDINFO pfi = (PFIELDINFO) WinSendMsg(hwndCnr, 
    381                                            CM_QUERYDETAILFIELDINFO, 
    382                                            MPVOID, MPFROMSHORT(CMA_FIRST)); 
     384                                           CM_QUERYDETAILFIELDINFO, 
     385                                           MPVOID, MPFROMSHORT(CMA_FIRST)); 
    383386 
    384387  while (pfi) { 
    385388    if (!strcmp(pfi->pTitleData, title)) { 
    386389      if (toggle) { 
    387         if (pfi->flData & CFA_INVISIBLE) 
    388           pfi->flData &= (~CFA_INVISIBLE); 
    389         else 
    390           pfi->flData |= CFA_INVISIBLE; 
    391         return !(pfi->flData & CFA_INVISIBLE); 
     390        if (pfi->flData & CFA_INVISIBLE) 
     391          pfi->flData &= (~CFA_INVISIBLE); 
     392        else 
     393          pfi->flData |= CFA_INVISIBLE; 
     394        return !(pfi->flData & CFA_INVISIBLE); 
    392395      } 
    393396      else { 
    394         if (visible) 
    395           pfi->flData &= (~CFA_INVISIBLE); 
    396         else 
    397           pfi->flData |= CFA_INVISIBLE; 
     397        if (visible) 
     398          pfi->flData &= (~CFA_INVISIBLE); 
     399        else 
     400          pfi->flData |= CFA_INVISIBLE; 
    398401      } 
    399402      return TRUE; 
     
    407410{ 
    408411  PFIELDINFO pfi = (PFIELDINFO) WinSendMsg(hwndCnr, 
    409                                            CM_QUERYDETAILFIELDINFO, 
    410                                            MPVOID, MPFROMSHORT(CMA_FIRST)); 
     412                                           CM_QUERYDETAILFIELDINFO, 
     413                                           MPVOID, MPFROMSHORT(CMA_FIRST)); 
    411414 
    412415  while (pfi) { 
    413416    if (!strcmp(pfi->pTitleData, title)) { 
    414417      if (toggle) { 
    415         if (pfi->flData & CFA_FIREADONLY) 
    416           pfi->flData &= (~CFA_FIREADONLY); 
    417         else 
    418           pfi->flData |= CFA_FIREADONLY; 
    419         return (pfi->flData & CFA_FIREADONLY); 
     418        if (pfi->flData & CFA_FIREADONLY) 
     419          pfi->flData &= (~CFA_FIREADONLY); 
     420        else 
     421          pfi->flData |= CFA_FIREADONLY; 
     422        return (pfi->flData & CFA_FIREADONLY); 
    420423      } 
    421424      else { 
    422         if (!readonly) 
    423           pfi->flData &= (~CFA_FIREADONLY); 
    424         else 
    425           pfi->flData |= CFA_FIREADONLY; 
     425        if (!readonly) 
     426          pfi->flData &= (~CFA_FIREADONLY); 
     427        else 
     428          pfi->flData |= CFA_FIREADONLY; 
    426429      } 
    427430      return TRUE; 
     
    445448  if (x != -1) { 
    446449    if (!stricmp(FileSystem, HPFS) || 
    447         !stricmp(FileSystem, JFS) || 
    448         !stricmp(FileSystem, FAT32) || 
    449         !stricmp(FileSystem, RAMFS) || 
    450         !stricmp(FileSystem, NDFS32) || 
    451         !stricmp(FileSystem, NTFS) || 
    452         !stricmp(FileSystem, HPFS386)) { 
     450        !stricmp(FileSystem, JFS) || 
     451        !stricmp(FileSystem, FAT32) || 
     452        !stricmp(FileSystem, RAMFS) || 
     453        !stricmp(FileSystem, NDFS32) || 
     454        !stricmp(FileSystem, NTFS) || 
     455        !stricmp(FileSystem, HPFS386)) { 
    453456      hasCreateDT = TRUE; 
    454457      hasAccessDT = TRUE; 
     
    474477  } 
    475478  AdjustCnrColVis(hwndCnr, 
    476                   GetPString(IDS_LADATE), 
    477                   pds->detailsladate ? hasAccessDT : FALSE, 
    478                   FALSE); 
     479                  GetPString(IDS_LADATE), 
     480                  pds->detailsladate ? hasAccessDT : FALSE, 
     481                  FALSE); 
    479482  AdjustCnrColVis(hwndCnr, 
    480                   GetPString(IDS_LATIME), 
    481                   pds->detailslatime ? hasAccessDT : FALSE, 
    482                   FALSE); 
     483                  GetPString(IDS_LATIME), 
     484                  pds->detailslatime ? hasAccessDT : FALSE, 
     485                  FALSE); 
    483486  AdjustCnrColVis(hwndCnr, 
    484                   GetPString(IDS_CRDATE), 
    485                   pds->detailscrdate ? hasCreateDT : FALSE, 
    486                   FALSE); 
     487                  GetPString(IDS_CRDATE), 
     488                  pds->detailscrdate ? hasCreateDT : FALSE, 
     489                  FALSE); 
    487490  AdjustCnrColVis(hwndCnr, 
    488                   GetPString(IDS_CRTIME), 
    489                   pds->detailscrtime ? hasCreateDT : FALSE, 
    490                   FALSE); 
     491                  GetPString(IDS_CRTIME), 
     492                  pds->detailscrtime ? hasCreateDT : FALSE, 
     493                  FALSE); 
    491494  AdjustCnrColVis(hwndCnr, 
    492                   GetPString(IDS_LNAME), 
    493                   pds->detailslongname ? hasLongNames : FALSE, 
    494                   FALSE); 
     495                  GetPString(IDS_LNAME), 
     496                  pds->detailslongname ? hasLongNames : FALSE, 
     497                  FALSE); 
    495498  WinSendMsg(hwndCnr, CM_INVALIDATEDETAILFIELDINFO, MPVOID, MPVOID); 
    496499} 
    497500 
    498501VOID AdjustCnrColsForPref(HWND hwndCnr, CHAR * directory, DETAILS_SETTINGS * pds, 
    499                           BOOL compare) 
     502                          BOOL compare) 
    500503{ 
    501504 
    502505  AdjustCnrColVis(hwndCnr, 
    503                   compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ), 
    504                   pds->detailssubject, 
    505                   FALSE); 
     506                  compare ? GetPString(IDS_STATUS) : GetPString(IDS_SUBJ), 
     507                  pds->detailssubject, 
     508                  FALSE); 
    506509 
    507510  AdjustCnrColVis(hwndCnr, GetPString(IDS_ATTR), pds->detailsattr, FALSE); 
     
    532535 
    533536  pfi = WinSendMsg(hwndCnr, CM_ALLOCDETAILFIELDINFO, 
    534                    MPFROMLONG(CONTAINER_COLUMNS), NULL); 
     537                   MPFROMLONG(CONTAINER_COLUMNS), NULL); 
    535538 
    536539  if (!pfi) { 
     
    582585      pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR; 
    583586      if (isCompCnr) 
    584         pfi->flData |= CFA_FIREADONLY; 
     587        pfi->flData |= CFA_FIREADONLY; 
    585588      pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY; 
    586589      pfi->pTitleData = isCompCnr ? GetPString(IDS_STATUS) : 
    587                                   GetPString(IDS_SUBJ); 
     590                                  GetPString(IDS_SUBJ); 
    588591      pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject); 
    589592      pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth; 
     
    602605      pfi->flData = CFA_STRING | CFA_LEFT | CFA_SEPARATOR; 
    603606      if (isCompCnr) 
    604         pfi->flData |= CFA_FIREADONLY; 
     607        pfi->flData |= CFA_FIREADONLY; 
    605608      pfi->flTitle = CFA_LEFT | CFA_FITITLEREADONLY; 
    606609      pfi->pTitleData = isCompCnr ? GetPString(IDS_STATUS) : 
    607                                   GetPString(IDS_SUBJ); 
     610                                  GetPString(IDS_SUBJ); 
    608611      pfi->offStruct = FIELDOFFSET(CNRITEM, pszSubject); 
    609612      pfi->cxWidth = dsDirCnrDefault.SubjectDisplayWidth; 
     
    697700 
    698701    if (!WinSendMsg(hwndCnr, CM_INSERTDETAILFIELDINFO, MPFROMP(pfiFirst), 
    699                     MPFROMP(&fii))) { 
     702                    MPFROMP(&fii))) { 
    700703      Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, "CM_INSERTDETAILFIELDINFO"); 
    701704      fSuccess = FALSE; 
     
    716719    size = sizeof(LONG); 
    717720    PrfQueryProfileData(fmprof, 
    718                         appname, "CnrSplitBar", &cnri.xVertSplitbar, &size); 
     721                        appname, "CnrSplitBar", &cnri.xVertSplitbar, &size); 
    719722    if (cnri.xVertSplitbar <= 0) 
    720723      cnri.xVertSplitbar = DIR_SPLITBAR_OFFSET - 32; 
    721724    if (!WinSendMsg(hwndCnr, CM_SETCNRINFO, MPFROMP(&cnri), 
    722                     MPFROMLONG(CMA_PFIELDINFOLAST | CMA_PFIELDINFOOBJECT | 
    723                                CMA_XVERTSPLITBAR))) { 
     725                    MPFROMLONG(CMA_PFIELDINFOLAST | CMA_PFIELDINFOOBJECT | 
     726                               CMA_XVERTSPLITBAR))) { 
    724727      Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, "CM_SETCNRINFO"); 
    725728      fSuccess = FALSE; 
     
    739742 
    740743      if (pci && 
    741           (INT) pci != -1 && 
    742           !IsRoot(pci->pszFileName) && 
    743           !(pci->flags & RECFLAGS_ENV) && !(pci->flags & RECFLAGS_UNDERENV)) { 
    744         if (!pfi || pfi->offStruct == FIELDOFFSET(CNRITEM, pszDisplayName)) { 
    745           PostMsg(hwnd, UM_FIXEDITNAME, MPFROMP(pci->pszFileName), MPVOID); 
    746         } 
    747         else if (pfi->offStruct == FIELDOFFSET(CNRITEM, pszSubject)) 
    748           PostMsg(hwnd, UM_FIXCNRMLE, MPFROMLONG(1048), MPVOID); 
    749         else 
    750           PostMsg(hwnd, UM_FIXCNRMLE, MPFROMLONG(CCHMAXPATH), MPVOID); 
     744          (INT) pci != -1 && 
     745          !IsRoot(pci->pszFileName) && 
     746          !(pci->flags & RECFLAGS_ENV) && !(pci->flags & RECFLAGS_UNDERENV)) { 
     747        if (!pfi || pfi->offStruct == FIELDOFFSET(CNRITEM, pszDisplayName)) { 
     748          PostMsg(hwnd, UM_FIXEDITNAME, MPFROMP(pci->pszFileName), MPVOID); 
     749        } 
     750        else if (pfi->offStruct == FIELDOFFSET(CNRITEM, pszSubject)) 
     751          PostMsg(hwnd, UM_FIXCNRMLE, MPFROMLONG(1048), MPVOID); 
     752        else 
     753          PostMsg(hwnd, UM_FIXCNRMLE, MPFROMLONG(CCHMAXPATH), MPVOID); 
    751754      } 
    752755      else 
    753         PostMsg(hwnd, CM_CLOSEEDIT, MPVOID, MPVOID); 
     756        PostMsg(hwnd, CM_CLOSEEDIT, MPVOID, MPVOID); 
    754757    } 
    755758    break; 
     
    763766 
    764767      if (pci && (INT) pci != -1 && !IsRoot(pci->pszFileName)) { 
    765         if (pfi && pfi->offStruct == FIELDOFFSET(CNRITEM, pszSubject)) { 
    766  
    767           APIRET rc; 
    768           EAOP2 eaop; 
    769           PFEA2LIST pfealist = NULL; 
    770           CHAR szSubject[1048]; 
    771           ULONG ealen; 
    772           USHORT len; 
    773           CHAR *eaval; 
    774           LONG retlen; 
    775           PSZ psz; 
    776  
    777           retlen = WinQueryWindowText(hwndMLE, sizeof(szSubject), szSubject); 
    778           szSubject[retlen + 1] = 0; 
    779           bstrip(szSubject); 
    780           if (pci->pszSubject != NullStr) { 
    781             if (retlen == 0) { 
    782               psz = pci->pszSubject; 
    783               pci->pszSubject = NullStr; 
    784               xfree(psz, pszSrcFile, __LINE__); 
    785             } 
    786             else 
    787               pci->pszSubject = xrealloc(pci->pszSubject, retlen + 1, pszSrcFile, __LINE__); 
    788           } 
    789           else { 
    790             pci->pszSubject = xmalloc(retlen + 1, pszSrcFile, __LINE__); 
    791             if (!pci->pszSubject) 
    792               return FALSE; 
    793           } 
    794           len = strlen(szSubject); 
    795           if (len) 
    796