X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/00d760f7506c2d5c32ab5abf9f11b3066999f08a..0e593b90e45687680b8ea9eb6c7643b44abde0fb:/uip/comp.c?ds=sidebyside diff --git a/uip/comp.c b/uip/comp.c index 3667f2e4..00aa1c2c 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -5,9 +5,33 @@ * complete copyright information. */ -#include -#include -#include +#include "h/mh.h" +#include "sbr/fmt_new.h" +#include "whatnowproc.h" +#include "sbr/m_name.h" +#include "sbr/m_gmprot.h" +#include "sbr/getarguments.h" +#include "sbr/read_switch_multiword.h" +#include "sbr/seq_setprev.h" +#include "sbr/seq_save.h" +#include "sbr/showfile.h" +#include "sbr/smatch.h" +#include "sbr/refile.h" +#include "sbr/cpydata.h" +#include "sbr/m_draft.h" +#include "sbr/m_convert.h" +#include "sbr/getfolder.h" +#include "sbr/fdcompare.h" +#include "sbr/folder_read.h" +#include "sbr/context_save.h" +#include "sbr/context_find.h" +#include "sbr/ambigsw.h" +#include "sbr/path.h" +#include "sbr/print_version.h" +#include "sbr/print_help.h" +#include "sbr/error.h" +#include "h/utils.h" +#include "h/fmt_scan.h" #include "h/done.h" #include "sbr/m_maildir.h" #include @@ -70,7 +94,10 @@ static struct swit aqrul[] = { int main (int argc, char **argv) { - int use = NOUSE, nedit = 0, nwhat = 0, build = 0; + int use = NOUSE; + bool nedit = false; + bool nwhat = false; + bool build = false; int i, in = NOTOK, isdf = 0, out, dat[5], format_len = 0; int outputlinelen = OUTPUTLINELEN; char *cp, *cwd, *maildir, *dfolder = NULL; @@ -83,7 +110,7 @@ main (int argc, char **argv) struct format *fmt; struct stat st; - if (nmh_init(argv[0], 1)) { return 1; } + if (nmh_init(argv[0], true, true)) { return 1; } arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -109,23 +136,23 @@ main (int argc, char **argv) case EDITRSW: if (!(ed = *argp++) || *ed == '-') die("missing argument to %s", argp[-2]); - nedit = 0; + nedit = false; continue; case NEDITSW: - nedit++; + nedit = true; continue; case WHATSW: if (!(whatnowproc = *argp++) || *whatnowproc == '-') die("missing argument to %s", argp[-2]); - nwhat = 0; + nwhat = false; continue; case BILDSW: - build++; + build = true; /* FALLTHRU */ case NWHATSW: - nwhat++; + nwhat = true; continue; case FORMSW: