projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disabled echo of rm -f lines in Makefile to quiet builds and
[mmh]
/
sbr
/
mf.c
diff --git
a/sbr/mf.c
b/sbr/mf.c
index
518a184
..
fd92e36
100644
(file)
--- a/
sbr/mf.c
+++ b/
sbr/mf.c
@@
-2,8
+2,6
@@
/*
* mf.c -- mail filter subroutines
*
/*
* mf.c -- mail filter subroutines
*
- * $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.
* 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.
@@
-18,8
+16,7
@@
* static prototypes
*/
static char *getcpy (char *);
* static prototypes
*/
static char *getcpy (char *);
-static char *add (char *, char *);
-static void compress (char *, char *);
+static void compress (char *, unsigned char *);
static int isat (char *);
static int parse_address (void);
static int phrase (char *);
static int isat (char *);
static int parse_address (void);
static int phrase (char *);
@@
-49,20
+46,6
@@
getcpy (char *s)
}
}
-static char *
-add (char *s1, char *s2)
-{
- register char *p;
-
- if (!s2)
- return getcpy (s1);
-
- p = mh_xmalloc ((size_t) (strlen (s1) + strlen (s2) + 2));
- sprintf (p, "%s%s", s2, s1);
- free (s2);
- return p;
-}
-
int
isfrom(char *string)
{
int
isfrom(char *string)
{
@@
-72,7
+55,7
@@
isfrom(char *string)
int
int
-lequal (char *a, char *b)
+lequal (unsigned char *a, unsigned char *b)
{
for (; *a; a++, b++)
if (*b == 0)
{
for (; *a; a++, b++)
if (*b == 0)
@@
-148,7
+131,8
@@
seekadrx (char *addrs)
struct adrx *
uucpadrx (char *addrs)
{
struct adrx *
uucpadrx (char *addrs)
{
- register char *cp, *wp, *xp, *yp, *zp;
+ register unsigned char *cp, *wp, *xp, *yp;
+ register char *zp;
register struct adrx *adrxp = &adrxs1;
if (vp == NULL) {
register struct adrx *adrxp = &adrxs1;
if (vp == NULL) {
@@
-221,9
+205,10
@@
uucpadrx (char *addrs)
static void
static void
-compress (char *fp, char *tp)
+compress (char *fp, unsigned char *tp)
{
{
- register char c, *cp;
+ register char c;
+ register unsigned char *cp;
for (c = ' ', cp = tp; (*tp = *fp++) != 0;)
if (isspace (*tp)) {
for (c = ' ', cp = tp; (*tp = *fp++) != 0;)
if (isspace (*tp)) {
@@
-348,8
+333,8
@@
static int ingrp = 0;
static int last_lex = LX_END;
static char *dp = NULL;
static int last_lex = LX_END;
static char *dp = NULL;
-static char *cp = NULL;
-static char *ap = NULL;
+static unsigned char *cp = NULL;
+static unsigned char *ap = NULL;
static char *pers = NULL;
static char *mbox = NULL;
static char *host = NULL;
static char *pers = NULL;
static char *mbox = NULL;
static char *host = NULL;
@@
-434,7
+419,7
@@
getadrx (char *addrs)
while (isspace (*ap))
ap++;
if (cp)
while (isspace (*ap))
ap++;
if (cp)
- sprintf (adr, "%.*s", cp - ap, ap);
+ sprintf (adr, "%.*s", (int)(cp - ap), ap);
else
strcpy (adr, ap);
bp = adr + strlen (adr) - 1;
else
strcpy (adr, ap);
bp = adr + strlen (adr) - 1;
@@
-774,7
+759,8
@@
my_lex (char *buffer)
{
/* buffer should be at least BUFSIZ bytes long */
int i, gotat = 0;
{
/* buffer should be at least BUFSIZ bytes long */
int i, gotat = 0;
- register char c, *bp;
+ register unsigned char c;
+ register char *bp;
/* Add C to the buffer bp. After use of this macro *bp is guaranteed to be within the buffer. */
#define ADDCHR(C) do { *bp++ = (C); if ((bp - buffer) == (BUFSIZ-1)) goto my_lex_buffull; } while (0)
/* Add C to the buffer bp. After use of this macro *bp is guaranteed to be within the buffer. */
#define ADDCHR(C) do { *bp++ = (C); if ((bp - buffer) == (BUFSIZ-1)) goto my_lex_buffull; } while (0)