Fix regression in argument collection, from 2008-01-21.
[m4/ericb.git] / TODO
blobf138dd26cc09d16af6e09e9d3387a6b0441976ce
1 GNU m4 TODO - Tasks that need implementing.             -*- outline -*-
2 Copyright (C) 2000, 2001, 2006, 2007, 2008 Free Software Foundation, Inc.
4 Tell the maintainers at <bug-m4@gnu.org> if you feel like volunteering
5 for any of these ideas or if you have others to add.
7 * KNOWN BUGS
9   + The following patch needs to be ported from the branch:
10     http://lists.gnu.org/archive/html/m4-patches/2007-03/msg00005.html
11     May be a couple of issues in that thread.
13   + The format builtin needs more power to be like printf(1):
14     http://lists.gnu.org/archive/html/m4-discuss/2007-05/msg00015.html
15     But be aware of compatibility issues in making too many changes.
17   + The test case `other-tests/stackovf.test' does not work.
19   + stack overflow is basically broken
21     The routines to detect stack overflow throuh segv  are basically
22     broken. The idea may be fine, but it ends up calling a sigv handler
23     that uses gettext, printf, stdout... all of which are definitely NOT
24     sig-safe.  Pity, because the hardcode routine is basically very careful
25     to use write(2), to avoid this.
27     I haven't checked that translation magic is signal-safe.
28     - I doubt it;
29     - stdio is not signal-safe in any kind of portable setting anyways.
30     --
31     Marc Espie
32     espie@schutzenberger.liafa.jussieu.fr
35 * FEATURES OR PROBLEMS
37   + m4 should keep an ``execution stack'' of macros, which applications could
38     use in their error messages.
40   + Implement discarding comment delimiters with the syntax table.
42   + Implement qindir.  Like indir, except that the result of the macro call
43     is not expanded.  Because the input stack might contain a file or a
44     string, it is probably best achieved by making note that the TOS input
45     should be copied rather than rescanned.
47       $ echo "a'b" > f
48       $ m4
49       define(a,z)dnl
50       include(f)dnl
51       z'b
52       indir(`include', f)dnl
53       z'b
54       qindir(`include', f)dnl
55       a'b
56       define(b,NONO)dnl
57       patsubst(qindir(`include', f), `b', x)
58       z'x
60   + Use the TOS input quoting for qindir to fix this undesirable POSIX
61     behavior:
63       define(`x', -'-)
64       define(y, defn(`x'))
65       y
66       --'
67     --
68     Stepan Kasal <kasal@ucw.cz>
70   + If configured --with-gmp for multiple precision arithmetic there are
71     some warnings, but it passes the tests.
73   + Make m4 show include dependencies like gcc so Makefile targets are
74     updated when their (included) input files are updated (Erick B).
76   + Add support for wide character sets.
79 * OPTIMIZATION AND CLEAN UP
81   + Have NULs go really undisturbed through GNU m4
82         GNU m4 is lousy regarding NULs in streams (this would require
83         maintaining the string lengths, and avoiding strlen, strcpy,
84         etc.).  (Almost there, once argv_ref is ported).
86   + The argument count limits are handled for all tokens passed around by
87     the internals:  we should enable attaching these values to text macros
88     too.
90   + The context parameter is just a placeholder for formerly global state.
91     We should be making the library reentrant so that multiple instances
92     of m4 can be run in the same process at the same time.
94   + The path management stuff (in path.c/m4private.h) is reinventing the
95     wheel.  There are a bunch of fast path management and search functions
96     in ltdl.c:  These need to be sanitized, exported through ltdl.h, and
97     then wrapped by the m4module.h path api.  path.c can probably be removed
98     entirely at that point.
100 * MODULE SPECIFIC ISSUES
102   + Some way of linking a module statically is needed, for systems
103     without support for dynamic loading.
105   + Some sort of module interface versioning system needs to be implemented
106     in the module loader and the freezer so that m4 can tell if it is being
107     asked to load a frozen file that requires versions of modules with
108     interface versions unsupported by the current release.
110   + The module API should probably use functions, not data exports:
111     http://lists.gnu.org/archive/html/m4-patches/2007-09/msg00012.html
112     Actually, there are several good ideas for module in that thread.
114   + Setting of the module search path within m4 scripts:
116         append(__modulepath__, `/some/modules/live/here')
118   + Module autoloader.  This would allow an m4 core with no builtins except
119     for loadmodule().  A default startup script would mark the recognised
120     set of builtins for autoload from the installed module directory on first
121     use.  A new cli parameter would inhibit initialisation from this script,
122     so that customised m4 interpreters could be built on the fly!
124   + The module loader needs to differentiate between modules that are in
125     memory and modules that are loaded (i.e. visible) from various context
126     structures.
128   + The perl module should only be built if a suitable perl interpreter
129     is found on the build machine.  For that matter, it has been a
130     while since the perl module has even been built, and perl has had
131     new releases in the meantime.
133 * OTHER TOOLS
135   + Copy coreutils' idea of using rsync, not wget, for grabbing .po
136     files efficiently.
138   + Use gnulib's build-aux/git-version-gen for reliable version
139     numbers, now that CVS timestamps are no longer available.