diff options
author | Joel Kronqvist <joelkronqvist@proton.me> | 2024-04-11 16:17:46 +0300 |
---|---|---|
committer | Joel Kronqvist <joelkronqvist@proton.me> | 2024-04-13 18:31:30 +0300 |
commit | f8f07ca39bd617ddaeb2149f138b12aa7a6532bf (patch) | |
tree | a47e8624bad148977b9f6014fcb90641a996c8a8 /config-parser.c | |
parent | a793df3e2a07c65f36fb2f5f43d2c51ab0c47bf2 (diff) | |
download | stdu-f8f07ca39bd617ddaeb2149f138b12aa7a6532bf.tar.gz stdu-f8f07ca39bd617ddaeb2149f138b12aa7a6532bf.zip |
Multiline printing & fixes to output space padding
Diffstat (limited to 'config-parser.c')
-rw-r--r-- | config-parser.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <stdio.h> #include <stdlib.h> #include <string.h> @@ -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; @@ -36,6 +36,11 @@ Result parse_config(int argc, char* argv[]) { ) { 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 ) { if (precision != NULL) { @@ -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; |