pike.git / src / modules / Pipe / pipe.c

version» Context lines:

pike.git/src/modules/Pipe/pipe.c:19: Inside #if defined(HAVE_MMAP)
  #else   #ifdef HAVE_MMAP   /* sys/mman.h is _probably_ there anyway. */   #include <sys/mman.h>   #endif   #endif   #endif      #include <fcntl.h>    - RCSID("$Id: pipe.c,v 1.38 2000/08/03 18:45:52 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.39 2000/08/09 21:01:23 grubba Exp $");      #include "threads.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "error.h"   #include "builtin_functions.h"
pike.git/src/modules/Pipe/pipe.c:182:   static ptrdiff_t ninputs, nbuffers, sbuffers;      void close_and_free_everything(struct object *o,struct pipe *);   static INLINE void output_finish(struct object *obj);   static INLINE void output_try_write_some(struct object *obj);      /********** internal ********************************************************/      /* Push a callback to this object given the internal function number.    */ - static void push_callback(int no) + static void push_callback(ptrdiff_t no)   {    add_ref(Pike_sp->u.object=THISOBJ); -  Pike_sp->subtype=no+Pike_fp->context.identifier_level; -  Pike_sp->type=T_FUNCTION; +  Pike_sp->subtype = DO_NOT_WARN(no + Pike_fp->context.identifier_level); +  Pike_sp->type = T_FUNCTION;    Pike_sp++;   }      /* Allocate a new struct input, link it last in the linked list */   static INLINE struct input *new_input(void)   {    struct input *i;    ninputs++;    i=ALLOC_STRUCT(input);    i->type=I_NONE;
pike.git/src/modules/Pipe/pipe.c:432:    }    THIS->sleeping=0;       low_start();    finished_p();   }      /* This function reads some data from the file cache..    * Called when we want some data to send.    */ - static INLINE struct pike_string* gimme_some_data(unsigned long pos) + static INLINE struct pike_string* gimme_some_data(size_t pos)   {    struct buffer *b; -  long len; +  ptrdiff_t len;    struct pipe *this = THIS;       /* We have a file cache, read from it */    if (this->fd!=-1)    {    char buffer[READ_BUFFER_SIZE];       if (this->pos<=pos) return NULL; /* no data */    len=this->pos-pos;    if (len>READ_BUFFER_SIZE) len=READ_BUFFER_SIZE;
pike.git/src/modules/Pipe/pipe.c:1250:   }         /********** Pike init *******************************************************/      void port_setup_program(void);      void f__pipe_debug(INT32 args)   {    pop_n_elems(args); -  push_int(noutputs); -  push_int(ninputs); -  push_int(nstrings); -  push_int(nobjects); -  push_int(mmapped); -  push_int(nbuffers); -  push_int(sbuffers); +  push_int(DO_NOT_WARN(noutputs)); +  push_int(DO_NOT_WARN(ninputs)); +  push_int(DO_NOT_WARN(nstrings)); +  push_int(DO_NOT_WARN(nobjects)); +  push_int(DO_NOT_WARN(mmapped)); +  push_int(DO_NOT_WARN(nbuffers)); +  push_int(DO_NOT_WARN(sbuffers));    f_aggregate(7);   }      void pike_module_init(void)   {    start_new_program();    ADD_STORAGE(struct pipe);      /* function(:array) */    ADD_EFUN("_pipe_debug", f__pipe_debug,tFunc(tNone,tArray), 0);