pike.git / src / modules / _Stdio / buffer.cmod

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:772:    return io->offset;    }       static void io_append_byte_uc( Buffer *io, unsigned char byte )    {    io->buffer[io->len++] = byte;    }       static void io_append_short_uc( Buffer *io, unsigned short shrt )    { -  *((short *)(io->buffer+io->len)) = htons(shrt); -  io->len+=2; +  io->buffer[io->len++] = shrt>>8; +  io->buffer[io->len++] = shrt;    }       static void io_append_int_uc( Buffer *io, unsigned INT32 i )    { -  *((INT32 *)(io->buffer+io->len)) = htonl(i); -  io->len+=4; +  io->buffer[io->len++] = i>>24; +  io->buffer[io->len++] = i>>16; +  io->buffer[io->len++] = i>>8; +  io->buffer[io->len++] = i;    }          static size_t io_svalue_len( Buffer *io, struct svalue *p )    {    switch( TYPEOF(*p) ) {    case PIKE_T_INT:    return 1;    case PIKE_T_STRING:    if( !p->u.string->size_shift )