aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_l.l
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-17 16:42:58 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-17 16:42:58 +0000
commit6acb0b4730875ea953f04df5fa6c5680fd98ca09 (patch)
treee25242b148b18f9356645cb37650dc94acffb468 /rcfile_l.l
parenta9eb6d847ec9c80ad409cfd9ffff6777bc9bb0dd (diff)
downloadfetchmail-6acb0b4730875ea953f04df5fa6c5680fd98ca09.tar.gz
fetchmail-6acb0b4730875ea953f04df5fa6c5680fd98ca09.tar.bz2
fetchmail-6acb0b4730875ea953f04df5fa6c5680fd98ca09.zip
Allow C-style escapes in strings.
svn path=/trunk/; revision=344
Diffstat (limited to 'rcfile_l.l')
-rw-r--r--rcfile_l.l13
1 files changed, 11 insertions, 2 deletions
diff --git a/rcfile_l.l b/rcfile_l.l
index 000b10d9..99558152 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -71,11 +71,20 @@ options {/* EMPTY */}
[0-9]+ { yylval.number = atoi(yytext); return NUMBER; }
\"[^\"]*\" {
+ char buf[POPBUFSIZE];
+
yytext[strlen(yytext)-1] = '\0';
- yylval.sval = (char *) strdup(yytext+1);
+ escapes(yytext+1, buf);
+ yylval.sval = (char *) strdup(buf);
+ return STRING;
+ }
+[^;:, \t\r\n]+ {
+ char buf[POPBUFSIZE];
+
+ escapes(yytext, buf);
+ yylval.sval = (char *) strdup(buf);
return STRING;
}
-[^;:, \t\r\n]+ { yylval.sval = (char *) strdup(yytext); return STRING; }
[ \t\r]+ ; /* whitespace */