/*
- * mhlsbr.c -- main routines for nmh message lister
- *
- * 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.
- */
+** mhlsbr.c -- main routines for nmh message lister
+**
+** 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 <h/signals.h>
#include <signal.h>
/*
- * MAJOR BUG:
- * for a component containing addresses, ADDRFMT, if COMPRESS is also
- * set, then addresses get split wrong (not at the spaces between commas).
- * To fix this correctly, putstr() should know about "atomic" strings that
- * must NOT be broken across lines. That's too difficult for right now
- * (it turns out that there are a number of degernate cases), so in
- * oneline(), instead of
- *
- * (*onelp == '\n' && !onelp[1])
- *
- * being a terminating condition,
- *
- * (*onelp == '\n' && (!onelp[1] || (flags & ADDRFMT)))
- *
- * is used instead. This cuts the line prematurely, and gives us a much
- * better chance of getting things right.
- */
+** MAJOR BUG:
+** for a component containing addresses, ADDRFMT, if COMPRESS is also
+** set, then addresses get split wrong (not at the spaces between commas).
+** To fix this correctly, putstr() should know about "atomic" strings that
+** must NOT be broken across lines. That's too difficult for right now
+** (it turns out that there are a number of degernate cases), so in
+** oneline(), instead of
+**
+** (*onelp == '\n' && !onelp[1])
+**
+** being a terminating condition,
+**
+** (*onelp == '\n' && (!onelp[1] || (flags & ADDRFMT)))
+**
+** is used instead. This cuts the line prematurely, and gives us a much
+** better chance of getting things right.
+*/
#define ONECOMP 0
#define TWOCOMP 1
/*
- * Redefine a couple of functions.
- * These are undefined later in the code.
- */
+** Redefine a couple of functions.
+** These are undefined later in the code.
+*/
#define adios mhladios
#define done mhldone
/*
- * prototypes
- */
+** prototypes
+*/
static void mhl_format (char *, int, int);
static int evalvar (struct mcomp *);
static int ptoi (char *, int *);
static int mcomp_flags (char *);
static char *mcomp_add (long, char *, char *);
static void mcomp_format (struct mcomp *, struct mcomp *);
-static struct mcomp *add_queue (struct mcomp **, struct mcomp **, char *, char *, int);
+static struct mcomp *add_queue (struct mcomp **, struct mcomp **,
+ char *, char *, int);
static void free_queue (struct mcomp **, struct mcomp **);
static void putcomp (struct mcomp *, struct mcomp *, int);
static char *oneline (char *, long);
case ',':
case '=':
/*
- * Split this list of fields to ignore,
- * and copy it to the end of the current
- * "ignores" list.
- */
+ ** Split this list of fields to ignore,
+ ** and copy it to the end of the current
+ ** "ignores" list.
+ */
if (!mh_strcasecmp (name, "ignores")) {
char **tmparray, **p;
int n = 0;
while (*p++)
n++;
- /* copy pointers to split fields to ignores array */
+ /*
+ ** copy pointers to split fields
+ ** to ignores array
+ */
ip = copyip (tmparray, ip, MAXARGS - num_ignores);
num_ignores += n;
continue;
default:
/*
- * If we are forwarding this message, and the first
- * column contains a dash, then add a dash and a space.
- */
+ ** If we are forwarding this message, and the first
+ ** column contains a dash, then add a dash and a space.
+ */
if (column == 0 && forwflg && (dashstuff >= 0) && ch == '-') {
putchar ('-');
putchar (' ');
/*
- * faceproc is two elements defining the image agent's location:
- * Internet host
- * UDP port
- */
+** faceproc is two elements defining the image agent's location:
+** Internet host
+** UDP port
+*/
#include <sys/socket.h>
#include <netinet/in.h>
}
/*
- * COMMENTED OUT
- * This version doesn't use sockets
- */
+** COMMENTED OUT
+** This version doesn't use sockets
+*/
#if 0
static int
mhl_action = action;
/*
- * If signal is at default action, then start ignoring
- * it, else let it set to its current action.
- */
+ ** If signal is at default action, then start ignoring
+ ** it, else let it set to its current action.
+ */
if ((istat = SIGNAL (SIGINT, SIG_IGN)) != SIG_DFL)
SIGNAL (SIGINT, istat);
if ((qstat = SIGNAL (SIGQUIT, SIG_IGN)) != SIG_DFL)
default:
SIGNAL (SIGINT, istat);
SIGNAL (SIGQUIT, qstat);
- SIGNAL (SIGPIPE, SIG_IGN); /* should probably change to block instead */
+ SIGNAL (SIGPIPE, SIG_IGN); /*
+ ** should probably change to block
+ ** instead
+ */
if (ontty == PITTY)
m_pclose ();
SIGNAL (SIGPIPE, pstat);