+ // According to POSIX, the dirent structure contains a field char d_name[]
+ // of unspecified size, with at most NAME_MAX characters preceding the
+ // terminating null character. Use of other fields will harm the porta-
+ // bility of your programs.
+
+ struct stat buf;
+ dirent *d = 0;
+ for (d = readdir(dir); d; d = readdir(dir))