commit 6ba30e5bc63d82f3ec52bf2b80174586bc87e441
parent d35d00b7d43ec14749a04fea02e3f89a6c7e3f1d
Author: lostd <lostd@2f30.org>
Date: Sun, 5 Jan 2014 03:49:14 +0200
Print more info with dash a
Diffstat:
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/taginfo/taginfo.cc b/taginfo/taginfo.cc
@@ -1,4 +1,5 @@
#include <iostream>
+#include <iomanip>
#include <fileref.h>
#include <tag.h>
@@ -8,11 +9,19 @@
using namespace std;
+static int all = 0;
+
int
main(int argc, char *argv[])
{
+ if (argv[1] != NULL && strcmp(argv[1], "-a") == 0) {
+ all = 1;
+ argv++;
+ argc--;
+ }
+
if (argc == 1) {
- cerr << "usage: taginfo file ..." << endl;
+ cerr << "usage: taginfo [-a] file ..." << endl;
return 1;
}
@@ -39,6 +48,12 @@ main(int argc, char *argv[])
cout << a;
cout << " - ";
cout << b;
+ if (all) {
+ cout << " (" << y << ")";
+ cout << " [" << g << "]";
+ cout << " -- " << c;
+ cout << " -- " << setw(2) << n;
+ }
cout << " - ";
cout << t;
cout << endl;