diff options
author | 1999-04-20 17:31:25 +0000 | |
---|---|---|
committer | 1999-04-20 17:31:25 +0000 | |
commit | 271018d036c25821d92978441515877c236245b8 (patch) | |
tree | 2fd1e31cd6c0eb4bb3108b97f78576b29c4f61d0 /usr.bin/awk/parse.c | |
parent | Merge with EOM 1.50 (diff) | |
download | wireguard-openbsd-271018d036c25821d92978441515877c236245b8.tar.xz wireguard-openbsd-271018d036c25821d92978441515877c236245b8.zip |
April 16, 1999 version of the "one true awk"--64-bit fixes and more.
Diffstat (limited to 'usr.bin/awk/parse.c')
-rw-r--r-- | usr.bin/awk/parse.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/awk/parse.c b/usr.bin/awk/parse.c index 0fbe00d3e3d..429fdcaba7f 100644 --- a/usr.bin/awk/parse.c +++ b/usr.bin/awk/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.2 1997/08/25 16:17:13 kstailey Exp $ */ +/* $OpenBSD: parse.c,v 1.3 1999/04/20 17:31:30 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -208,7 +208,7 @@ Node *pa2stat(Node *a, Node *b, Node *c) /* pat, pat {...} */ { Node *x; - x = node4(PASTAT2, a, b, c, (Node *) paircnt); + x = node4(PASTAT2, a, b, c, itonp(paircnt)); if (paircnt++ >= PA2NUM) ERROR "limited to %d pat,pat statements", PA2NUM SYNTAX; x->ntype = NSTAT; @@ -260,3 +260,13 @@ int isarg(char *s) /* is s in argument list for current function? */ return n; return -1; } + +int ptoi(void *p) /* convert pointer to integer */ +{ + return (int) (long) p; /* swearing that p fits, of course */ +} + +Node *itonp(int i) /* and vice versa */ +{ + return (Node *) (long) i; +} |