]> git.draconx.ca Git - upkg.git/blobdiff - upkg.c
Implement import table parsing.
[upkg.git] / upkg.c
diff --git a/upkg.c b/upkg.c
index 3cfd7279010cb5c7bf969c62b3449d0403afa29a..660819c53b6f54355c91ed30e0b667501afbe246 100644 (file)
--- a/upkg.c
+++ b/upkg.c
@@ -36,9 +36,17 @@ int main(int argc, char **argv)
 
        printf("Version: %u\n",  pkg->version);
        printf("License: %u\n",  pkg->license);
+
        printf("Flags:   %lx\n", pkg->flags);
        print_upkg_flags("\t", pkg->flags);
-       printf("Names:   %zu\n", pkg->name_count);
+
+       printf("Names:   %lu\n", pkg->name_count);
+       for (unsigned long i = 0; i < pkg->name_count; i++) {
+               printf("\t%s\n", upkg_get_name(pkg, i));
+       }
+
+       printf("Exports: %lu\n", pkg->export_count);
+       printf("Imports: %lu\n", pkg->import_count);
 
        upkg_close(pkg);
        return 0;