XenevaOS
Loading...
Searching...
No Matches
memio.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15
16#ifndef MEMIO_H
17#define MEMIO_H
18
19typedef struct _MEMFILE MEMFILE;
20
27
28MEMFILE *mem_fopen_read(void *buf, size_t buflen);
29size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream);
31size_t mem_fwrite(const void *ptr, size_t size, size_t nmemb, MEMFILE *stream);
32void mem_get_buf(MEMFILE *stream, void **buf, size_t *buflen);
33void mem_fclose(MEMFILE *stream);
34long mem_ftell(MEMFILE *stream);
35int mem_fseek(MEMFILE *stream, signed long offset, mem_rel_t whence);
36
37#endif /* #ifndef MEMIO_H */
38
size_t size
Definition drm_bridge.h:1299
size_t size_t offset
Definition drm_bridge.h:1299
size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream)
Definition memio.c:58
void mem_get_buf(MEMFILE *stream, void **buf, size_t *buflen)
Definition memio.c:143
int mem_fseek(MEMFILE *stream, signed long offset, mem_rel_t whence)
Definition memio.c:164
mem_rel_t
Definition memio.h:22
@ MEM_SEEK_SET
Definition memio.h:23
@ MEM_SEEK_CUR
Definition memio.h:24
@ MEM_SEEK_END
Definition memio.h:25
MEMFILE * mem_fopen_write(void)
Definition memio.c:90
void mem_fclose(MEMFILE *stream)
Definition memio.c:149
long mem_ftell(MEMFILE *stream)
Definition memio.c:159
MEMFILE * mem_fopen_read(void *buf, size_t buflen)
Definition memio.c:42
size_t mem_fwrite(const void *ptr, size_t size, size_t nmemb, MEMFILE *stream)
Definition memio.c:107
Definition memio.c:32
size_t buflen
Definition memio.c:34
unsigned char * buf
Definition memio.c:33