X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fpackf.c;h=732be656691fbdfa6c54688440fb38dd6f142b43;hp=cb7caf24f5f9f1fa73584b47118bf1654911adf7;hb=ced6090a330d3d83d0bce709f756aa3d7d65fea4;hpb=337338b404931f06f0db2119c9e145e8ca5a9860 diff --git a/uip/packf.c b/uip/packf.c index cb7caf2..732be65 100644 --- a/uip/packf.c +++ b/uip/packf.c @@ -1,10 +1,10 @@ /* - * packf.c -- pack a nmh folder into a file - * - * This code is Copyright (c) 2002, by the authors of nmh. See the - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ +** packf.c -- pack a nmh folder into a file +** +** This code is Copyright (c) 2002, by the authors of nmh. See the +** COPYRIGHT file in the root directory of the nmh distribution for +** complete copyright information. +*/ #include #include @@ -59,8 +59,8 @@ main (int argc, char **argv) argp = arguments; /* - * Parse arguments - */ + ** Parse arguments + */ while ((cp = *argp++)) { if (*cp == '-') { switch (smatch (++cp, switches)) { @@ -71,8 +71,7 @@ main (int argc, char **argv) adios (NULL, "-%s unknown", cp); case HELPSW: - snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]", - invo_name); + snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name); print_help (buf, switches, 1); done (1); case VERSIONSW: @@ -101,7 +100,7 @@ main (int argc, char **argv) adios (NULL, "only one folder at a time!"); folder = pluspath (cp); } else - app_msgarg(&msgs, cp); + app_msgarg(&msgs, cp); } if (!file) @@ -109,9 +108,9 @@ main (int argc, char **argv) file = path (file, TFILE); /* - * Check if file to be created (or appended to) - * exists. If not, ask for confirmation. - */ + ** Check if file to be created (or appended to) + ** exists. If not, ask for confirmation. + */ if (stat (file, &st) == NOTOK) { if (errno != ENOENT) adios (file, "error on file"); @@ -150,18 +149,21 @@ main (int argc, char **argv) seq_setprev (mp); /* set the previous-sequence */ /* open and lock new maildrop file */ - if ((md = mbx_open(file, mbx_style, getuid(), getgid(), m_gmprot())) == NOTOK) + if ((md = mbx_open(file, mbx_style, getuid(), getgid(), m_gmprot())) + == NOTOK) adios (file, "unable to open"); /* copy all the SELECTED messages to the file */ for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) if (is_selected(mp, msgnum)) { - if ((fd = open (msgnam = m_name (msgnum), O_RDONLY)) == NOTOK) { + if ((fd = open (msgnam = m_name (msgnum), O_RDONLY)) + == NOTOK) { admonish (msgnam, "unable to read message"); break; } - if (mbx_copy (file, mbx_style, md, fd, mapping, NULL, 1) == NOTOK) + if (mbx_copy(file, mbx_style, md, fd, mapping, NULL, 1) + == NOTOK) adios (file, "error writing to file"); close (fd);