[hackers] [sbase] Fixing the ARG macros and adding nice. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Wed, 29 May 2013 20:54:29 +0200

commit c9aac796c8e932b836e659024821917ef989f749
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed May 29 20:52:39 2013 +0200

    Fixing the ARG macros and adding nice.
    
    Thanks "Galos, David" <galosd83_AT_students.rowan.edu>!

diff --git a/Makefile b/Makefile
index 4e1f3e6..bef596f 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -41,6 +41,7 @@ SRC = \
         mkdir.c \
         mkfifo.c \
         mv.c \
+ nice.c \
         nl.c \
         nohup.c \
         paste.c \
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 May 29 2013 - 20:54:29 CEST

This archive was generated by hypermail 2.3.0 : Wed May 29 2013 - 21:00:18 CEST