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()
240 deFile* deFile_create (const char* filename, deUint32 mode) in deFile_create() argument
247 DE_ASSERT((mode & DE_FILEMODE_READ) != 0 || ((mode & DE_FILEMODE_WRITE) != 0)); in deFile_create()
250 DE_ASSERT((mode & DE_FILEMODE_OPEN) != 0 || ((mode & DE_FILEMODE_CREATE) != 0)); in deFile_create()
253 DE_ASSERT(!(mode & DE_FILEMODE_CREATE) || (mode & DE_FILEMODE_WRITE)); in deFile_create()
256 …DE_ASSERT(!(mode & DE_FILEMODE_TRUNCATE) || ((mode & DE_FILEMODE_WRITE) && (mode & DE_FILEMODE_OPE… in deFile_create()
259 if (mode & DE_FILEMODE_READ) in deFile_create()
262 if (mode & DE_FILEMODE_WRITE) in deFile_create()
265 if ((mode & DE_FILEMODE_TRUNCATE)) in deFile_create()
267 if ((mode & DE_FILEMODE_CREATE) && (mode & DE_FILEMODE_OPEN)) in deFile_create()
269 else if (mode & DE_FILEMODE_OPEN) in deFile_create()
276 if ((mode & DE_FILEMODE_CREATE) && (mode & DE_FILEMODE_OPEN)) in deFile_create()
278 else if (mode & DE_FILEMODE_CREATE) in deFile_create()
280 else if (mode & DE_FILEMODE_OPEN) in deFile_create()