Changeset 1916 for trunk/dll/eas.c


Ignore:
Timestamp:
Nov 1, 2025, 7:30:47 PM (3 days ago)
Author:
Gregg Young
Message:

Fix easize so that EAs larger than 32767 show their actual size instead of 32767

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/eas.c

    r1915 r1916  
    14881488  DosPostEventSem(CompactSem);
    14891489}
     1490#if 1
     1491ULONG  GetLargeEASize(PSZ filename)
     1492{
     1493  ULONG EASize = 0;
     1494  PDENA2 pdena;
     1495  ULONG ulEntry = 1, ulCount = 1;
     1496  int rc = 0;
     1497
     1498    pdena = xmalloc(65536 + 1024, pszSrcFile, __LINE__);
     1499    if (pdena) {
     1500      while ((rc = DosEnumAttribute(ENUMEA_REFTYPE_PATH,
     1501                                    filename,
     1502                                    ulEntry,
     1503                                    (PVOID)pdena,
     1504                                    (ULONG)65536,
     1505                                    &ulCount,
     1506                                    ENUMEA_LEVEL_NO_VALUE) == 0) && ulCount)
     1507      {
     1508        //GKY 10/10/25  name size term null EA data size  sizeofcbName & EAf(lag) sizeofcbValue sizeof next offset
     1509        EASize += (pdena->cbName) + pdena->cbValue + (sizeof(BYTE) * 2) + sizeof(USHORT) + sizeof(USHORT);
     1510        ulEntry += ulCount; //next entry
     1511      }
     1512      free(pdena);
     1513      DosPostEventSem(CompactSem);
     1514    }
     1515  return EASize;
     1516}
     1517
     1518#endif
    14901519#pragma alloc_text(EAS,DisplayEAsProc,SaveEA,HexDumpEA,CheckEA,AddEAProc)
    14911520#pragma alloc_text(EAS1,HexDump,GetFileEAs,Free_FEAList,GetLargeEASize)
Note: See TracChangeset for help on using the changeset viewer.