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:
@ -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);
|
||||
|
Reference in New Issue
Block a user