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 | |
9 | static int |
9 | static int |
10 | not_here(char *s) |
10 | not_here(char *s) |
11 | { |
11 | { |
… | |
… | |
58 | if (strEQ(name, "OPT_SAVEPATH")) return UUOPT_SAVEPATH; |
58 | if (strEQ(name, "OPT_SAVEPATH")) return UUOPT_SAVEPATH; |
59 | if (strEQ(name, "OPT_TINYB64")) return UUOPT_TINYB64; |
59 | if (strEQ(name, "OPT_TINYB64")) return UUOPT_TINYB64; |
60 | if (strEQ(name, "OPT_USETEXT")) return UUOPT_USETEXT; |
60 | if (strEQ(name, "OPT_USETEXT")) return UUOPT_USETEXT; |
61 | if (strEQ(name, "OPT_VERBOSE")) return UUOPT_VERBOSE; |
61 | if (strEQ(name, "OPT_VERBOSE")) return UUOPT_VERBOSE; |
62 | if (strEQ(name, "OPT_VERSION")) return UUOPT_VERSION; |
62 | if (strEQ(name, "OPT_VERSION")) return UUOPT_VERSION; |
|
|
63 | if (strEQ(name, "OPT_REMOVE")) return UUOPT_REMOVE; |
|
|
64 | if (strEQ(name, "OPT_MOREMIME")) return UUOPT_MOREMIME; |
63 | case 'R': |
65 | case 'R': |
64 | if (strEQ(name, "RET_CANCEL")) return UURET_CANCEL; |
66 | if (strEQ(name, "RET_CANCEL")) return UURET_CANCEL; |
65 | if (strEQ(name, "RET_CONT")) return UURET_CONT; |
67 | if (strEQ(name, "RET_CONT")) return UURET_CONT; |
66 | if (strEQ(name, "RET_EXISTS")) return UURET_EXISTS; |
68 | if (strEQ(name, "RET_EXISTS")) return UURET_EXISTS; |
67 | if (strEQ(name, "RET_ILLVAL")) return UURET_ILLVAL; |
69 | if (strEQ(name, "RET_ILLVAL")) return UURET_ILLVAL; |
… | |
… | |
80 | if (strEQ(name, "QP_ENCODED")) return QP_ENCODED; |
82 | if (strEQ(name, "QP_ENCODED")) return QP_ENCODED; |
81 | case 'U': |
83 | case 'U': |
82 | if (strEQ(name, "UU_ENCODED")) return UU_ENCODED; |
84 | if (strEQ(name, "UU_ENCODED")) return UU_ENCODED; |
83 | case 'X': |
85 | case 'X': |
84 | if (strEQ(name, "XX_ENCODED")) return XX_ENCODED; |
86 | if (strEQ(name, "XX_ENCODED")) return XX_ENCODED; |
|
|
87 | case 'Y': |
|
|
88 | if (strEQ(name, "YENC_ENCODED")) return YENC_ENCODED; |
85 | } |
89 | } |
86 | errno = EINVAL; |
90 | errno = EINVAL; |
87 | return 0; |
91 | return 0; |
88 | } |
92 | } |
89 | |
93 | |
… | |
… | |
140 | PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; |
144 | PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; |
141 | |
145 | |
142 | if (count != 1) |
146 | if (count != 1) |
143 | croak ("fnamefilter perl callback returned more than one argument"); |
147 | croak ("fnamefilter perl callback returned more than one argument"); |
144 | |
148 | |
145 | FP_free(str); str = FP_strdup (POPp); |
149 | _FP_free(str); str = _FP_strdup (POPp); |
146 | |
150 | |
147 | PUTBACK; FREETMPS; LEAVE; |
151 | PUTBACK; FREETMPS; LEAVE; |
148 | |
152 | |
149 | return str; |
153 | return str; |
150 | } |
154 | } |
… | |
… | |
495 | uulist *li |
499 | uulist *li |
496 | char * newfilename |
500 | char * newfilename |
497 | CODE: |
501 | CODE: |
498 | if (newfilename) |
502 | if (newfilename) |
499 | { |
503 | { |
500 | FP_free (li->filename); |
504 | _FP_free (li->filename); |
501 | li->filename = FP_strdup (newfilename); |
505 | li->filename = _FP_strdup (newfilename); |
502 | } |
506 | } |
503 | RETVAL = li->filename; |
507 | RETVAL = li->filename; |
504 | OUTPUT: |
508 | OUTPUT: |
505 | RETVAL |
509 | RETVAL |
506 | |
510 | |