projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bca1c9b
)
Removed support to handle ARPAnet (RFC733) addresses containing ` at '.
author
markus schnalke
<meillo@marmaro.de>
Sat, 24 Mar 2012 15:40:16 +0000
(16:40 +0100)
committer
markus schnalke
<meillo@marmaro.de>
Sat, 24 Mar 2012 15:40:16 +0000
(16:40 +0100)
sbr/mf.c
patch
|
blob
|
history
diff --git
a/sbr/mf.c
b/sbr/mf.c
index
53752a3
..
6338a6e
100644
(file)
--- a/
sbr/mf.c
+++ b/
sbr/mf.c
@@
-15,7
+15,6
@@
** static prototypes
*/
static char *getcpy(char *);
** static prototypes
*/
static char *getcpy(char *);
-static int isat(char *);
static int parse_address(void);
static int phrase(char *);
static int route_addr(char *);
static int parse_address(void);
static int phrase(char *);
static int route_addr(char *);
@@
-46,25
+45,12
@@
getcpy(char *s)
}
}
-#define CHKADR 0 /* undertermined address style */
-#define UNIXDR 1 /* UNIX-style address */
-#define ARPADR 2 /* ARPAnet-style address */
-
-
-static int
-isat(char *p)
-{
- return (strncmp(p, " AT ", 4)!=0 && strncmp(p, " At ", 4)!=0 &&
- strncmp(p, " aT ", 4)!=0 && strncmp(p, " at ", 4)!=0 ?
- FALSE : TRUE);
-}
-
-
/*
**
** getadrx() implements a partial 822-style address parser. The parser
** is neither complete nor correct. It does however recognize nearly all
/*
**
** getadrx() implements a partial 822-style address parser. The parser
** is neither complete nor correct. It does however recognize nearly all
-** of the 822 address syntax. In addition it handles the majority of the
+** of the 822 address syntax.
+** Historically, it handled the majority (and still handles parts) of the
** 733 syntax as well. Most problems arise from trying to accomodate both.
**
** In terms of 822, the route-specification in
** 733 syntax as well. Most problems arise from trying to accomodate both.
**
** In terms of 822, the route-specification in
@@
-75,8
+61,6
@@
isat(char *p)
** via source-routing. Recursive groups are not allowed as per the
** standard.
**
** via source-routing. Recursive groups are not allowed as per the
** standard.
**
-** In terms of 733, " at " is recognized as equivalent to "@".
-**
** In terms of both the parser will not complain about missing hosts.
**
** -----
** In terms of both the parser will not complain about missing hosts.
**
** -----
@@
-582,7
+566,7
@@
static int
my_lex(char *buffer)
{
/* buffer should be at least BUFSIZ bytes long */
my_lex(char *buffer)
{
/* buffer should be at least BUFSIZ bytes long */
- int i, gotat = 0;
+ int i;
register unsigned char c;
register char *bp;
register unsigned char c;
register char *bp;
@@
-602,7
+586,6
@@
my_lex(char *buffer)
if (!cp)
return (last_lex = LX_END);
if (!cp)
return (last_lex = LX_END);
- gotat = isat(cp);
c = *cp++;
while (isspace(c))
c = *cp++;
c = *cp++;
while (isspace(c))
c = *cp++;
@@
-712,9
+695,7
@@
got_atom: ;
else
cp--;
*bp = 0;
else
cp--;
*bp = 0;
- last_lex = !gotat || cp == NULL || strchr(cp, '<') != NULL
- ? LX_ATOM : LX_AT;
- return last_lex;
+ return LX_ATOM;
my_lex_buffull:
/* Out of buffer space. *bp is the last byte in the buffer */
my_lex_buffull:
/* Out of buffer space. *bp is the last byte in the buffer */