aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_unixize.c
diff options
context:
space:
mode:
authorjozan <jozan@noemail.net>2020-11-02 23:32:11 +0000
committerjozan <jozan@noemail.net>2020-11-02 23:32:11 +0000
commit72a390eadb1fc670132c4d6324b45a7b8266ce79 (patch)
treec56cd1d88dea8a277afbb853029b7151c0f6070f /src/c_unixize.c
parentMakefile now working (diff)
downloadunixize-72a390eadb1fc670132c4d6324b45a7b8266ce79.tar.gz
unixize-72a390eadb1fc670132c4d6324b45a7b8266ce79.tar.bz2
unixize-72a390eadb1fc670132c4d6324b45a7b8266ce79.tar.xz
unixize-72a390eadb1fc670132c4d6324b45a7b8266ce79.tar.zst
unixize-72a390eadb1fc670132c4d6324b45a7b8266ce79.zip
Learning getopt(3)
FossilOrigin-Name: 6eb65942ab3572141b56e2f5cf0e1487c7d0745c3dff9545c8219b1027769f29
Diffstat (limited to '')
-rw-r--r--src/c_unixize.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/c_unixize.c b/src/c_unixize.c
index 84985b8..3e16ecd 100644
--- a/src/c_unixize.c
+++ b/src/c_unixize.c
@@ -45,11 +45,27 @@
* This is the main function and entrypoint of the program.
*/
+/* #ifdef __linux__ */
+/* # include <linux/limits.h> */
+/* #else */
+/* # include <limits.h> */
+/* #endif */
+#include <stdio.h>
+
+#include "c_opts.h"
+
int
-main(int argc, const char *argv[])
+main
+(int argc,
+ const char* argv[])
{
- (void)argc;
- (void)argv;
+ struct opts_s opts;
+
+ c_opts(&opts, argc, argv);
+ if (opts.recursive == TRUE)
+ printf("Recursive\n");
+ if (opts.verbose == TRUE)
+ printf("Verbose\n");
return (0);
}
@@ -57,5 +73,4 @@ main(int argc, const char *argv[])
* Files prefixes index
* --------------------
* c_ -> core program related
- *
*/