/*
- * forw.c -- forward a message, or group of messages.
- *
- * 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.
- */
+** forw.c -- forward a message, or group of messages.
+**
+** 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 <h/mh.h>
#include <fcntl.h>
/*
- * static prototypes
- */
+** static prototypes
+*/
static void mhl_draft (int, char *, int, int, char *, char *, int);
static void copy_draft (int, char *, char *, int, int, int);
static void copy_mime_draft (int);
if (file) {
/*
- * Forwarding a file.
- */
+ ** Forwarding a file.
+ */
anot = 0; /* don't want to annotate a file */
} else {
/*
- * Forwarding a message.
- */
+ ** Forwarding a message.
+ */
if (!msgp)
msgs[msgp++] = "cur";
if (!folder)
adios (filter, "unable to read");
/*
- * Open form (component) file.
- */
+ ** Open form (component) file.
+ */
if (digest) {
if (issue == 0) {
snprintf (buf, sizeof(buf), IFORMAT, digest);
adios (drft, "unable to create");
/*
- * copy the components into the draft
- */
+ ** copy the components into the draft
+ */
cpydata (in, out, form, drft);
close (in);
close (out);
} else {
/*
- * If filter file is defined, then format the
- * messages into the draft using mhlproc.
- */
+ ** If filter file is defined, then format the
+ ** messages into the draft using mhlproc.
+ */
if (filter)
mhl_draft (out, digest, volume, issue, drft, filter, dashstuff);
else if (mime)
/*
- * Filter the messages you are forwarding, into the
- * draft calling the mhlproc, and reading its output
- * from a pipe.
- */
+** Filter the messages you are forwarding, into the
+** draft calling the mhlproc, and reading its output
+** from a pipe.
+*/
static void
mhl_draft (int out, char *digest, int volume, int issue,
}
/*
- * Are we dashstuffing (quoting) the lines that begin
- * with `-'. We use the mhl default (don't add any flag)
- * unless the user has specified a specific flag.
- */
+ ** Are we dashstuffing (quoting) the lines that begin
+ ** with `-'. We use the mhl default (don't add any
+ ** flag) unless the user has specified a specific flag.
+ */
if (dashstuff > 0)
vec[i++] = "-dashstuffing";
else if (dashstuff < 0)
MAXARGS - i, vec[0]);
/*
- * Now add the message names to filter. We can only
- * handle about 995 messages (because vec is fixed size),
- * but that should be plenty.
- */
- for (msgnum = mp->lowsel; msgnum <= mp->hghsel && i < sizeof(vec) - 1;
- msgnum++)
+ ** Now add the message names to filter. We can only
+ ** handle about 995 messages (because vec is fixed
+ ** size), but that should be plenty.
+ */
+ for (msgnum = mp->lowsel;
+ msgnum <= mp->hghsel && i < sizeof(vec) - 1;
+ msgnum++)
if (is_selected (mp, msgnum))
vec[i++] = getcpy (m_name (msgnum));
vec[i] = NULL;
/*
- * Copy the messages into the draft. The messages are
- * not filtered through the mhlproc. Do dashstuffing if
- * necessary.
- */
+** Copy the messages into the draft. The messages are
+** not filtered through the mhlproc. Do dashstuffing if
+** necessary.
+*/
static void
-copy_draft (int out, char *digest, char *file, int volume, int issue, int dashstuff)
+copy_draft (int out, char *digest, char *file, int volume, int issue,
+ int dashstuff)
{
int fd,i, msgcnt, msgnum;
int len, buflen;
}
/*
- * Copy the message. Add RFC934 quoting (dashstuffing)
- * unless given the -nodashstuffing flag.
- */
+ ** Copy the message. Add RFC934 quoting (dashstuffing)
+ ** unless given the -nodashstuffing flag.
+ */
if (dashstuff >= 0)
cpydgst (fd, out, msgnam, file);
else
/*
- * Create a mhbuild composition file for forwarding message.
- */
+** Create a mhbuild composition file for forwarding message.
+*/
static void
copy_mime_draft (int out)