From: Arvin Schnell Date: Wed, 9 Feb 2011 09:29:16 +0000 (+0100) Subject: - added option for table style X-Git-Tag: v0.1.3~501 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=16bf6bf856cced4af9a606434d5b8fe069452aba;p=thirdparty%2Fsnapper.git - added option for table style --- diff --git a/tools/snapper.cc b/tools/snapper.cc index 34ee70e0..b772b663 100644 --- a/tools/snapper.cc +++ b/tools/snapper.cc @@ -258,6 +258,7 @@ main(int argc, char** argv) const struct option options[] = { { "quiet", no_argument, 0, 'q' }, + { "table-style", required_argument, 0, 's' }, { 0, 0, 0, 0 } }; @@ -282,6 +283,19 @@ main(int argc, char** argv) if ((it = opts.find("quiet")) != opts.end()) quiet = true; + if ((it = opts.find("table-style")) != opts.end()) + { + unsigned int s; + it->second >> s; + if (s >= _End) + { + cerr << sformat(_("Invalid table style %d."), s) << " " + << sformat(_("Use an integer number from %d to %d"), 0, _End - 1) << endl; + exit(EXIT_FAILURE); + } + Table::defaultStyle = (TableLineStyle) s; + } + sh = createSnapper(); if (!quiet)