PORTNLS(5)
NAME
portnls − MPE Native Language Support routines
SYNOPSIS
/usr/lib/nls/*
DESCRIPTION
Portnls contains a set of library routines that perform miscellaneous language-dependent operations. These routines are also available in MPE, another HP operating system.
Localizable programs written in Pascal, FORTRAN, or COBOL, and making use of these routines, can be written and run under HP-UX, and ported into MPE by a mere recompilation, and vice versa.
Each routine is described in an individual manual page in section LIBX. They can be grouped in the following categories:
Routines that return language information:
nlgetlang Return current language.
nlinfo Return language-dependent information (data tables).
nlnumspec Return information needed for formatting and converting numbers.
Routines that handle date and time:
almanac Return numeric date information for a date in the packed date format returned by the calendar routine.
calendar Return an MPE calendar date.
clock Return an MPE clock value.
nlconvclock Check and convert a time array to an internal format.
nlconvcustdate Convert a date array to a packed date format.
nlfmtcalendar Format a packed date using a localized format.
nlfmtclock Format time of day using a localized format.
nlfmtcustdate Format a packed date using a custom date.
nlfmtdate Format a date and time in a localized format.
nlfmtlongcal Format a packed date using a long calendar format.
Routines that handle language formatted numbers:
nlconvnum Convert a native language formatted number to an ASCII number.
nlfmtnum Convert an ASCII number to a language-specific formatted number.
Routines that handle character arrays:
nlappend Append the appropriate language ID to a file name.
nlcollate Compare two character arrays.
nlfindstr Search for a array in another array.
nljudge Judge whether a character is a one-byte or multi-byte Asian character.
nlkeycompare Determine if a character array is almost equal to another.
nlrepchar Replace non-displayable characters of a array.
nlscanmove Move, scan and case shift character arrays.
nlsubstr Extract a subarray of a array.
nlswitchbuf Convert a array of characters between phonetic order and screen order.
nltranslate Translate ASCII arrays to EBCDIC using an conversion table.
Portnls routines may use flags to select their behavior. The manual pages contain symbolic names for the values of those flags. The actual implementation of those values (such as unsigned integer values, octal, hexadecimal, or bit values) depends on the specific programming language being used.
Some functions are driven by the logical and or by the logical or of two of those flags. Logical or/and of two flags is defined as the or/and operation performed bit to bit. For example, 0x0051 and 0x0045 is equal to 0x0041.
The following list contains the hexadecimal values of those constants.
Mask characters for nlscanmove(3X) flags
M_L 0x0001 /* lowercase */
M_U 0x0002 /* uppercase */
M_N 0x0004/* numeric */
M_S 0x0008/* special */
M_WU 0x0010/* while/until 0/1 */
M_US 0x0020/* upshift */
M_DS 0x0040/* downshift */
M_TB 0x0080/* two byte only flag */
M_OB 0x0100/* one byte only flag */
Masks for nlsubstr(3X)
F_RETURNERR
0x0000 /* Return an error condition */
F_SPP1 0x0001 /* Start from start position + 1 */
F_SPM1 0x0002 /* Start from start position - 1 */
F_SPBL 0x0003 /* Start from start position. Replace character by blank */
F_SP 0x0004 /* Start from start position regardless value of first character */
F_LMP1 0x0010 /* Move until movelength + 1 is reached */
F_LMM1 0x0020 /* Move until movelength - 1 is reached */
F_LMBL 0x0030 /* Move until movelength is reached. Replace character by blank */
F_LM 0x0040 /* Move until movelength is reached regardless value of last byte */
Masks for nlconvnum(3X)
M_STRIPTHOU
0x0001 /* strip thousands separator */
M_STRIPDEC 0x0002 /* strip decimal separator */
M_NUMBERSONLY
0x0004 /* numbers only in input */
Masks for nlfmtnum(3X)
M_INSTHOU 0x0001 /* insert thousands separator */
M_INSDEC 0x0002 /* insert decimal separator */
M_CURRENCY
0x0004 /* insert currency symbol */
M_LEFTJUST 0x0008 /* left justify */
M_RIGHTJUST
0x0010 /* right justify */
M_RETLENGTH
0x0018 /* left justify and return length */
Masks for nlnumspec(3X)
CURRENCY_PRECEDES 0
CURRENCY_SUCCEEDS 1
CURRENCY_REPLACES 2
WARNINGS
This library is provided for compatibility with MPE, another HP operating system. Use the Native Language Support routines for C programmers described on hpnls(5) for HP-UX NLS support.
AUTHOR
Portnls was developed by HP.
FILES
usr/lib/libportnls.a
usr/lib/nls/$LANG/custdat.cat
SEE ALSO
almanac(3X), calendar(3X), clock(3X), hpnls(5), nlappend(3X), nlconvclock(3X), nlconvcustdate(3X), nlconvnum(3X), nlcollate(3X), nlfmtcalendar(3X), nlfmtclock(3X), nlfmtcustdate(3X), nlfmtdate(3X), nlfindstr(3X), nlfmtlongcal(3X), nlfmtnum(3X), nlgetlang(3X), nlinfo(3X), nljudge(3X), nlkeycompare(3X), nlnumspec(3X), nlrepchar(3X), nlscanmove(3X), nlsubstr(3X), nlswitchbuf(3X), nltranslate(3X)
MPE Intrinsics Reference Manual.
MPE Native Language Support Reference Manual.
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