about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-03-10 18:45:26 +0000
committerDaniel Santos <dacs.git@brilhante.top>2022-03-10 18:45:26 +0000
commit310002d3e0a8b735afe133b502b245b9eee6c11a (patch)
treeac8bb3c2ae4cfdb7cf6da0002c1611b9af60c675
parentdcc93c0ba6fd640456544e911bcdcf5d6e66a688 (diff)
downloadnumericx-c-310002d3e0a8b735afe133b502b245b9eee6c11a.tar.gz
compile flags don't need true
compilation flags are defined as true by default.
rearrange them.

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
-rw-r--r--numericx.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/numericx.c b/numericx.c
index 2a611d8..c5eef26 100644
--- a/numericx.c
+++ b/numericx.c
@@ -4,24 +4,26 @@
 #include <stdbool.h>
 #include <errno.h>
 
-#ifdef DEBUG
-#define DEBUG true
-#else
+#ifndef DEBUG
 #define DEBUG false
 #endif
 
-#ifdef TO_UNITS_ON_THE_END
-#define TO_UNITS_ON_THE_END true
-#else
+#ifndef TO_UNITS_ON_THE_END
 #define TO_UNITS_ON_THE_END false
 #endif
 
-#ifdef FROM_UNITS_ON_THE_END
-#define FROM_UNITS_ON_THE_END true
-#else
+#ifndef FROM_UNITS_ON_THE_END
 #define FROM_UNITS_ON_THE_END false
 #endif
 
+#ifndef TO_FIRST_NUMBER_VOID
+#define TO_FIRST_NUMBER_VOID false
+#endif
+
+#ifndef FROM_FIRST_NUMBER_VOID
+#define FROM_FIRST_NUMBER_VOID false
+#endif
+
 typedef struct NumeralPtr
 {
 	char const* symbol;
@@ -182,6 +184,7 @@ main(int argc, char* argv[])
 
 		if(DEBUG)
 			print_numeral(counting);
+
 		increment(counting, from_first, from_last);
 	}
 	if(DEBUG)