aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--array.c9
-rw-r--r--symbol.c25
3 files changed, 37 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 292e6709..0c3d0c00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,11 @@
(remap_std_file): Per Eli's suggestion, removed the leading close
of oldfd and will let dup2 do the close for us.
+2011-10-11 John Haque <j.eh@mchsi.com>
+
+ * symbol.c: Add licence notice.
+ * array.c (PREC_NUM, PREC_STR): Define as macros.
+
2011-10-09 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
diff --git a/array.c b/array.c
index a7508285..70e0decc 100644
--- a/array.c
+++ b/array.c
@@ -660,12 +660,14 @@ do_delete_loop(NODE *symbol, NODE **lhs)
/* value_info --- print scalar node info */
-int PREC_NUM = -1;
-int PREC_STR = -1;
static void
value_info(NODE *n)
{
+
+#define PREC_NUM -1
+#define PREC_STR -1
+
if (n == Nnull_string || n == Null_field) {
fprintf(output_fp, "<(null)>");
return;
@@ -693,6 +695,9 @@ value_info(NODE *n)
fprintf(output_fp, "CONVFMT=\"%s\"", n->stfmt <= -1 ? "%ld"
: fmt_list[n->stfmt]->stptr);
}
+
+#undef PREC_NUM
+#undef PREC_STR
}
diff --git a/symbol.c b/symbol.c
index a1c598ee..57ca7be0 100644
--- a/symbol.c
+++ b/symbol.c
@@ -1,3 +1,28 @@
+/*
+ * symbol.c - routines for symbol table management and code allocation
+ */
+
+/*
+ * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
#include "awk.h"
extern SRCFILE *srcfiles;