Introduction
Introduction Statistics Contact Development Disclaimer Help
tMakefile: increment VERSION to 0.1.2 - numtools - perform numerical operations…
git clone git://src.adamsgaard.dk/numtools
Log
Files
Refs
README
LICENSE
---
commit 59276b770d09a73afca015d649e2726d7ab2bec7
parent 7a3d0ac06b0b914fbd04bd19e76fc682fcb38a20
Author: Anders Damsgaard <[email protected]>
Date: Tue, 31 Aug 2021 10:42:38 +0200
Makefile: increment VERSION to 0.1.2
Diffstat:
M Makefile | 2 +-
A arg.h | 38 +++++++++++++++++++++++++++++…
2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/Makefile b/Makefile
t@@ -1,7 +1,7 @@
.POSIX:
NAME = mathtools
-VERSION = 0.1.1
+VERSION = 0.1.2
# paths
PREFIX = /usr/local
diff --git a/arg.h b/arg.h
t@@ -0,0 +1,38 @@
+/* by 20h */
+#ifndef ARG_H
+#define ARG_H
+
+#define USED(x) ((void)(x))
+
+extern char *argv0;
+
+#define ARGBEGIN for(argv0 = *argv, argv++, argc--;\
+ argv[0] && argv[0][0] == '-'\
+ && argv[0][1];\
+ argc--, argv++) {\
+ char _argc;\
+ char **_argv;\
+ if(argv[0][1] == '-' && argv[0][2] == '\0') {\
+ argv++;\
+ argc--;\
+ break;\
+ }\
+ int i_;\
+ for(i_ = 1, _argv = argv; argv[0][i_];\
+ i_++) {\
+ if(_argv != argv)\
+ break;\
+ _argc = argv[0][i_];\
+ switch(_argc)
+
+#define ARGEND }\
+ USED(_argc);\
+ }\
+ USED(argv);\
+ USED(argc);
+
+#define EARGF(x) ((argv[1] == NULL)? ((x), abort(), (char *)0) :\
+ (argc--, argv++, argv[0]))
+
+#endif
+
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.