Completely reworked the path convertion functions
[mmh] / uip / mhlistsbr.c
index 2b32b64..ecd6bac 100644 (file)
@@ -171,7 +171,7 @@ list_content(CT ct, int toplevel, int realsize, int verbose, int debug)
        CI ci = &ct->c_ctinfo;
 
        printf(toplevel > 0 ? LSTFMT2a : toplevel < 0 ? "part " : "     ",
-                       atoi(r1bindex(empty(ct->c_file), '/')));
+                       atoi(mhbasename(empty(ct->c_file))));
        snprintf(buffer, sizeof(buffer), "%s/%s", empty(ci->ci_type),
                        empty(ci->ci_subtype));
        printf(LSTFMT2b, empty(ct->c_partno), buffer);
@@ -207,7 +207,7 @@ list_content(CT ct, int toplevel, int realsize, int verbose, int debug)
        if (ct->c_descr) {
                char *dp;
 
-               dp = trimcpy(cp = add(ct->c_descr, NULL));
+               dp = trimcpy(cp = getcpy(ct->c_descr));
                free(cp);
                printf(LSTFMT2d1, dp);
                free(dp);
@@ -222,7 +222,7 @@ list_content(CT ct, int toplevel, int realsize, int verbose, int debug)
        if (verbose && ci->ci_comment) {
                char *dp;
 
-               dp = trimcpy(cp = add(ci->ci_comment, NULL));
+               dp = trimcpy(cp = getcpy(ci->ci_comment));
                free(cp);
                snprintf(buffer, sizeof(buffer), "(%s)", dp);
                free(dp);