|
Blender V2.27
|
00001 00025 /* simple memory stream functions with buffer overflow check */ 00026 00027 #ifndef _STREAM_H 00028 #define _STREAM_H 00029 00030 struct Stream 00031 { 00032 unsigned char *mem; // location in memory 00033 unsigned int size; // size 00034 unsigned int pos; // current position 00035 Stream(unsigned char *m, unsigned int s) : mem(m), size(s), pos(0) {}; 00036 unsigned int seek(unsigned int p); 00037 }; 00038 00039 unsigned int mem_read(Stream & mem, unsigned long long & i); 00040 unsigned int mem_read(Stream & mem, unsigned int & i); 00041 unsigned int mem_read(Stream & mem, unsigned short & i); 00042 unsigned int mem_read(Stream & mem, unsigned char & i); 00043 unsigned int mem_read(Stream & mem, unsigned char *i, unsigned int cnt); 00044 00045 #endif // _STREAM_H 00046
1.7.3