3 #include "zypp/base/LogTools.h"
5 #include "zypp/parser/HistoryLogReader.h"
6 #include "zypp/parser/ParseException.h"
12 struct HistoryItemCollector
14 // vector<HistoryItem::Ptr> items;
16 bool operator()( const HistoryItem::Ptr & item_ptr )
18 // items.insert(item);
19 cout << *item_ptr << endl;
24 // ---------------------------------------------------------------------------
26 int main( int argc, const char * argv[] )
28 --argc; ++argv; // skip arg 0
30 HistoryItemCollector ic;
31 parser::HistoryLogReader reader(*argv, ic);
37 catch (const parser::ParseException & e)
39 cout << "error in " << *argv << ":" << endl;
40 cout << e.asUserHistory() << endl;
43 cout << "done" << endl;