summaryrefslogtreecommitdiffstats
path: root/contrib/awk/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/awk.h')
-rw-r--r--contrib/awk/awk.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/contrib/awk/awk.h b/contrib/awk/awk.h
index 3ab2015..621a981 100644
--- a/contrib/awk/awk.h
+++ b/contrib/awk/awk.h
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -21,10 +21,20 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * $FreeBSD$
*/
/* ------------------------------ Includes ------------------------------ */
+/*
+ * config.h absolutely, positively, *M*U*S*T* be included before
+ * any system headers. Otherwise, extreme death, destruction
+ * and loss of life results.
+ *
+ * Well, OK, gawk just won't work on systems using egcs and LFS. But
+ * that's almost as bad.
+ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -34,6 +44,7 @@
#endif /* _GNU_SOURCE */
#include <stdio.h>
+#include <assert.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif /* HAVE_LIMITS_H */
@@ -588,7 +599,8 @@ extern char casetable[]; /* for case-independent regexp matching */
/* ------------------------- Pseudo-functions ------------------------- */
#define is_identchar(c) (isalnum(c) || (c) == '_')
-#define isnondecimal(str) (((str)[0]) == '0')
+#define isnondecimal(str) (((str)[0]) == '0' && (ISDIGIT((str)[1]) \
+ || (str)[1] == 'x' || (str)[1] == 'X'))
#ifdef MPROF
#define getnode(n) emalloc(n, NODE *, sizeof(NODE), "getnode")
OpenPOWER on IntegriCloud