From f8f07ca39bd617ddaeb2149f138b12aa7a6532bf Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Thu, 11 Apr 2024 16:17:46 +0300 Subject: Multiline printing & fixes to output space padding --- config-parser.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'config-parser.c') diff --git a/config-parser.c b/config-parser.c index 075ef47..3cebc73 100644 --- a/config-parser.c +++ b/config-parser.c @@ -1,5 +1,4 @@ - #include #include #include @@ -16,6 +15,7 @@ Result parse_config(int argc, char* argv[]) { res.success = false; Config tmp; tmp.precision = 0; + tmp.multiline = false; tmp.human_readable = false; tmp.help = false; @@ -35,6 +35,11 @@ Result parse_config(int argc, char* argv[]) { || strcmp(argument, "-h") == 0 ) { tmp.human_readable = true; + } else if ( + strcmp(argument, "--multiline") == 0 + || strcmp(argument, "-m") == 0 + ) { + tmp.multiline = true; } else if ( comp1 || strncmp(argument, "-p", 2) == 0 ) { @@ -124,6 +129,7 @@ Result parse_config(int argc, char* argv[]) { Config* conf = malloc(sizeof(int) + sizeof(bool)); conf->help = tmp.help; conf->human_readable = tmp.human_readable; + conf->multiline = tmp.multiline; conf->precision = tmp.precision; res.success = true; -- cgit v1.2.3