maint: summarize highlights of 1.4.18 release
[m4/ericb.git] / TODO
blob9833f03406c8f77bb520f6ca1356305e1ca06aa6
1 GNU m4 TODO - Tasks that need implementing.      -*- outline -*-
2 Copyright (C) 2000-2001, 2006-2008, 2010, 2013-2014, 2017 Free Software
3 Foundation, Inc.
5 Tell the maintainers at <bug-m4@gnu.org> if you feel like volunteering
6 for any of these ideas or if you have others to add.
8 * KNOWN BUGS
10   + The following patch needs to be ported from the branch:
11     http://lists.gnu.org/archive/html/m4-patches/2007-03/msg00005.html
12     May be a couple of issues in that thread.
14   + The format builtin needs more power to be like printf(1):
15     http://lists.gnu.org/archive/html/m4-discuss/2007-05/msg00015.html
16     But be aware of compatibility issues in making too many changes.
18   + The test case `other-tests/stackovf.test' does not work.
20   + stack overflow is basically broken
22     The routines to detect stack overflow throuh segv  are basically
23     broken. The idea may be fine, but it ends up calling a sigv handler
24     that uses gettext, printf, stdout... all of which are definitely NOT
25     sig-safe.  Pity, because the hardcode routine is basically very careful
26     to use write(2), to avoid this.
28     I haven't checked that translation magic is signal-safe.
29     - I doubt it;
30     - stdio is not signal-safe in any kind of portable setting anyways.
31     --
32     Marc Espie
33     espie@schutzenberger.liafa.jussieu.fr
35     Perhaps the gnulib c-stack module or libsigsegv would be useful:
36     http://lists.gnu.org/archive/html/bug-gnu-utils/2008-01/msg00042.html
38 * FEATURES OR PROBLEMS
40   + m4 should keep an ``execution stack'' of macros, which applications could
41     use in their error messages.
43   + Implement discarding comment delimiters with the syntax table.
45   + Implement qindir.  Like indir, except that the result of the macro call
46     is not expanded.  Because the input stack might contain a file or a
47     string, it is probably best achieved by making note that the TOS input
48     should be copied rather than rescanned.
50       $ echo "a'b" > f
51       $ m4
52       define(a,z)dnl
53       include(f)dnl
54       z'b
55       indir(`include', f)dnl
56       z'b
57       qindir(`include', f)dnl
58       a'b
59       define(b,NONO)dnl
60       patsubst(qindir(`include', f), `b', x)
61       z'x
63   + Use the TOS input quoting for qindir to fix this undesirable POSIX
64     behavior:
66       define(`x', -'-)
67       define(y, defn(`x'))
68       y
69       --'
70     --
71     Stepan Kasal <kasal@ucw.cz>
73   + If configured --with-gmp for multiple precision arithmetic there are
74     some warnings, but it passes the tests.
76   + Make m4 show include dependencies like gcc so Makefile targets are
77     updated when their (included) input files are updated (Erick B).
79   + Add support for wide character sets.
82 * OPTIMIZATION AND CLEAN UP
84   + Have NULs go really undisturbed through GNU m4
85         GNU m4 is lousy regarding NULs in streams (this would require
86         maintaining the string lengths, and avoiding strlen, strcpy,
87         etc.).  (Almost there, once argv_ref is ported).
89   + The argument count limits are handled for all tokens passed around by
90     the internals:  we should enable attaching these values to text macros
91     too.
93   + The context parameter is just a placeholder for formerly global state.
94     We should be making the library reentrant so that multiple instances
95     of m4 can be run in the same process at the same time.
97   + The path management stuff (in path.c/m4private.h) is reinventing the
98     wheel.  There are a bunch of fast path management and search functions
99     in ltdl.c:  These need to be sanitized, exported through ltdl.h, and
100     then wrapped by the m4module.h path api.  path.c can probably be removed
101     entirely at that point.
103 * MODULE SPECIFIC ISSUES
105   + Some way of linking a module statically is needed, for systems
106     without support for dynamic loading.
108   + Some sort of module interface versioning system needs to be implemented
109     in the module loader and the freezer so that m4 can tell if it is being
110     asked to load a frozen file that requires versions of modules with
111     interface versions unsupported by the current release.
113   + The module API should probably use functions, not data exports:
114     http://lists.gnu.org/archive/html/m4-patches/2007-09/msg00012.html
115     Actually, there are several good ideas for module in that thread.
117   + Setting of the module search path within m4 scripts:
119         append(__modulepath__, `/some/modules/live/here')
121   + Module autoloader.  This would allow an m4 core with no builtins except
122     for loadmodule().  A default startup script would mark the recognised
123     set of builtins for autoload from the installed module directory on first
124     use.  A new cli parameter would inhibit initialisation from this script,
125     so that customised m4 interpreters could be built on the fly!
127   + The module loader needs to differentiate between modules that are in
128     memory and modules that are loaded (i.e. visible) from various context
129     structures.
131   + The perl module should only be built if a suitable perl interpreter
132     is found on the build machine.  For that matter, it has been a
133     while since the perl module has even been built, and perl has had
134     new releases in the meantime.
137 Local Variables:
138 mode: outline
139 outline-regexp: " *[-+*.] \\|\f"
140 End:
142 Copyright (C) 2000, 2006, 2007, 2009, 2010 Free Software Foundation,
143 Inc.
145 Permission is granted to copy, distribute and/or modify this document
146 under the terms of the GNU Free Documentation License, Version 1.3 or
147 any later version published by the Free Software Foundation; with no
148 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
149 Texts.  A copy of the license is included in the ``GNU Free
150 Documentation License'' file as part of this distribution.