proh14 / canoutils

coreutils but cano! public domain 💖
The Unlicense
17 stars 9 forks source link

Implement getopt & getopt_long #41

Closed CobbCoding1 closed 2 months ago

CobbCoding1 commented 2 months ago

Should be more or less equivalent to the regular getopt functions. defines global variables char *optarg; ints optind, opterr, optopt, and end_of_args; Also defines macro constants no_argument, required_argument, and optional_argument. creates struct option (equivalent fields to standard GNU option struct). Defines function-like macro EXCHANGE().