Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ timtbl(M) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chrtbl(M)

locale(M)

numtbl(M)

setlocale(S)

strftime(S)



     TIMTBL(M)                XENIX System V                 TIMTBL(M)



     Name
          timtbl - Create a time locale table.

     Syntax
          timtbl [ specfile ]

     Description
          The utility timtbl is provided to allow new LC_TIME locales
          to be defined.  It reads a specification file, which
          contains definitions of the way in which time and date
          information is presented for a particular locale, and
          produces a binary table file, to be read by setlocale(S),
          which determines the behavior of the strftime(S) routine.

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

               item = string

          The ``='' can be separated from the item and string fields
          by zero or more space or tab characters.  The following
          values are meaningful for item:

          DATE_FMT
                specification of the format string for representing
                the date.  It will contain ``%'' directives
                representing variable items such as the month number,
                as used in the format string for strftime(S).

          TIME_FMT
                specification of the format string for representing
                the time of day.

          F_NOON
                string indicating 12-hour clock times before midday,
                e.g. ``AM''.

          A_NOON
                string indicating 12-hour clock times after midday,
                e.g. ``PM''.

          D_T_FMT
                string for formatting combined date and time.

          DAY_1 full name of the first day of the week (Sunday).
                     .
                     .
                     .

          DAY_7 full name of the seventh day of the week.

          ABDAY_1



     Page 1                                           (printed 2/7/91)





     TIMTBL(M)                XENIX System V                 TIMTBL(M)



                abbreviated name of the first day of the week, e.g.
                ``Sun''.
                     .
                     .
                     .

          ABDAY_7
                abbreviated name of the seventh day of the week.

          MON_1 full name of the first month in the Gregorian
                calendar.
                     .
                     .
                     .

          MON_12
                full name of the twelfth month.

          ABMON_1
                abbreviated name of the first month.
                     .
                     .
                     .

          ABMON_12
                full name of the twelfth month.

          The string is a sequence of characters surrounded by quotes
          (").  Characters within the string can be specified both
          literally and using ``\'' escapes; the following three
          strings are equivalent:

             "Tuesday"            - literal
             "\x54ue\x73da\x79"   - hexadecimal escapes
             "\124ue\163da\171"   - octal escapes

          The strings for the items DATE_FMT , TIME_FMT and D_T_FMT
          will also include ``%'' directives as detailed in the
          strftime(S) manual page, to specify variable portions of the
          string.

          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 various items may be specified in any order.  If any
          items are not specified, a warning message will be produced,
          and the null string ("") substituted.

          The binary table output is placed in a file named ``time'',
          within the current directory.  This file should be copied or
          linked to the correct place in the setlocale file tree (see



     Page 2                                           (printed 2/7/91)





     TIMTBL(M)                XENIX System V                 TIMTBL(M)



          locale(M)).  To prevent accidental corruption of the output
          data, the file is created with no write permission; if the
          timtbl utility is run in a directory containing a write-
          protected ``ctype'' file, the utility will ask if the
          existing file should be replaced - any response other than
          ``yes'' or ``y'' will cause timtbl to terminate without
          overwriting the existing file.

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

     See Also
          chrtbl(M), locale(M), numtbl(M), setlocale(S), strftime(S)

     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 urecognized value for the item,
          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 a particular item is specified more than once, a warning
          message will be produced, and processing will continue.

          If the specification file does not contain specifications
          for all possible items, a warning message will be produced.

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

          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.

     Notes
          The strings D_FMT , T_FMT , AM_STR and PM_STR may be used as
          alternatives to DATE_FMT , TIME_FMT , F_NOON and A_NOON
          respectively, if required.  These alternatives are provided
          for consistency with the identifiers used by nl_langinfo(S).










     Page 3                                           (printed 2/7/91)



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