MCPcopy Create free account
hub / github.com/JACoders/OpenJK / FS_HandleForFile

Function FS_HandleForFile

codemp/qcommon/files.cpp:380–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380static fileHandle_t FS_HandleForFile(void) {
381 int i;
382
383 for ( i = 1 ; i < MAX_FILE_HANDLES ; i++ ) {
384 if ( fsh[i].handleFiles.file.o == NULL ) {
385 return i;
386 }
387 }
388 Com_Error( ERR_DROP, "FS_HandleForFile: none free" );
389 return 0;
390}
391
392static FILE *FS_FileForHandle( fileHandle_t f ) {
393 if ( f < 1 || f >= MAX_FILE_HANDLES ) {

Callers 6

FS_SV_FOpenFileWriteFunction · 0.70
FS_SV_FOpenFileAppendFunction · 0.70
FS_SV_FOpenFileReadFunction · 0.70
FS_FOpenFileWriteFunction · 0.70
FS_FOpenFileAppendFunction · 0.70
FS_FOpenFileReadFunction · 0.70

Calls 1

Com_ErrorFunction · 0.70

Tested by

no test coverage detected