Lines Matching refs:context

139 static ISTDFIOFile* DEMOi_HIO_AllocFile(DEMOHIOContext *context)  in DEMOi_HIO_AllocFile()  argument
142 u32 index = MATH_CTZ((u32)~context->busyfiles); in DEMOi_HIO_AllocFile()
145 context->busyfiles |= (1 << index); in DEMOi_HIO_AllocFile()
146 file = &context->file[index]; in DEMOi_HIO_AllocFile()
161 static void DEMOi_HIO_FreeFile(DEMOHIOContext *context, ISTDFIOFile *file) in DEMOi_HIO_FreeFile() argument
163 int index = (context->file - file); in DEMOi_HIO_FreeFile()
164 context->busyfiles &= ~(1 << index); in DEMOi_HIO_FreeFile()
165 context->validfiles &= ~(1 << index); in DEMOi_HIO_FreeFile()
179 static void DEMOi_HIO_CreateFullPath(DEMOHIOContext *context, char *dst, const char *relpath) in DEMOi_HIO_CreateFullPath() argument
189 (void)STD_TSPrintf(dst, "%s/%s", context->basepath, relpath); in DEMOi_HIO_CreateFullPath()
302 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_GetPathInfo() local
303 char *tmppath = context->fullpath[0]; in DEMOi_HIO_GetPathInfo()
306 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_GetPathInfo()
336 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CreateFile() local
337 char *tmppath = context->fullpath[0]; in DEMOi_HIO_CreateFile()
339 ISTDFIOFile *file = DEMOi_HIO_AllocFile(context); in DEMOi_HIO_CreateFile()
351 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_CreateFile()
357 DEMOi_HIO_FreeFile(context, file); in DEMOi_HIO_CreateFile()
374 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_DeleteFile() local
375 char *tmppath = context->fullpath[0]; in DEMOi_HIO_DeleteFile()
377 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_DeleteFile()
396 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_RenameFileOrDirectory() local
397 char *tmppath1 = context->fullpath[0]; in DEMOi_HIO_RenameFileOrDirectory()
398 char *tmppath2 = context->fullpath[1]; in DEMOi_HIO_RenameFileOrDirectory()
401 DEMOi_HIO_CreateFullPath(context, tmppath1, relpath_src); in DEMOi_HIO_RenameFileOrDirectory()
402 DEMOi_HIO_CreateFullPath(context, tmppath2, relpath_dst); in DEMOi_HIO_RenameFileOrDirectory()
419 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CreateDirectory() local
420 char *tmppath = context->fullpath[0]; in DEMOi_HIO_CreateDirectory()
423 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_CreateDirectory()
440 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_DeleteDirectory() local
441 char *tmppath = context->fullpath[0]; in DEMOi_HIO_DeleteDirectory()
443 DEMOi_HIO_CreateFullPath(context, tmppath, relpath); in DEMOi_HIO_DeleteDirectory()
464 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_OpenFile() local
465 char *tmppath = context->fullpath[0]; in DEMOi_HIO_OpenFile()
466 ISTDFIOFile *handle = DEMOi_HIO_AllocFile(context); in DEMOi_HIO_OpenFile()
477 DEMOi_HIO_CreateFullPath(context, tmppath, path); in DEMOi_HIO_OpenFile()
500 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CloseFile() local
503 DEMOi_HIO_FreeFile(context, handle); in DEMOi_HIO_CloseFile()
638 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_OpenDirectory() local
639 char *tmppath = context->fullpath[0]; in DEMOi_HIO_OpenDirectory()
640 ISTDFIOFile *handle = DEMOi_HIO_AllocFile(context); in DEMOi_HIO_OpenDirectory()
648 int index = handle - context->file; in DEMOi_HIO_OpenDirectory()
649 ISTDFIOFindData *data = &context->ffdata[index]; in DEMOi_HIO_OpenDirectory()
653 DEMOi_HIO_CreateFullPath(context, tmppath, path); in DEMOi_HIO_OpenDirectory()
671 context->validfiles |= (1 << index); in DEMOi_HIO_OpenDirectory()
691 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_CloseDirectory() local
694 DEMOi_HIO_FreeFile(context, handle); in DEMOi_HIO_CloseDirectory()
714 DEMOHIOContext *context = (DEMOHIOContext *)FS_GetArchiveUserData(arc); in DEMOi_HIO_ReadDirectory() local
716 int index = handle - context->file; in DEMOi_HIO_ReadDirectory()
717 if ((context->validfiles & (1 << index)) == 0) in DEMOi_HIO_ReadDirectory()
723 ISTDFIOFindData *data = &context->ffdata[index]; in DEMOi_HIO_ReadDirectory()
740 context->validfiles &= ~(1 << index); in DEMOi_HIO_ReadDirectory()