Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ montbl(1a) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

localeconv(3C)

setlocale(3C)



montbl(1M)       SYSTEM ADMINISTRATION COMMANDS        montbl(1M)



NAME
     montbl - create monetary database

SYNOPSIS
     montbl [ -o outfile] infile

DESCRIPTION
     The montbl command takes  as  input  a  specification  file,
     infile,   that  describes  the  formatting  conventions  for
     numeric quantities (monetary and otherwise) for  a  specific
     locale.

     -o outfile  Write the output on  outfile;  otherwise,  write
                 the output on a file named LCMONETARY.

     The output of montbl is suitable for use by the localeconv()
     function  (see  localeconv(3C)).  Before outfile can be used
     by   localeconv(),   it   must   be   installed    in    the
     /usr/lib/locale/locale  directory  with the name LCMONETARY
     by someone who is super-user  or  a  member  of  group  bin.
     locale  is  the  locale whose numeric formatting conventions
     are described in infile.  This  file  must  be  readable  by
     user,  group, and other; no other permissions should be set.
     To  use  formatting  conventions  for   numeric   quantities
     described  in  this  file,  set  the LCMONETARY environment
     variable appropriately (see environ(5) or setlocale(3C)).

     Once installed, this file will be used by  the  localeconv()
     function  to  initialize  a  structure of type struct lconv.
     For a description of  each  field  in  this  structure,  see
     localeconv(3C).

          struct    lconv     {
               char *decimalpoint;     /* "." */
               char *thousandssep;     /* "" (zero length string) */
               char *grouping;          /* "" */
               char *intcurrsymbol;   /* "" */
               char *currencysymbol;   /* "" */
               char *mondecimalpoint; /* "" */
               char *monthousandssep; /* "" */
               char *mongrouping; /* "" */
               char *positivesign;     /* "" */
               char *negativesign;     /* "" */
               char intfracdigits;    /* CHARMAX */
               char fracdigits;        /* CHARMAX */
               char pcsprecedes; /* CHARMAX */
               char psepbyspace;     /* CHARMAX */
               char ncsprecedes; /* CHARMAX */
               char nsepbyspace;     /* CHARMAX */
               char psignposn;        /* CHARMAX */
               char nsignposn;        /* CHARMAX */
          };



                                                                1





montbl(1M)       SYSTEM ADMINISTRATION COMMANDS        montbl(1M)



     The specification file contains the value that  each  struct
     lconv  member  should  be  set  to, except for the first two
     members, decimal_point and thousands_sep which  are  set  by
     the  LCNUMERIC  category  to  setlocale(3C).  Each member's
     value is given on a separate line and in the order they  are
     listed in the struct lconv definition above.  Lines starting
     with a # are taken to be  comments  and  are  ignored.   All
     other  lines  are  assumed  to  describe their corresponding
     structure member.  A blank line describes  the  null  string
     for structure members that are pointers to strings.  A char-
     acter in a string may be in  octal  or  hex  representation.
     For  example,  \141  or  \x61 could be used to represent the
     letter 'a'.  Given below is an example of what the  specifi-
     cation file for Italy would look like:

          # Italy
          3
          ITL.
          L.

          .
          \3

          -
          0
          0
          1
          0
          1
          0
          1
          1

     Note that the first non-comment line  in  the  specification
     file describes the grouping field.

FILES
     /lib/locale/locale/LCMONETARY
                     LCMONETARY database for locale

     /usr/lib/locale/C/montblC
                     input file used to construct LCMONETARY  in
                     the default locale.

SEE ALSO
     localeconv(3C), setlocale(3C) in the Programmer's  Reference
     Manual.








                                                                2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026