diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-10-24 09:39:29 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-10-24 09:39:29 +0000 |
commit | b84289f95f7c80e302b80af2bd2d2a4bb808fbcb (patch) | |
tree | 6124e7818ab8bae00aba45bd64b2b83fe0613bca /mh | |
parent | e64ddc4d219556583491f2cc65a406d9d24af945 (diff) | |
download | mailutils-b84289f95f7c80e302b80af2bd2d2a4bb808fbcb.tar.gz mailutils-b84289f95f7c80e302b80af2bd2d2a4bb808fbcb.tar.bz2 |
Resolve a conflict between the angle bracket
indicating file inclusion and the one starting a valid
RFC822 address.
Diffstat (limited to 'mh')
-rw-r--r-- | mh/mh_alias.l | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mh/mh_alias.l b/mh/mh_alias.l index f2a81c6d3..ade7d045f 100644 --- a/mh/mh_alias.l +++ b/mh/mh_alias.l @@ -345,12 +345,18 @@ WORD [^ \t\n,:;<+=\*]+ return STRING;} {WS} ; {WORD} { yylval.string = strdup (yytext); return STRING;} -"<"{WS}{WORD} { char *p; - - for (p = yytext + 1; p < yytext + yyleng; p++) +^{WS}?"<"{WS}?{WORD} { char *p; + for (p = yytext; p < yytext + yyleng && isblank(*p); p++) + ; + for (p++; p < yytext + yyleng; p++) if (!isspace (*p)) break; push_source (p, 1); } +"<"{WORD} { yylval.string = xmalloc (yyleng + 2); + yylval.string[0] = '<'; + memcpy(yylval.string, yytext, yyleng); + yylval.string[yyleng+1] = 0; + return STRING;} =|\*|\+|,|:|\; return yytext[0]; . { char *p; asprintf (&p, |