From a52733c9964313a37bd66a6ae3ecd3590a2863b5 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 20 Jan 2009 21:51:03 +0000 Subject: [PATCH] updated main/fart.cc a tad git-svn-id: svn://anubis/fart/trunk@20 7f9b0f55-74a9-4bce-be96-3c2cd072584d --- main/fart.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main/fart.cc b/main/fart.cc index 66804fc..a048ad5 100644 --- a/main/fart.cc +++ b/main/fart.cc @@ -10,9 +10,11 @@ void usage(const char * progname) { cout << "Usage: " << progname << " [options] " << endl; cout << " Options:" << endl; + cout << " -o|--output-file " << endl; cout << " -w|--width " << endl; cout << " -h|--height " << endl; cout << " -m|--multisample " << endl; + cout << " -v|--verbose" << endl; exit(42); } @@ -22,25 +24,28 @@ int main(int argc, char * argv[]) int option_index; static const struct option long_options[] = { + { "output-file", required_argument, NULL, 'o' }, { "width", required_argument, NULL, 'w' }, { "height", required_argument, NULL, 'h' }, { "multisample", required_argument, NULL, 'm' }, + { "verbose", no_argument, NULL, 'v' }, { NULL, 0, NULL, 0 } }; - while ((opt = getopt_long(argc, argv, "w:h:m:", + while ((opt = getopt_long(argc, argv, "o:w:h:m:", long_options, &option_index)) != -1) { switch (opt) { + case 'o': + break; case 'w': - cout << "width: " << optarg << endl; break; case 'h': - cout << "height: " << optarg << endl; break; case 'm': - cout << "multisample level: " << optarg << endl; + break; + case 'v': break; default: usage(argv[0]);