9os

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

serialize.h (347B)


      1 #define CHAR(x,p)    (p = tobytes(p, x, 1))
      2 #define SHORT(x,p)   (p = tobytes(p, x, 2))
      3 #define LONG(x,p)    (p = tobytes(p, x, 4))
      4 #define LLONG(x,p)   (p = tobytes(p, x, 8))
      5 #define STRING(s,p)  (p = tostring(p, s))
      6 
      7 unsigned char *tobytes(unsigned char *p, unsigned long long v, int nbytes);
      8 unsigned char *tostring(unsigned char *p, char *s);