1al_open_memfile(3)                                          al_open_memfile(3)
2
3
4

NAME

6       al_open_memfile - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro_memfile.h>
10
11              ALLEGRO_FILE *al_open_memfile(void *mem, int64_t size, const char *mode)
12

DESCRIPTION

14       Returns a file handle to the block of memory.  All read and write oper‐
15       ations act upon the memory directly, so it must not be freed while  the
16       file remains open.
17
18       The  mode  can be any combination of "r" (readable) and "w" (writable).
19       Regardless of the mode, the file always opens at position 0.  The  file
20       size  is  fixed  and  cannot  be  expanded.   The  file  is always read
21       from/written to in binary mode, which means that no newline translation
22       is performed.
23
24       It  should  be closed with al_fclose(3).  After the file is closed, you
25       are responsible for freeing the memory (if needed).
26
27
28
29Allegro reference manual                                    al_open_memfile(3)
Impressum