Main Page   Compound List   File List   Header Files   Sources   Compound Members   File Members  

usort.h File Reference


Compounds

struct  USortLine
struct  USort

Defines

#define T_USORT_EXPORT
#define T_USORT_IMPORT
#define C_USORT_API
#define T_USORT_API
#define T_USORT_EXPORT_API

Functions

T_USORT_API USortusort_open (const char *locale, UCollationStrength strength, bool_t ownText, UErrorCode *status)
Open a USort object. More...

T_USORT_API void usort_close (USort *usort)
Close a USort object. More...

T_USORT_API void usort_addLine (USort *usort, const UChar *line, int32_t len, bool_t copy, void *userData)
Add a line of text to the list. More...

T_USORT_API void usort_addLinesFromFILE ( USort *sort, FILE *file, UConverter *inConverter, bool_t escapeMode)
Add a bunch of lines to the list from a FILE, converting as necessary. More...

T_USORT_API void usort_sort (USort *usort)
Do the final sort. More...

T_USORT_API void usort_printToFILE (USort *usort, FILE *file, UConverter *toConverter)
Print out the contents of the sorted list to some FILE [convenience]. More...


Define Documentation

#define T_USORT_EXPORT ()

Definition at line 48 of file usort.h.

#define T_USORT_IMPORT ()

Definition at line 49 of file usort.h.

#define C_USORT_API ()

Definition at line 55 of file usort.h.

#define T_USORT_API ()

Definition at line 62 of file usort.h.

#define T_USORT_EXPORT_API ()

Definition at line 63 of file usort.h.


Function Documentation

T_USORT_API USort * usort_open (const char * locale, UCollationStrength strength, bool_t ownText, UErrorCode * status)

Open a USort object.

Parameters:
locale   Locale to use. NULL for default
strength   Collation strength. UCOL_DEFAULT is a good default.
ownText   TRUE if this object should own its' text.
status   Error code. [values?]

T_USORT_API void usort_close (USort * usort)

Close a USort object.

If the ownsText was set, then delete the 0wned text.

Parameters:
usort   The USort to be closed.

T_USORT_API void usort_addLine (USort * usort, const UChar * line, int32_t len, bool_t copy, void * userData)

Add a line of text to the list.

if ownsText was FALSE, then the text will be copied. Note: text MUST be null terminated if it's not being copied !

Parameters:
usort   The sort object to add to
line   Text to be added. [Typically, will not end with CR or LF]
len   Length of text passed in. -1 if null terminated.
copy   TRUE if the text should be copied. Text WILL be copied if len is not -1.
userData   Your additional reference data can go here. Pass in NULL by default.

T_USORT_API void usort_addLinesFromFILE (USort * sort, FILE * file, UConverter * inConverter, bool_t escapeMode)

Add a bunch of lines to the list from a FILE, converting as necessary.

Break lines at LF. [todo: use linebreakiterator] [convenience]

Parameters:
usort   the sort object to add to
file   FILE to read data from. Will read until EOF.
inConverter   Converter to use to convert data in the FILE. If NULL, the converter specified by ucnv_getDefaultName() will be used.
escapeMode   If TRUE, sequences such as \u0308 will be recognized.

T_USORT_API void usort_sort (USort * usort)

Do the final sort.

Finally!!

Parameters:
usort   The items to be sorted

T_USORT_API void usort_printToFILE (USort * usort, FILE * file, UConverter * toConverter)

Print out the contents of the sorted list to some FILE [convenience].

Parameters:
usort   The sorted list to be printed
file   FILE to print to. NULL for stdout.
toConverter   Converter to use for the output. NULL to use ucnv_getDefaultName()

Generated at Wed Aug 16 16:06:06 2000 for ICU1.5UnsupportedAPI by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999