OSDN Git Service

Add some ignore files
[lha/lha.git] / src / prototypes.h
1 /* This file was generated by cproto. */
2 #define P_(s) s
3
4 /* append.c */
5 int encode_lzhuf P_((FILE *infp, FILE *outfp, off_t size, off_t *original_size_var, off_t *packed_size_var, char *name, char *hdr_method));
6 /* bitio.c */
7 void fillbuf P_((int n));
8 unsigned short getbits P_((int n));
9 void putcode P_((int n, int x));
10 void putbits P_((int n, int x));
11 void init_getbits P_((void));
12 void init_putbits P_((void));
13 /* crcio.c */
14 void make_crctable P_((void));
15 unsigned int calccrc P_((unsigned int crc, char *p, unsigned int n));
16 int fread_crc P_((unsigned int *crcp, void *p, int n, FILE *fp));
17 void fwrite_crc P_((unsigned int *crcp, void *p, int n, FILE *fp));
18 void init_code_cache P_((void));
19 int fwrite_txt P_((void *vp, int n, FILE *fp));
20 int fread_txt P_((void *vp, int n, FILE *fp));
21 /* dhuf.c */
22 void start_c_dyn P_((void));
23 void decode_start_dyn P_((void));
24 unsigned short decode_c_dyn P_((void));
25 unsigned short decode_p_dyn P_((void));
26 void output_dyn P_((unsigned int code, unsigned int pos));
27 void encode_end_dyn P_((void));
28 /* extract.c */
29 int decode_lzhuf P_((FILE *infp, FILE *outfp, off_t original_size, off_t packed_size, char *name, int method, off_t *read_sizep));
30 /* header.c */
31 int calc_sum P_((void *p, int len));
32 void convert_filename P_((char *name, int len, int size, int from_code, int to_code, char *from_delim, char *to_delim, int case_to));
33 boolean get_header P_((FILE *fp, LzHeader *hdr));
34 int seek_lha_header P_((FILE *fp));
35 void init_header P_((char *name, struct stat *v_stat, LzHeader *hdr));
36 void write_header P_((FILE *fp, LzHeader *hdr));
37 char *sjis_to_utf8 P_((char *dst, const char *src, size_t dstsize));
38 char *utf8_to_sjis P_((char *dst, const char *src, size_t dstsize));
39 void euc2sjis P_((int *p1, int *p2));
40 void sjis2euc P_((int *p1, int *p2));
41 int cap_to_sjis P_((char *dst, const char *src, size_t dstsize));
42 int sjis_to_cap P_((char *dst, const char *src, size_t dstsize));
43 /* huf.c */
44 void output_st1 P_((int c, int p));
45 unsigned char *alloc_buf P_((void));
46 void encode_start_st1 P_((void));
47 void encode_end_st1 P_((void));
48 unsigned short decode_c_st1 P_((void));
49 unsigned short decode_p_st1 P_((void));
50 void decode_start_st1 P_((void));
51 /* indicator.c */
52 void start_indicator P_((char *name, off_t size, char *msg, long def_indicator_threshold));
53 void put_indicator P_((long int count));
54 void finish_indicator2 P_((char *name, char *msg, int pcnt));
55 void finish_indicator P_((char *name, char *msg));
56 /* larc.c */
57 unsigned short decode_c_lzs P_((void));
58 unsigned short decode_p_lzs P_((void));
59 void decode_start_lzs P_((void));
60 unsigned short decode_c_lz5 P_((void));
61 unsigned short decode_p_lz5 P_((void));
62 void decode_start_lz5 P_((void));
63 /* lhadd.c */
64 FILE *append_it P_((char *name, FILE *oafp, FILE *nafp));
65 FILE *build_temporary_file P_((void));
66 void temporary_to_new_archive_file P_((off_t new_archive_size));
67 void cmd_add P_((void));
68 void cmd_delete P_((void));
69 /* lharc.c */
70 void message P_((char *fmt, ...));
71 void warning P_((char *fmt, ...));
72 void error P_((char *fmt, ...));
73 void fatal_error P_((char *fmt, ...));
74 void cleanup P_((void));
75 RETSIGTYPE interrupt P_((int signo));
76 void *xmalloc P_((size_t size));
77 void *xrealloc P_((void *old, size_t size));
78 char *xstrdup P_((char *str));
79 void init_sp P_((struct string_pool *sp));
80 void add_sp P_((struct string_pool *sp, char *name, int len));
81 void finish_sp P_((register struct string_pool *sp, int *v_count, char ***v_vector));
82 void free_sp P_((char **vector));
83 void cleaning_files P_((int *v_filec, char ***v_filev));
84 boolean find_files P_((char *name, int *v_filec, char ***v_filev));
85 void free_files P_((int filec, char **filev));
86 int build_temporary_name P_((void));
87 void build_backup_name P_((char *buffer, char *original, size_t size));
88 void build_standard_archive_name P_((char *buffer, char *original, size_t size));
89 boolean need_file P_((char *name));
90 FILE *xfopen P_((char *name, char *mode));
91 FILE *open_old_archive P_((void));
92 int inquire P_((char *msg, char *name, char *selective));
93 void write_archive_tail P_((FILE *nafp));
94 void lha_exit P_((int status));
95 /* lhext.c */
96 void cmd_extract P_((void));
97 int is_directory_traversal P_((char *path));
98 /* lhlist.c */
99 void cmd_list P_((void));
100 /* maketbl.c */
101 void make_table P_((int nchar, unsigned char bitlen[], int tablebits, unsigned short table[]));
102 /* maketree.c */
103 short make_tree P_((int nchar, unsigned short *freq, unsigned char *bitlen, unsigned short *code));
104 /* patmatch.c */
105 int patmatch P_((register char *p, register char *s, int f));
106 /* shuf.c */
107 void decode_start_st0 P_((void));
108 void encode_p_st0 P_((int j));
109 void encode_start_fix P_((void));
110 void decode_start_fix P_((void));
111 unsigned short decode_c_st0 P_((void));
112 unsigned short decode_p_st0 P_((void));
113 /* slide.c */
114 int encode_alloc P_((int method));
115 unsigned int encode P_((struct interfacing *interface));
116 unsigned int decode P_((struct interfacing *interface));
117 /* util.c */
118 off_t copyfile P_((FILE *f1, FILE *f2, off_t size, int text_flg, unsigned int *crcp));
119 int encode_stored_crc P_((FILE *ifp, FILE *ofp, off_t size, off_t *original_size_var, off_t *write_size_var));
120 boolean archive_is_msdos_sfx1 P_((char *name));
121 int xsnprintf P_((char *dest, size_t size, char *fmt, ...));
122 char *xstrchr P_((const char *s, int c));
123 char *xstrrchr P_((const char *s, int c));
124 char *xmemchr P_((const char *s, int c, size_t n));
125 char *xmemrchr P_((const char *s, int c, size_t n));
126 int str_safe_copy P_((char *dst, const char *src, int dstsz));
127 /* pm2.c */
128 void decode_start_pm2 P_((void));
129 unsigned short decode_c_pm2 P_((void));
130 unsigned short decode_p_pm2 P_((void));
131 /* pm2tree.c */
132 void maketree1 P_((void));
133 void maketree2 P_((int tree2bound));
134 int tree1_get P_((void));
135 int tree2_get P_((void));
136 /* pm2hist.c */
137 void hist_init P_((void));
138 unsigned char hist_lookup P_((int n));
139 void hist_update P_((unsigned char data));
140
141 /* util.c */
142 #if !HAVE_MEMMOVE
143 void *memmove P_((void *dst, const void *src, size_t cnt));
144 #endif
145 #if !HAVE_STRDUP
146 char *strdup P_((const char *buf));
147 #endif
148 #if !HAVE_MEMSET
149 char *memset P_((char *s, int c, size_t n));
150 #endif
151 #if !HAVE_STRCASECMP
152 int strcasecmp P_((const char *p1, const char *p2));
153 #endif
154 #if defined HAVE_DECL_BASENAME && !HAVE_DECL_BASENAME
155 char *basename P_((char *s));
156 #endif
157
158 /* vsnprintf.c */
159 #if !HAVE_VSNPRINTF
160 int vsnprintf P_((char *str, size_t n, const char *fmt, va_list ap));
161 int snprintf P_((char *str, size_t n, char const *fmt, ...));
162 #endif
163
164 #undef P_