| 1 |
Mon Jan 20 10:14:19 PM IST 2025 |
| 2 |
=============================== |
| 3 |
|
| 4 |
There were too many files tracking different thoughts and ideas for |
| 5 |
things to do, or consider doing. This file merges them into one. As |
| 6 |
tasks are completed, they should be removed. |
| 7 |
|
| 8 |
This file should exist only in the master branch or branches based off |
| 9 |
of it for development, but not in the stable branch. This may require some |
| 10 |
careful work with Git. |
| 11 |
|
| 12 |
TODO |
| 13 |
==== |
| 14 |
|
| 15 |
Minor Cleanups and Code Improvements |
| 16 |
------------------------------------ |
| 17 |
|
| 18 |
Tzvetelin Katchov <[email protected]> points out the following: |
| 19 |
|
| 20 |
- Clean up file and directory permissions to 0644 and 0755 |
| 21 |
across the board. |
| 22 |
|
| 23 |
- Use consistent #! lines in awk scripts in the test suite. |
| 24 |
|
| 25 |
- Double check uses of xxx:: targets in the test suite Makefile, |
| 26 |
maybe only one colon is needed. |
| 27 |
|
| 28 |
- The commas, mbstr1 and mbstr2 tests should probably be moved |
| 29 |
into the locale tests. |
| 30 |
|
| 31 |
API: |
| 32 |
??? #if !defined(GAWK) && !defined(GAWK_OMIT_CONVENIENCE_MACROS) |
| 33 |
|
| 34 |
?? Add debugger commands to reference card |
| 35 |
|
| 36 |
Look at function order within files. |
| 37 |
|
| 38 |
Consider removing use of and/or need for the protos.h file. |
| 39 |
|
| 40 |
Fully synchronize whitespace tests (for \s, \S in Unicode |
| 41 |
environment) with those of GNU grep. |
| 42 |
|
| 43 |
Lint option which would allow extensions and only complain |
| 44 |
about genuine errors. |
| 45 |
|
| 46 |
Go through the FIXMEs in the manual and fix as many as possible. |
| 47 |
|
| 48 |
In the test suite, don't run locale tests if the locale aren't |
| 49 |
available. |
| 50 |
|
| 51 |
In the test suite, use grep -E if no egrep or egrep produces |
| 52 |
a warning. |
| 53 |
|
| 54 |
Minor New Features |
| 55 |
------------------ |
| 56 |
|
| 57 |
Store the filename and line number where a variable is |
| 58 |
first used. |
| 59 |
|
| 60 |
Enable command line source text in the debugger. |
| 61 |
|
| 62 |
Enhance extension/fork.c waitpid to allow the caller to specify |
| 63 |
the options. And add an optional array argument to wait and |
| 64 |
waitpid in which to return exit status information. |
| 65 |
|
| 66 |
Consider relaxing the strictness of --posix. |
| 67 |
|
| 68 |
Enhance --lint=invalid to apply in more places. |
| 69 |
|
| 70 |
? Add an optional base to strtonum, allowing 2-36. |
| 71 |
|
| 72 |
? Optional third argument for index indicating where to start the |
| 73 |
search. |
| 74 |
|
| 75 |
Suggested by Jannick: |
| 76 |
* It is possible to make gawk look for a file with extension name |
| 77 |
plus API version number(s) in case a shared lib with the expected |
| 78 |
basename cannot be found? This would help have extension versions |
| 79 |
compiled against different API versions in one single directory |
| 80 |
and make gawk pick the extension with the right API version. |
| 81 |
|
| 82 |
Major New Features |
| 83 |
------------------ |
| 84 |
|
| 85 |
Think about how to generalize indirect access. Manuel Collado |
| 86 |
suggests things like |
| 87 |
|
| 88 |
foo = 5 |
| 89 |
@"foo" += 4 |
| 90 |
|
| 91 |
Also needed: |
| 92 |
|
| 93 |
Indirect through array elements, not just scalar variables |
| 94 |
|
| 95 |
Add ability to do decimal arithmetic. |
| 96 |
|
| 97 |
Rework management of array index storage. (Partially DONE.) |
| 98 |
|
| 99 |
Consider using an atom table for all string array indices. |
| 100 |
|
| 101 |
DBM storage of awk arrays. Try to allow multiple dbm packages. |
| 102 |
|
| 103 |
?? A RECLEN variable for fixed-length record input. PROCINFO["RS"] |
| 104 |
would be "RS" or "RECLEN" depending upon what's in use. |
| 105 |
*** Could this be done as an extension? |
| 106 |
|
| 107 |
?? Use a new or improved dfa and/or regex library. |
| 108 |
|
| 109 |
Rewrite in C++. |
| 110 |
|
| 111 |
Things To Think About That May Never Happen |
| 112 |
------------------------------------------- |
| 113 |
|
| 114 |
Consider making shadowed variables a warning and not |
| 115 |
a fatal warning when --lint=fatal. |
| 116 |
|
| 117 |
Similar for extra parameters in a function call. |
| 118 |
|
| 119 |
Look at code coverage tools, like S2E: https://s2e.epfl.ch/ |
| 120 |
|
| 121 |
Try running with diehard. See http://www.diehard-software.org, |
| 122 |
https://github.com/emeryberger/DieHard |
| 123 |
|
| 124 |
Include a sample rpm spec file in a new packaging subdirectory. |
| 125 |
(Really needed?) |
| 126 |
|
| 127 |
Patch lexer for @include and @load to make quotes optional. |
| 128 |
(Really needed?) |
| 129 |
|
| 130 |
Add a lint check if the return value of a function is used but |
| 131 |
the function did not supply a value. |
| 132 |
|
| 133 |
Consider making gawk output +nan for NaN values so that it |
| 134 |
will accept its own output as input. |
| 135 |
NOTE: Investigated this. GLIBC formats NaN as '-nan' |
| 136 |
and -NaN as 'nan'. Dealing with this is not simple. |
| 137 |
|
| 138 |
Review the bash source script for working with shared libraries in |
| 139 |
order to nuke the use of libtool. [ Partially started in the |
| 140 |
dead-branches/nolibtool branch. ] |
| 141 |
|
| 142 |
Things That We Decided We Will Never Do |
| 143 |
======================================= |
| 144 |
|
| 145 |
See if something like b = a "" can be optimized to not do |
| 146 |
a concatenation, but instead just set STRCUR on a. |
| 147 |
(Tried this; the type of b doesn't come out correctly.) |
| 148 |
|
| 149 |
Consider moving var_value info into Node_var itself to reduce |
| 150 |
memory usage. This would break all uses of get_lhs in the |
| 151 |
code. It's too sweeping a change. |
| 152 |
|
| 153 |
Add macros for working with flags instead of using & and | |
| 154 |
directly. |
| 155 |
|
| 156 |
FIX regular field splitting to use FPAT algorithm. |
| 157 |
Note: Looked at this. Not sure it's with the trouble: |
| 158 |
If it ain't broke... |
| 159 |
|
| 160 |
Scope IDs for IPv6 addresses |
| 161 |
|
| 162 |
Gnulib |
| 163 |
|
| 164 |
Make FIELDWIDTHS be an array? |
| 165 |
|
| 166 |
"Do an optimization pass over parse tree?" |
| 167 |
This isn't relevant now that we are using a byte code engine. |
| 168 |
|
| 169 |
"Consider integrating Fred Fish's DBUG library into gawk." |
| 170 |
I did this once as an experiment. But I don't see a lot of value |
| 171 |
to this at this stage of the development. Stepping through things |
| 172 |
in a debugger is generally enough. Also, I would have to try to |
| 173 |
track down the latest version of this. |
| 174 |
|
| 175 |
"Make awk '/foo/' files... run at egrep speeds" (How?) |
| 176 |
This has been on the list since the early days (gawk 1.x or early |
| 177 |
2.x). But I am not sure how to really do this, nor have I done |
| 178 |
timings, nor does there seem to be any real demand for this. |
| 179 |
|
| 180 |
Change from dlopen to using the libltdl library (i.e. lt_dlopen). |
| 181 |
This may support more platforms. If we move off of libtool |
| 182 |
then this is the wrong direction. |