From: Paul Fox Date: Wed, 4 Jun 2014 16:18:12 +0000 (-0400) Subject: mhlist: don't truncate anything when -verbose X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d4700e9d89995a338a134ed8fdb77ba26b6038d5?ds=inline;hp=55afa6a4e8886b665eb1c75d377b626314eb224e mhlist: don't truncate anything when -verbose without this change to the -verbose output, there's no easy way to use mhlist to get an unmodified content-type or content-description. (the non-verbose output isn't changed.) --- diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index fea4ea28..309357b1 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -40,12 +40,14 @@ static int list_encoding (CT); #define LSTFMT1 "%4s %-5s %-24s %5s %s\n" #define LSTFMT2a "%4d " #define LSTFMT2b "%-5s %-24.24s " +#define LSTFMT2bv "%-5s %-24s " #define LSTFMT2c1 "%5lu" #define LSTFMT2c2 "%4lu%c" #define LSTFMT2c3 "huge " #define LSTFMT2c4 " " #define LSTFMT2d1 " %.36s" -#define LSTFMT2d2 "\t %-65.65s\n" +#define LSTFMT2d1v " %s" +#define LSTFMT2d2 "\t %-65s\n" /* @@ -156,7 +158,10 @@ list_content (CT ct, int toplevel, int realsize, int verbose, int debug, snprintf (buffer, sizeof(buffer), "%s/%s", empty (ci->ci_type), empty (ci->ci_subtype)); - printf (LSTFMT2b, empty (ct->c_partno), buffer); + if (verbose) + printf (LSTFMT2bv, empty (ct->c_partno), buffer); + else + printf (LSTFMT2b, empty (ct->c_partno), buffer); if (ct->c_cesizefnx && realsize) size = (*ct->c_cesizefnx) (ct); @@ -190,7 +195,10 @@ list_content (CT ct, int toplevel, int realsize, int verbose, int debug, char *dp; dp = cpytrim (ct->c_descr); - printf (LSTFMT2d1, dp); + if (verbose) + printf (LSTFMT2d1v, dp); + else + printf (LSTFMT2d1, dp); free (dp); }