Changeset 103000 in vbox
- Timestamp:
- Jan 23, 2024 3:58:08 PM (14 months ago)
- svn:sync-xref-src-repo-rev:
- 161232
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/bldprog-strtab-template.cpp.h
r98103 r103000 821 821 size_t cWords = 0; 822 822 size_t iDict = 0; 823 # ifdef BLDPROG_STRTAB_PURE_ASCII 823 824 for (size_t i = 0; i < RT_ELEMENTS(pThis->aCompDict); i++) 825 # else 826 for (size_t i = 0; i < RT_ELEMENTS(pThis->aCompDict) - 1; i++) 827 # endif 824 828 { 825 829 char szTmp[2] = { (char)i, '\0' }; … … 979 983 bldProgStrTab_AddStringToHashTab(pThis, &pThis->aCompDict[i]); 980 984 # ifdef RT_STRICT 981 else if (pThis->aCompDict[i].cchString != 1) 985 else if ( pThis->aCompDict[i].cchString != 1 986 # ifndef BLDPROG_STRTAB_PURE_ASCII 987 && i != 0xff 988 # endif 989 ) 982 990 abort(); 983 991 # endif … … 1141 1149 #endif 1142 1150 { 1151 #ifdef BLDPROG_STRTAB_WITH_COMPRESSION 1152 if (uch == 0xff) 1153 abort(); 1154 #endif 1143 1155 if (uch != '\'' && uch != '\\') 1144 1156 fputc((char)uch, pOut); … … 1157 1169 fprintf(pOut, "\\u%04x", uc); 1158 1170 } 1159 # e lse1171 # endif 1160 1172 else 1161 1173 fputs(pThis->aCompDict[uch].pszString, pOut); 1162 # endif1163 1174 #else 1164 1175 else … … 1194 1205 { 1195 1206 if (BldProgBitIsSet(pThis->bmUsedChars, i) 1196 ? pThis->aCompDict[i].cchString != 1 : pThis->aCompDict[i].cchString < 1) 1207 # ifdef BLDPROG_STRTAB_PURE_ASCII 1208 ? pThis->aCompDict[i].cchString != 1 1209 # else 1210 ? pThis->aCompDict[i].cchString != (i != 0xff ? 1 : 0) 1211 # endif 1212 : pThis->aCompDict[i].cchString < 1) 1197 1213 abort(); 1198 1214 if (pThis->aCompDict[i].cchString > 1) … … 1291 1307 else if (i == 0) 1292 1308 fprintf(pOut, " /*[%3u]=*/ { 0x000000, 0x00 }, // unused, because zero terminator\n", i); 1293 else if (i < 0x20 )1309 else if (i < 0x20 || i >= 0x7f) 1294 1310 fprintf(pOut, " /*[%3u]=*/ { 0x000000, 0x00 }, // %02x\n", i, i); 1295 1311 else
Note:
See TracChangeset
for help on using the changeset viewer.