diff options
Diffstat (limited to 'TODO.xgawk')
-rw-r--r-- | TODO.xgawk | 144 |
1 files changed, 78 insertions, 66 deletions
@@ -1,5 +1,40 @@ To-do list for xgawk enhancements: +- In gawkapi.c - review switch statements and use of default. + +- In extensions/configure.ac - add compiler warnings if GCC. + +Low priority: + +- 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. + +Possible future changes requiring (further) discussion: + +- Change from dlopen to using the libltdl library (i.e. lt_dlopen). + This may support more platforms. + +- 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. + - Extension libraries install functions and global variables with names + that have a "." in them: XML.parse(), XML.name, whatever. + - Awk code can read/write such variables and call such functions, but they + cannot define such functions + function XML.foo() { .. } # error + or create a variable with such a name if it doesn't exist. This would + be a run-time error, not a parse-time error. + - This last rule may be too restrictive. + I don't want to get into fancy rules a la perl and file-scope visibility + etc, I'd like to keep things simple. But how we design this is going + to be very important. + +Unlikely: + +- Include a sample rpm spec file in a new packaging subdirectory. + +- Patch lexer for @include and @load to make quotes optional. Done: @@ -27,24 +62,9 @@ Done: - Add shared library tests. +- Delete extension/xreadlink.[ch] -To do (not necessarily in this order): - -- 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. - -- Maybe add more shared library tests. - -- Figure out how to support xgawk on platforms such as Cygwin where a DLL - cannot be linked with unresolved references. There are currently 3 - possible solutions: - 1. Restructure gawk as a stub calling into a shared library. - 2. Move a subset of gawk interfaces into a shared library that can be - called by extensions. - 3. Change the interface between gawk and extensions so that gawk will - pass a pointer to a structure into dlload that contains the addresses - of all variables and functions to which the extension may need access. +- Add a -i (--include) option. - Enable default ".awk" search in io.c:find_source(). The simple change is to add this code inline in io.c: @@ -52,6 +72,28 @@ To do (not necessarily in this order): #define DEFAULT_FILETYPE ".awk" #endif +- The -f flag should not eliminate duplicates. + +- Eliminate libtool from the top-level configure.ac. Create a separate + configure.ac in the extensions subdirectory, and hide all the libtool + stuff in there. + +- Running "make install" should install gawkapi.h in /usr/include. + +- Add time extension to the gawk distro. This defines sleep and gettimeofday. + Renamed existing gettimeofday to getlocaltime. + +- Finish implementing new interface using gawkapi.h + - api_get_curfunc_param not honoring requested type in node_to_awk_value + - should api_sym_lookup also accept a type request? + - must update the API do_lint value when changed by set_LINT + - what is the proper return value for load_ext? It does not matter + unless called by the "extension" function that nobody uses. + +- Hide private parts of IOBUF from extensions. + +- Fix extension/rwarray.c. + - Fix lint complaints about shared library functions being called without having been defined. For example, try: gawk --lint -lordchr 'BEGIN {print chr(65)}' @@ -62,10 +104,12 @@ To do (not necessarily in this order): defined but not used. So there should probably be an enhancement to func_use and ftable to indicate if it's a shared library function. -- Develop a libgawk shared library for use by extensions. In particular, - a few existing extensions use a hash API for mapping string handles to - structures. In xgawk, we had this API inside array.c, but it probably - belongs in a separate libgawk shared library: +- Develop a libgawk shared library for use by extensions. Should this + be hosted in a separate project? + + A few existing extensions use a hash API for mapping string + handles to structures. In xgawk, we had this API inside array.c, but it + probably belongs in a separate libgawk shared library: typedef struct _strhash strhash; extern strhash *strhash_create P((size_t min_table_size)); @@ -81,54 +125,22 @@ To do (not necessarily in this order): strhash_delete_func, void *opaque)); extern void strhash_destroy P((strhash *, strhash_delete_func, void *opaque)); -- Running "make install" should install the new libgawk shared library - as well as header files needed to build extensions under /usr/include/gawk. - The extensions include "awk.h", and that pulls in the following headers - (according to gcc -M) : - awk.h config.h custom.h gettext.h mbsupport.h protos.h getopt.h \ - regex.h dfa.h - Most likely, most of this is not required. Arnold has suggested - creating a smaller header to define the public interface for use by shared - libraries. One could imagine having "awk-ext.h" that is included by "awk.h". +- Separate projects for major standalone extensions. We need to set up + hosting for these projects: + - XML -Separate projects for major standalone extensions. Where should these -be hosted? - -- Time. This defines sleep and gettimeofday. This one is quite trivial, - and I propose that it be included in the mainline gawk distro. - -- XML - -- PostgreSQL - -- GD - -- MPFR. Is this still useful if MPFR support will be integrated into gawk? - - -Possible changes requiring (further) discussion: - -- Change from dlopen to using the libltdl library (i.e. lt_dlopen). - This may support more platforms. + - PostgreSQL -- 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. - - Extension libraries install functions and global variables with names - that have a "." in them: XML.parse(), XML.name, whatever. - - Awk code can read/write such variables and call such functions, but they - cannot define such functions - function XML.foo() { .. } # error - or create a variable with such a name if it doesn't exist. This would - be a run-time error, not a parse-time error. - - This last rule may be too restrictive. - I don't want to get into fancy rules a la perl and file-scope visibility - etc, I'd like to keep things simple. But how we design this is going - to be very important. + - GD -- Include a sample rpm spec file in a new packaging subdirectory. + - MPFR. This is probably not useful now that MPFR support has been + integrated into gawk. Are there any users who need this extension? -- Patch lexer for @include and @load to make quotes optional. +- Review open hook implementation. + * Mostly done. + * Still to go: Rework iop_alloc, interaction with open hooks, and + skipping command line directories. -- Add a -i (--include) option. +- Attempting to load the same file with -f and -i (or @include) should + be a fatal error. |