commit 60da4cbe2337722dc0e86ce5cb4ab598e2243d60
parent 124b7d6734669e10d28fc164f8c75e273eadb256
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Fri, 29 Apr 2022 01:56:53 +0000
Dir: some tinkering
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/extra/Dir.c b/extra/Dir.c
@@ -27,15 +27,14 @@ main(int argc, char **argv)
dbuf = mallocz(DIRMAX, 1);
n = dirreadall(fd, &dbuf);
- print("f\nl..\n.../\nn\n");
+ print("f\n" "l..\n" ".../\n" "l\n" "n\n");
for (i = 0; i < n; i++) {
char *spacer = "";
if (dbuf[i].mode & DMEXEC) spacer = "*";
if (dbuf[i].mode & DMDIR) spacer = "/";
- print("l%s\n.%s%s\nn\n", dbuf[i].name, dbuf[i].name, spacer);
+ print("l%s\n" ".%s%s\n" "l\n" "n\n", dbuf[i].name, dbuf[i].name, spacer);
}
- print("l\n");
} else sysfatal("not a directory");
}