X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/177f020f122827214159c46dcfe7ded1e3c8d1c3..24ca4cf3b0f5e02735ea716163a880b2b5cc8b49:/sbr/showfile.c diff --git a/sbr/showfile.c b/sbr/showfile.c index 9b24ec64..7daadaed 100644 --- a/sbr/showfile.c +++ b/sbr/showfile.c @@ -5,14 +5,19 @@ * complete copyright information. */ -#include +#include "h/mh.h" +#include "showfile.h" +#include "r1bindex.h" +#include "context_save.h" +#include "arglist.h" +#include "error.h" int showfile (char **arg, char *file) { pid_t pid; - int isdraft, vecp; + int vecp; char **vec, *program; int retval = 1; @@ -36,11 +41,11 @@ showfile (char **arg, char *file) case 0: /* child */ vec = argsplit(lproc, &program, &vecp); - isdraft = 1; + bool isdraft = true; if (arg) { while (*arg) { if (**arg != '-') - isdraft = 0; + isdraft = false; vec[vecp++] = *arg++; } } @@ -54,7 +59,7 @@ showfile (char **arg, char *file) execvp (program, vec); fprintf (stderr, "unable to exec "); perror (lproc); - _exit (-1); + _exit(1); default: /* parent */