X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowproc.c;h=9d4d06d279f0ec0ecf5edebc8daf6d10f9b19e3c;hp=44146d7e27026d7880aeeb0e6d2e93fbb5500ce9;hb=ced6090a330d3d83d0bce709f756aa3d7d65fea4;hpb=337338b404931f06f0db2119c9e145e8ca5a9860 diff --git a/uip/whatnowproc.c b/uip/whatnowproc.c index 44146d7..9d4d06d 100644 --- a/uip/whatnowproc.c +++ b/uip/whatnowproc.c @@ -1,22 +1,22 @@ /* - * whatnowproc.c -- exec the "whatnowproc" - * - * 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. - */ +** whatnowproc.c -- exec the "whatnowproc" +** +** 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 /* - * This routine is used by comp, repl, forw, and dist to exec - * the "whatnowproc". It first sets up all the environment - * variables that the "whatnowproc" will need to check, and - * then execs the command. As an optimization, if the - * "whatnowproc" is the nmh command "whatnow" (typical case), - * it will call this routine directly without exec'ing it. - */ +** This routine is used by comp, repl, forw, and dist to exec +** the "whatnowproc". It first sets up all the environment +** variables that the "whatnowproc" will need to check, and +** then execs the command. As an optimization, if the +** "whatnowproc" is the nmh command "whatnow" (typical case), +** it will call this routine directly without exec'ing it. +*/ /* from whatnowsbr.c */ int WhatNow (int, char **); @@ -44,7 +44,8 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, if (mp == NULL || *altmsg == '/' || cwd == NULL) m_putenv ("mhaltmsg", altmsg); else { - snprintf (buffer, sizeof(buffer), "%s/%s", mp->foldpath, altmsg); + snprintf (buffer, sizeof(buffer), "%s/%s", + mp->foldpath, altmsg); m_putenv ("mhaltmsg", buffer); } } else { @@ -73,14 +74,17 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, buflen = sizeof(buffer); for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++) { if (is_selected(mp, msgnum)) { - snprintf (bp, buflen, "%s%s", found ? " " : "", m_name (msgnum)); + snprintf (bp, buflen, "%s%s", + found ? " " : "", + m_name (msgnum)); len = strlen (bp); bp += len; buflen -= len; for (k = msgnum + 1; k <= mp->hghmsg && is_selected(mp, k); k++) continue; if (--k > msgnum) { - snprintf (bp, buflen, "-%s", m_name (k)); + snprintf (bp, buflen, "-%s", + m_name (k)); len = strlen (bp); bp += len; buflen -= len; @@ -104,9 +108,9 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, chdir (cwd); /* - * If the "whatnowproc" is the nmh command "whatnow", - * we run it internally, rather than exec'ing it. - */ + ** If the "whatnowproc" is the nmh command "whatnow", + ** we run it internally, rather than exec'ing it. + */ if (strcmp (vec[0], "whatnow") == 0) { WhatNow (vecp, vec); done (0);