FILE *open_tempfile P_((void));
/* io.c */
void make_crctable P_((void));
-void fillbuf P_((int n));
-uint getbits P_((int n));
-void putbits P_((int n, uint x));
-int fread_crc P_((void *p, int n, FILE *f));
-void fwrite_crc P_((void *p, int n, FILE *f));
-void init_getbits P_((void));
-void init_putbits P_((void));
+void fillbuf P_((struct lzh_istream *rp, int n));
+uint getbits P_((struct lzh_istream *rp, int n));
+void putbits P_((struct lzh_ostream *wp, int n, uint x));
+int fread_crc P_((void *p, int n, FILE *f, unsigned int *crc));
+void fwrite_crc P_((void *p, int n, FILE *f, unsigned int *crc));
+void init_getbits P_((struct lzh_istream *rp));
+void init_putbits P_((struct lzh_ostream *wp));
/* encode.c */
-void encode P_((void));
+void encode P_((struct lzh_ostream *wp, FILE *rfp));
/* decode.c */
-void decode_start P_((void));
-void decode P_((uint count, char *buf));
+void decode_start P_((struct lzh_istream *rp));
+void decode P_((struct huf_t *huf, struct lzh_istream *rp, uint count, char *buf, unsigned int *slide_off, int *slide_len));
/* maketree.c */
-int make_tree P_((int nparm, ushort freqparm[], uchar lenparm[], ushort codeparm[]));
+int make_tree P_((uint16_t nparm, uint16_t *freqparm, uchar *lenparm, uint16_t *codeparm));
/* maketbl.c */
-void make_table P_((int nchar, uchar bitlen[], int tablebits, ushort table[]));
+void make_table P_((struct huf_t *huf, int nchar, uchar bitlen[], int tablebits, ushort table[]));
/* huf.c */
-void output P_((uint c, uint p));
-void huf_encode_start P_((struct lha_method *m));
-void huf_encode_end P_((void));
-uint decode_c P_((void));
-uint decode_p P_((void));
-void huf_decode_start P_((struct lha_method *m));
+void output P_((struct lzh_ostream *wp, uint c, uint p));
+void huf_encode_start P_((struct lzh_ostream *wp, struct lha_method *m));
+void huf_encode_end P_((struct lzh_ostream *wp));
+uint decode_c P_((struct huf_t *huf, struct lzh_istream *rp));
+uint decode_p P_((struct huf_t *huf, struct lzh_istream *rp));
+void huf_decode_start P_((struct lzh_istream *rp, struct lha_method *m));
/* strlib.c */
int string_equal P_((char *str1, char *str2));
int string_copy P_((char *dst, char *src, int dstsz));
int read_header P_((FILE *fp, struct lzh_header *h));
void write_header P_((FILE *fp, struct lzh_header *h));
/* add.c */
-int add_dir P_((int replace_flag, struct lzh_header *h));
-int add P_((int replace_flag, char *filename, int namelen));
+int add_dir P_((struct lzh_ostream *wp, int replace_flag, struct lzh_header *h));
+int add P_((struct lzh_ostream *wp, int replace_flag, char *filename, int namelen));
/* extract.c */
-void extract P_((int to_file, struct lzh_header *h));
+void extract P_((struct lzh_istream *rp, int to_file, struct lzh_header *h));
/* list.c */
void list_start P_((void));
void list P_((struct lzh_header *h));