… | |
… | |
20 | /* |
20 | /* |
21 | * This file describes the internal structures, variables and definitions |
21 | * This file describes the internal structures, variables and definitions |
22 | * of UUDeview. It should not be included from other packages. Subject to |
22 | * of UUDeview. It should not be included from other packages. Subject to |
23 | * change without notice. Do not depend on anything here. |
23 | * change without notice. Do not depend on anything here. |
24 | * |
24 | * |
25 | * $Id: uuint.h,v 1.6 2003/11/06 13:33:41 root Exp $ |
25 | * $Id: uuint.h,v 1.12 2020/12/13 02:55:12 root Exp $ |
26 | */ |
26 | */ |
27 | |
27 | |
28 | /* |
28 | /* |
29 | * Busy Polls will be made after processing ... lines |
29 | * Busy Polls will be made after processing ... lines |
30 | */ |
30 | */ |
… | |
… | |
67 | * by zero for b<100 and the result doesn't become larger than 100% |
67 | * by zero for b<100 and the result doesn't become larger than 100% |
68 | */ |
68 | */ |
69 | |
69 | |
70 | #define UUPERCENT(a,b) ((int) ((unsigned long)(a) / \ |
70 | #define UUPERCENT(a,b) ((int) ((unsigned long)(a) / \ |
71 | (((unsigned long)(b)/100)+1))) |
71 | (((unsigned long)(b)/100)+1))) |
72 | |
72 | |
73 | /* |
73 | /* |
74 | * Make the Busy Callback easier. The macro returns true if the BusyCallback |
74 | * Make the Busy Callback easier. The macro returns true if the BusyCallback |
75 | * wants us to terminate. |
75 | * wants us to terminate. |
76 | */ |
76 | */ |
77 | |
77 | |
… | |
… | |
140 | char *subject; /* Whole subject line */ |
140 | char *subject; /* Whole subject line */ |
141 | char *filename; /* Only filled in if begin detected */ |
141 | char *filename; /* Only filled in if begin detected */ |
142 | char *origin; /* Whole 'From:' line */ |
142 | char *origin; /* Whole 'From:' line */ |
143 | char *mimeid; /* the ID for Mime-encoded files */ |
143 | char *mimeid; /* the ID for Mime-encoded files */ |
144 | char *mimetype; /* Content-Type */ |
144 | char *mimetype; /* Content-Type */ |
145 | short mode; /* Mode of File (from 'begin') */ |
|
|
146 | int begin; /* begin detected */ |
145 | int begin; /* begin detected */ |
147 | int end; /* end detected */ |
146 | int end; /* end detected */ |
|
|
147 | long yefilesize; /* the yencode file size, or 0 */ |
|
|
148 | |
|
|
149 | uint16_t mode; /* Mode of File (from 'begin') */ |
148 | int flags; /* associated flags */ |
150 | uint8_t flags; /* associated flags */ |
149 | |
|
|
150 | short uudet; /* valid encoded data. value indicates encoding */ |
151 | uint8_t uudet; /* valid encoded data. value indicates encoding */ |
151 | short partno; /* Mime-files have a part number within */ |
152 | int partno; /* Mime-files have a part number within */ |
152 | short maxpno; /* ... plus the total number of parts */ |
153 | int maxpno; /* ... plus the total number of parts */ |
153 | |
154 | |
154 | char *sfname; /* Associated source file */ |
155 | char *sfname; /* Associated source file */ |
155 | long startpos; /* ftell() position where data starts */ |
156 | long startpos; /* ftell() position where data starts */ |
156 | long length; /* length of data */ |
157 | long length; /* length of data */ |
157 | } fileread; |
158 | } fileread; |
… | |
… | |
162 | * and produces this uufile structure. |
163 | * and produces this uufile structure. |
163 | * Linked List, ordered by partno. |
164 | * Linked List, ordered by partno. |
164 | **/ |
165 | **/ |
165 | |
166 | |
166 | typedef struct _uufile { |
167 | typedef struct _uufile { |
|
|
168 | struct _uufile *NEXT; |
167 | char *filename; |
169 | char *filename; |
168 | char *subfname; |
170 | char *subfname; |
169 | char *mimeid; |
171 | char *mimeid; |
170 | char *mimetype; |
172 | char *mimetype; |
171 | short partno; |
|
|
172 | fileread *data; |
173 | fileread *data; |
173 | struct _uufile *NEXT; |
174 | long yefilesize; |
|
|
175 | int partno; |
174 | } uufile; |
176 | } uufile; |
175 | |
177 | |
176 | extern void *uu_MsgCBArg; |
178 | extern void *uu_MsgCBArg; |
177 | extern void *uu_BusyCBArg; |
179 | extern void *uu_BusyCBArg; |
178 | extern void *uu_FileCBArg; |
180 | extern void *uu_FileCBArg; |
… | |
… | |
180 | extern void *uu_FNCBArg; |
182 | extern void *uu_FNCBArg; |
181 | |
183 | |
182 | /* |
184 | /* |
183 | * variables |
185 | * variables |
184 | */ |
186 | */ |
|
|
187 | |
|
|
188 | extern int uu_autocheck; |
|
|
189 | extern int uu_rbuf; |
|
|
190 | extern int uu_wbuf; |
|
|
191 | #define UUSETBUF(fp,buff,size) if (size) setvbuf ((fp), ((buff) = malloc (size)), _IOFBF, (size)) |
|
|
192 | #define UUCLRBUF(size,buff) if (size) free (buff) |
185 | |
193 | |
186 | extern int uu_fast_scanning; |
194 | extern int uu_fast_scanning; |
187 | extern int uu_bracket_policy; |
195 | extern int uu_bracket_policy; |
188 | extern int uu_verbose; |
196 | extern int uu_verbose; |
189 | extern int uu_desperate; |
197 | extern int uu_desperate; |
… | |
… | |
278 | * Functions from uucheck.c |
286 | * Functions from uucheck.c |
279 | */ |
287 | */ |
280 | |
288 | |
281 | uufile * UUPreProcessPart (fileread *, int *); |
289 | uufile * UUPreProcessPart (fileread *, int *); |
282 | int UUInsertPartToList (uufile *); |
290 | int UUInsertPartToList (uufile *); |
283 | uulist * UUCheckGlobalList (void); |
|
|
284 | |
291 | |
285 | /* |
292 | /* |
286 | * Functions from uuutil.c |
293 | * Functions from uuutil.c |
287 | */ |
294 | */ |
288 | |
295 | |
… | |
… | |
293 | |
300 | |
294 | fileread * ScanPart (FILE *, char *, int *); |
301 | fileread * ScanPart (FILE *, char *, int *); |
295 | |
302 | |
296 | int UUbhdecomp (char *, char *, |
303 | int UUbhdecomp (char *, char *, |
297 | char *, int *, |
304 | char *, int *, |
298 | size_t, size_t, |
305 | size_t, size_t, |
299 | size_t *); |
306 | size_t *); |
300 | size_t UUbhwrite (char *, size_t, size_t, FILE *); |
307 | size_t UUbhwrite (char *, size_t, size_t, FILE *); |
301 | |
308 | |
302 | /* |
309 | /* |
303 | * Functions from uunconc.c |
310 | * Functions from uunconc.c |