From 79dd6b6fcb349eae92c53bb3684015acb64fc852 Mon Sep 17 00:00:00 2001 From: dam Date: Fri, 27 Jan 2023 17:44:38 +0000 Subject: Processing version option argument. --- ttt.jai | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index c77f2a3..655fac8 100644 --- a/ttt.jai +++ b/ttt.jai @@ -21,6 +21,7 @@ // #import "File_Utilities"; VERSION :: "2.0"; // Use only 3 chars (to fit layouts). +YEAR :: "2023"; TASK_NAME_LENGTH :: 57; TASK_NAME_BYTES :: #run TASK_NAME_LENGTH+1; // TODO Get rid of this! FIRST_DAY_OF_WEEK :: 1; // (0-6, Sunday = 0). @@ -1330,17 +1331,14 @@ main :: () { return; } - }}// TODO To be removed once we continue our journey... - /* + if is_equal_to_any(args[it], "--version", "-v") { - print("Task Time Tracker version % \n" - "Copyright 2023 Daniel Martins\n" - "License GPL-3.0-or-later\n" - ); + print("Task Time Tracker version % \nCopyright % Daniel Martins\nLicense GPL-3.0-or-later\n", VERSION, YEAR); free_memory(); - return EXIT_SUCCESS; + return; } - + }}// TODO To be removed once we continue our journey... + /* if (is_equal_to_any(args[it], "--import-csv", "-i")) { idx++; if (idx >= argc) { -- cgit v1.2.3