9os

Experimental kernel using plan9 ideas for embedded device
git clone git://git.simple-cc.org/9os
Log | Files | Refs | README | LICENSE

deserialize.h (461B)


      1 #define CHAR(v, b, n, m)        (v = frombytes(b, &n, m, 1))
      2 #define SHORT(v, b, n, m)       (v = frombytes(b, &n, m, 2))
      3 #define LONG(v, b, n, m)        (v = frombytes(b, &n, m, 4))
      4 #define LLONG(v, b, n, m)       (v = frombytes(b, &n, m, 8))
      5 #define STRING(str, s, b, n, m) (fromstring(b, &n, m, str, s))
      6 
      7 extern long long frombytes(unsigned char *b, int *n, int max, int nbytes);
      8 extern char *fromstring(unsigned char *b, int *n, int max, char *str, int s);