From 3246870b7567cbdfd98b29f4a1b5dd70694a8002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Wed, 28 Dec 2016 14:43:17 +0100 Subject: [PATCH] Better help information. --- src/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 467e9fb..d6ce987 100644 --- a/src/main.c +++ b/src/main.c @@ -63,12 +63,13 @@ int main(int argc, char *argv[]) { // Act based on which flags were used if(f_help) { printUsage(argv[0]); + puts("\nArguments:"); puts(" -h print this help information"); puts(" -v print version number of program"); puts(" -q quiet mode"); puts(" -b base in which to print primes between 2 and 62 (default 10)"); puts(" -f file in/from which primes are stored and read from in raw format"); - puts(" -e export input file to plain text format"); + puts(" -e export input file to plain text format\n"); return 0; } else if(f_version) { printf("Indivisible %s\n", VERSION); @@ -209,12 +210,11 @@ nextPrime: } +releaseMemory: + puts("Clearing memory..."); // Clear GMP variables mpz_clear(halfNum); mpz_clear(num); - -releaseMemory: - puts("Clearing memory..."); // Deinitialize the list deInitList(&primes); @@ -223,7 +223,8 @@ releaseMemory: } void printUsage(char *progName) { - printf("%s [OPTIONS]\n", progName); + printf("%s [-f ] [-q] [-b ]\n", progName); + printf("%s -f -e \n", progName); } void leave() { run = false; }