X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/dbdbd49d59ae5c14e66b1c148a63b8abc9d076ab..04ee0c3f6ad7e4177cc43a0c57f046013a4fbac9:/uip/dist.c diff --git a/uip/dist.c b/uip/dist.c index 4fb33bf1..294e4f24 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -5,11 +5,16 @@ * complete copyright information. */ -#include -#include +#include "h/mh.h" +#include "sbr/path.h" +#include "sbr/print_version.h" +#include "sbr/print_help.h" +#include "sbr/error.h" +#include "h/utils.h" #include "sbr/m_maildir.h" #include #include "h/done.h" +#include "forwsbr.h" #define DIST_SWITCHES \ X("annotate", 0, ANNOSW) \ @@ -71,10 +76,14 @@ static struct swit aqrl[] = { int main (int argc, char **argv) { - int anot = 0, inplace = 1, nedit = 0; - int nwhat = 0, i, in, isdf = 0, out; + bool anot = false; + bool inplace = true; + bool nedit = false; + bool nwhat = false; + int i, in, isdf = 0, out; int outputlinelen = OUTPUTLINELEN; - int dat[5], atfile = 0; + int dat[5]; + bool atfile = false; char *cp, *cwd, *maildir, *msgnam, *dfolder = NULL; char *dmsg = NULL, *ed = NULL, *file = NULL, *folder = NULL; char *form = NULL, *msg = NULL, buf[BUFSIZ], drft[BUFSIZ]; @@ -107,28 +116,28 @@ main (int argc, char **argv) done (0); case ANNOSW: - anot++; + anot = true; continue; case NANNOSW: - anot = 0; + anot = false; continue; 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 NWHATSW: - nwhat++; + nwhat = true; continue; case FILESW: @@ -144,10 +153,10 @@ main (int argc, char **argv) continue; case INPLSW: - inplace++; + inplace = true; continue; case NINPLSW: - inplace = 0; + inplace = false; continue; case DFOLDSW: @@ -198,10 +207,10 @@ main (int argc, char **argv) continue; case ATFILESW: - atfile++; + atfile = true; continue; case NOATFILESW: - atfile = 0; + atfile = false; continue; } } @@ -259,7 +268,7 @@ try_it_again: /* * Dist a file */ - anot = 0; /* don't want to annotate a file */ + anot = false; /* don't want to annotate a file */ } else { /* * Dist a message