NLREPCHAR(3X)
NAME
nlrepchar − replace non-displayable characters of a string using the MPE character set table
SYNOPSIS
void nlrepchar(instr, outstr, length, repchar, langid, err, charset)
char *instr, *outstr, repchar, *charset;
short length, langid;
unsigned short err[2];
DESCRIPTION
Nlrepchar replaces all non-displayable characters in the input character buffer with the replacement character. Non-displayable characters are those of types 3 and 5, as returned by nlinfo(3X), itemnumber 12. Native language characters of the supported character set are not replaced.
The arguments to nlrepchar are used as follows:
instr A character buffer in which the non-displayable characters must be replaced.
outstr A character buffer to which the replaced character string is returned.
length A short integer specifying the length (in bytes) of instr.
repchar A byte specifying the replacement character to be used.
langid A short integer value specifying the language ID number of the language that determines the character set to be used.
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 Invalid replacement character.
4 Invalid length parameter.
8 The value of outstr would overwrite instr.
10 Invalid Asian character.
charset Contains the character set definition for the language to be used, as returned in nlinfo(3X)’s itemnumber 12. If this parameter is supplied (i.e., not NULL), langid is ignored and this routine is much more efficient.
AUTHOR
Nlrepchar 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 7.0: Sept 1989