coreutils

General Software Utilities
git clone http://git.omkov.net/coreutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2020-07-06 11:53:34
Commit637e3a15065f82a9bab757cdf6b4fe3f061a89f8
Parent6a8c357fc1af1f65bcb265bd30f78823496bd9a9

uname: Rename argc and argv for consistency

Diffstat

M src/uname.c | 9 ++++++---

1 files changed, 6 insertions, 3 deletions

diff --git a/src/uname.c b/src/uname.c
index ecd9e04..374d2e2 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -1,4 +1,4 @@
-// uname.c, version 1.0.0
+// uname.c, version 1.0.1
 // OMKOV coreutils implementation of POSIX uname
 // Copyright (C) 2020, Jakob Wakeling
 // All rights reserved.
@@ -41,6 +41,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
 #include <stdbool.h>
 #include <stdio.h>
 
+#define VERSION "1.0.1"
+
 static int mode;
 
 static inline void print(char *string);
@@ -48,7 +50,7 @@ static inline void print(char *string);
 static void help(void);
 static void version(void);
 
-int main(int argc, char *argv[]) { (void)(argc);
+int main(int ac, char *av[]) { (void)(ac);
 	lop_t lops[] = {
 		{ "help",    ARG_NUL, 256 },
 		{ "version", ARG_NUL, 257 },
@@ -56,7 +58,7 @@ int main(int argc, char *argv[]) { (void)(argc);
 	};
 
 	opt_t opt = OPTGET_INIT; opt.str = "amnrsv"; opt.lops = lops; int o;
-	while ((o = optget(&opt, argv, 1)) != -1) switch (o) {
+	while ((o = optget(&opt, av, 1)) != -1) switch (o) {
 	case 'a': { mode |= 31; break; }
 	case 'm': { mode |=  1; break; }
 	case 'n': { mode |=  2; break; }
@@ -103,7 +105,7 @@ static void help(void) {
 }
 
 static void version(void) {
-	puts("OMKOV coreutils uname, version 1.0.0");
+	puts("OMKOV coreutils uname, version " VERSION);
 	puts("Copyright (C) 2020, Jakob Wakeling");
 	puts("All rights reserved.");
 	puts("OMKOV Permissive Licence (https://www.omkov.net/OLPE)");