]> diplodocus.org Git - nmh/commitdiff
rename %(units) to %(kilo)
authorPaul Fox <pgf@foxharp.boston.ma.us>
Tue, 13 May 2014 13:43:43 +0000 (09:43 -0400)
committerPaul Fox <pgf@foxharp.boston.ma.us>
Wed, 14 May 2014 13:26:58 +0000 (09:26 -0400)
per discussion here:
  http://lists.nongnu.org/archive/html/nmh-workers/2014-05/msg00092.html

etc/mhshow.marker
h/fmt_compile.h
man/mh-format.man
sbr/fmt_compile.c
sbr/fmt_scan.c
uip/fmtdump.c
uip/mhshowsbr.c

index 6e324b133950afa3cb878bbfc5f4d0d80cf1ee64..1fbf109167f61089a77247659e963d89d8a1caaa 100644 (file)
@@ -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\)%> ]
index 08eb8d67a3ea63be3d36466f26c797f6e7e4aeed..bfe47204aa0267a72dc6c81a4e1aad4689e4584f 100644 (file)
@@ -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 "<value>[KMGT]"             */
+#define FT_LS_KILO     38      /* set "str" to "<value>[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                  */
index 4dfa2632e42745e4d736cf4b79a647d6f398e333..82128e807c717b58a1ffa8f8f72275829a8481d4 100644 (file)
@@ -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
index 200d738d79203627413e666ccfe5dacd45d9a9d5..dbd86631fd0b0b11aca0a47af91f5064e3e28946 100644 (file)
@@ -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 },
index c8cdece56b10f8eb8f374d5c16b7a5acb8d1190d..20420516fefee8fc92972694a210697357e5621e 100644 (file)
@@ -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;
index 7ee5d37694bbb5392c714e3b1cea807d820f9a56..c8204f6b33c673fb0721f3c0e35c993977b290d5 100644 (file)
@@ -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");
index 042ca7cb6ddbe7be11c60f853ba14e89774cf943..34c1911d943405892ba6bd6bfd7f39355337b9c5 100644 (file)
@@ -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)