Lines Matching refs:mode

66 static int mapOpenMode (deFileMode mode)  in mapOpenMode()  argument
71 DE_ASSERT((mode & DE_FILEMODE_READ) != 0 || ((mode & DE_FILEMODE_WRITE) != 0)); in mapOpenMode()
74 DE_ASSERT((mode & DE_FILEMODE_OPEN) != 0 || ((mode & DE_FILEMODE_CREATE) != 0)); in mapOpenMode()
77 DE_ASSERT(!(mode & DE_FILEMODE_CREATE) || (mode & DE_FILEMODE_WRITE)); in mapOpenMode()
80 …DE_ASSERT(!(mode & DE_FILEMODE_TRUNCATE) || ((mode & DE_FILEMODE_WRITE) && (mode & DE_FILEMODE_OPE… in mapOpenMode()
82 if (mode & DE_FILEMODE_READ) in mapOpenMode()
85 if (mode & DE_FILEMODE_WRITE) in mapOpenMode()
88 if (mode & DE_FILEMODE_TRUNCATE) in mapOpenMode()
91 if (mode & DE_FILEMODE_CREATE) in mapOpenMode()
94 if (!(mode & DE_FILEMODE_OPEN)) in mapOpenMode()
100 deFile* deFile_create (const char* filename, deUint32 mode) in deFile_create() argument
102 int fd = open(filename, mapOpenMode(mode), 0777); in deFile_create()
241 deFile* deFile_create (const char* filename, deUint32 mode) in deFile_create() argument
248 DE_ASSERT((mode & DE_FILEMODE_READ) != 0 || ((mode & DE_FILEMODE_WRITE) != 0)); in deFile_create()
251 DE_ASSERT((mode & DE_FILEMODE_OPEN) != 0 || ((mode & DE_FILEMODE_CREATE) != 0)); in deFile_create()
254 DE_ASSERT(!(mode & DE_FILEMODE_CREATE) || (mode & DE_FILEMODE_WRITE)); in deFile_create()
257 …DE_ASSERT(!(mode & DE_FILEMODE_TRUNCATE) || ((mode & DE_FILEMODE_WRITE) && (mode & DE_FILEMODE_OPE… in deFile_create()
260 if (mode & DE_FILEMODE_READ) in deFile_create()
263 if (mode & DE_FILEMODE_WRITE) in deFile_create()
266 if ((mode & DE_FILEMODE_TRUNCATE)) in deFile_create()
268 if ((mode & DE_FILEMODE_CREATE) && (mode & DE_FILEMODE_OPEN)) in deFile_create()
270 else if (mode & DE_FILEMODE_OPEN) in deFile_create()
277 if ((mode & DE_FILEMODE_CREATE) && (mode & DE_FILEMODE_OPEN)) in deFile_create()
279 else if (mode & DE_FILEMODE_CREATE) in deFile_create()
281 else if (mode & DE_FILEMODE_OPEN) in deFile_create()