/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints the names  of  all  the
   files in the current directory
*/
#include <stdio.h>
#include <dirent.h>

int main() {
    DIR *dirp;
    struct dirent *direntp;

    dirp = opendir( "." );
    while ( (direntp = readdir( dirp )) != NULL )
        printf( "%s\n", direntp->d_name );
    closedir( dirp );
    return (0);
}
