projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change all chars being passed to the ctype macros (isalph(), etc.) to
[mmh]
/
sbr
/
mf.c
diff --git
a/sbr/mf.c
b/sbr/mf.c
index
9a2c647
..
2559b67
100644
(file)
--- a/
sbr/mf.c
+++ b/
sbr/mf.c
@@
-18,8
+18,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
+48,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
+57,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
+133,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
+207,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
+335,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;
@@
-774,7
+761,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)
@@
-975,13
+963,8
@@
mfgets (FILE *in, char **bp)
break;
}
if (cp >= ep) {
break;
}
if (cp >= ep) {
- if (!(dp = realloc (pp, (size_t) (len += BUFSIZ)))) {
- free (pp);
- pp = NULL;
- return NOTOK;
- }
- else
- cp += dp - pp, ep = (pp = cp) + len - 2;
+ dp = mh_xrealloc (pp, (size_t) (len += BUFSIZ));
+ cp += dp - pp, ep = (pp = cp) + len - 2;
}
}
}
}
}
}