Lines Matching refs:file
204 EAS_HW_FILE *file; in EAS_HWOpenFile() local
216 file = hwInstData->files; in EAS_HWOpenFile()
220 if (file->buffer == NULL) in EAS_HWOpenFile()
229 if ((file->fileSize = ftell(ioFile)) == -1L) in EAS_HWOpenFile()
235 file->buffer = EAS_HWMalloc(hwInstData, file->fileSize); in EAS_HWOpenFile()
236 if (file->buffer == NULL) in EAS_HWOpenFile()
243 temp = (int) fread(file->buffer, (size_t) file->fileSize, 1, ioFile); in EAS_HWOpenFile()
253 file->filePos = 0; in EAS_HWOpenFile()
254 file->dup = EAS_FALSE; in EAS_HWOpenFile()
256 *pFile = file; in EAS_HWOpenFile()
259 file++; in EAS_HWOpenFile()
275 EAS_RESULT EAS_HWReadFile (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, void *pBuffer, EAS_… in EAS_HWReadFile() argument
280 if (file->buffer == NULL) in EAS_HWReadFile()
284 count = file->fileSize - file->filePos; in EAS_HWReadFile()
290 EAS_HWMemCpy(pBuffer, &file->buffer[file->filePos], count); in EAS_HWReadFile()
291 file->filePos += count; in EAS_HWReadFile()
309 EAS_RESULT EAS_HWGetByte (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, void *p) in EAS_HWGetByte() argument
313 if (file->buffer == NULL) in EAS_HWGetByte()
317 if (file->filePos >= file->fileSize) in EAS_HWGetByte()
324 *((EAS_U8*) p) = file->buffer[file->filePos++]; in EAS_HWGetByte()
337 EAS_RESULT EAS_HWGetWord (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, void *p, EAS_BOOL ms… in EAS_HWGetWord() argument
343 if ((result = EAS_HWGetByte(hwInstData, file, &c1)) != EAS_SUCCESS) in EAS_HWGetWord()
345 if ((result = EAS_HWGetByte(hwInstData, file, &c2)) != EAS_SUCCESS) in EAS_HWGetWord()
366 EAS_RESULT EAS_HWGetDWord (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, void *p, EAS_BOOL m… in EAS_HWGetDWord() argument
372 if ((result = EAS_HWGetByte(hwInstData, file, &c1)) != EAS_SUCCESS) in EAS_HWGetDWord()
374 if ((result = EAS_HWGetByte(hwInstData, file, &c2)) != EAS_SUCCESS) in EAS_HWGetDWord()
376 if ((result = EAS_HWGetByte(hwInstData, file, &c3)) != EAS_SUCCESS) in EAS_HWGetDWord()
378 if ((result = EAS_HWGetByte(hwInstData, file, &c4)) != EAS_SUCCESS) in EAS_HWGetDWord()
399 EAS_RESULT EAS_HWFilePos (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, EAS_I32 *pPosition) in EAS_HWFilePos() argument
403 if (file->buffer == NULL) in EAS_HWFilePos()
406 *pPosition = file->filePos; in EAS_HWFilePos()
419 EAS_RESULT EAS_HWFileSeek (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, EAS_I32 position) in EAS_HWFileSeek() argument
423 if (file->buffer == NULL) in EAS_HWFileSeek()
427 if ((position < 0) || (position > file->fileSize)) in EAS_HWFileSeek()
431 file->filePos = position; in EAS_HWFileSeek()
444 EAS_RESULT EAS_HWFileSeekOfs (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, EAS_I32 position) in EAS_HWFileSeekOfs() argument
448 if (file->buffer == NULL) in EAS_HWFileSeekOfs()
452 position += file->filePos; in EAS_HWFileSeekOfs()
453 if ((position < 0) || (position > file->fileSize)) in EAS_HWFileSeekOfs()
457 file->filePos = position; in EAS_HWFileSeekOfs()
470 EAS_RESULT EAS_HWFileLength (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, EAS_I32 *pLength) in EAS_HWFileLength() argument
474 if (file->buffer == NULL) in EAS_HWFileLength()
477 *pLength = file->fileSize; in EAS_HWFileLength()
489 EAS_RESULT EAS_HWDupHandle (EAS_HW_DATA_HANDLE hwInstData, EAS_FILE_HANDLE file, EAS_FILE_HANDLE *p… in EAS_HWDupHandle() argument
495 if (file->buffer == NULL) in EAS_HWDupHandle()
507 dupFile->filePos = file->filePos; in EAS_HWDupHandle()
508 dupFile->fileSize = file->fileSize; in EAS_HWDupHandle()
509 dupFile->buffer = file->buffer; in EAS_HWDupHandle()
512 dupFile->dup = file->dup = EAS_TRUE; in EAS_HWDupHandle()