commit e6df377504b60e231ee6de60f2ba0e5dd0975fab
parent cd35347203fbce8c8f1b4fd69102326e684e4f5e
Author: sin <sin@2f30.org>
Date: Fri, 21 Nov 2014 17:53:22 +0000
Respect exit status in expand(1)
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/expand.c b/expand.c
@@ -20,6 +20,7 @@ main(int argc, char *argv[])
{
FILE *fp;
int tabstop = 8;
+ int ret = 0;
ARGBEGIN {
case 'i':
@@ -38,13 +39,14 @@ main(int argc, char *argv[])
for (; argc > 0; argc--, argv++) {
if (!(fp = fopen(argv[0], "r"))) {
weprintf("fopen %s:", argv[0]);
+ ret = 1;
continue;
}
expand(argv[0], fp, tabstop);
fclose(fp);
}
}
- return 0;
+ return ret;
}
static int