From 4390fca3efe734e5058942955a96a9e71f684454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Wed, 14 Dec 2016 23:38:22 +0100 Subject: [PATCH] Added comments. --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 77ab081..6b1cfe2 100644 --- a/src/main.c +++ b/src/main.c @@ -7,7 +7,7 @@ #include "list.h" -#define VERSION "v0.6" +#define VERSION "v1.0" static bool run; @@ -15,12 +15,14 @@ void printUsage(char *progName); void leave(); int main(int argc, char *argv[]) { + // Variables for argument parsing bool f_help = false, f_version = false, f_quiet = false; int base = 10; char *file = NULL; + // Parse commandline arguments int c; while((c = getopt(argc, argv, "hvqb:f:")) != -1) { switch(c) { @@ -51,6 +53,7 @@ int main(int argc, char *argv[]) { } } + // Act based on which flags were used if(f_help) { printUsage(argv[0]); puts(" -h print this help information");