mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
remove unused and not implemented IOFLAG_RANDOM, add assert
This commit is contained in:
parent
d51f20586c
commit
75662b6c1a
|
@ -283,6 +283,7 @@ void mem_zero(void *block, unsigned size)
|
|||
|
||||
IOHANDLE io_open(const char *filename, int flags)
|
||||
{
|
||||
dbg_assert(flags == IOFLAG_READ || flags == IOFLAG_WRITE || flags == IOFLAG_APPEND, "flags must be read, write or append");
|
||||
if(flags == IOFLAG_READ)
|
||||
return (IOHANDLE)fopen(filename, "rb");
|
||||
if(flags == IOFLAG_WRITE)
|
||||
|
|
|
@ -170,8 +170,7 @@ enum
|
|||
{
|
||||
IOFLAG_READ = 1,
|
||||
IOFLAG_WRITE = 2,
|
||||
IOFLAG_RANDOM = 4,
|
||||
IOFLAG_APPEND = 8,
|
||||
IOFLAG_APPEND = 4,
|
||||
|
||||
IOSEEK_START = 0,
|
||||
IOSEEK_CUR = 1,
|
||||
|
@ -186,7 +185,7 @@ typedef struct IOINTERNAL *IOHANDLE;
|
|||
|
||||
Parameters:
|
||||
filename - File to open.
|
||||
flags - A set of flags. IOFLAG_READ, IOFLAG_WRITE, IOFLAG_RANDOM, IOFLAG_APPEND.
|
||||
flags - A set of flags. IOFLAG_READ, IOFLAG_WRITE, IOFLAG_APPEND.
|
||||
|
||||
Returns:
|
||||
Returns a handle to the file on success and 0 on failure.
|
||||
|
|
Loading…
Reference in a new issue