19 lines
355 B
C
19 lines
355 B
C
#include "argparse.h"
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
|
|
argparser_t parse_args(i32 argc, char *argv[]) {
|
|
if (argc != 3) {
|
|
return (argparser_t){0};
|
|
}
|
|
|
|
argparser_t output = {0};
|
|
output.succeeded = true;
|
|
output.args = (pckr_args_t){0};
|
|
|
|
realpath(argv[1], output.args.dir);
|
|
realpath(argv[2], output.args.output);
|
|
|
|
return output;
|
|
}
|