/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints the names  of a file in the current directory
*/
#include <stdio.h>
#include <dirent.h>
int main() {
    DIR *dirp;
    struct dirent direntp;
    struct dirent *result;

    dirp = opendir( "." );
    readdir_r( dirp, &direntp, &result);
    printf( "%s\n", direntp.d_name );
    closedir( dirp );
}
