Lines Matching refs:context

135 static ISTDFIOFile* DEMOi_HIO_AllocFile(DEMOHIOContext *context)  in DEMOi_HIO_AllocFile()  argument
138 u32 index = MATH_CTZ((u32)~context->busyfiles); in DEMOi_HIO_AllocFile()
141 context->busyfiles |= (1 << index); in DEMOi_HIO_AllocFile()
142 file = &context->file[index]; in DEMOi_HIO_AllocFile()
157 static void DEMOi_HIO_FreeFile(DEMOHIOContext *context, ISTDFIOFile *file) in DEMOi_HIO_FreeFile() argument
159 int index = (context->file - file); in DEMOi_HIO_FreeFile()
160 context->busyfiles &= ~(1 << index); in DEMOi_HIO_FreeFile()
161 context->validfiles &= ~(1 << index); in DEMOi_HIO_FreeFile()
175 static void DEMOi_HIO_CreateFullPath(DEMOHIOContext *context, char *dst, const char *relpath) in DEMOi_HIO_CreateFullPath() argument
185 (void)STD_TSPrintf(dst, "%s/%s", context->basepath, relpath); in DEMOi_HIO_CreateFullPath()
298 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_GetPathInfo() local
299 char *tmppath = context->fullpath[0]; in DEMOi_HIO_GetPathInfo()
302 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_GetPathInfo()
332 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CreateFile() local
333 char *tmppath = context->fullpath[0]; in DEMOi_HIO_CreateFile()
335 ISTDFIOFile *file = DEMOi_HIO_AllocFile(context); in DEMOi_HIO_CreateFile()
347 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_CreateFile()
353 DEMOi_HIO_FreeFile(context, file); in DEMOi_HIO_CreateFile()
370 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_DeleteFile() local
371 char *tmppath = context->fullpath[0]; in DEMOi_HIO_DeleteFile()
373 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_DeleteFile()
392 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_RenameFileOrDirectory() local
393 char *tmppath1 = context->fullpath[0]; in DEMOi_HIO_RenameFileOrDirectory()
394 char *tmppath2 = context->fullpath[1]; in DEMOi_HIO_RenameFileOrDirectory()
397 DEMOi_HIO_CreateFullPath(context, tmppath1, relpath_src); in DEMOi_HIO_RenameFileOrDirectory()
398 DEMOi_HIO_CreateFullPath(context, tmppath2, relpath_dst); in DEMOi_HIO_RenameFileOrDirectory()
415 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CreateDirectory() local
416 char *tmppath = context->fullpath[0]; in DEMOi_HIO_CreateDirectory()
419 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_CreateDirectory()
436 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_DeleteDirectory() local
437 char *tmppath = context->fullpath[0]; in DEMOi_HIO_DeleteDirectory()
439 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_DeleteDirectory()
460 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_OpenFile() local
461 char *tmppath = context->fullpath[0]; in DEMOi_HIO_OpenFile()
462 ISTDFIOFile *handle = DEMOi_HIO_AllocFile(context); in DEMOi_HIO_OpenFile()
473 DEMOi_HIO_CreateFullPath(context, tmppath, path); in DEMOi_HIO_OpenFile()
496 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CloseFile() local
499 DEMOi_HIO_FreeFile(context, handle); in DEMOi_HIO_CloseFile()
634 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_OpenDirectory() local
635 char *tmppath = context->fullpath[0]; in DEMOi_HIO_OpenDirectory()
636 ISTDFIOFile *handle = DEMOi_HIO_AllocFile(context); in DEMOi_HIO_OpenDirectory()
644 int index = handle - context->file; in DEMOi_HIO_OpenDirectory()
645 ISTDFIOFindData *data = &context->ffdata[index]; in DEMOi_HIO_OpenDirectory()
649 DEMOi_HIO_CreateFullPath(context, tmppath, path); in DEMOi_HIO_OpenDirectory()
667 context->validfiles |= (1 << index); in DEMOi_HIO_OpenDirectory()
687 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CloseDirectory() local
690 DEMOi_HIO_FreeFile(context, handle); in DEMOi_HIO_CloseDirectory()
710 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_ReadDirectory() local
712 int index = handle - context->file; in DEMOi_HIO_ReadDirectory()
713 if ((context->validfiles & (1 << index)) == 0) in DEMOi_HIO_ReadDirectory()
719 ISTDFIOFindData *data = &context->ffdata[index]; in DEMOi_HIO_ReadDirectory()
736 context->validfiles &= ~(1 << index); in DEMOi_HIO_ReadDirectory()