Jump to content

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++) putcputchar(' ');
puts(entry->d_name);
indent += 2;
Line 133:
} else {
if (!regexec(&reg, entry->d_name, 0, NULL, 0)) {
for(i=0; i < indent; i++) putcputchar(' ');
puts(entry->d_name);
}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.