upkg: Print class name in listings.
authorNick Bowler <nbowler@draconx.ca>
Mon, 21 Mar 2011 11:34:35 +0000 (07:34 -0400)
committerNick Bowler <nbowler@draconx.ca>
Mon, 21 Mar 2011 11:35:52 +0000 (07:35 -0400)
src/upkg.c

index 5912fc04aee6dde22596f41aaaa2989b4931bcba..16f16b2d8c14aca4b1db0f8f5d5e6584aecab2c5 100644 (file)
@@ -238,7 +238,6 @@ export_print_fullname(GTypeModule *pkg, const struct upkg_export *export)
 {
        printf("%s", pkg->name);
        export_print_name(U_PKG(pkg)->pkg, export);
-       putchar('\n');
 }
 
 static int package_list(GTypeModule *pkg, long parent)
@@ -253,6 +252,15 @@ static int package_list(GTypeModule *pkg, long parent)
                        continue;
 
                export_print_fullname(pkg, export);
+
+               if (verbose >= 1) {
+                       const char *class, *package;
+
+                       class = upkg_export_class(upkg, i, &package);
+                       printf(" (%s.%s)", package, class);
+               }
+
+               putchar('\n');
        }
 }
 
@@ -260,10 +268,14 @@ static int export_info(GTypeModule *pkg, unsigned long idx)
 {
        struct upkg *upkg = U_PKG(pkg)->pkg;
        const struct upkg_export *export;
+       const char *class, *package;
 
        export = upkg_get_export(upkg, idx);
-
        export_print_fullname(pkg, export);
+
+       class = upkg_export_class(upkg, idx, &package);
+       printf(" (%s.%s)\n", package, class);
+
        return 0;
 }