[hackers] [st] Adopting arg.h with more flexible cmd handling. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Wed, 03 Apr 2013 21:02:19 +0200

commit b1813b14d956978ae8af37166b3cccc3a7b4b720
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed Apr 3 21:00:38 2013 +0200

    Adopting arg.h with more flexible cmd handling.

diff --git a/arg.h b/arg.h
new file mode 100644
index 0000000..2b189fe
--- /dev/null
+++ b/arg.h
_AT_@ -0,0 +1,55 @@
+/*
+ * Copy me if you can.
+ * by 20h
+ */
+
+#ifndef __ARG_H__
+#define __ARG_H__
+
+extern char *argv0;
+
+#define USED(x) ((void)(x))
+
+/* use main(int argc, char *argv[]) */
+#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
+ argv[0] && argv[0][1]\
+ && argv[0][0] == '-';\
+ argc--, argv++) {\
+ char _argc;\
+ char **_argv;\
+ int brk;\
+ if (argv[0][1] == '-' && argv[0][2] == '
Received on Wed Apr 03 2013 - 21:02:19 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 03 2013 - 21:12:06 CEST