1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

stdin multiple file fixes (#3222)

* Fixes for https://github.com/facebook/zstd/issues/3206 - bugs when handling stdin as part of multiple files.

* new line at end of multiple-files.sh
This commit is contained in:
Yonatan Komornik
2022-07-29 16:13:07 -07:00
committed by GitHub
parent d4a5bc4efc
commit ae4670466c
6 changed files with 62 additions and 4 deletions

View File

@ -509,6 +509,16 @@ FileNamesTable* UTIL_allocateFileNamesTable(size_t tableSize)
return fnt;
}
int UTIL_searchFileNamesTable(FileNamesTable* table, char const* name) {
size_t i;
for(i=0 ;i < table->tableSize; i++) {
if(!strcmp(table->fileNames[i], name)) {
return (int)i;
}
}
return -1;
}
void UTIL_refFilename(FileNamesTable* fnt, const char* filename)
{
assert(fnt->tableSize < fnt->tableCapacity);