pike.git / src / post_modules / Shuffler / a_source_pikestring.c

version» Context lines:

pike.git/src/post_modules/Shuffler/a_source_pikestring.c:23:    struct pike_string*str;    char *data;    size_t len;   };      static struct data get_data( struct source *src, off_t len )   {    struct ps_source *s = (struct ps_source *)src;    struct data res;    -  if (len > s->len) { -  len = s->len; +     s->s.eof = 1; /* next read will be done from the next source */ -  } -  +     res.data = s->data; -  s->data += len; -  s->len -= res.len = len; +  res.len = s->len; /* ignore len parameter and deliver what we have */       return res;   }      static void free_source( struct source *src )   {    free_string(((struct ps_source *)src)->str);   }      struct source *source_pikestring_make( struct svalue *s,