};
int next, len, i, error, ignore;
int year, month, day; /* for time analysis */
- int hour, min, sec;
+ int hour, min, sec, ptype;
struct tm timestruct, *tnow;
time_t timenow;
treated equally for now. */
year = hour = min = sec = 0; /* Silence the compiler. */
month = day = 0;
+ ptype = TT_DAY;
next = -1;
/* While there are tokens on the line, parse them. Next is the
number of tokens left until the filename.
/* This means these were hours! */
hour = year;
year = 0;
+ ptype = TT_HOUR_MIN;
++tok;
/* Get the minutes... */
for (; c_isdigit (*tok); tok++)
timestruct.tm_yday = 0;
timestruct.tm_isdst = -1;
l->tstamp = mktime (×truct); /* store the time-stamp */
+ l->ptype = ptype;
xfree (line);
}
timestruct.tm_yday = 0;
timestruct.tm_isdst = -1;
cur.tstamp = mktime (×truct); /* store the time-stamp */
+ cur.ptype = TT_HOUR_MIN;
DEBUGP(("Timestamp: %ld\n", cur.tstamp));
}
cur.tstamp = timenow; /* Store the time-stamp. */
DEBUGP(("Timestamp: %ld\n", cur.tstamp));
+ cur.ptype = TT_HOUR_MIN;
/* Add the data for this item to the linked list, */
if (!dir)
fprintf (fp, "%d %s %02d ", ptm->tm_year + 1900, months[ptm->tm_mon],
ptm->tm_mday);
- if (ptm->tm_hour)
+ if (f->ptype == TT_HOUR_MIN)
fprintf (fp, "%02d:%02d ", ptm->tm_hour, ptm->tm_min);
else
fprintf (fp, " ");