From df313b5bd9d5c65f2bd646adda935018f8490124 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 16 Jan 2014 20:04:27 +0900 Subject: [PATCH] decl memory access functions --- include/picrin/port.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/picrin/port.h b/include/picrin/port.h index 67a5b277..f9359753 100644 --- a/include/picrin/port.h +++ b/include/picrin/port.h @@ -64,12 +64,19 @@ int pic_ffill(pic_file *); pic_file *pic_funopen(void *cookie, int (*read)(void *, char *, int), int (*write)(void *, const char *, int), fpos_t (*seek)(void *, fpos_t, int), int (*close)(void *)); +/* file access */ pic_file *pic_fopen(const char *, const char *); int pic_fclose(pic_file *); +/* memory access */ +pic_file *pic_mropen(const char *, size_t, const char *); +pic_file *pic_mwopen(char **, size_t *); + +/* direct IO with buffering */ size_t pic_fread(void *, size_t, size_t, pic_file *); size_t pic_fwrite(const void *, size_t, size_t, pic_file *); +/* character IO */ int pic_fgetc(pic_file *); int pic_ungetc(int, pic_file *); int pic_fputc(int, pic_file *);