2022-08-26 15:15:16 +00:00
|
|
|
#ifndef LIBXMP_MEMIO_H
|
|
|
|
#define LIBXMP_MEMIO_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
2023-06-17 08:37:50 +00:00
|
|
|
#include "common.h"
|
2022-08-26 15:15:16 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const unsigned char *start;
|
|
|
|
ptrdiff_t pos;
|
|
|
|
ptrdiff_t size;
|
2023-06-17 08:37:50 +00:00
|
|
|
int free_after_use;
|
2022-08-26 15:15:16 +00:00
|
|
|
} MFILE;
|
|
|
|
|
2023-06-17 08:37:50 +00:00
|
|
|
LIBXMP_BEGIN_DECLS
|
2022-08-26 15:15:16 +00:00
|
|
|
|
2023-06-17 08:37:50 +00:00
|
|
|
MFILE *mopen(const void *, long, int);
|
2022-08-26 15:15:16 +00:00
|
|
|
int mgetc(MFILE *stream);
|
|
|
|
size_t mread(void *, size_t, size_t, MFILE *);
|
|
|
|
int mseek(MFILE *, long, int);
|
|
|
|
long mtell(MFILE *);
|
|
|
|
int mclose(MFILE *);
|
|
|
|
int meof(MFILE *);
|
|
|
|
|
2023-06-17 08:37:50 +00:00
|
|
|
LIBXMP_END_DECLS
|
2022-08-26 15:15:16 +00:00
|
|
|
|
|
|
|
#endif
|