/* doio.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
if (num_svs > 1) {
Perl_croak(aTHX_ "More than one argument to '%c&' open",IoTYPE(io));
}
+ /*SUPPRESS 530*/
+ for (; isSPACE(*type); type++) ;
if (num_svs && (SvIOK(*svp) || (SvPOK(*svp) && looks_like_number(*svp)))) {
fd = SvUV(*svp);
num_svs = 0;
}
else if (isDIGIT(*type)) {
- /*SUPPRESS 530*/
- for (; isSPACE(*type); type++) ;
fd = atoi(type);
}
else {
}
else {
GV *thatgv;
- /*SUPPRESS 530*/
- for (; isSPACE(*type); type++) ;
thatgv = gv_fetchpv(type,FALSE,SVt_PVIO);
thatio = GvIO(thatgv);
}
SV* modified = *++mark;
void * utbufp = &utbuf;
- /* be like C, and if both times are undefined, let the C
- library figure out what to do. This usually means
- "current time" */
+ /* Be like C, and if both times are undefined, let the C
+ * library figure out what to do. This usually means
+ * "current time". */
if ( accessed == &PL_sv_undef && modified == &PL_sv_undef )
- utbufp = NULL;
-
- Zero(&utbuf, sizeof utbuf, char);
+ utbufp = NULL;
+ else {
+ Zero(&utbuf, sizeof utbuf, char);
#ifdef BIG_TIME
- utbuf.actime = (Time_t)SvNVx(accessed); /* time accessed */
- utbuf.modtime = (Time_t)SvNVx(modified); /* time modified */
+ utbuf.actime = (Time_t)SvNVx(accessed); /* time accessed */
+ utbuf.modtime = (Time_t)SvNVx(modified); /* time modified */
#else
- utbuf.actime = (Time_t)SvIVx(accessed); /* time accessed */
- utbuf.modtime = (Time_t)SvIVx(modified); /* time modified */
+ utbuf.actime = (Time_t)SvIVx(accessed); /* time accessed */
+ utbuf.modtime = (Time_t)SvIVx(modified); /* time modified */
#endif
- APPLY_TAINT_PROPER();
+ }
+ APPLY_TAINT_PROPER();
tot = sp - mark;
while (++mark <= sp) {
char *name = SvPVx(*mark, n_a);