X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/d3d8b8ee03a773b7f2cd1aad16ee43d9784e5139..cceeec0efada64579525b90b30e5597cd24dfc6c:/arg.h?ds=sidebyside

diff --git a/arg.h b/arg.h
index 6c4a528..2b189fe 100644
--- a/arg.h
+++ b/arg.h
@@ -3,49 +3,53 @@
  * by 20h
  */
 
-#ifndef ARG_H__
-#define ARG_H__
+#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_;\
+				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_;\
+				for (brk = 0, argv[0]++, _argv = argv;\
+						argv[0][0] && !brk;\
 						argv[0]++) {\
-					if (argv_ != argv)\
+					if (_argv != argv)\
 						break;\
-					argc_ = argv[0][0];\
-					switch (argc_)
+					_argc = argv[0][0];\
+					switch (_argc)
 
 #define ARGEND			}\
-			}
-
-#define ARGC()		argc_
+				USED(_argc);\
+			}\
+			USED(argv);\
+			USED(argc);
 
-#define ARGNUMF(base)	(brk_ = 1, estrtol(argv[0], (base)))
+#define ARGC()		_argc
 
 #define EARGF(x)	((argv[0][1] == '\0' && argv[1] == NULL)?\
 				((x), abort(), (char *)0) :\
-				(brk_ = 1, (argv[0][1] != '\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')?\
+				(brk = 1, (argv[0][1] != '\0')?\
 					(&argv[0][1]) :\
 					(argc--, argv++, argv[0])))
 
 #endif
+