tweaks
1636e122
2 file(s) · +2 −2
| 279 | 279 | if(text[cursor] == '\0') |
|
| 280 | 280 | return; |
|
| 281 | 281 | cursor = nextrune(+1); |
|
| 282 | + | /* fallthrough */ |
|
| 282 | 283 | case XK_BackSpace: |
|
| 283 | 284 | if(cursor == 0) |
|
| 284 | 285 | return; |
| 3 | 3 | #include <limits.h> |
|
| 4 | 4 | #include <stdio.h> |
|
| 5 | 5 | #include <stdlib.h> |
|
| 6 | - | #include <string.h> |
|
| 7 | 6 | #include <unistd.h> |
|
| 8 | 7 | #include <sys/stat.h> |
|
| 9 | 8 | ||
| 32 | 31 | return; |
|
| 33 | 32 | } |
|
| 34 | 33 | while((d = readdir(dp))) |
|
| 35 | - | if(snprintf(buf, sizeof buf, "%s/%s", dir, d->d_name) < (ssize_t)sizeof buf |
|
| 34 | + | if(snprintf(buf, sizeof buf, "%s/%s", dir, d->d_name) < (int)sizeof buf |
|
| 36 | 35 | && !stat(buf, &st) && S_ISREG(st.st_mode) && access(buf, X_OK) == 0) |
|
| 37 | 36 | puts(d->d_name); |
|
| 38 | 37 | closedir(dp); |
|