From 0d1f19d7779e3b6b3940a6c7aff5935bbbd7971e Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Sat, 7 Jan 2017 22:33:28 +0100 Subject: removed ./extern/ --- arg.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ extern/arg.h | 55 ------------------------------------------------------- slstatus.c | 2 +- 3 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 arg.h delete mode 100644 extern/arg.h diff --git a/arg.h b/arg.h new file mode 100644 index 0000000..2b189fe --- /dev/null +++ b/arg.h @@ -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] == '\0') {\ + argv++;\ + argc--;\ + break;\ + }\ + for (brk = 0, argv[0]++, _argv = argv;\ + argv[0][0] && !brk;\ + argv[0]++) {\ + if (_argv != argv)\ + break;\ + _argc = argv[0][0];\ + switch (_argc) + +#define ARGEND }\ + USED(_argc);\ + }\ + USED(argv);\ + USED(argc); + +#define ARGC() _argc + +#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ + ((x), abort(), (char *)0) :\ + (brk = 1, (argv[0][1] != '\0')?\ + (&argv[0][1]) :\ + (argc--, argv++, argv[0]))) + +#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ + (char *)0 :\ + (brk = 1, (argv[0][1] != '\0')?\ + (&argv[0][1]) :\ + (argc--, argv++, argv[0]))) + +#endif + diff --git a/extern/arg.h b/extern/arg.h deleted file mode 100644 index 2b189fe..0000000 --- a/extern/arg.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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] == '\0') {\ - argv++;\ - argc--;\ - break;\ - }\ - for (brk = 0, argv[0]++, _argv = argv;\ - argv[0][0] && !brk;\ - argv[0]++) {\ - if (_argv != argv)\ - break;\ - _argc = argv[0][0];\ - switch (_argc) - -#define ARGEND }\ - USED(_argc);\ - }\ - USED(argv);\ - USED(argc); - -#define ARGC() _argc - -#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ - ((x), abort(), (char *)0) :\ - (brk = 1, (argv[0][1] != '\0')?\ - (&argv[0][1]) :\ - (argc--, argv++, argv[0]))) - -#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ - (char *)0 :\ - (brk = 1, (argv[0][1] != '\0')?\ - (&argv[0][1]) :\ - (argc--, argv++, argv[0]))) - -#endif - diff --git a/slstatus.c b/slstatus.c index 64f7eab..6d2e89e 100644 --- a/slstatus.c +++ b/slstatus.c @@ -25,7 +25,7 @@ #include #include -#include "extern/arg.h" +#include "arg.h" struct arg { char *(*func)(); -- cgit v1.2.3