X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/547506fee9de4579e9273e8bcd17639865f02e74..29f44ca7ba8bb3788df4729d7917c53c8f489d87:/uip/whatnowproc.c diff --git a/uip/whatnowproc.c b/uip/whatnowproc.c index ca2236e8..f61f5b7f 100644 --- a/uip/whatnowproc.c +++ b/uip/whatnowproc.c @@ -5,7 +5,10 @@ * complete copyright information. */ -#include +#include "h/mh.h" +#include "sbr/context_save.h" +#include "sbr/error.h" +#include "h/done.h" /* @@ -22,7 +25,8 @@ int what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, struct msgs *mp, char *text, int inplace, char *cwd, int atfile) { - int found, k, msgnum, vecp; + bool found; + int k, msgnum, vecp; int len, buflen; char *bp; char buffer[BUFSIZ], *vec[MAXARGS]; @@ -67,7 +71,7 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, unsetenv("mhinplace"); if (text && mp && !is_readonly(mp)) { - found = 0; + found = false; bp = buffer; buflen = sizeof(buffer); for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++) { @@ -85,7 +89,7 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, buflen -= len; } msgnum = k + 1; - found++; + found = true; } } if (found) {