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