aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-12-16 18:07:56 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-12-16 18:07:56 +0200
commitd0bcd0b2c45fb90429b5eb0bbb91fdc43cec654b (patch)
tree64a65e20c4ab284cf7e1ec82b6a1147dc6eeb816
parent4e03c2c0d247af83d43a802ca645f3f83f57ffa8 (diff)
downloadegawk-d0bcd0b2c45fb90429b5eb0bbb91fdc43cec654b.tar.gz
egawk-d0bcd0b2c45fb90429b5eb0bbb91fdc43cec654b.tar.bz2
egawk-d0bcd0b2c45fb90429b5eb0bbb91fdc43cec654b.zip
Minor code and doc cleanups.
-rw-r--r--ChangeLog4
-rw-r--r--TODO63
-rw-r--r--debug.c4
3 files changed, 41 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index fadef90e..ba76fb3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-16 Arnold D. Robbins <arnold@skeeve.com>
+
+ * debug.c (do_set_var): Fix last remaining `*assoc_lookup() = x'.
+
2012-12-15 Arnold D. Robbins <arnold@skeeve.com>
Infrastructure Updates:
diff --git a/TODO b/TODO
index 7f1d82ea..47f1c6d9 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-Sat Nov 24 20:09:56 IST 2012
+Sun Dec 16 18:04:50 IST 2012
============================
There were too many files tracking different thoughts and ideas for
@@ -14,25 +14,12 @@ TODO
Minor Cleanups and Code Improvements
------------------------------------
- Fix all *assoc_lookup() = xxx calls.
-
- Make GAWKDEBUG pass the test suite.
API:
- DONE: awk_true and awk_false
- DONE: Update doc to use gcc -o filefuncs.so -shared filefuncs.o
- instead of ld ...
- DONE: Have check for name not rely on isalpha, isalnum since
- the locale could botch that up. Also make it not
- fatal.
??? #if !defined(GAWK) && !defined(GAWK_OMIT_CONVENIENCE_MACROS)
- DONE: Make fflush() and fflush("") both flush all files, as in BWK awk.
-
?? Add debugger commands to reference card
- FIX regular field splitting to use FPAT algorithm.
-
Look at function order within files.
regex.h - remove underscores in param names
@@ -44,8 +31,6 @@ Minor Cleanups and Code Improvements
Add tests for patches in emails (?? - not sure now what this
referred to)
- DONE: In gawkapi.c - review switch statements and use of default.
-
Consider removing use of and/or need for the protos.h file.
Consider moving var_value info into Node_var itself
@@ -59,9 +44,9 @@ Minor Cleanups and Code Improvements
Minor New Features
------------------
- Enhance extension/fork.c waitpid to allow the caller to specify the options.
- And add an optional array argument to wait and waitpid in which to return
- exit status information.
+ Enhance extension/fork.c waitpid to allow the caller to specify
+ the options. And add an optional array argument to wait and
+ waitpid in which to return exit status information.
Consider relaxing the strictness of --posix.
@@ -84,8 +69,6 @@ Major New Features
indirect calls of extension functions
indirect through array elements, not just scalar variables
- Integration of array_iface branch.
-
Rework management of array index storage. (Partially DONE.)
Consider using an atom table for all string array indices.
@@ -117,6 +100,10 @@ Things To Think About That May Never Happen
Change from dlopen to using the libltdl library (i.e. lt_dlopen).
This may support more platforms.
+ FIX regular field splitting to use FPAT algorithm.
+ Note: Looked at this. Not sure it's with the trouble:
+ If it ain't broke...
+
Implement namespaces. Arnold suggested the following in an email:
- Extend the definition of an 'identifier' to include "." as a valid character
although an identifier can't start with it.
@@ -179,6 +166,22 @@ Done in 4.1:
Review all FIXME and TODO comments
+ Fix all *assoc_lookup() = xxx calls.
+
+ Make GAWKDEBUG pass the test suite.
+
+ Make fflush() and fflush("") both flush all files, as in BWK awk.
+
+ In gawkapi.c - review switch statements and use of default.
+
+ API:
+ awk_true and awk_false
+ Update doc to use gcc -o filefuncs.so -shared filefuncs.o
+ instead of ld ...
+ Have check for name not rely on isalpha, isalnum since
+ the locale could botch that up. Also make it not
+ fatal.
+
Minor New Features
------------------
Done in 4.1:
@@ -189,22 +192,24 @@ Major New Features
------------------
Done in 4.1:
- DONE: Design and implement I/O plugin API.
+ Integration of array_iface branch.
+
+ Design and implement I/O plugin API.
- DONE: Implement designed API for loadable modules
+ Implement designed API for loadable modules
- DONE: Redo the loadable modules interface from the awk level.
+ Redo the loadable modules interface from the awk level.
- DONE: xgawk features (@load, -l, others)
+ xgawk features (@load, -l, others)
- DONE: Merge gawk/pgawk/dgawk into one executable
+ Merge gawk/pgawk/dgawk into one executable
- DONE: Merge xmlgawk XML extensions (via source forge project that
+ Merge xmlgawk XML extensions (via source forge project that
works with new API)
- DONE: Integrate MPFR to provide high precision arithmetic.
+ Integrate MPFR to provide high precision arithmetic.
- DONE: Consider really implementing BWK awk SYMTAB for seeing what
+ Consider really implementing BWK awk SYMTAB for seeing what
global variables are defined.
Things To Think About That May Never Happen
diff --git a/debug.c b/debug.c
index 7dff7b8d..a69b7e3e 100644
--- a/debug.c
+++ b/debug.c
@@ -1263,7 +1263,9 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
array = make_array();
array->vname = estrdup(subs->stptr, subs->stlen);
array->parent_array = r;
- *assoc_lookup(r, subs) = array;
+ lhs = assoc_lookup(r, subs);
+ unref(*lhs);
+ *lhs = array;
r = array;
} else if (value->type != Node_var_array) {
d_error(_("attempt to use scalar `%s[\"%s\"]' as array"),