23 lines
370 B
C
23 lines
370 B
C
|
|
#include <stdio.h>
|
|
#include <direct.h>
|
|
|
|
void main()
|
|
{
|
|
DIR *dirp;
|
|
struct dirent *direntp;
|
|
|
|
dirp = opendir( "\\watcom\\h" );
|
|
if( dirp == NULL ) {
|
|
perror( "" );
|
|
} else {
|
|
for(;;) {
|
|
direntp = readdir( dirp );
|
|
if( direntp == NULL ) break;
|
|
printf( "%s\n", direntp->d_name );
|
|
}
|
|
closedir( dirp );
|
|
}
|
|
}
|
|
|