aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/c_opts.c7
-rw-r--r--src/c_opts.h6
-rw-r--r--src/c_unixize.c2
3 files changed, 11 insertions, 4 deletions
diff --git a/src/c_opts.c b/src/c_opts.c
index 77c55b1..98f60cb 100644
--- a/src/c_opts.c
+++ b/src/c_opts.c
@@ -58,6 +58,9 @@ c_opts(struct opts_s* opts, int argc, const char* argv[])
opts->recursive = FALSE;
opts->verbose = FALSE;
+ opts->pretend = FALSE;
+ opts->hidden = FALSE;
+ opts->hyphen = FALSE;
while ((opt = getopt(argc, (char *const *)argv, C_OPTS)) != -1) {
if (opt == 'R') {
opts->recursive = TRUE;
@@ -68,6 +71,10 @@ c_opts(struct opts_s* opts, int argc, const char* argv[])
else if (opt == 'p') {
opts->pretend = TRUE;
}
+ else if (opt == 'h') {
+ /* c_dump_usage(); */
+ exit(0);
+ }
else if (opt == '?') {
dprintf(
STDERR_FILENO,
diff --git a/src/c_opts.h b/src/c_opts.h
index 6704f0d..cbe2e54 100644
--- a/src/c_opts.h
+++ b/src/c_opts.h
@@ -41,8 +41,6 @@
* unixize: src/c_opts.h
* 2020-11-02 23:37
* Joe
- *
- * This is where we handle command line options
*/
#ifndef __C_OPTS_H__
@@ -50,12 +48,14 @@
#include "c_unixize.h"
-#define C_OPTS "Rvp"
+#define C_OPTS "hpnRv"
struct opts_s {
bool_t recursive;
bool_t verbose;
bool_t pretend;
+ bool_t hidden;
+ bool_t hyphen;
};
void c_opts(struct opts_s*, int, const char*[]);
diff --git a/src/c_unixize.c b/src/c_unixize.c
index 5ae3d2f..d05c78e 100644
--- a/src/c_unixize.c
+++ b/src/c_unixize.c
@@ -66,7 +66,7 @@ main(int argc, const char* argv[])
if (opts.verbose == TRUE)
printf("Verbose\n");
if (opts.pretend == TRUE)
- printf("Verbose\n");
+ printf("Pretend\n");
return (0);
}