From 5c2ad28e251994c41438dc127b77e090f77ad40c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 18 Oct 1996 23:44:13 +0000 Subject: Catch another rewrite case. svn path=/trunk/; revision=347 --- driver.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'driver.c') diff --git a/driver.c b/driver.c index dec8e7e8..8bc214aa 100644 --- a/driver.c +++ b/driver.c @@ -102,7 +102,24 @@ const char *host; /* server hostname */ /* If the address token is not properly terminated, ignore it. */ else if (*from == ' ' || *from == '\t') - state = 1; + { + const char *cp; + + /* + * The only lookahead case. If we're looking at space or tab, + * we might be looking at a local name immediately followed + * by a human name. + */ + for (cp = from; isspace(*cp); cp++) + continue; + if (*cp == '(') + { + strcpy(buf, "@"); + strcat(buf, host); + buf += strlen(buf); + state = 1; + } + } /* * On proper termination with no @, insert hostname. -- cgit v1.2.3