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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.h:13:    struct object *obj; /* PIKE_T_OBJECT */    struct _Buffer *parent; /* PIKE_T_MIXED */    } source;    INT32 sourcetype; /* type for the source union */    INT32 locked, locked_move;    float max_waste;       struct svalue output;      #ifdef PIKE_DEBUG -  INT_TYPE num_malloc, num_move; /* debug mainly, for testsuite*/ +  INT32 num_malloc, num_move; /* debug mainly, for testsuite*/   #endif   };      struct rewind_to {    struct _Buffer *io;    size_t rewind_to;   #ifdef PIKE_DEBUG    int old_locked_move;   #endif   };      typedef struct _Buffer Buffer;      extern void init_stdio_buffer(void);   extern void exit_stdio_buffer(void); -  + extern unsigned char *io_add_space_do_something( Buffer *io, size_t bytes, int force ); + extern void io_actually_trigger_output( Buffer *io );    - PMOD_EXPORT void io_ensure_malloced( Buffer *io, size_t bytes ); - PMOD_EXPORT unsigned char *io_add_space_do_something( Buffer *io, size_t bytes, int force ); +    PMOD_EXPORT Buffer *io_buffer_from_object(struct object *o); - PMOD_EXPORT void io_trim( Buffer *io ); - PMOD_EXPORT void io_actually_trigger_output( Buffer *io ); +       PIKE_UNUSED_ATTRIBUTE   static size_t io_len( Buffer *io )   { -  return io->len-io->offset; +  return io->len - io->offset;   }      PIKE_UNUSED_ATTRIBUTE   static unsigned char *io_read_pointer(Buffer *io)   {    return io->buffer + io->offset;   }      PIKE_UNUSED_ATTRIBUTE   static unsigned char *io_add_space( Buffer *io, size_t bytes, int force )
pike.git/src/modules/_Stdio/buffer.h:74:    io->offset += num;    return io_len(io);   }      PIKE_UNUSED_ATTRIBUTE   static void io_trigger_output( Buffer *io )   {    if (UNLIKELY(TYPEOF(io->output) == PIKE_T_OBJECT))    io_actually_trigger_output(io);   } -  +