aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-11-15 21:45:58 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-11-15 21:45:58 +0200
commit4f1eec385831018980e4c7424e1a544c5313b52a (patch)
treedc9ffe7aba416c469113a03ff08629d2bfeb6312 /field.c
parentb37675aa79213f2665abb2bbb4db90560642bdee (diff)
downloadegawk-4f1eec385831018980e4c7424e1a544c5313b52a.tar.gz
egawk-4f1eec385831018980e4c7424e1a544c5313b52a.tar.bz2
egawk-4f1eec385831018980e4c7424e1a544c5313b52a.zip
Finish reworking typed regexes. Tests pass!
Diffstat (limited to 'field.c')
-rw-r--r--field.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/field.c b/field.c
index 4f24d5f3..2c4b1f55 100644
--- a/field.c
+++ b/field.c
@@ -929,6 +929,9 @@ do_split(int nargs)
return make_number((AWKNUM) 0);
}
+ if ((sep->flags & REGEX) != 0)
+ sep = sep->typed_re;
+
if ( (sep->re_flags & FS_DFLT) != 0
&& current_field_sep() == Using_FS
&& ! RS_is_null) {
@@ -991,6 +994,9 @@ do_patsplit(int nargs)
src = TOP_STRING();
+ if ((sep->flags & REGEX) != 0)
+ sep = sep->typed_re;
+
fpat = sep->re_exp;
if (fpat->stlen == 0)
fatal(_("patsplit: third argument must be non-null"));