summaryrefslogtreecommitdiff
path: root/src/hoofd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hoofd.c')
-rw-r--r--src/hoofd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hoofd.c b/src/hoofd.c
index 64c2bfd..62d1151 100644
--- a/src/hoofd.c
+++ b/src/hoofd.c
@@ -58,8 +58,12 @@ int entry_hoofd(int argc, char **argv) {
char **args = parse_options(argc, argv, &n, &c);
while (*args != NULL) {
- struct map *map = open_map(*args);
- if (map == NULL) {
+ bool isdir;
+ struct map *map = open_map(*args, &isdir);
+ if (isdir) {
+ fprintf(stderr, "hoofd: %s: is een mapje\n", *args);
+ goto next;
+ } else if (map == NULL) {
fprintf(stderr, "hoofd: fout bij lezen bestand");
return 1;
}
@@ -73,6 +77,7 @@ int entry_hoofd(int argc, char **argv) {
}
fwrite(map->addr, 1, i, stdout);
+next:
args++;
}