alphasort(), alphasort64()

sort a directory in alphabetical order 

Function


SYNOPSIS

#include <dirent.h>

int alphasort(const void *, const void *);

int alphasort64(const void *, const void *);


DESCRIPTION

The alphasort() function is a comparator function for sorting a directory in alphabetical order. alphasort() is intended to be passed as the comparator function to scandir().

The alphasort64() function is identical to the alphasort() function except that it is intended to be passed as a comparator function to scandir64(). The alphasort64() function is a part of the large-file extensions.


PARAMETERS

d1 

Points to a directory entry.

d2 

Points to the directory entry to compare to d1.


RETURN VALUES

If d1 sorts before d2, alphasort() and alphasort64() return an integer less than zero. If d1 and d2 are lexically equal, alphasort() and alphasort64() return zero. If d1 sorts after d2, alphasort() and alphasort64() return an integer greater than zero.


CONFORMANCE

4.4BSD UNIX.

alphasort64(): Large File Specification, revision 1.5.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
qsort(), scandir()

Miscellaneous:
lf64


PTC MKS Toolkit 10.4 Documentation Build 39.