Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ montbl(1M) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

localeconv(3C)

setlocale(3C)

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 monetary quantities for a specific locale. 

infile describes the monetary formatting conventions for a specific locale.  The output of montbl is suitable for use by localeconv(3C), after the super-user has installed outfile as /usr/lib/locale/locale/LC_MONETARY.  This file must be readable by everybody. 

Before calling localeconv(), a program should set the locale category LC_MONETARY using setlocale(3C).  This file is used by the localeconv() function to initialize the monetary specific fields of a structure of type struct lconv.  For a description of the fields in this structure, see localeconv(3C). 

struct  lconv  {
char ∗decimal_point;/∗ "" (zero length string) ∗/
char ∗thousands_sep;/∗ "" (zero length string) ∗/
char ∗grouping;/∗ "" ∗/
char ∗int_curr_symbol;/∗ "" ∗/
char ∗currency_symbol;/∗ "" ∗/
char ∗mon_decimal_point;/∗ "" ∗/
char ∗mon_thousands_sep; /∗ "" ∗/
char ∗mon_grouping;/∗ "" ∗/
char ∗positive_sign;/∗ "" ∗/
char ∗negative_sign;/∗ "" ∗/
char int_frac_digits;/∗ CHAR_MAX ∗/
char frac_digits;/∗ CHAR_MAX ∗/
char p_cs_precedes;/∗ CHAR_MAX ∗/
char p_sep_by_space;/∗ CHAR_MAX ∗/
char n_cs_precedes;/∗ CHAR_MAX ∗/
char n_sep_by_space;/∗ CHAR_MAX ∗/
char p_sign_posn;/∗ CHAR_MAX ∗/
char n_sign_posn;/∗ CHAR_MAX ∗/
};

The specification file specifies the value of each struct lconv member, except for the first two members, decimal_point and thousands_sep, which are set by the LC_NUMERIC category of setlocale(3C).  Each member’s value is given on a line in the order defined in the lconv structure. 

Blank lines and comment lines starting with # are ignored.  Characters in strings may be in octal or hex representation; for example, \141 or \x61 indicate the letter ‘a’.  If there is no specification line for a given structure member, the default ‘C’ locale value for is used (these values are shown as comments in the struct lconv definition above).  Here is a specification file for Japan.  Note that \3 is in octal, as specified by ANSI C.  The string \xa1\xef is a multibyte sequence for the Yen symbol ‘’. 

# first eight items have string values, remaining items have
# numeric values.
# grouping=
\3
# int_curr_symbol=
JPY
# currency_symbol=
\xa1\xef
# mon_decimal_point=
.
# mon_thousands_sep=
,
# mon_grouping=
\3
# positive_sign=
 # negative_sign=
−
# int_frac_digits=
0
# frac_digits=
0
# p_cs_precedes=
1
# p_sep_by_space=
0
# n_cs_precedes=
1
# n_sep_by_space=
0
# p_sign_posn=
1
# n_sign_posn=
4

OPTIONS

−o outfile Write output to outfile; otherwise, write output to LC_MONETARY. 

FILES

/usr/lib/locale/locale/LC_MONETARY
LC_MONETARY database for locale

SEE ALSO

localeconv(3C), setlocale(3C)

NOTES

Do not change files under the C locale, as this could cause undefined or nonstandard behavior. 

SunOS 5.4  —  Last change: 12 Nov 1991

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