aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/stdlib.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-31 12:58:59 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-31 12:58:59 -0400
commit530b91d9e756830abffce9d96ed995e0fe3302b0 (patch)
treedc3df5990c6c45c4a2beea887269382bae7bd8b6 /src/stdlib/stdlib.h
parent07c5287760ca7a80c06dd80defe007ad009695fc (diff)
Move CLI parsing to its own file.
Diffstat (limited to 'src/stdlib/stdlib.h')
-rw-r--r--src/stdlib/stdlib.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/stdlib/stdlib.h b/src/stdlib/stdlib.h
index bbf8a43a..9bae5a6c 100644
--- a/src/stdlib/stdlib.h
+++ b/src/stdlib/stdlib.h
@@ -5,7 +5,7 @@
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
-#include <stdio.h>
+#include <stdio.h> // IWYU pragma: export
#include "datatypes.h"
#include "print.h"
@@ -15,19 +15,7 @@
extern bool USE_COLOR;
extern Text_t TOMO_VERSION_TEXT;
-typedef struct {
- const char *name;
- bool required;
- const TypeInfo_t *type;
- void *dest;
-} cli_arg_t;
-
void tomo_init(void);
-void _tomo_parse_args(int argc, char *argv[], Text_t usage, Text_t help, const char *version, int spec_len,
- cli_arg_t spec[spec_len]);
-#define tomo_parse_args(argc, argv, usage, help, version, ...) \
- _tomo_parse_args(argc, argv, usage, help, version, sizeof((cli_arg_t[]){__VA_ARGS__}) / sizeof(cli_arg_t), \
- (cli_arg_t[]){__VA_ARGS__})
#define fail(...) \
({ \
@@ -95,7 +83,6 @@ Text_t ask(Text_t prompt, bool bold, bool force_tty);
_Noreturn void tomo_exit(Text_t text, int32_t status);
Closure_t spawn(Closure_t fn);
-bool pop_flag(char **argv, int *i, const char *flag, Text_t *result);
void sleep_num(double seconds);
OptionalText_t getenv_text(Text_t name);
void setenv_text(Text_t name, Text_t value);