DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

montbl(M)


montbl -- create a currency locale table

Syntax

montbl [ specfile ]

Description

The utility montbl is provided to allow new LC_MONETARY locales to be defined; it reads a specification file, containing a definition of the currency symbol for a particular locale, and produces a binary table file, to be read by setlocale(S), which determines the behavior of the nl_langinfo(S) routine.

The information supplied in the specification file consists of a line in the following format:

CRNCYSTR = string

The ``='' can be separated from the keyword and string fields by zero or more space or tab characters.

The string is a sequence of characters surrounded by quotes ("). The first character of the string should be ``-'' if the symbol is to precede the currency value, or ``+'' if it should appear after the value. Characters within the string can be specified both literally and using ``\'' escapes; the following three strings are equivalent:

"+DM" literal
"+\x44M" hexadecimal escapes
"+D\115" octal escapes

All characters following a hash (#) are treated as a comment and ignored up to the end of the line, unless the hash is within a quoted string.

The binary table output is placed in a file named currency, within the current directory. This file should be copied or linked to the correct place in the setlocale file tree (see locale(M)). To prevent accidental corruption of the output data, the file is created with no write permission; if the montbl utility is run in a directory containing a write-protected currency file, the utility will ask if the existing file should be replaced -- any response other than ``yes'' or ``y'' will cause montbl to terminate without overwriting the existing file.

If the specfile argument is missing, the specification information is read from the standard input.

Exit values

Any error conditions encountered will cause the program to exit with a non-zero return code; successful completion is indicated with a zero return code.

Diagnostics

If the input table file cannot be opened for reading, processing will terminate with the error message, ``Cannot open specification file''.

Any lines in the specification file which are syntactically incorrect, or contain an unrecognized value instead of CRNCYSTR, will cause an error message to be issued to the standard error output, specifying the line number on which the error was detected. The line will be ignored, and processing will continue.

If the output file, currency, cannot be opened for writing, processing will terminate with the error message, ``Cannot create table file''.

Limitations

This utility was formerly known as curtbl. A link with this name is provided to maintain backward compatibility.

See also

chrtbl(M), locale(M), mestbl(M), monconv(M), nl_langinfo(S), numtbl(M), setlocale(S), timtbl(M)

Standards conformance

montbl is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003