alphasort()
QNX SDP8.0C Library ReferenceAPIDeveloper
Compare two directory entries
Synopsis:
#include <dirent.h>
int alphasort( const struct dirent **d1,
const struct dirent **d2);
Arguments:
- d1, d2
- Pointers to the struct dirent directory entries that you want to compare.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The alphasort() function alphabetically compares two directory entries. You can use it as the compar argument to scandir().
Returns:
- < 0
- The d1 entry precedes the d2 entry alphabetically.
- 0
- The entries are equivalent.
- > 0
- The d1 entry follows the d2 entry alphabetically.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: