aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-05-11 14:53:15 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-05-11 14:53:15 +0300
commit3ac8984c62b6a89e86e18376b75e32f0a60bfe9f (patch)
treedfd5c36afbc764d88919a6925e2edcc43187bbe9 /profile.c
parent4ab78d60892f19f1cae1e85771a396b50eb591c6 (diff)
downloadegawk-3ac8984c62b6a89e86e18376b75e32f0a60bfe9f.tar.gz
egawk-3ac8984c62b6a89e86e18376b75e32f0a60bfe9f.tar.bz2
egawk-3ac8984c62b6a89e86e18376b75e32f0a60bfe9f.zip
Change Node_hardregex to Node_typedregex.
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/profile.c b/profile.c
index a5c24b77..0f686768 100644
--- a/profile.c
+++ b/profile.c
@@ -32,8 +32,8 @@ static void parenthesize(int type, NODE *left, NODE *right);
static char *pp_list(int nargs, const char *paren, const char *delim);
static char *pp_group3(const char *s1, const char *s2, const char *s3);
static char *pp_concat(int nargs);
-static char *pp_string_or_hard_regex(const char *in_str, size_t len, int delim, bool hard_regex);
-static char *pp_hard_regex(const char *in_str, size_t len, int delim);
+static char *pp_string_or_strong_regex(const char *in_str, size_t len, int delim, bool strong_regex);
+static char *pp_strong_regex(const char *in_str, size_t len, int delim);
static bool is_binary(int type);
static bool is_scalar(int type);
static int prec_level(int type);
@@ -626,7 +626,7 @@ cleanup:
break;
case Op_push_re:
- if (pc->memory->type != Node_regex && pc->memory->type != Node_hardregex)
+ if (pc->memory->type != Node_regex && pc->memory->type != Node_typedregex)
break;
/* else
fall through */
@@ -636,7 +636,7 @@ cleanup:
if (pc->memory->type == Node_regex)
str = pp_string(re->stptr, re->stlen, '/');
else
- str = pp_hard_regex(re->stptr, re->stlen, '/');
+ str = pp_strong_regex(re->stptr, re->stlen, '/');
pp_push(pc->opcode, str, CAN_FREE);
}
break;
@@ -658,9 +658,9 @@ cleanup:
txt = t2->pp_str;
str = pp_group3(txt, op2str(pc->opcode), restr);
pp_free(t2);
- } else if (m->type == Node_hardregex) {
+ } else if (m->type == Node_typedregex) {
NODE *re = m->re_exp;
- restr = pp_hard_regex(re->stptr, re->stlen, '/');
+ restr = pp_strong_regex(re->stptr, re->stlen, '/');
str = pp_group3(txt, op2str(pc->opcode), restr);
efree(restr);
} else {
@@ -1338,21 +1338,21 @@ parenthesize(int type, NODE *left, NODE *right)
char *
pp_string(const char *in_str, size_t len, int delim)
{
- return pp_string_or_hard_regex(in_str, len, delim, false);
+ return pp_string_or_strong_regex(in_str, len, delim, false);
}
-/* pp_hard_regex --- pretty format a hard regex constant */
+/* pp_strong_regex --- pretty format a hard regex constant */
static char *
-pp_hard_regex(const char *in_str, size_t len, int delim)
+pp_strong_regex(const char *in_str, size_t len, int delim)
{
- return pp_string_or_hard_regex(in_str, len, delim, true);
+ return pp_string_or_strong_regex(in_str, len, delim, true);
}
-/* pp_string_or_hard_regex --- pretty format a string, regex, or hard regex constant */
+/* pp_string_or_strong_regex --- pretty format a string, regex, or hard regex constant */
char *
-pp_string_or_hard_regex(const char *in_str, size_t len, int delim, bool hard_regex)
+pp_string_or_strong_regex(const char *in_str, size_t len, int delim, bool strong_regex)
{
static char str_escapes[] = "\a\b\f\n\r\t\v\\";
static char str_printables[] = "abfnrtv\\";
@@ -1386,12 +1386,12 @@ pp_string_or_hard_regex(const char *in_str, size_t len, int delim, bool hard_reg
} ofre -= (l)
/* initial size; 3 for delim + terminating null, 1 for @ */
- osiz = len + 3 + 1 + (hard_regex == true);
+ osiz = len + 3 + 1 + (strong_regex == true);
emalloc(obuf, char *, osiz, "pp_string");
obufout = obuf;
ofre = osiz - 1;
- if (hard_regex)
+ if (strong_regex)
*obufout++ = '@';
*obufout++ = delim;