Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ numtbl(M) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

locale(M)

environ(M)


     NUMTBL(M)                                  UNIX System V



     Name
          numtbl - create a numeric locale table


     Syntax
          numtbl [ table_file ]


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

          The table_file 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 characters ``d'' and ``t'' may be  specified
          in  six  different  ways. The following 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  nl_langinfo(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 nl_langinfo(S).


     Value Added
          numtbl is an extension of AT&T  System  V  provided  by  the
          Santa Cruz Operation.


     (printed 8/23/89)                                  NUMTBL(M)

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