1 /* See LICENSE file for copyright and license details. */
9 static void lsx(const char *dir);
12 main(int argc, char *argv[]) {
17 else for(i = 1; i < argc; i++)
23 lsx(const char *dir) {
29 if(!(dp = opendir(dir))) {
33 while((d = readdir(dp)))
34 if(snprintf(buf, sizeof buf, "%s/%s", dir, d->d_name) < (int)sizeof buf
35 && !stat(buf, &st) && S_ISREG(st.st_mode) && access(buf, X_OK) == 0)