* Makefile.am (dist_pkgdata_DATA): Distribute recently-added
[m4.git] / TODO
blob01026ee958d62a051d618a8e06289f492cd286f5
1 GNU m4 TODO - Tasks that need implementing.             -*- outline -*-
2 Copyright (C) 2000, 2001, 2006 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   + m4wrap.1.test fail on Solaris 2.6 using egcs 1.1a compiler (Erick B).
11   + The test case `other-tests/stackovf.test' does not work.
13   + stack overflow is basically broken
15     The routines to detect stack overflow throuh segv  are basically
16     broken. The idea may be fine, but it ends up calling a sigv handler
17     that uses gettext, printf, stdout... all of which are definitely NOT
18     sig-safe.  Pity, because the hardcode routine is basically very careful
19     to use write(2), to avoid this.
21     I haven't checked that translation magic is signal-safe.
22     - I doubt it;
23     - stdio is not signal-safe in any kind of portable setting anyways.
24     --
25     Marc Espie
26     espie@schutzenberger.liafa.jussieu.fr
29 * FEATURES OR PROBLEMS
31   + m4 should keep an ``execution stack'' of macros, which applications could
32     use in their error messages.
34   + Implement discarding comment delimiters with the syntax table.
36   + Implement qindir.  Like indir, except that the result of the macro call
37     is not expanded.  Because the input stack might contain a file or a
38     string, it is probably best achieved by making note that the TOS input
39     should be copied rather than rescanned.
41       $ echo "a'b" > f
42       $ m4
43       define(a,z)dnl
44       include(f)dnl
45       z'b
46       indir(`include', f)dnl
47       z'b
48       qindir(`include', f)dnl
49       a'b
50       define(b,NONO)dnl
51       patsubst(qindir(`include', f), `b', x)
52       z'x
54   + Use the TOS input quoting for qindir to fix this bug:
56       define(`x', -'-)
57       define(y, defn(`x'))
58       y
59       --'
60     --
61     Stepan Kasal <kasal@ucw.cz>
63   + If configured --with-gmp for multiple precision arithmetic there are
64     some warnings, but it passes the tests.
66   + Make m4 show include dependencies like gcc so Makefile targets are
67     updated when their (included) input files are updated (Erick B).
69   + Sort out all the weird forms of interaction between changesyntax,
70     changecom and changequote.  What happens if you install a quote with
71     changequote and removes it with changesyntax and vice versa.
73   + Add support for wide character sets.
76 * OPTIMIZATION AND CLEAN UP
78   + Have NULs go really undisturbed through GNU m4
79         GNU m4 is lousy regarding NULs in streams (this would require
80         maintaining the string lengths, and avoiding strlen, strcpy,
81         etc.).
83   + The argument count limits are handled for all tokens passed around by
84     the internals:  we should enable attaching these values to text macros
85     too.
87   + The context parameter is just a placeholder for formerly global state.
88     We should be making the library reentrant so that multiple instances
89     of m4 can be run in the same process at the same time.
91   + The path management stuff (in path.c/m4private.h) is reinventing the
92     wheel.  There are a bunch of fast path management and search functions
93     in ltdl.c:  These need to be sanitized, exported through ltdl.h, and
94     then wrapped by the m4module.h path api.  path.c can probably be removed
95     entirely at that point.
97 * MODULE SPECIFIC ISSUES
99   + Some way of linking a module statically is needed, for systems
100     without support for dynamic loading.
102   + Some sort of module interface versioning system needs to be implemented
103     in the module loader and the freezer so that m4 can tell if it is being
104     asked to load a frozen file that requires versions of modules with
105     interface versions unsupported by the current release.
107   + Setting of the module search path within m4 scripts:
109         append(__modulepath__, `/some/modules/live/here')
111   + Module autoloader.  This would allow an m4 core with no builtins except
112     for loadmodule().  A default startup script would mark the recognised
113     set of builtins for autoload from the installed module directory on first
114     use.  A new cli parameter would inhibit initialisation from this script,
115     so that customised m4 interpreters could be built on the fly!
117   + The module loader needs to differentiate between modules that are in
118     memory and modules that are loaded (i.e. visible) from various context
119     structures.
121   + The perl module should only be built if a suitable perl interpreter
122     is found on the build machine.
124 * OTHER TOOLS
126   + Automake 1.5 doesn't seem to like pkglibexec_LTLIBRARIES +=
127     See modules/Makefile.am.