123456789101112131415161718192021222324 |
- #ifndef STREAM_H
- #define STREAM_H
- #define BUFFER_SIZE 1024
- typedef struct Stream
- {
- int size;
- int index;
- char data[BUFFER_SIZE];
- } Stream;
- typedef void (*StreamFunction) (Stream*);
- int streamGetChar(char* c, Stream* in);
- int streamGetShort(short* s, Stream* in);
- int streamGetInt(int* i, Stream* in);
- int streamWriteChar(char c, Stream* in);
- int streamWriteShort(short s, Stream* in);
- int streamWriteInt(int i, Stream* in);
- #endif
|