OSDN Git Service

refectoring for ar.c
[lha/olha.git] / prototypes.h
1 /* This file was generated by cproto. */
2 #if PROTOTYPES /* defined in config.h */
3 #define P_(s) s
4 #else
5 #define P_(s) ()
6 #endif
7
8 /* ar.c */
9 struct lha_method *which_method P_((char *id));
10 int get_byte P_((char *buf));
11 uint16_t get_word P_((char *buf));
12 uint32_t get_dword P_((char *buf));
13 void get_char P_((char *buf, char *p, size_t size));
14 void put_byte P_((char *buf, int c));
15 void put_word P_((char *buf, uint16_t c));
16 void put_dword P_((char *buf, uint32_t c));
17 void put_char P_((char *buf, char *p, size_t size));
18 time_t ftime_to_time_t P_((uint32_t ftime));
19 uint32_t time_t_to_ftime P_((time_t t));
20 void write_header_lv0 P_((FILE *fp, struct lzh_header *h));
21 void write_header_lv1 P_((FILE *fp, struct lzh_header *h));
22 void write_header_lv2 P_((FILE *fp, struct lzh_header *h));
23 void write_header P_((FILE *fp, struct lzh_header *h));
24 int get_line P_((char *s, int n));
25 int parse_args P_((int argc, char **argv));
26 FILE *open_tempfile P_((void));
27 /* io.c */
28 void error P_((char *fmt, ...));
29 void message P_((char *fmt, ...));
30 void make_crctable P_((void));
31 void fillbuf P_((int n));
32 uint getbits P_((int n));
33 void putbits P_((int n, uint x));
34 int fread_crc P_((uchar *p, int n, FILE *f));
35 void fwrite_crc P_((uchar *p, int n, FILE *f));
36 void init_getbits P_((void));
37 void init_putbits P_((void));
38 /* encode.c */
39 void encode P_((void));
40 /* decode.c */
41 void decode_start P_((void));
42 void decode P_((uint count, uchar buffer[]));
43 /* maketree.c */
44 int make_tree P_((int nparm, ushort freqparm[], uchar lenparm[], ushort codeparm[]));
45 /* maketbl.c */
46 void make_table P_((int nchar, uchar bitlen[], int tablebits, ushort table[]));
47 /* huf.c */
48 void output P_((uint c, uint p));
49 void huf_encode_start P_((struct lha_method *m));
50 void huf_encode_end P_((void));
51 uint decode_c P_((void));
52 uint decode_p P_((void));
53 void huf_decode_start P_((struct lha_method *m));
54 /* strlib.c */
55 int string_equal P_((char *str1, char *str2));
56 int string_copy P_((char *dst, char *src, int dstsz));
57 char *string_pcopy P_((char *dst, char *src, int dstsz));
58 int string_cat P_((char *dst, int dstsz, ...));
59 char *string_tail P_((char *str));
60 int chomp P_((char *s));
61 char *skip_space P_((char *s));
62 char *skip_to_space P_((char *s));
63 char *next_field P_((char *s));
64 char *strip_space P_((char *s));
65 /* pathlib.c */
66 int path_addsep P_((char *path, size_t size));
67 int makepath P_((char *dest, int dest_size, char *dir, char *file, char *ext));
68 /* filelib.c */
69 int file_exists P_((char *file));
70 time_t file_mtime P_((char *file));
71 int copy_stream P_((FILE *from, FILE *to));
72 int move_file_to_stream P_((char *from, FILE *to));
73 int xrename P_((char *from, char *to));