Anonymous user
Walk a directory/Recursively: Difference between revisions
→{{header|C}}: putc takes 2 arguments (RTFM). maybe you wanted putchar?
(→{{header|C}}: putc takes 2 arguments (RTFM). maybe you wanted putchar?) |
|||
Line 123:
if ( stat(entry->d_name, &fs) < 0 ) return;
if ( S_ISDIR(fs.st_mode) ) {
for(i=0; i < indent; i++)
puts(entry->d_name);
indent += 2;
Line 133:
} else {
if (!regexec(®, entry->d_name, 0, NULL, 0)) {
for(i=0; i < indent; i++)
puts(entry->d_name);
}
|