Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ numtbl(M) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

locale(M)

environ(M)


 numtbl(M)                       19 June 1992                       numtbl(M)


 Name

    numtbl - create a numeric locale table

 Syntax

    numtbl [ tablefile ]

 Description

    This utility will create a numeric locale table to be interpreted by the
    setlocale(S) system call.

    The tablefile contains information about the numeric locale in a user
    readable form.

    At present, two pieces of information can be supplied. These are: the
    character to be used as a decimal place marker (radix character), and the
    character to be used as a thousands delimiter, for example the commas in
    1,000,000.  To specify these, there must be lines, in the table file, of
    the form:

       DECIMAL=d
       THOUSANDS=t

    Where ``d'' is the character to be used as the decimal place mark and
    ``t'' is the character to be used as the thousands delimiter.  The char-
    acters ``d'' and ``t'' may be specified in six different ways. The fol-
    lowing lines show different formats for the letter ``b''.

       98      - decimal
       0142    - octal
       0x62    - hexadecimal
       'b'     - quoted character
       '\0142' - quoted octal
       '\x62'  - quoted hexadecimal

    Any line starting with a hash (#) is treated as a comment.

    The output is a file, called numeric, which is placed in the current
    directory. This file is in a form which can be interpreted by the
    setlocale(S) system call. For more information on where this file should
    be placed, please see locale(M).

    If no table file is specified, the information is taken from the standard
    input.  The format of the information is identical.

    If either DECIMAL or THOUSANDS is not specified, its value will default
    to ``.'' or ``,'', respectively.

 See also

    locale(M), environ(M)

 Diagnostics

    Any lines of input which are in the wrong format will cause a warning to
    be issued on the terminal, but will not terminate the program.

    ``Character syntax error'' will be issued on the terminal if the format
    of the character specification does not match one of those specified
    above. The program will then terminate.

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

    If the output file, numeric, cannot be opened for writing, the program
    will terminate with the error message, ``Cannot create numeric locale
    file''.

 Notes

    The thousands delimiter is not currently used within any of the standard
    UNIX libraries or utilities, although it can be accessed by application
    programs using the nllanginfo(S) function.

    The string RADIXCHAR may be used as an alternative to DECIMAL, and
    THOUSEP as an alternative to THOUSANDS, if required.  These alternatives
    are provided for consistency with the identifiers used by nllanginfo(S).

 Value added

    numtbl is an extension of AT&T System V provided by The Santa Cruz Opera-
    tion, Inc.


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