Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nlinfo(3X)

portnls(5)

nlcollate(3X)

NAME

nlcollate() − compare two character strings according to the MPE language-dependent collating sequence

SYNOPSIS

#include <portnls.h>

void nlcollate(

const char *string1,
const char *string2,
short int length,
short *result,
short int langid,
unsigned short int err[2],
const char *collseq

);

DESCRIPTION

nlcollate collates two character strings according to the collating sequence of the specified language.  This routine’s purpose is to determine a lexical ordering.  It is not intended to be used for searching or matching. 

If the collseq parameter points to the null address, and langid is specified as (or defaults to) a language in which binary collation is appropriate, the binary collation is used to compare the two indicated strings.  Otherwise, the collseq array is used to determine the string-compare operation (note that this may be a binary collation). 

Arguments to nlcollate() are as follows:

string1 One of the character strings to be collated. 

string2 The second character string to be collated. 

length The length of the string segments to be collated. 

result The result of the character collation is stored in the short integer variable to which result points. 

 0 If string1 collates equal to string2.

-1 If string1 collates before string2.

 1 If string1 collates after string2.

langid The language ID indicating the collating sequence to be used for the collation. 

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 collating table entry. 

4 Invalid length parameter. 

collseq An array containing the collating sequence to be used, as returned from a call to nlinfo(3X)’s itemnumber 11. 

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

nlcollate 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 10.20:  July 1996

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