ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/UUlib.xs
(Generate patch)

Comparing Convert-UUlib/UUlib.xs (file contents):
Revision 1.1 by root, Mon Jun 11 19:48:55 2001 UTC vs.
Revision 1.13 by root, Sat May 26 15:14:10 2007 UTC

1#include "EXTERN.h" 1#include "EXTERN.h"
2#include "perl.h" 2#include "perl.h"
3#include "XSUB.h" 3#include "XSUB.h"
4 4
5#include "uulib/fptools.h" 5#include "uulib/fptools.h"
6#include "uulib/uulib.h" 6#include "uulib/uudeview.h"
7#include "uulib/uuint.h" 7#include "uulib/uuint.h"
8 8
9static int 9static int
10not_here(char *s) 10not_here (char *s)
11{ 11{
12 croak("%s not implemented on this architecture", s); 12 croak("%s not implemented", s);
13 return -1; 13 return -1;
14} 14}
15 15
16static int 16static int
17constant(char *name) 17constant (char *name)
18{ 18{
19 errno = 0; 19 errno = 0;
20 switch (*name) { 20 switch (*name)
21 {
21 case 'A': 22 case 'A':
22 if (strEQ(name, "ACT_COPYING")) return UUACT_COPYING; 23 if (strEQ(name, "ACT_COPYING")) return UUACT_COPYING;
23 if (strEQ(name, "ACT_DECODING")) return UUACT_DECODING; 24 if (strEQ(name, "ACT_DECODING")) return UUACT_DECODING;
24 if (strEQ(name, "ACT_ENCODING")) return UUACT_ENCODING; 25 if (strEQ(name, "ACT_ENCODING")) return UUACT_ENCODING;
25 if (strEQ(name, "ACT_IDLE")) return UUACT_IDLE; 26 if (strEQ(name, "ACT_IDLE")) return UUACT_IDLE;
26 if (strEQ(name, "ACT_SCANNING")) return UUACT_SCANNING; 27 if (strEQ(name, "ACT_SCANNING")) return UUACT_SCANNING;
27 case 'F': 28 case 'F':
28 if (strEQ(name, "FILE_DECODED")) return UUFILE_DECODED; 29 if (strEQ(name, "FILE_DECODED")) return UUFILE_DECODED;
29 if (strEQ(name, "FILE_ERROR")) return UUFILE_ERROR; 30 if (strEQ(name, "FILE_ERROR")) return UUFILE_ERROR;
30 if (strEQ(name, "FILE_MISPART")) return UUFILE_MISPART; 31 if (strEQ(name, "FILE_MISPART")) return UUFILE_MISPART;
31 if (strEQ(name, "FILE_NOBEGIN")) return UUFILE_NOBEGIN; 32 if (strEQ(name, "FILE_NOBEGIN")) return UUFILE_NOBEGIN;
32 if (strEQ(name, "FILE_NODATA")) return UUFILE_NODATA; 33 if (strEQ(name, "FILE_NODATA")) return UUFILE_NODATA;
33 if (strEQ(name, "FILE_NOEND")) return UUFILE_NOEND; 34 if (strEQ(name, "FILE_NOEND")) return UUFILE_NOEND;
34 if (strEQ(name, "FILE_OK")) return UUFILE_OK; 35 if (strEQ(name, "FILE_OK")) return UUFILE_OK;
35 if (strEQ(name, "FILE_READ")) return UUFILE_READ; 36 if (strEQ(name, "FILE_READ")) return UUFILE_READ;
36 if (strEQ(name, "FILE_TMPFILE")) return UUFILE_TMPFILE; 37 if (strEQ(name, "FILE_TMPFILE")) return UUFILE_TMPFILE;
37 break; 38 break;
38 case 'M': 39 case 'M':
39 if (strEQ(name, "MSG_ERROR")) return UUMSG_ERROR; 40 if (strEQ(name, "MSG_ERROR")) return UUMSG_ERROR;
40 if (strEQ(name, "MSG_FATAL")) return UUMSG_FATAL; 41 if (strEQ(name, "MSG_FATAL")) return UUMSG_FATAL;
41 if (strEQ(name, "MSG_MESSAGE")) return UUMSG_MESSAGE; 42 if (strEQ(name, "MSG_MESSAGE")) return UUMSG_MESSAGE;
42 if (strEQ(name, "MSG_NOTE")) return UUMSG_NOTE; 43 if (strEQ(name, "MSG_NOTE")) return UUMSG_NOTE;
43 if (strEQ(name, "MSG_PANIC")) return UUMSG_PANIC; 44 if (strEQ(name, "MSG_PANIC")) return UUMSG_PANIC;
44 if (strEQ(name, "MSG_WARNING")) return UUMSG_WARNING; 45 if (strEQ(name, "MSG_WARNING")) return UUMSG_WARNING;
45 case 'O': 46 case 'O':
47 if (strEQ(name, "OPT_VERSION")) return UUOPT_VERSION;
48 if (strEQ(name, "OPT_FAST")) return UUOPT_FAST;
49 if (strEQ(name, "OPT_DUMBNESS")) return UUOPT_DUMBNESS;
46 if (strEQ(name, "OPT_BRACKPOL")) return UUOPT_BRACKPOL; 50 if (strEQ(name, "OPT_BRACKPOL")) return UUOPT_BRACKPOL;
47 if (strEQ(name, "OPT_DEBUG")) return UUOPT_DEBUG; 51 if (strEQ(name, "OPT_VERBOSE")) return UUOPT_VERBOSE;
48 if (strEQ(name, "OPT_DESPERATE")) return UUOPT_DESPERATE; 52 if (strEQ(name, "OPT_DESPERATE")) return UUOPT_DESPERATE;
49 if (strEQ(name, "OPT_DUMBNESS")) return UUOPT_DUMBNESS;
50 if (strEQ(name, "OPT_ENCEXT")) return UUOPT_ENCEXT;
51 if (strEQ(name, "OPT_ERRNO")) return UUOPT_ERRNO;
52 if (strEQ(name, "OPT_FAST")) return UUOPT_FAST;
53 if (strEQ(name, "OPT_IGNMODE")) return UUOPT_IGNMODE;
54 if (strEQ(name, "OPT_IGNREPLY")) return UUOPT_IGNREPLY; 53 if (strEQ(name, "OPT_IGNREPLY")) return UUOPT_IGNREPLY;
55 if (strEQ(name, "OPT_OVERWRITE")) return UUOPT_OVERWRITE; 54 if (strEQ(name, "OPT_OVERWRITE")) return UUOPT_OVERWRITE;
56 if (strEQ(name, "OPT_PREAMB")) return UUOPT_PREAMB;
57 if (strEQ(name, "OPT_PROGRESS")) return UUOPT_PROGRESS;
58 if (strEQ(name, "OPT_SAVEPATH")) return UUOPT_SAVEPATH; 55 if (strEQ(name, "OPT_SAVEPATH")) return UUOPT_SAVEPATH;
59 if (strEQ(name, "OPT_TINYB64")) return UUOPT_TINYB64; 56 if (strEQ(name, "OPT_IGNMODE")) return UUOPT_IGNMODE;
57 if (strEQ(name, "OPT_DEBUG")) return UUOPT_DEBUG;
58 if (strEQ(name, "OPT_ERRNO")) return UUOPT_ERRNO;
59 if (strEQ(name, "OPT_PROGRESS")) return UUOPT_PROGRESS;
60 if (strEQ(name, "OPT_USETEXT")) return UUOPT_USETEXT; 60 if (strEQ(name, "OPT_USETEXT")) return UUOPT_USETEXT;
61 if (strEQ(name, "OPT_PREAMB")) return UUOPT_PREAMB;
62 if (strEQ(name, "OPT_TINYB64")) return UUOPT_TINYB64;
63 if (strEQ(name, "OPT_ENCEXT")) return UUOPT_ENCEXT;
64 if (strEQ(name, "OPT_REMOVE")) return UUOPT_REMOVE;
65 if (strEQ(name, "OPT_MOREMIME")) return UUOPT_MOREMIME;
66 if (strEQ(name, "OPT_DOTDOT")) return UUOPT_DOTDOT;
61 if (strEQ(name, "OPT_VERBOSE")) return UUOPT_VERBOSE; 67 if (strEQ(name, "OPT_RBUF")) return UUOPT_RBUF;
62 if (strEQ(name, "OPT_VERSION")) return UUOPT_VERSION; 68 if (strEQ(name, "OPT_WBUF")) return UUOPT_WBUF;
63 case 'R': 69 case 'R':
64 if (strEQ(name, "RET_CANCEL")) return UURET_CANCEL; 70 if (strEQ(name, "RET_CANCEL")) return UURET_CANCEL;
65 if (strEQ(name, "RET_CONT")) return UURET_CONT; 71 if (strEQ(name, "RET_CONT")) return UURET_CONT;
66 if (strEQ(name, "RET_EXISTS")) return UURET_EXISTS; 72 if (strEQ(name, "RET_EXISTS")) return UURET_EXISTS;
67 if (strEQ(name, "RET_ILLVAL")) return UURET_ILLVAL; 73 if (strEQ(name, "RET_ILLVAL")) return UURET_ILLVAL;
68 if (strEQ(name, "RET_IOERR")) return UURET_IOERR; 74 if (strEQ(name, "RET_IOERR")) return UURET_IOERR;
69 if (strEQ(name, "RET_NODATA")) return UURET_NODATA; 75 if (strEQ(name, "RET_NODATA")) return UURET_NODATA;
70 if (strEQ(name, "RET_NOEND")) return UURET_NOEND; 76 if (strEQ(name, "RET_NOEND")) return UURET_NOEND;
71 if (strEQ(name, "RET_NOMEM")) return UURET_NOMEM; 77 if (strEQ(name, "RET_NOMEM")) return UURET_NOMEM;
72 if (strEQ(name, "RET_OK")) return UURET_OK; 78 if (strEQ(name, "RET_OK")) return UURET_OK;
73 if (strEQ(name, "RET_UNSUP")) return UURET_UNSUP; 79 if (strEQ(name, "RET_UNSUP")) return UURET_UNSUP;
74 case 'B': 80 case 'B':
75 if (strEQ(name, "B64ENCODED")) return B64ENCODED; 81 if (strEQ(name, "B64_ENCODED")) return B64ENCODED;
76 if (strEQ(name, "BH_ENCODED")) return BH_ENCODED; 82 if (strEQ(name, "BH_ENCODED")) return BH_ENCODED;
77 case 'P': 83 case 'P':
78 if (strEQ(name, "PT_ENCODED")) return PT_ENCODED; 84 if (strEQ(name, "PT_ENCODED")) return PT_ENCODED;
79 case 'Q': 85 case 'Q':
80 if (strEQ(name, "QP_ENCODED")) return QP_ENCODED; 86 if (strEQ(name, "QP_ENCODED")) return QP_ENCODED;
81 case 'U': 87 case 'U':
82 if (strEQ(name, "UU_ENCODED")) return UU_ENCODED; 88 if (strEQ(name, "UU_ENCODED")) return UU_ENCODED;
83 case 'X': 89 case 'X':
84 if (strEQ(name, "XX_ENCODED")) return XX_ENCODED; 90 if (strEQ(name, "XX_ENCODED")) return XX_ENCODED;
91 case 'Y':
92 if (strEQ(name, "YENC_ENCODED")) return YENC_ENCODED;
85 } 93 }
94
86 errno = EINVAL; 95 errno = EINVAL;
87 return 0; 96 return 0;
88} 97}
89 98
99static void
90static void uu_msg_callback (void *cb, char *msg, int level) 100uu_msg_callback (void *cb, char *msg, int level)
91{ 101{
92 dSP; 102 dSP;
93 103
94 ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP,2); 104 ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2);
95 105
96 PUSHs(sv_2mortal(newSVpv(msg,0))); 106 PUSHs (sv_2mortal (newSVpv (msg, 0)));
97 PUSHs(sv_2mortal(newSViv(level))); 107 PUSHs (sv_2mortal (newSViv (level)));
98 108
99 PUTBACK; (void) perl_call_sv ((SV *)cb, G_VOID|G_DISCARD); SPAGAIN; 109 PUTBACK; (void) perl_call_sv ((SV *)cb, G_VOID|G_DISCARD); SPAGAIN;
100 PUTBACK; FREETMPS; LEAVE; 110 PUTBACK; FREETMPS; LEAVE;
101} 111}
102 112
113static int
103static int uu_busy_callback (void *cb, uuprogress *uup) 114uu_busy_callback (void *cb, uuprogress *uup)
104{ 115{
105 dSP; 116 dSP;
106 int count; 117 int count;
107 int retval; 118 int retval;
108 119
109 ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP,6); 120 ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 6);
110 121
111 PUSHs(sv_2mortal(newSViv(uup->action))); 122 PUSHs (sv_2mortal (newSViv (uup->action)));
112 PUSHs(sv_2mortal(newSVpv(uup->curfile,0))); 123 PUSHs (sv_2mortal (newSVpv (uup->curfile, 0)));
113 PUSHs(sv_2mortal(newSViv(uup->partno))); 124 PUSHs (sv_2mortal (newSViv (uup->partno)));
114 PUSHs(sv_2mortal(newSViv(uup->numparts))); 125 PUSHs (sv_2mortal (newSViv (uup->numparts)));
115 PUSHs(sv_2mortal(newSViv(uup->fsize))); 126 PUSHs (sv_2mortal (newSViv (uup->fsize)));
116 PUSHs(sv_2mortal(newSViv(uup->percent))); 127 PUSHs (sv_2mortal (newSViv (uup->percent)));
117 128
118 PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; 129 PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
119 130
120 if (count != 1) 131 if (count != 1)
121 croak ("busycallback perl callback returned more than one argument"); 132 croak ("busycallback perl callback returned more than one argument");
125 PUTBACK; FREETMPS; LEAVE; 136 PUTBACK; FREETMPS; LEAVE;
126 137
127 return retval; 138 return retval;
128} 139}
129 140
141static char *
130static char *uu_fnamefilter_callback (void *cb, char *fname) 142uu_fnamefilter_callback (void *cb, char *fname)
131{ 143{
132 dSP; 144 dSP;
133 int count; 145 int count;
134 static char *str; 146 static char *str;
135 147
136 ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP,1); 148 ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 1);
137 149
138 PUSHs(sv_2mortal(newSVpv(fname,0))); 150 PUSHs (sv_2mortal (newSVpv (fname, 0)));
139 151
140 PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; 152 PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
141 153
142 if (count != 1) 154 if (count != 1)
143 croak ("fnamefilter perl callback returned more than one argument"); 155 croak ("fnamefilter perl callback MUST return a single filename exactly");
144 156
145 FP_free(str); str = FP_strdup (POPp); 157 _FP_free (str); str = _FP_strdup (SvPV_nolen (TOPs));
146 158
147 PUTBACK; FREETMPS; LEAVE; 159 PUTBACK; FREETMPS; LEAVE;
148 160
149 return str; 161 return str;
150} 162}
151 163
164static int
152static int uu_file_callback (void *cb, char *id, char *fname, int retrieve) 165uu_file_callback (void *cb, char *id, char *fname, int retrieve)
153{ 166{
154 dSP; 167 dSP;
155 int count; 168 int count;
156 int retval; 169 int retval;
157 SV *xfname = newSVpv ("", 0); 170 SV *xfname = newSVpv ("", 0);
158 STRLEN dc;
159 171
160 ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP,3); 172 ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3);
161 173
162 PUSHs(sv_2mortal(newSVpv(id,0))); 174 PUSHs (sv_2mortal (newSVpv (id, 0)));
163 PUSHs(sv_2mortal(xfname)); 175 PUSHs (sv_2mortal (xfname));
164 PUSHs(sv_2mortal(newSViv(retrieve))); 176 PUSHs (sv_2mortal (newSViv (retrieve)));
165 177
166 PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; 178 PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
167 179
168 if (count != 1) 180 if (count != 1)
169 croak ("filecallback perl callback returned more than one argument"); 181 croak ("filecallback perl callback must return a single return status");
170 182
171 strcpy (fname, SvPV (xfname, dc)); 183 strcpy (fname, SvPV_nolen (xfname));
172
173 retval = POPi; 184 retval = POPi;
174 185
175 PUTBACK; FREETMPS; LEAVE; 186 PUTBACK; FREETMPS; LEAVE;
176 187
177 return retval; 188 return retval;
178} 189}
179 190
191static char *
192uu_filename_callback (void *cb, char *subject, char *filename)
193{
194 dSP;
195 int count;
196
197 ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2);
198
199 PUSHs (sv_2mortal(newSVpv(subject, 0)));
200 PUSHs (filename ? sv_2mortal(newSVpv(filename, 0)) : &PL_sv_undef);
201
202 PUTBACK; count = perl_call_sv ((SV *)cb, G_ARRAY); SPAGAIN;
203
204 if (count > 1)
205 croak ("filenamecallback perl callback must return nothing or a single filename");
206
207 if (count)
208 {
209 _FP_free (filename);
210
211 filename = SvOK (TOPs)
212 ? _FP_strdup (SvPV_nolen (TOPs))
213 : 0;
214 }
215
216 PUTBACK; FREETMPS; LEAVE;
217
218 return filename;
219}
220
180static SV *uu_msg_sv, *uu_busy_sv, *uu_file_sv, *uu_fnamefilter_sv; 221static SV *uu_msg_sv, *uu_busy_sv, *uu_file_sv, *uu_fnamefilter_sv, *uu_filename_sv;
181 222
182#define FUNC_CB(cb) (void *)(sv_setsv (cb ## _sv, func), cb ## _sv), func ? cb ## _callback : NULL 223#define FUNC_CB(cb) (void *)(sv_setsv (cb ## _sv, func), cb ## _sv), func ? cb ## _callback : NULL
183 224
225static int
184static int uu_info_file(void *cb, char *info) 226uu_info_file (void *cb, char *info)
185{ 227{
186 dSP; 228 dSP;
187 int count; 229 int count;
188 int retval; 230 int retval;
189 231
222MODULE = Convert::UUlib PACKAGE = Convert::UUlib PREFIX = UU 264MODULE = Convert::UUlib PACKAGE = Convert::UUlib PREFIX = UU
223 265
224PROTOTYPES: ENABLE 266PROTOTYPES: ENABLE
225 267
226int 268int
227constant(name) 269constant (name)
228 char * name 270 char * name
229 271
230 272
231void 273void
232UUInitialize() 274UUInitialize ()
233 CODE: 275 CODE:
234 if (!uu_initialized) 276 if (!uu_initialized)
235 { 277 {
236 int retval; 278 int retval;
237 279
240 282
241 uu_initialized = 1; 283 uu_initialized = 1;
242 } 284 }
243 285
244void 286void
245UUCleanUp() 287UUCleanUp ()
246 CODE: 288 CODE:
247 if (uu_initialized) 289 if (uu_initialized)
248 UUCleanUp (); 290 UUCleanUp ();
249 291
250 uu_initialized = 0; 292 uu_initialized = 0;
251 293
252SV * 294SV *
253UUGetOption(opt) 295UUGetOption (opt)
254 int opt 296 int opt
255 CODE: 297 CODE:
256 { 298 {
257 if (opt == UUOPT_PROGRESS) 299 if (opt == UUOPT_PROGRESS)
258 croak ("GetOption(UUOPT_PROGRESS) is not yet implemented"); 300 croak ("GetOption(UUOPT_PROGRESS) is not yet implemented");
270 } 312 }
271 OUTPUT: 313 OUTPUT:
272 RETVAL 314 RETVAL
273 315
274int 316int
275UUSetOption(opt,val) 317UUSetOption (opt, val)
276 int opt 318 int opt
277 SV * val 319 SV * val
278 CODE: 320 CODE:
279 { 321 {
280 STRLEN dc; 322 STRLEN dc;
286 } 328 }
287 OUTPUT: 329 OUTPUT:
288 RETVAL 330 RETVAL
289 331
290char * 332char *
291UUstrerror(errcode) 333UUstrerror (errcode)
292 int errcode 334 int errcode
293 335
294void 336void
295UUSetMsgCallback(func=0) 337UUSetMsgCallback (func = 0)
296 SV * func 338 SV * func
297 CODE: 339 CODE:
298 UUSetMsgCallback (FUNC_CB(uu_msg)); 340 UUSetMsgCallback (FUNC_CB (uu_msg));
299 341
300void 342void
301UUSetBusyCallback(func=0,msecs=1000) 343UUSetBusyCallback (func = 0,msecs = 1000)
302 SV * func 344 SV * func
303 long msecs 345 long msecs
304 CODE: 346 CODE:
305 UUSetBusyCallback (FUNC_CB(uu_busy), msecs); 347 UUSetBusyCallback (FUNC_CB (uu_busy), msecs);
306 348
307void 349void
308UUSetFileCallback(func=0) 350UUSetFileCallback (func = 0)
309 SV * func 351 SV * func
310 CODE: 352 CODE:
311 UUSetFileCallback (FUNC_CB(uu_file)); 353 UUSetFileCallback (FUNC_CB (uu_file));
312 354
313void 355void
314UUSetFNameFilter(func=0) 356UUSetFNameFilter (func = 0)
315 SV * func 357 SV * func
316 CODE: 358 CODE:
317 UUSetFNameFilter (FUNC_CB(uu_fnamefilter)); 359 UUSetFNameFilter (FUNC_CB (uu_fnamefilter));
360
361void
362UUSetFileNameCallback (func = 0)
363 SV * func
364 CODE:
365 UUSetFileNameCallback (FUNC_CB (uu_filename));
318 366
319char * 367char *
320UUFNameFilter(fname) 368UUFNameFilter (fname)
321 char * fname 369 char * fname
322 370
323void 371void
324UULoadFile(fname,id=0,delflag=0) 372UULoadFile (fname, id = 0, delflag = 0, partno = -1)
325 char * fname 373 char * fname
326 char * id 374 char * id
327 int delflag 375 int delflag
376 int partno
328 PPCODE: 377 PPCODE:
329 { 378 {
330 int count; 379 int count;
331 380
332 XPUSHs(sv_2mortal(newSViv(UULoadFile (fname, id, delflag, &count)))); 381 XPUSHs (sv_2mortal (newSViv (UULoadFileWithPartNo (fname, id, delflag, partno, &count))));
333 if (GIMME_V == G_ARRAY) 382 if (GIMME_V == G_ARRAY)
334 XPUSHs(sv_2mortal(newSViv(count))); 383 XPUSHs (sv_2mortal (newSViv (count)));
335 } 384 }
336 385
337int 386int
338UUSmerge(pass) 387UUSmerge (pass)
339 int pass 388 int pass
340 389
341int 390int
342UUQuickDecode(datain,dataout,boundary,maxpos) 391UUQuickDecode(datain,dataout,boundary,maxpos)
343 FILE * datain 392 FILE * datain
413 char * from 462 char * from
414 char * subject 463 char * subject
415 int isemail 464 int isemail
416 465
417uulist * 466uulist *
418UUGetFileListItem(num) 467UUGetFileListItem (num)
419 int num 468 int num
420 469
470MODULE = Convert::UUlib PACKAGE = Convert::UUlib::Item
471
421int 472int
422UURenameFile(item,newname) 473rename (item, newname)
423 uulist *item 474 uulist *item
424 char * newname 475 char * newname
425 ALIAS: 476 CODE:
426 Convert::UUlib::Item::rename = 1 477 RETVAL = UURenameFile (item, newname);
478 OUTPUT:
479 RETVAL
427 480
428int 481int
429UUDecodeToTemp(item) 482decode_temp (item)
430 uulist *item 483 uulist *item
431 ALIAS: 484 CODE:
432 Convert::UUlib::Item::decode_temp = 1 485 RETVAL = UUDecodeToTemp (item);
486 OUTPUT:
487 RETVAL
433 488
434int 489int
435UURemoveTemp(item) 490remove_temp (item)
436 uulist *item 491 uulist *item
437 ALIAS: 492 CODE:
438 Convert::UUlib::Item::remove_temp = 1 493 RETVAL = UURemoveTemp (item);
494 OUTPUT:
495 RETVAL
439 496
440int 497int
441UUDecodeFile(item,target=0) 498decode (item, target = 0)
442 uulist *item 499 uulist *item
443 char * target 500 char * target
444 ALIAS: 501 CODE:
445 Convert::UUlib::Item::decode = 1 502 RETVAL = UUDecodeFile (item, target);
503 OUTPUT:
504 RETVAL
446 505
447void 506void
448UUInfoFile(item,func) 507info (item, func)
449 uulist *item 508 uulist *item
450 SV * func 509 SV * func
451 CODE: 510 CODE:
452 UUInfoFile(item,(void *)func,uu_info_file); 511 UUInfoFile (item,(void *)func, uu_info_file);
453 ALIAS:
454 Convert::UUlib::Item::info = 1
455
456MODULE = Convert::UUlib PACKAGE = Convert::UUlib::Item
457 512
458short 513short
459state(li) 514state(li)
460 uulist *li 515 uulist *li
461 CODE: 516 CODE:
489 RETVAL = li->size; 544 RETVAL = li->size;
490 OUTPUT: 545 OUTPUT:
491 RETVAL 546 RETVAL
492 547
493char * 548char *
494filename(li,newfilename=0) 549filename (li, newfilename = 0)
495 uulist *li 550 uulist *li
496 char * newfilename 551 char * newfilename
497 CODE: 552 CODE:
498 if (newfilename) 553 if (newfilename)
499 { 554 {
500 FP_free (li->filename); 555 _FP_free (li->filename);
501 li->filename = FP_strdup (newfilename); 556 li->filename = _FP_strdup (newfilename);
502 } 557 }
503 RETVAL = li->filename; 558 RETVAL = li->filename;
504 OUTPUT: 559 OUTPUT:
505 RETVAL 560 RETVAL
506 561
507char * 562char *
508subfname(li) 563subfname (li)
509 uulist *li 564 uulist *li
510 CODE: 565 CODE:
511 RETVAL = li->subfname; 566 RETVAL = li->subfname;
512 OUTPUT: 567 OUTPUT:
513 RETVAL 568 RETVAL
514 569
515char * 570char *
516mimeid(li) 571mimeid (li)
517 uulist *li 572 uulist *li
518 CODE: 573 CODE:
519 RETVAL = li->mimeid; 574 RETVAL = li->mimeid;
520 OUTPUT: 575 OUTPUT:
521 RETVAL 576 RETVAL
522 577
523char * 578char *
524mimetype(li) 579mimetype (li)
525 uulist *li 580 uulist *li
526 CODE: 581 CODE:
527 RETVAL = li->mimetype; 582 RETVAL = li->mimetype;
528 OUTPUT: 583 OUTPUT:
529 RETVAL 584 RETVAL
530 585
531char * 586char *
532binfile(li) 587binfile (li)
533 uulist *li 588 uulist *li
534 CODE: 589 CODE:
535 RETVAL = li->binfile; 590 RETVAL = li->binfile;
536 OUTPUT: 591 OUTPUT:
537 RETVAL 592 RETVAL
538 593
539# functions accessing internal data(!) 594# methods accessing internal data(!)
540 595
541void 596void
542parts(li) 597parts (li)
543 uulist *li 598 uulist *li
544 PPCODE: 599 PPCODE:
545 { 600 {
546 struct _uufile *p = li->thisfile; 601 struct _uufile *p = li->thisfile;
547 602
571 p = p->NEXT; 626 p = p->NEXT;
572 } 627 }
573 } 628 }
574 629
575BOOT: 630BOOT:
576uu_msg_sv = newSVsv(&PL_sv_undef); 631 uu_msg_sv = newSVsv (&PL_sv_undef);
577uu_busy_sv = newSVsv(&PL_sv_undef); 632 uu_busy_sv = newSVsv (&PL_sv_undef);
578uu_file_sv = newSVsv(&PL_sv_undef); 633 uu_file_sv = newSVsv (&PL_sv_undef);
579uu_fnamefilter_sv = newSVsv(&PL_sv_undef); 634 uu_fnamefilter_sv = newSVsv (&PL_sv_undef);
635 uu_filename_sv = newSVsv (&PL_sv_undef);
580 636

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines