X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhlsbr.c;h=a0d1306845606b3a047183755d540a1c1d867610;hb=3a84d814004fd4557bf4f44952648e9e69bd22a8;hp=9f1ebddeb763e0b5df04d991d533d7bc8a1945ff;hpb=7b98850d3b8b2453b473fdfb6db52f4aa3fe39b6;p=mmh diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 9f1ebdd..a0d1306 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -2,8 +2,6 @@ /* * mhlsbr.c -- main routines for nmh message lister * - * $Id$ - * * 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. @@ -273,9 +271,9 @@ static void putcomp (struct mcomp *, struct mcomp *, int); static char *oneline (char *, long); static void putstr (char *); static void putch (char); -static RETSIGTYPE intrser (int); -static RETSIGTYPE pipeser (int); -static RETSIGTYPE quitser (int); +static void intrser (int); +static void pipeser (int); +static void quitser (int); static void face_format (struct mcomp *); static int doface (struct mcomp *); static void mhladios (char *, char *, ...); @@ -619,7 +617,8 @@ mhl_format (char *file, int length, int width) fprintf (stderr, "c1: name=\"%s\" text=\"%s\" ovtxt=\"%s\"\n", c1->c_name, c1->c_text, c1->c_ovtxt); fprintf (stderr, "\tnfs=0x%x fmt=0x%x\n", - (unsigned int) c1->c_nfs, (unsigned int) c1->c_fmt); + (unsigned int)(unsigned long) c1->c_nfs, + (unsigned int)(unsigned long) c1->c_fmt); fprintf (stderr, "\toffset=%d ovoff=%d width=%d cwidth=%d length=%d\n", c1->c_offset, c1->c_ovoff, c1->c_width, c1->c_cwidth, c1->c_length); @@ -793,8 +792,8 @@ parse (void) static void process (char *folder, char *fname, int ofilen, int ofilec) { - char *cp; - FILE *fp; + char *cp = NULL; + FILE *fp = NULL; struct mcomp *c1; switch (setjmp (env)) { @@ -1445,12 +1444,10 @@ putch (char ch) } -static RETSIGTYPE +static void intrser (int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL (SIGINT, intrser); -#endif + NMH_UNUSED (i); discard (stdout); putchar ('\n'); @@ -1458,23 +1455,19 @@ intrser (int i) } -static RETSIGTYPE +static void pipeser (int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL (SIGPIPE, pipeser); -#endif + NMH_UNUSED (i); done (NOTOK); } -static RETSIGTYPE +static void quitser (int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL (SIGQUIT, quitser); -#endif + NMH_UNUSED (i); putchar ('\n'); fflush (stdout); @@ -1516,10 +1509,7 @@ face_format (struct mcomp *c1) #include #include #include - -#ifdef HAVE_ARPA_INET_H -# include -#endif +#include static int doface (struct mcomp *c1) @@ -1543,7 +1533,9 @@ bad_faceproc: ; } memset(&hints, 0, sizeof(hints)); +#ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; +#endif hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; @@ -1686,8 +1678,8 @@ doface (struct mcomp *c1) int mhlsbr (int argc, char **argv, FILE *(*action)()) { - SIGNAL_HANDLER istat, pstat, qstat; - char *cp; + SIGNAL_HANDLER istat = NULL, pstat = NULL, qstat = NULL; + char *cp = NULL; struct mcomp *c1; switch (setjmp (mhlenv)) {