/* * mfile.h -- memory buffered file header * (C)Copyright 2000 by TAJIRI Yasuhiro * This file is part of Enfle. * * Last Modified: Thu Aug 10 07:21:00 2000. * $Id: mfile.h,v 1.1 2000/08/09 22:21:07 sian Exp $ * * Enfle is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Enfle is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef MFILE_H #define MFILE_H typedef struct { char *buf; int size; int pos; }MFILE; MFILE* mopen(int init_size); size_t mread(char* buf,size_t size, size_t nmemb, MFILE*stream); size_t mwrite(char* buf,size_t size, size_t nmemb, MFILE*stream); int mseek( MFILE *stream, long offset, int whence); long mtell( MFILE *stream); int mclose(MFILE* stream); int mputcn(int c, MFILE *stream,size_t size); int mputc(int c, MFILE *stream); #endif