feat(args): $0, $1, ... in vars

This commit is contained in:
william.valenduc 2026-01-23 17:05:56 +00:00
parent 82f35cfa08
commit 7bcf48f63e
4 changed files with 82 additions and 29 deletions

View file

@ -4,6 +4,8 @@
#include <stdbool.h>
#include <stdio.h>
#include "../hash_map/hash_map.h"
enum input_type
{
INPUT_UNDEFINED,
@ -30,9 +32,11 @@ struct args_options
* @param argc The argument count.
* @param argv The argument vector.
* @param options Pointer to args_options structure to be populated.
* @param vars Pointer to the variables hash map.
* @return 0 on success, non-zero on failure.
*/
int args_handler(int argc, char **argv, struct args_options *options);
int args_handler(int argc, char **argv, struct args_options *options,
struct hash_map *vars);
/** Prints the parsed arguments for debugging purposes.
* @param options Pointer to args_options structure containing parsed options.