remove unused and not implemented IOFLAG_RANDOM, add assert

This commit is contained in:
Robert Müller 2021-08-23 12:30:12 +02:00
parent d51f20586c
commit 75662b6c1a
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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.