VirtualBox

Changeset 84070 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Apr 28, 2020 11:58:24 PM (5 years ago)
Author:
vboxsync
Message:

IPRT: Massaging errmsg*-sorter.cpp and bldprog-strtab-template.cpp.h a little. bugref:9726

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/bldprog-strtab-template.cpp.h

    r84055 r84070  
    140140    /** The 127 words we've picked to be indexed by reference.  */
    141141    BLDPROGSTRING       aCompDict[127];
     142    /** The frequency of the 127 dictionary entries.  */
     143    size_t              auCompDictFreq[127];
    142144    /** Incoming strings pending compression. */
    143145    PBLDPROGSTRING     *papPendingStrings;
     
    613615         ++it, i++)
    614616    {
     617        pThis->auCompDictFreq[i]      = it->m_pPair->second;
    615618        pThis->aCompDict[i].cchString = it->m_pPair->first.length();
    616619        pThis->aCompDict[i].pszString = (char *)malloc(pThis->aCompDict[i].cchString + 1);
     
    10321035            pszBaseName, (unsigned)RT_ELEMENTS(pThis->aCompDict));
    10331036    for (unsigned i = 0; i < RT_ELEMENTS(pThis->aCompDict); i++)
    1034         fprintf(pOut, "    { %#08x, %#04x }, // %s\n",
    1035                 pThis->aCompDict[i].offStrTab, (unsigned)pThis->aCompDict[i].cchString, pThis->aCompDict[i].pszString);
     1037        fprintf(pOut, "    { %#08x, %#04x }, // %6lu - %s\n",
     1038                pThis->aCompDict[i].offStrTab, (unsigned)pThis->aCompDict[i].cchString,
     1039                (unsigned long)pThis->auCompDictFreq[i], pThis->aCompDict[i].pszString);
    10361040    fprintf(pOut, "};\n\n");
    10371041#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette