aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-27 22:33:01 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-27 22:33:01 +0300
commit9701514d4ad1152da564ebf6690c514becd4339a (patch)
tree69cf8c9a9991cb4f9fed6fbc2415f0605c52578e /awkgram.c
parent6b1b9c16a1b55804df36457de0650414ab3f017d (diff)
parente71e74ac9af232d58e6c672e37ddf7e8737d68b1 (diff)
downloadegawk-9701514d4ad1152da564ebf6690c514becd4339a.tar.gz
egawk-9701514d4ad1152da564ebf6690c514becd4339a.tar.bz2
egawk-9701514d4ad1152da564ebf6690c514becd4339a.zip
Merge branch 'master' into comment
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/awkgram.c b/awkgram.c
index fac2070a..4fe3b04e 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5225,7 +5225,7 @@ check_bad_char(int c)
}
if (iscntrl(c) && ! isspace(c))
- fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), c);
+ fatal(_("PEBKAC error: invalid character '\\%03o' in source code"), c & 0xFF);
}
/* nextc --- get the next input character */
@@ -5895,7 +5895,11 @@ retry:
case '"':
string:
esc_seen = false;
- while ((c = nextc(true)) != '"') {
+ /*
+ * Allow any kind of junk in quoted string,
+ * so pass false to nextc().
+ */
+ while ((c = nextc(false)) != '"') {
if (c == '\n') {
pushback();
yyerror(_("unterminated string"));
@@ -8261,6 +8265,16 @@ install_builtins(void)
/* is_alpha --- return true if c is an English letter */
+/*
+ * The scene of the murder was grisly to look upon. When the inspector
+ * arrived, the sergeant turned to him and said, "Another programmer stabbed
+ * in the back. He never knew what happened."
+ *
+ * The inspector replied, "Looks like the MO of isalpha, and his even meaner
+ * big brother, isalnum. The Locale brothers." The sergeant merely
+ * shuddered in horror.
+ */
+
bool
is_alpha(int c)
{