From: Paul Fox Date: Tue, 13 May 2014 13:43:43 +0000 (-0400) Subject: rename %(units) to %(kilo) X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/13ae67e6d208deea2382c2901488d8a7f278ee23?ds=inline;hp=-c rename %(units) to %(kilo) per discussion here: http://lists.nongnu.org/archive/html/nmh-workers/2014-05/msg00092.html --- 13ae67e6d208deea2382c2901488d8a7f278ee23 diff --git a/etc/mhshow.marker b/etc/mhshow.marker index 6e324b13..1fbf1091 100644 --- a/etc/mhshow.marker +++ b/etc/mhshow.marker @@ -4,4 +4,4 @@ %; [ part %{part} - %{content-type} - %<{description}\ %{description}%?{cdispo-filename}%{cdispo-filename}%|%{ctype-name}%> \ -%(units(size))B %<(unseen)\(suppressed\)%> ] +%(kilo(size))B %<(unseen)\(suppressed\)%> ] diff --git a/h/fmt_compile.h b/h/fmt_compile.h index 08eb8d67..bfe47204 100644 --- a/h/fmt_compile.h +++ b/h/fmt_compile.h @@ -44,7 +44,7 @@ #define FT_LS_WEEKDAY 35 /* set "str" to long tws weekday */ #define FT_LS_822DATE 36 /* set "str" to 822 date str */ #define FT_LS_PRETTY 37 /* set "str" to pretty (?) date str */ -#define FT_LS_UNITS 38 /* set "str" to "[KMGT]" */ +#define FT_LS_KILO 38 /* set "str" to "[KMGT]" */ #define FT_LV_SEC 39 /* set "value" to tws second */ #define FT_LV_MIN 40 /* set "value" to tws minute */ #define FT_LV_HOUR 41 /* set "value" to tws hour */ diff --git a/man/mh-format.man b/man/mh-format.man index 4dfa2632..82128e80 100644 --- a/man/mh-format.man +++ b/man/mh-format.man @@ -290,7 +290,7 @@ decode expr string decode \fIstr\fR as RFC 2047 (MIME-encoded) component unquote expr string remove RFC 2822 quotes from \fIstr\fR trim expr trim trailing whitespace from \fIstr\fR -units expr string convert number to SI units ("15.1K") +kilo expr string express in SI units: 15.9K, 2.3M, etc. putstr expr print \fIstr\fR putstrf expr print \fIstr\fR in a fixed width putnum expr print \fInum\fR diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 200d738d..dbd86631 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -159,7 +159,7 @@ static struct ftable functable[] = { { "decodecomp", TF_COMP, FT_LS_DECODECOMP, 0, TFL_PUTS }, { "decode", TF_EXPR, FT_LS_DECODE, 0, TFL_PUTS }, { "trim", TF_EXPR, FT_LS_TRIM, 0, 0 }, - { "units", TF_EXPR, FT_LS_UNITS, 0, TFL_PUTS }, + { "kilo", TF_EXPR, FT_LS_KILO, 0, TFL_PUTS }, { "compval", TF_COMP, FT_LV_COMP, 0, TFL_PUTN }, { "compflag", TF_COMP, FT_LV_COMPFLAG, 0, TFL_PUTN }, { "num", TF_NUM, FT_LV_LIT, 0, TFL_PUTN }, diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index c8cdece5..20420516 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -490,7 +490,7 @@ fmt_scan (struct format *format, char *scanl, size_t max, int width, int *dat, cp += n; } break; - case FT_LS_UNITS: + case FT_LS_KILO: { char *unitcp; unsigned int whole, tenths; diff --git a/uip/fmtdump.c b/uip/fmtdump.c index 7ee5d376..c8204f6b 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -371,7 +371,7 @@ f_typestr(int t) case FT_LV_DIVIDE_L: return("LV_DIVIDE_L"); case FT_LV_MODULO_L: return("LV_MODULO_L"); case FT_LV_CHAR_LEFT: return("LV_CHAR_LEFT"); - case FT_LS_UNITS: return("LS_UNITS"); + case FT_LS_KILO: return("LS_KILO"); case FT_LS_MONTH: return("LS_MONTH"); case FT_LS_LMONTH: return("LS_LMONTH"); case FT_LS_ZONE: return("LS_ZONE"); diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 042ca7cb..34c1911d 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -1224,7 +1224,7 @@ convert_content_charset (CT ct, char **file) { "%<{description}%{description}" \ "%?{cdispo-filename}%{cdispo-filename}" \ "%|%{ctype-name}%> " \ - "%(units(size))B %<(unseen)\\(suppressed\\)%> ]" + "%(kilo(size))B %<(unseen)\\(suppressed\\)%> ]" static struct format * compile_marker(char *markerform)