/*********************************************** !!!! DO NOT EDIT THIS FILE !!!! This file was auto-generated by Build.PL from lib/KinoSearch/Store/InStream.pm See KinoSearch::Docs::DevGuide for details. ***********************************************/ #line 290 "lib/KinoSearch/Store/InStream.pm" #ifndef H_KINOSEARCH_STORE_INSTREAM #define H_KINOSEARCH_STORE_INSTREAM 1 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "KinoSearchUtilCarp.h" #include "KinoSearchUtilMathUtils.h" /* Detect whether we're on an ASCII or EBCDIC machine. */ #if '0' == 240 #define KINO_NUM_CHAR_OFFSET 240 #else #define KINO_NUM_CHAR_OFFSET 48 #endif #define KINO_IO_STREAM_BUF_SIZE 1024 typedef struct instream { PerlIO *fh; SV *fh_sv; double offset; double len; char *buf; Off_t buf_start; /* file position of start of buffer */ int buf_len; /* number of valid bytes in the buffer */ int buf_pos; /* next byte to read */ void (*seek)(struct instream*, double); double (*tell)(struct instream*); char (*read_byte)(struct instream*); void (*read_bytes)(struct instream*, char*, STRLEN); void (*read_chars)(struct instream*, char*, STRLEN, STRLEN); U32 (*read_int)(struct instream*); double (*read_long)(struct instream*); U32 (*read_vint)(struct instream*); double (*read_vlong)(struct instream*); } InStream; InStream* Kino_InStream_new (char*, SV*, double, double); void Kino_InStream_seek (InStream*, double); double Kino_InStream_tell (InStream*); void Kino_InStream_refill (InStream*); char Kino_InStream_read_byte (InStream*); void Kino_InStream_read_bytes (InStream*, char*, STRLEN); void Kino_InStream_read_chars (InStream*, char*, STRLEN, STRLEN); U32 Kino_InStream_read_int (InStream*); double Kino_InStream_read_long (InStream*); U32 Kino_InStream_decode_vint(char**); U32 Kino_InStream_read_vint (InStream*); double Kino_InStream_read_vlong (InStream*); void Kino_InStream_destroy (InStream*); #endif /* include guard */