Lines Matching refs:toc
113 static int32_t simpleBinarySearch(const char *s, const char *names, const TOCEntry *toc, int32_t count) {
123 int32_t cmp=strcmp(s, names+toc[number].nameOffset);
140 toc=new TOCEntry[count];
142 toc[i].nameOffset=itemNames.length();
143 toc[i].dataOffset=i; // arbitrary value, see toc comment below
151 printf("size of TOC: %6ld\n", (long)(count*8));
155 delete[] toc;
163 if(simpleBinarySearch(name, itemNameChars, toc, count)<0) {
172 // toc imitates a .dat file's array of UDataOffsetTOCEntry
176 TOCEntry *toc;
203 static int32_t prefixBinarySearch(const char *s, const char *names, const TOCEntry *toc, int32_t count) {
218 if(0==strcmpAfterPrefix(s, names+toc[0].nameOffset, startPrefixLength)) {
223 if(0==strcmpAfterPrefix(s, names+toc[limit].nameOffset, limitPrefixLength)) {
229 int32_t cmp=strcmpAfterPrefix(s, names+toc[i].nameOffset, prefixLength);
253 if(prefixBinarySearch(name, itemNameChars, toc, count)<0) {