SystemCall run(block) can now exit the run if it returns false
[io/quag.git] / libs / basekit / source / BStreamTag.h
blob8124f1675f3e960ac84d464e471a72292b9dcbbf
1 /*#io
2 docCopyright("Steve Dekorte", 2004)
3 docLicense("BSD revised") *
4 */
6 #ifndef BSTREAMTAG_DEFINED
7 #define BSTREAMTAG_DEFINED 1
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 #define BSTREAM_UNSIGNED_INT 0
14 #define BSTREAM_SIGNED_INT 1
15 #define BSTREAM_FLOAT 2
16 #define BSTREAM_POINTER 3
18 typedef struct
20 unsigned int isArray : 1;
21 unsigned int type : 2; // 0 = unsigned int, 1 = signed int, 2 = float, 3 = pointer
22 unsigned int byteCount : 5; // number of bytes in data value(s)
23 } BStreamTag;
25 // values in network byte order / big endian
27 BStreamTag BStreamTag_FromUnsignedChar(unsigned char c);
28 unsigned char BStreamTag_asUnsignedChar(BStreamTag *self);
29 BStreamTag BStreamTag_TagArray_type_byteCount_(unsigned int a, unsigned int t, unsigned int b);
30 int BStreamTag_isEqual_(BStreamTag *self, BStreamTag *other);
31 void BStreamTag_print(BStreamTag *self);
33 char *BStreamTag_typeName(BStreamTag *self);
35 #ifdef __cplusplus
37 #endif
38 #endif