45 void parseLine(
const string & line,
unsigned int lineNr);
48 void readFrom(
const Date & date,
51 const Date & fromDate,
const Date & toDate,
59 HistoryLogReader::Impl::Impl(
const Pathname & historyFile,
61 : _filename(historyFile), _callback(callback), _ignoreInvalid(false)
95 WAR <<
"Unknown history log action type: " << fields[1] << endl;
109 if (fields.size() <= 2)
112 e(
str::form(
"Error in history log on line #%u.", lineNr));
114 str::form(
"Bad number of fields. Got %zd, expected more than %d.",
121 item_ptr = createHistoryItem(fields);
126 ERR <<
"Invalid history log entry on line #" << lineNr <<
":" << endl
132 str::form(
"Error in history log on line #%u.", lineNr ) );
140 else if (!_ignoreInvalid)
143 e(
str::form(
"Error in history log on line #%u.", lineNr));
158 for (; line; line.
next(), pd.
tick() )
161 if ((*line)[0] ==
'#')
164 parseLine(*line, line.
lineNo());
180 bool pastDate =
false;
181 for (; line; line.
next(), pd.
tick())
183 const string & s = *line;
190 parseLine(s, line.
lineNo());
197 parseLine(s, line.
lineNo());
206 const Date & fromDate,
const Date & toDate,
216 bool pastFromDate =
false;
217 for (; line; line.
next(), pd.
tick())
219 const string & s = *line;
228 if (logDate >= toDate)
232 if (!pastFromDate && logDate > fromDate)
236 parseLine(s, line.
lineNo());
270 const Date & fromDate,
const Date & toDate,