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

version» Context lines:

pike.git/src/modules/Pipe/pipe.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pipe.c,v 1.57 2003/10/08 14:53:48 grubba Exp $ + || $Id: pipe.c,v 1.58 2003/12/12 17:45:51 nilsson Exp $   */      #include "global.h"   #include "config.h"   #include "machine.h"   #include "module.h"      #include <sys/types.h>   #include <sys/stat.h>   
pike.git/src/modules/Pipe/pipe.c:31:   #endif   #endif   #endif      #ifdef HAVE_SYS_ID_H   #include <sys/id.h>   #endif /* HAVE_SYS_ID_H */      #include <fcntl.h>    - RCSID("$Id: pipe.c,v 1.57 2003/10/08 14:53:48 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.58 2003/12/12 17:45:51 nilsson Exp $");      #include "threads.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_error.h"   #include "builtin_functions.h"
pike.git/src/modules/Pipe/pipe.c:853:       if ((sp[-1].type==T_INT)    && (fd=sp[-1].u.integer)>=0    && (fstat(fd,&s)==0)    && S_ISREG(s.st_mode)    && (THIS->fd=fd_dup(fd))!=-1 )    {    /* keep the file pointer of the duped fd */    THIS->pos=fd_lseek(fd, 0L, SEEK_CUR);    - #if 0 -  /* This won't work if the spider-module is dynamically linked. */ -  push_int(THIS->fd); -  push_string(make_shared_string("pipe.c: file buffer")); -  f_mark_fd(2); -  pop_stack(); - #endif /* 0 */ -  +     THIS->living_outputs++;       while (THIS->firstbuffer)    {    b=THIS->firstbuffer;    THIS->firstbuffer=b->next;    fd_lseek(THIS->fd, THIS->pos, SEEK_SET);    fd_write(THIS->fd,b->s->str,b->s->len);    sbuffers-=b->s->len;    nbuffers--;
pike.git/src/modules/Pipe/pipe.c:1103:    i->type=I_NONE;       input_finish();    if(args)    pop_n_elems(args-1);   }      static void pipe_version(INT32 args)   {    pop_n_elems(args); -  push_string(make_shared_string("PIPE ver 2.0")); +  push_text("PIPE ver 2.0");   }      /********** init/exit *******************************************************/      void close_and_free_everything(struct object *thisobj,struct pipe *p)   {    struct buffer *b;    struct input *i;    struct output *o;    struct object *obj;