Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nlinfo(3X) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hpnls(5)

nlinfo(3X)

NAME

nlinfo() − return MPE language-dependent information

SYNOPSIS

#include <portnls.h>

void nlinfo(

short int itemnumber,
int *itemvalue,
short int *langid,
unsigned short int err[2]

);

DESCRIPTION

nlinfo() returns such information as the format of the date, the radix character, the direction of the language, etc. 

The itemnumber indicates the type of information the user has requested.  The data is passed back in itemvalue.

The arguments to nlinfo() are used as follows:

itemnumber A short integer of the item desired.  This number specifies which item value is to be returned.  See below for a list of item numbers. 

itemvalue A pointer to an integer that contains the value of the item specified by the corresponding item number.  The data type of the item value depends on the item itself. 

langid A pointer to a short integer containing the language ID or, for itemnumber 22, the location in which the language ID is returned. 

err The first element of this array contains the error number.  The second element is always zero.  If the call is successful, both elements contain zero. 

Error # Meaning

1 Native Language Support file(s) not found

2 Specified language is not configured. 

3 Specified character set is not configured. 

10 itemnumber is out of range. 

Item numbers

The following is a list of the currently defined item numbers and the information returned. 

itemnumber Description

1 An 18-byte buffer in which the calendar format is returned. 

2 A 13-byte buffer in which the custom date format is returned. 

3 An 8-byte buffer in which the clock specification is returned. 

4 A 48-byte buffer in which the month denotation abbreviation table is returned.  The abbreviation of each month is 4 bytes long (with blank padding if necessary).  The first 4 bytes are the abbreviation for January. 

5 A 144-byte array in which the month denotation table is returned.  Each month denotation is 12 bytes long.  The table starts with January. 

6 A 21-byte array in which the day of the week denotation abbreviation table is returned.  Each weekday abbreviation is three bytes long.  The first three bytes are the abbreviation for Sunday. 

7 An 84-byte array in which the day of the week denotation table is returned.  Each weekday denotation is 12 bytes long.  The table starts with Sunday. 

8 A 12-byte array in which the YES/NO responses are returned.  The first 6 bytes contain the (upshifted) "YES" response; the second 6 bytes contain the (upshifted) "NO" response. 

9 A 2-byte array in which the symbols for decimal point and thousands indicator are returned.  The first byte contains the decimal point, the second contains the thousands indicator. 

10 A 6-byte array in which the currency signs are returned.  The first byte contains the currency sign used in the business formats, the second byte is either a numeric zero, which indicates that the currency symbol precedes the value, or a one, which indicates that a symbol follows the value.  The next 4 bytes contain the fully qualified currency sign. 

11 An array in which the collating sequence table is returned.  To determine the size of this array, the length must be determined by a call to nlinfo() with itemnumber 27. 

12 A 256-byte array in which the character set definition is returned.  Each byte has numeric identification of the character type:

0 Numeric character

1 Alphabetic lowercase character

2 Alphabetic uppercase character

3 Undefined graphic character

4 Special character

5 Control code

6 First byte of a two-byte character

15 A 256-byte array in which the upshift table is returned. 

16 A 256-byte array in which the downshift table is returned. 

17 An array of unsigned shorts in which the language numbers of all configured languages are returned.  The first element of this array contains the number of configured languages.  The second word contains the language number of the first configured language, etc.  The system default language is returned (the langid parameter, if specified, is insignificant). 

18 A short int in which true (-1) is returned if the specified language is supported (configured) on the system.  Otherwise, false (0) is returned. 

21 A 16-byte array in which the (uppercase) name of the specified language is returned.  If the name contains less than 16 bytes, it is padded with blanks. 

22 The itemvalue contains a byte buffer containing a language name or language number ( ASCII digits) terminated by a blank.  The array must contain less than or equal to 16 bytes.  The langid (third) parameter is assigned the associated language ID number. 

26 A short integer in which the class number of the specified language is returned. 

27 An integer in which the length (in two-byte units) of the collating sequence table corresponding to the specified language is returned. 

28 A short integer in which the length (in two-byte units) of the national dependent information table is returned.  If no national table exists for the specified language, an error is returned. 

29 A byte buffer in which the national-dependent information table is returned.  To determine the size of this array, the length must be obtained via a prior call to nlinfo() with itemnumber 28. 

30 A 36-byte array in which the long calendar format is returned.  It may contain arbitrary text as well as the following descriptors:

D 1 through 3 of these are to be replaced by that many bytes from the day abbreviation. 

W 1 through 12 of these are to be replaced by that many bytes from the day of the week. 

M 1 through 4 of these are to be replaced by that many bytes from the month abbreviation. 

O 1 through 12 of these are to be replaced by that many bytes from the month of the year. 

mm Numeric month of the year. 

yy Numeric year of the century. 

yyyy Numeric year of the century. 

Nyy National year. 

In addition, a special literal character ~ (tilde) can be used to indicate that the following character should be taken literally in the format, even if it is one of the special characters above. 

For example, a format could be:

"WWWWWWWWW, OOOOOOOOO  dd, A.~D. yyyy  "

This format in n-computer would result in the following:

"WEDNESDAY, NOVEMBER  21, A.D. 1984  "

31 A 16-byte array in which the currency name is returned. 

32 An 8-byte array, containing information about an Alternate set of digits (currently only used by arabic). 

Byte Description

0−1 Alternate digit indicator
0 − No Alternate digits defined
1 − Alternate digits defined

2 The Alternate digit 0

3 The Alternate digit 9

4 The + used with Alternate digits

5 The - used with Alternate digits

6 The decimal separator used with Alternate digits

7 The thousands separator used with Alternate digits

33 A 4-byte array, containing information about the direction of the language. 

Byte Description

0  1 Language direction
0 − Direction is "left-to-right"
1 − Direction is "right-to-left"

2 The “right-to-left” space

3 Undefined

34 An unsigned short that returns the data ordering of the language. 

0 Keyboard order

1 Left-to-Right screen order

2 Right-to-Left screen order

35 An unsigned short that returns the size of the character used by the language. 

0 One-byte characters (8 bits)

1 Two-byte characters (16 bits)

WARNINGS

This routine is provided for compatibility with MPE, a proprietary HP operating system.  See portnls(5) for more information on the use of this routine. Use the Native Language Support routines for C programmers described by hpnls(5) for HP-UX NLS support.

AUTHOR

nlinfo() was developed by HP. 

SEE ALSO

hpnls(5). 

EXTERNAL INFLUENCES

International Code Set Support

Single- and multi-byte character code sets are supported. 

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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