Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nlnumspec(3X) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nlinfo(3X)

portnls(5)

NLNUMSPEC(3X)

NAME

nlnumspec − return information needed by MPE routines for
 formatting and converting numbers

SYNOPSIS

void nlnumspec(langid, numspec, err)
short langid;
char *numspec;
unsigned short err[2];

DESCRIPTION

Nlnumspec returns the information needed for formatting and converting numbers.  It combines several calls to nlinfo(3X) in order to simplify the use of native language formatting. By calling nlnumspec once, and passing the obtained information to nlfmtnum(3X) and nlconvnum(3X), implicit calls to nlnumspec(3X) from nlfmtnum(3X) and nlconvnum(3X) are avoided and performance is improved.

Nlnumspec combines the functions of itemnumber 9, 10, 31, 32, and 33 on nlinfo(3X). The information is formatted where needed.  For example, any spaces in the currency symbol/name are included.  The currency symbol/name is the shortest non-blank descriptor, as returned from nlinfo(3X) itemnumber 10 and 31. 

Nlnumspec does not, apart from the mentioned formatting, provide any information not obtainable with nlinfo(3X), but is included for the convenience of the user. For efficiency, the user of this routine calls it once, saves the result, and then calls nlfmtnum(3X) and/or nlconvnum(3X) multiple times.

The arguments to nlnumspec are used as follows:

langid The ID number of the desired language. 

numspec A character buffer of at least 60 bytes in which the following information is returned:

Byte Description

00−01 Language ID number. 

02−03 Alternate Digit Indicator. 
0 − No Alternate digits exist.
1 − Alternate digits exist.

04−05 Language Direction Indicator. 
0 − The Language is "left-to-right."
1 − The Language is "right-to-left."

06−07 The Alternate digit range ("0", "9"). 

08 Decimal separator (ASCII-digits). 

09 Decimal separator (Alternate-digits). 

10 Thousands separator (ASCII-digits). 

11 Thousands separator (Alternate-digits). 

12 "+" Alternate-digits. 

13 "−" Alternate-digits. 

14 "Right-to-left" space. 

15 Reserved. 

16-17 Currency place. 
0 − Currency symbol precedes the number.
1 − Currency symbol follows the number.
2 − Currency symbol replaces the decimal separator.

18-19 Length of Currency symbol (including any spaces). 

20-37 Currency symbol (including any spaces). 

38-39 Data ordering of the language. 

40-41 Size of character used by the language. 

42-59 Reserved. 

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

2 Specified language is not configured. 

WARNINGS

This routine is provided for compatibility with MPE, another 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 on hpnls(5) for HP-UX NLS support.

AUTHOR

Nlnumspec was developed by HP. 

SEE ALSO

nlinfo(3X), portnls(5). 

EXTERNAL INFLUENCES

International Code Set Support

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

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

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