changeset 1491:41e82ba06d1b

return type of stream_seek changed void->int
author arpi
date Sun, 12 Aug 2001 01:59:22 +0000
parents 71424eb2b282
children 2c004737cb68
files stream.h
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/stream.h	Sun Aug 12 01:58:05 2001 +0000
+++ b/stream.h	Sun Aug 12 01:59:22 2001 +0000
@@ -112,22 +112,22 @@
   return stream_seek_long(s,pos);
 }
 
-inline static void stream_skip(stream_t *s,int len){
+inline static int stream_skip(stream_t *s,int len){
   if(len<0 || (len>2*STREAM_BUFFER_SIZE && s->type!=STREAMTYPE_STREAM)){
     // negative or big skip!
-    stream_seek(s,stream_tell(s)+len);
-    return;
+    return stream_seek(s,stream_tell(s)+len);
   }
   while(len>0){
     int x=s->buf_len-s->buf_pos;
     if(x==0){
-      if(!stream_fill_buffer(s)) return; // EOF
+      if(!stream_fill_buffer(s)) return 0; // EOF
       x=s->buf_len-s->buf_pos;
     }
     if(x>len) x=len;
     //memcpy(mem,&s->buf[s->buf_pos],x);
     s->buf_pos+=x; len-=x;
   }
+  return 1;
 }
 
 void stream_reset(stream_t *s);