From 9ebec735c488e2f7ac29933fb51b4e6e65c7b93f Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 5 Dec 2008 00:37:26 +0000 Subject: Initial working version of memory snapshots --- include/stream.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'include/stream.h') diff --git a/include/stream.h b/include/stream.h index f701d8b..1049706 100644 --- a/include/stream.h +++ b/include/stream.h @@ -22,10 +22,14 @@ #ifndef DS81_STREAM_H #define DS81_STREAM_H -/* Macros to aid in streaming. Should be safe as there is no intention at all - about these snapshots being cross platform. -*/ -#define STRPUT(fp, a) fwrite(&(a), sizeof(a), 1, fp) -#define STRGET(fp, a) fread(&(a), sizeof(a), 1, fp) +#include + +void PUT_Byte(FILE *fp, unsigned char c); +void PUT_Long(FILE *fp, long l); +void PUT_ULong(FILE *fp, unsigned long l); + +unsigned char GET_Byte(FILE *fp); +long GET_Long(FILE *fp); +unsigned long GET_ULong(FILE *fp); #endif /* DS81_STREAM_H */ -- cgit v1.2.3