Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nlnumspec(3X) — HP-UX 9.05

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

#include <portnls.h>

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

DESCRIPTION

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

nlnumspec() combines the functions of nlinfo(3X)’s itemnumbers 9, 10, 31, 32, and 33. 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) itemnumbers 10 and 31.

nlnumspec() does not, apart from the mentioned formatting, provide any information not obtainable with nlinfo(), 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() and/or nlconvnum() multiple times. 

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, 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

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 9.0: August 1992

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