diff options
author | 2020-06-13 01:21:01 +0000 | |
---|---|---|
committer | 2020-06-13 01:21:01 +0000 | |
commit | b79e3a7920f32fb4d30ae9a299bd197ec636d727 (patch) | |
tree | 967aeff0d93a05f17178af73bfdde6ec115f71ef /usr.bin/awk/parse.c | |
parent | POSIX doesn't permit an unescaped '/' in an extended regular expression. (diff) | |
download | wireguard-openbsd-b79e3a7920f32fb4d30ae9a299bd197ec636d727.tar.xz wireguard-openbsd-b79e3a7920f32fb4d30ae9a299bd197ec636d727.zip |
Integrate the bsd-features branch from awk github.
Implements the gensub(), systime() and strftime() functions for
greater gawk compatibility.
Diffstat (limited to 'usr.bin/awk/parse.c')
-rw-r--r-- | usr.bin/awk/parse.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/usr.bin/awk/parse.c b/usr.bin/awk/parse.c index 0394da3a7e8..01b5b7e1304 100644 --- a/usr.bin/awk/parse.c +++ b/usr.bin/awk/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.9 2020/06/10 21:03:36 millert Exp $ */ +/* $OpenBSD: parse.c,v 1.10 2020/06/13 01:21:01 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -94,6 +94,20 @@ Node *node4(int a, Node *b, Node *c, Node *d, Node *e) return(x); } +Node *node5(int a, Node *b, Node *c, Node *d, Node *e, Node *f) +{ + Node *x; + + x = nodealloc(5); + x->nobj = a; + x->narg[0] = b; + x->narg[1] = c; + x->narg[2] = d; + x->narg[3] = e; + x->narg[4] = f; + return(x); +} + Node *stat1(int a, Node *b) { Node *x; @@ -166,6 +180,15 @@ Node *op4(int a, Node *b, Node *c, Node *d, Node *e) return(x); } +Node *op5(int a, Node *b, Node *c, Node *d, Node *e, Node *f) +{ + Node *x; + + x = node5(a,b,c,d,e,f); + x->ntype = NEXPR; + return(x); +} + Node *celltonode(Cell *a, int b) { Node *x; |