amxmodx/compiler/libpc300/memfile.h
Scott Ehlert 0dc6a4a5dd Whoa, amb1941: All of AMX Mod X is now officially moved over to Visual Studio 2005 (MSVC 8)
Also did the following:
* Removed -fPIC from all Linux makefiles
* AMXX build tool now also moved over to VS 2005
* AMXX build tool binary renamed from "AMXXRelease" to "builder"
* MSVC project files now can use environment variables to point to the paths of the Metamod headers and HL SDK: $(METAMOD) and $(HLSDK) respectively
2008-08-16 09:48:39 +00:00

32 lines
761 B
C

#ifndef _INCLUDE_MEMFILE_H
#define _INCLUDE_MEMFILE_H
#ifdef _MSC_VER
// MSVC8 - replace POSIX functions with ISO C++ conformant ones as they are deprecated
#if _MSC_VER >= 1400
#define strdup _strdup
#pragma warning(disable : 4996)
#endif
#endif
#include <malloc.h>
typedef struct memfile_s
{
char *name;
char *base;
long offs;
long usedoffs;
size_t size;
int _static;
} memfile_t;
memfile_t *memfile_creat(const char *name, size_t init);
void memfile_destroy(memfile_t *mf);
void memfile_seek(memfile_t *mf, long seek);
int memfile_write(memfile_t *mf, void *buffer, size_t size);
size_t memfile_read(memfile_t *mf, void *buffer, size_t maxsize);
long memfile_tell(memfile_t *mf);
#endif //_INCLUDE_MEMFILE_H