From 4f1eec385831018980e4c7424e1a544c5313b52a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 15 Nov 2016 21:45:58 +0200 Subject: Finish reworking typed regexes. Tests pass! --- field.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'field.c') 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")); -- cgit v1.2.3