103
/* skip restoring time stamps on user's request */
104
if (uO.D_flag <= 1) {
104
107
#ifdef IZ_CHECK_TZ
107
(ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0,
108
G.lrec.last_mod_dos_date, &z_utime, NULL)
110
t = localtime(&(z_utime.mtime));
112
t = (struct tm *)NULL;
114
if (t != (struct tm *)NULL)
116
yr = t->tm_year + 1900;
110
(ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0,
111
G.lrec.last_mod_dos_date, &z_utime, NULL)
113
t = localtime(&(z_utime.mtime));
115
t = (struct tm *)NULL;
117
if (t != (struct tm *)NULL)
119
yr = t->tm_year + 1900;
128
/* dissect the date */
129
yr = ((G.lrec.last_mod_dos_date >> 9) & 0x7f) + 1980;
130
mo = ((G.lrec.last_mod_dos_date >> 5) & 0x0f) - 1;
131
dy = (G.lrec.last_mod_dos_date & 0x1f);
133
/* dissect the time */
134
hh = (G.lrec.last_mod_dos_time >> 11) & 0x1f;
135
mm = (G.lrec.last_mod_dos_time >> 5) & 0x3f;
136
ss = (G.lrec.last_mod_dos_time & 0x1f) * 2;
138
#else /* !USE_EF_UT_TIME */
125
140
/* dissect the date */
126
yr = ((G.lrec.last_mod_dos_date >> 9) & 0x7f) + 1980;
127
mo = ((G.lrec.last_mod_dos_date >> 5) & 0x0f) - 1;
128
dy = (G.lrec.last_mod_dos_date & 0x1f);
141
yr = ((G.lrec.last_mod_dos_datetime >> 25) & 0x7f) + (1980 - YRBASE);
142
mo = (G.lrec.last_mod_dos_datetime >> 21) & 0x0f;
143
dy = (G.lrec.last_mod_dos_datetime >> 16) & 0x1f;
130
145
/* dissect the time */
131
hh = (G.lrec.last_mod_dos_time >> 11) & 0x1f;
132
mm = (G.lrec.last_mod_dos_time >> 5) & 0x3f;
133
ss = (G.lrec.last_mod_dos_time & 0x1f) * 2;
135
#else /* !USE_EF_UT_TIME */
137
/* dissect the date */
138
yr = ((G.lrec.last_mod_dos_datetime >> 25) & 0x7f) + (1980 - YRBASE);
139
mo = (G.lrec.last_mod_dos_datetime >> 21) & 0x0f;
140
dy = (G.lrec.last_mod_dos_datetime >> 16) & 0x1f;
142
/* dissect the time */
143
hh = (G.lrec.last_mod_dos_datetime >> 11) & 0x1f;
144
mm = (G.lrec.last_mod_dos_datetime >> 5) & 0x3f;
145
ss = (G.lrec.last_mod_dos_datetime << 1) & 0x1f;
146
hh = (G.lrec.last_mod_dos_datetime >> 11) & 0x1f;
147
mm = (G.lrec.last_mod_dos_datetime >> 5) & 0x3f;
148
ss = (G.lrec.last_mod_dos_datetime << 1) & 0x1f;
146
149
#endif /* ?USE_EF_UT_TIME */
148
sprintf(temp, "%02d/%02d/%02d %02d:%02d:%02d", mo, dy, yr, hh, mm, ss);
150
ablock[1] = (int)(temp - 1);
152
if (!jsys(IDTIM, ablock)) {
153
Info(slide, 1, ((char *)slide, "error: IDTIM failure for %s\n",
164
ablock[1] = fcntl(fileno(G.outfile), F_GETSYSFD, 0);
165
/* _uffd[outfd]->uf_ch */
166
ablock[2] = (int) tblock;
168
if (!jsys(SFTAD, ablock))
169
Info(slide, 1,((char *)slide, "error: cannot set the time for %s\n",
151
sprintf(temp, "%02d/%02d/%02d %02d:%02d:%02d", mo, dy, yr, hh, mm, ss);
153
ablock[1] = (int)(temp - 1);
155
if (!jsys(IDTIM, ablock)) {
156
Info(slide, 1, ((char *)slide, "error: IDTIM failure for %s\n",
167
ablock[1] = fcntl(fileno(G.outfile), F_GETSYSFD, 0);
168
/* _uffd[outfd]->uf_ch */
169
ablock[2] = (int) tblock;
171
if (!jsys(SFTAD, ablock))
172
Info(slide, 1,((char *)slide,
173
"error: cannot set the time for %s\n", G.filename));
175
} /* if (uO.D_flag <= 1) */
172
177
fclose(G.outfile);