summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0x221E2026-04-23 04:27:43 +0200
committer0x221E2026-04-23 04:27:43 +0200
commit871e8819bdbad30bf64ae775ee825193f9be2706 (patch)
tree1dbacc74c2c8f06002056f681c8dda0b7b3d8c67
parentaf5e00e3183c0dfa056149c6c8ae88d2d02842e0 (diff)
core: rename cmd_install() parameters
First parameter renamed to argc, and second renamed to argv to fit the general C-style entry function convention.
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 61bd4fe..0ac5739 100644
--- a/src/main.c
+++ b/src/main.c
@@ -38,9 +38,9 @@ void install_usage()
printf(" pkgman install <pkg1> ... <pkgn>\n");
}
-int cmd_install(int argv, char **cmd)
+int cmd_install(int argc, char **argv)
{
- if(argv < 1) {
+ if(argc < 1) {
install_usage();
return USAGE;
}
@@ -57,7 +57,7 @@ int cmd_install(int argv, char **cmd)
parser_init(&parser, &mem, &backend, (void*)&userdata);
parser_parse(&parser);
- struct string_view pkg = sv_create(cmd[0], strlen(cmd[0]));
+ struct string_view pkg = sv_create(argv[0], strlen(argv[0]));
int found = 0;
@@ -70,12 +70,12 @@ int cmd_install(int argv, char **cmd)
}
if (!found) {
- printf("Package '%s' not found!\n", cmd[0]);
+ printf("Package '%s' not found!\n",argv[0]);
ret = -PKGNOTFND;
goto cleanup;
}
- printf("Package '%s' found on upstream!\n", cmd[0]);
+ printf("Package '%s' found on upstream!\n", argv[0]);
ret = SUCCESS;
cleanup: