-void
-marshall::rawbyte(unsigned char x)
-{
- if(_ind >= _capa){
- _capa *= 2;
- VERIFY (_buf != NULL);
- _buf = (char *)realloc(_buf, _capa);
- VERIFY(_buf);
- }
- _buf[_ind++] = x;
-}
-
-void
-marshall::rawbytes(const char *p, int n)
-{
- if((_ind+n) > _capa){
- _capa = _capa > n? 2*_capa:(_capa+n);
- VERIFY (_buf != NULL);
- _buf = (char *)realloc(_buf, _capa);
- VERIFY(_buf);
- }
- memcpy(_buf+_ind, p, n);
- _ind += n;
-}
-
-marshall &
-operator<<(marshall &m, bool x)
-{
- m.rawbyte(x);
- return m;
-}
-