Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ NCcollate(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctab

wc_collate, wc_coluniq, wc_eqvmap, _wcxcol, _mbxcol, _wcxcolu, _mbxcolu



NCCOLLATE(3,L)              AIX Technical Reference              NCCOLLATE(3,L)



-------------------------------------------------------------------------------
NCcollate, NCcoluniq, NCeqvmap, _NCxcol, _NLxcol



PURPOSE

Collates characters for international character support.

LIBRARY

Standard C Library (libc.a)

SYNTAX

#include <NLchar.h>




      int NCcollate (xc)                  int NCcoluniq (xc)
      NLchar xc;                          NLchar xc;

      int _NCxcol (index, src, xstr)      int NCeqvmap (ucval)
      int index;                          int ucval;
      NLchar **src, **xstr;

      int _NLxcol (index, src, xstr)
      int index;
      unsigned char **src;
      NLchar **xstr;



DESCRIPTION

Note:  In the multibyte environment, the collation routines listed above are
       provided for backward compatibility.  They are front-ends to the
       wc_collate, wc_coluniq, wc_eqvmap, _wcxcol, and _mbxcol routines.  Avoid
       using them if you wish to write portable programs.

The xc value is that of an extended character (NLchar).

AIX supports a user-configurable collating order per process, using the table
file indicated by the LANG or LC_COLLATE environment variable.  Collating
values increment from 0.  The NCcollate macro, called with an NLchar, returns
the collating value.  NCcollate returns a negative value if extended collation
applies to the NLchar.  If extended collation applies, either the NLchar is
translated to a different character or string of characters before collation
(1-to-n collation), or the NLchar is to collate as a unit with one or more
following NLchars (n-to-1 collation).  For example, the NLchar for the code
point representing "oe" might translate to the string "oe" before (1-to-n)



Processed November 7, 1990      NCCOLLATE(3,L)                                1





NCCOLLATE(3,L)              AIX Technical Reference              NCCOLLATE(3,L)



collation or two code points representing "Pi" might translate to a unit "pi"
before (n-to-1) collation.

When NCcollate determines that extended collation is required, _NCxcol or
_NLxcol should be called.

The _NCxcol subroutine performs extended collation on the following:

index    The negative value returned from NCcollate that indicates that
         extended collation is needed.

src      A pointer to a string of NLchar type, starting with the NLchar
         following the one that was passed to the NCcollate subroutine.

xstr     A pointer to a replacement text string.

           o For 1-to-n collation, _NCxcol writes the address to xstr of a
             replacement string that is interpolated into the collating
             operation ahead of the remaining text of src.

           o For n-to-1 collation, a NULL value is written into the pointer.

_NCxcol returns -1 if 1-to-n collation is required (xstr is not NULL).  If
n-to-1 collation is required, _NCxcol returns the collating value of the
extended collation.

The NCcoluniq macro disables extended collation, simply assigning each NLchar a
unique value and treating it as a unit.  NCcoluniq returns its unique collating
value, a nonnegative integer that does not receive a special interpretation.  A
context in which NCcoluniq might be used is within character ranges in regular
expressions.

The NCeqvmap macro is a predicate that returns a nonzero value if the
corresponding NLchar begins an equivalence class, a set of NLchars that can be
treated as identical in some collating contexts.  For example, if any character
of an equivalence class is used as the beginning or ending point of a character
range, all of the characters in that class are included in the range.

RELATED INFORMATION

The ctab command in AIX Operating System Commands Reference.

"Introduction to International Character Support" in Managing the AIX Operating
System.

AIX Guide to Multibyte Character Set (MBCS) Support.

In this book:  "wc_collate, wc_coluniq, wc_eqvmap, _wcxcol, _mbxcol, _wcxcolu,
_mbxcolu."






Processed November 7, 1990      NCCOLLATE(3,L)                                2



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