nlscanmove(3X)
NAME
nlscanmove() − move, scan and case-shift character strings using the MPE character set definition table
SYNOPSIS
#include <portnls.h>
short int nlscanmove(
const char *instr,
char *outstr,
short int flags,
int length,
short int langid,
unsigned short int err[2],
const char *pcharset,
const char *pshift
);
DESCRIPTION
nlscanmove() moves, scans and case-shifts character strings.
Arguments to nlscanmove() are used as follows:
instr A character buffer that acts as the source string of the scan or move functions.
outstr A character buffer that acts as the target. Note that if outstr is equal to instr, this routine will act as scan. Otherwise, a move will be performed; see err below.
flags A flag defining the options for the routine invocation. This parameter defines the end condition for the scan or move.
Value Description
M_L Select lowercase alphabetic characters.
M_U Select uppercase alphabetic characters.
M_N Select numeric characters.
M_S Select special characters.
M_WU By default nlscanmove() scans or moves characters while the character currently being scanned is one of those selected (i.e. upper, lower, numeric, special). If M_WU is used, nlscanmove() scans or moves characters until the character currently being scanned is one of those selected.
M_US Shift scanned or moved characters to the uppercase.
M_DS Shift scanned or moved characters to the lowercase.
M_OB Select one-byte characters.
M_TB Select two-byte (Asian) characters.
M_OB or M_TB Select both one- and two-byte characters.
length A short integer indicating the maximum number of valid bytes to be acted upon during the indicated option.
langid A short integer containing the language ID number which implies the both the character set definitions of character attributes and the language specific shift.
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.
3 Overlapping strings, instr overwrites outstr.
4 Invalid length parameter.
7 The reserved part of flags is not zero.
8 Both upshift and downshift request.
9 Invalid table element.
10 Invalid Asian character.
pcharset A pointer to a character buffer containing the character set definition for the language to be used, as returned nlinfo(3X)’s itemnumber 12. If not zero, the langid parameter is ignored, and this routine is much more efficient. This parameter is required for calls in which bits (12:4) of flags is neither 0 nor 15.
pshift A pointer to a character buffer containing shift information for a desired upshift or downshift (e.g., as returned in nlinfo(3X)’s itemnumber 15 or 16). This parameter is used when bits (9:2) of flags is not 0.
RETURN VALUE
A short containing the number of bytes acted upon in the scan or move operation.
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
nlscanmove() was developed by HP.
SEE ALSO
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