1 2 3 4 5 6 7 8 9 10 11 12
#pragma once #include <stdbool.h> #include <stddef.h> #define eprintf(fmt, ...) fprintf(stderr, "sh: "fmt"\n" __VA_OPT__(,) __VA_ARGS__) struct redir { const char *stdout; bool append; }; int parse(char *s, char **argv, size_t argvlen, struct redir *redir);