4 #if __STDC__VERSION >= 199901L
6 #elif defined(__INTERIX)
9 typedef unsigned char uint8_t;
10 typedef unsigned short uint16_t;
13 typedef struct message_tag Message
;
19 uint16_t width
, height
;
25 #define MSG_RESIZE (21)
27 #define MESSAGE_MIN (2)
28 #define MESSAGE_MAX (sizeof(struct message_tag))
30 /* Fills in a Message structure from `data'. Does not attempt to validate
31 * the message type, but returns 0 if a partial message is received.
32 * Returns -1 if the size is impossible (bigger than largest possible
33 * message or smaller than smallest possible message).
34 * Returns 1 if the message structure is filled in properly.
36 int message_get(Message
*m
, const unsigned char *data
, size_t len
);
38 #endif /* MESSAGE_H */