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