9 # pragma warning( disable : 4231 )
24 void
do_dump_state(const
void* buf,
size_t nelem,
size_t size, FILE* out, int32 magic)
28 bool lgErr = ( fwrite( &magic,
sizeof(int32), 1, out ) != 1 );
29 int32 help = (int32)
sizeof(
size_t);
30 lgErr = lgErr || ( fwrite( &help,
sizeof(int32), 1, out ) != 1 );
31 lgErr = lgErr || ( fwrite( &size,
sizeof(
size_t), 1, out ) != 1 );
32 lgErr = lgErr || ( fwrite( buf, size, nelem, out ) != nelem );
50 bool lgErr = ( fread( &help,
sizeof(int32), 1, in ) != 1 );
53 lgErr = lgErr || ( help != magic );
54 lgErr = lgErr || ( fread( &help,
sizeof(int32), 1, in ) != 1 );
56 lgErr = lgErr || ( help != (int32)
sizeof(
size_t) );
57 lgErr = lgErr || ( fread( &help2,
sizeof(
size_t), 1, in ) != 1 );
59 lgErr = lgErr || ( help2 != size );
60 lgErr = lgErr || ( fread( buf, size, nelem, in ) != nelem );
void do_dump_state(const void *buf, size_t nelem, size_t size, FILE *out, int32 magic)
void do_restore_state(void *buf, size_t nelem, size_t size, FILE *in, int32 magic)
#define DEBUG_ENTRY(funcname)
int fprintf(const Output &stream, const char *format,...)
#define INSTANTIATE_MULTI_ARR(TYPE, BC)