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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines