diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-06-18 13:01:51 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-06-18 13:02:27 +0300 |
commit | fe41ae07b90bbd4609ee6871def851a41027aae8 (patch) | |
tree | 7f5a872c5ee030450e3cfdb84a73c9338f69d7f4 /src/dot.c | |
parent | c51d82f8f616c2c8939b74c1d78f723ef778f0c8 (diff) | |
download | apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.tar.gz apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.tar.bz2 apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.tar.xz apk-tools-fe41ae07b90bbd4609ee6871def851a41027aae8.zip |
apk: use string array in applet mains, separate apk_name_foreach_matching
Diffstat (limited to 'src/dot.c')
-rw-r--r-- | src/dot.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -120,15 +120,15 @@ static int foreach_pkg(apk_hash_item item, void *ctx) return 0; } -static int dot_main(void *pctx, struct apk_database *db, int argc, char **argv) +static int dot_main(void *pctx, struct apk_database *db, struct apk_string_array *args) { struct dot_ctx *ctx = (struct dot_ctx *) pctx; struct apk_provider *p; - int i; + char **parg; - if (argc) { - for (i = 0; i < argc; i++) { - struct apk_name *name = apk_db_get_name(db, APK_BLOB_STR(argv[i])); + if (args->num) { + foreach_array_item(parg, args) { + struct apk_name *name = apk_db_get_name(db, APK_BLOB_STR(*parg)); if (!name) continue; foreach_array_item(p, name->providers) |