summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@raspberryginger.com>2000-02-17 03:07:03 +0000
committerEric Blake <ebb9@byu.net>2007-10-05 14:34:46 -0600
commitcadf688c09928f593ce0bfa93c15afd7226c26ec (patch)
treec8cb1d9c7534fb12b6fd161388588b7a45216a61
parentccc53c7089eed5d7bed91f4da57d062b6064f578 (diff)
downloadm4-1.4f.tar.gz
Import of m4-1.4fm4-1.4f
-rw-r--r--AUTHORS6
-rw-r--r--ChangeLog46
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in2
-rw-r--r--NEWS28
-rw-r--r--README4
-rw-r--r--THANKS4
-rw-r--r--acconfig.h3
-rw-r--r--aclocal.m412
-rw-r--r--checks/01.define2
-rw-r--r--checks/02.arguments5
-rw-r--r--checks/02.define13
-rw-r--r--checks/03.arguments8
-rw-r--r--checks/04.arguments10
-rw-r--r--checks/05.arguments8
-rw-r--r--checks/06.arguments5
-rw-r--r--checks/06.pseudo_argu9
-rw-r--r--checks/07.pseudo_argu12
-rw-r--r--checks/08.pseudo_argu4
-rw-r--r--checks/09.pseudo_argu14
-rw-r--r--checks/10.pseudo_argu14
-rw-r--r--checks/11.pseudo_argu5
-rw-r--r--checks/12.undefine (renamed from checks/11.undefine)2
-rw-r--r--checks/13.defn (renamed from checks/12.defn)2
-rw-r--r--checks/14.defn9
-rw-r--r--checks/15.pushdef (renamed from checks/13.pushdef)2
-rw-r--r--checks/16.pushdef (renamed from checks/14.pushdef)2
-rw-r--r--checks/17.ifelse9
-rw-r--r--checks/17.indir (renamed from checks/15.indir)2
-rw-r--r--checks/18.ifdef (renamed from checks/16.ifdef)2
-rw-r--r--checks/19.ifelse9
-rw-r--r--checks/20.ifelse (renamed from checks/18.ifelse)2
-rw-r--r--checks/21.loops (renamed from checks/19.loops)4
-rw-r--r--checks/22.loops (renamed from checks/20.loops)2
-rw-r--r--checks/23.dumpdef (renamed from checks/21.dumpdef)2
-rw-r--r--checks/24.changequote7
-rw-r--r--checks/24.trace (renamed from checks/22.trace)2
-rw-r--r--checks/25.dnl (renamed from checks/23.dnl)0
-rw-r--r--checks/26.changequote10
-rw-r--r--checks/27.changequote (renamed from checks/25.changequote)0
-rw-r--r--checks/28.changequote9
-rw-r--r--checks/29.changecom (renamed from checks/27.changecom)0
-rw-r--r--checks/30.changecom (renamed from checks/28.changecom)0
-rw-r--r--checks/30.include6
-rw-r--r--checks/31.changesynta11
-rw-r--r--checks/32.changesynta11
-rw-r--r--checks/33.changesynta9
-rw-r--r--checks/34.changesynta9
-rw-r--r--checks/35.changesynta15
-rw-r--r--checks/36.changesynta5
-rw-r--r--checks/37.changesynta13
-rw-r--r--checks/38.m4wrap (renamed from checks/29.m4wrap)2
-rw-r--r--checks/39.include6
-rw-r--r--checks/40.include (renamed from checks/31.include)2
-rw-r--r--checks/41.include (renamed from checks/32.include)2
-rw-r--r--checks/42.divert (renamed from checks/33.divert)2
-rw-r--r--checks/43.divert (renamed from checks/34.divert)2
-rw-r--r--checks/44.undivert (renamed from checks/35.undivert)2
-rw-r--r--checks/45.undivert (renamed from checks/36.undivert)2
-rw-r--r--checks/46.undivert (renamed from checks/37.undivert)2
-rw-r--r--checks/47.divnum (renamed from checks/38.divnum)2
-rw-r--r--checks/48.cleardiv (renamed from checks/39.cleardiv)2
-rw-r--r--checks/49.cleardiv (renamed from checks/40.cleardiv)2
-rw-r--r--checks/50.len (renamed from checks/41.len)2
-rw-r--r--checks/51.index (renamed from checks/42.index)2
-rw-r--r--checks/52.regexp (renamed from checks/43.regexp)2
-rw-r--r--checks/53.regexp (renamed from checks/44.regexp)2
-rw-r--r--checks/54.substr (renamed from checks/45.substr)2
-rw-r--r--checks/55.translit (renamed from checks/46.translit)2
-rw-r--r--checks/56.errprint5
-rw-r--r--checks/56.patsubst (renamed from checks/47.patsubst)2
-rw-r--r--checks/57.patsubst (renamed from checks/48.patsubst)2
-rw-r--r--checks/58.format (renamed from checks/49.format)2
-rw-r--r--checks/59.incr (renamed from checks/50.incr)2
-rw-r--r--checks/60.eval (renamed from checks/51.eval)4
-rw-r--r--checks/61.eval (renamed from checks/52.eval)2
-rw-r--r--checks/62.esyscmd (renamed from checks/53.esyscmd)2
-rw-r--r--checks/63.sysval (renamed from checks/54.sysval)2
-rw-r--r--checks/64.errprint (renamed from checks/55.errprint)2
-rw-r--r--checks/65.errprint5
-rw-r--r--checks/66.m4exit (renamed from checks/57.m4exit)4
-rw-r--r--checks/Makefile.am24
-rw-r--r--checks/Makefile.in23
-rwxr-xr-xchecks/get-them2
-rw-r--r--config.h.in6
-rwxr-xr-xconfigure490
-rw-r--r--configure.in40
-rw-r--r--doc/m4.info159
-rw-r--r--doc/m4.info-1264
-rw-r--r--doc/m4.info-2460
-rw-r--r--doc/m4.info-3212
-rw-r--r--doc/m4.texinfo707
-rw-r--r--doc/stamp-vti6
-rw-r--r--doc/version.texi6
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/Makefile.in2
-rw-r--r--examples/iso8859.m4bin0 -> 1146 bytes
-rw-r--r--gettext.m4384
-rw-r--r--po/cat-id-tbl.c62
-rw-r--r--po/de.gmobin12496 -> 12340 bytes
-rw-r--r--po/de.po106
-rw-r--r--po/fr.gmobin12645 -> 12506 bytes
-rw-r--r--po/fr.po102
-rw-r--r--po/it.gmobin6243 -> 6118 bytes
-rw-r--r--po/it.po102
-rw-r--r--po/ja.gmobin13592 -> 13443 bytes
-rw-r--r--po/ja.po102
-rw-r--r--po/m4.pot95
-rw-r--r--po/nl.gmobin12351 -> 12219 bytes
-rw-r--r--po/nl.po102
-rw-r--r--po/ru.gmobin12173 -> 12035 bytes
-rw-r--r--po/ru.po102
-rw-r--r--po/sv.gmobin356 -> 356 bytes
-rw-r--r--po/sv.po110
-rw-r--r--src/Makefile.am4
-rw-r--r--src/Makefile.in13
-rw-r--r--src/builtin.c212
-rw-r--r--src/debug.c4
-rw-r--r--src/eval.c132
-rw-r--r--src/input.c745
-rw-r--r--src/m4.c2
-rw-r--r--src/m4.h78
-rw-r--r--src/macro.c14
-rw-r--r--src/numb.c418
-rw-r--r--src/numb.h156
-rw-r--r--src/path.c2
126 files changed, 4278 insertions, 1618 deletions
diff --git a/AUTHORS b/AUTHORS
index 93f8e657..e3a4be5c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -18,3 +18,9 @@ Added: stackovf.c tests/stackovf_test.sh
M4 Pete Chown (UK, 1972) 6/28/94
Assigns changes to M4 (builtin.c, input.c, m4.h, m4.texinfo, macro.c).
+M4 John Gerard Makecki US,1954 4/24/95
+Assigns changes. (m4.c,eval.c, builtin.c,m4.h; new- numb.h,mumb.c)
+johnm@vlibs.com
+
+M4 VLSI Libraries Inc. 4/24/95
+Disclaims changes by John Gerard Makecki.
diff --git a/ChangeLog b/ChangeLog
index f8e956dc..6175db70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+1998-08-10 Rene' Seindal <rene@seindal.dk>
+
+ * Prerelease 1.4f
+
+ * doc/m4.texinfo (Changesyntax): Added documentation for the macro
+ "changesyntax".
+
+ * src/builtin.c (m4_changesyntax): Added builtin macro
+ "changesyntax" to modify the syntax table.
+
+ * src/input.c, src/m4.h, src/macro.c: Implemented an input syntax
+ table. All categories are assigned a syntax code and tokens are
+ read according to this table.
+
+1998-08-09 Rene' Seindal <rene@seindal.dk>
+
+ * src/numb.{c,h}: New files, implements multiple precision eval
+ using GNU gmp. Originally submitted by John Gerard Makecki
+ (johnm@vlibs.com), later modified. Tested with GNU gmp 2.0.2.
+
+ * doc/m4.texinfo (Eval): Added documentation for multiple
+ precision arithmetic library support.
+
+ * src/m4.{c,h}, src/eval.c, src/builtin.c, configure.in: Changes
+ to accommodate multiple precision eval.
+
+1998-08-07 Rene' Seindal <rene@seindal.dk>
+
+ * src/input.c (MATCH, match_input), src/m4.h: changed definition
+ of comment and quote strings to `unsigned int' to allow eight bit
+ chars (reported by andrewb@zip.com.au (Andrew Bettison)).
+
+ * src/builtin.c, doc/m4.texinfo: Builtin `syncoutput' added by
+ patch from Mike Howard <mike@clove.com>
+
+1998-08-06 Rene' Seindal <rene@seindal.dk>
+
+ * gettext.m4: corrected AM_WITH_NLS to handle use of installed
+ -lintl.
+
1998-08-03 Rene' Seindal <rene@seindal.dk>
* Prerelease 1.4e
@@ -5,11 +45,11 @@
* src/m4.h: Added ifdef ENABLE_NLS around include of <libintl.h>
and _ macro. M4 now builds with --disable-nls.
- * src/m4.c (main): reintroduced textdomain(PAKCAGE) to get gettext
+ * src/m4.c (main): reintroduced textdomain(PACKAGE) to get gettext
to look for right message catalogs. Call indef'ed by ENABLE_NLS.
- * configure.in (ALL_LINGUAS): Added complete list of
- translations: de fr it ja nl ru sv.
+ * configure.in (ALL_LINGUAS): Added complete list of translations:
+ de fr it ja nl ru sv.
1998-05-22 Erick Branderhorst <Erick.Branderhorst@asml.nl>
diff --git a/Makefile.am b/Makefile.am
index df568f39..68d1a667 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
SUBDIRS=intl po doc lib src checks examples
-EXTRA_DIST = c-boxes.el # Franc,ois, is this still needed? (EB)
+EXTRA_DIST = gettext.m4 c-boxes.el # Franc,ois, is this still needed? (EB)
diff --git a/Makefile.in b/Makefile.in
index 2e6bae64..59e6733c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,7 +89,7 @@ l = @l@
SUBDIRS=intl po doc lib src checks examples
-EXTRA_DIST = c-boxes.el # Franc,ois, is this still needed? (EB)
+EXTRA_DIST = gettext.m4 c-boxes.el # Franc,ois, is this still needed? (EB)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
diff --git a/NEWS b/NEWS
index 6c0b304e..6d229276 100644
--- a/NEWS
+++ b/NEWS
@@ -1,16 +1,38 @@
GNU m4 NEWS - History of user-visible changes. -*-indented-text-*-
-Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
+
+Version 1.5 - August 1998, Erick Branderhorst and Rene' Seindal
-Version 1.5 - ?? 1998, by ?? (Erick Branderhorst, Rene' Seindal)
* GNU m4 now uses gettext to support internationalization.
+
* GNU m4 now uses automake to control Makefile.in generation. This
should make it more consistent with the GNU standards.
+* GNU m4 will use the gmp library for multiple precision integral and
+ rational arithmetic in `eval' if configured with `--with-gmp'. If
+ configured without `--with-gmp' or if gmp is not available, and the type
+ `long long int' is, GNU m4 will use that for `eval' arithmetic.
+
+* GNU m4 now parses the input according to a syntax table, that can be
+ modified through the new builtin `changesyntax'. It is a generalisation
+ of the existing builtins `changecom' and `changequote'. The changes are
+ completely backwards compatible (except for the existence of
+ `changesyntax').
+
+* Sync lines can be turned on and off with the `syncoutput' builtin. The
+ builtin `syncoutput' is a GNU extension.
+
* Implement a GNU message catalog for French (Franc,ois Pinard).
+
+Bugs fixed in 1.5
+
+* All 8-bit characters can now be used for quotes.
+
Version 1.4 - October 1994, by Franc,ois Pinard
(No user visible changes)
+
Version 1.3 - September 1994, by Franc,ois Pinard
@@ -23,6 +45,7 @@ at all if all diversions taken altogether do not use more than 512K.
* Frozen state files may be produced with the `--freeze-state' (-F)
option and later brought back through the `--reload-state' (-R) option.
+
Version 1.2 - July 1994, by Franc,ois Pinard
@@ -50,6 +73,7 @@ configure time to get these things. Do *not* depend on them yet.
* Various bugs have been corrected, m4 should be more portable. See the
ChangeLog for details.
+
Version 1.1 - November 1993, by Franc,ois Pinard
diff --git a/README b/README
index c492c743..76ac7a0c 100644
--- a/README
+++ b/README
@@ -26,6 +26,10 @@ By using `./configure --enable-changeword', you get an experimental
feature which allows for changing the syntax of what is a "word" in
`m4'. This might go away, so don't count on it yet.
+By using `./configure --with-gmp, you get an multiple precision integral
+and rational arithmetic in eval. The implementation depends on GNU gmp
+v2. This might go away, so don't count on it yet.
+
Send bug reports to `bug-gnu-utils@prep.ai.mit.edu'. A bug report is
an adequate description of the problem: your input, what you expected,
what you got, and why this is wrong. Diffs are welcome, but they only
diff --git a/THANKS b/THANKS
index d5e4a905..9eca8012 100644
--- a/THANKS
+++ b/THANKS
@@ -11,6 +11,7 @@ Alexander Lehmann alex@hal.rhein-main.de
Amos Shapira amoss@cs.huji.ac.il
Andreas Gustafsson gson@niksula.hut.fi
Andreas Schwab schwab@ls5.informatik.uni-dortmund.de
+Andrew Bettison andrewb@zip.com.au
Assar Westerlund assar@nada.kth.se
Ben A. Mesander ben@piglet.cr.usgs.gov
Bengt Mertensson bengt@mathematik.uni-bremen.de
@@ -44,6 +45,7 @@ Mark Seiden mis@seiden.com
Matthias Rabe rabe@mathematik.uni-bielefeld.de
Michael Fetterman mafetter@ichips.intel.com
Michael L. Welcome welcome@bigbird.llnl.gov
+Mike Howard mike@clove.com
Mike Lijewski lijewski@theory.tc.cornell.edu
Nick S. Kanakakorn skanan@otl.scu.edu
Nicolas Pioch pioch@inf.enst.fr
@@ -52,7 +54,7 @@ Pete Chown pete.chown@dale.dircon.co.uk
Pierre Gaumond gaumondp@ere.umontreal.ca
Pierre Mathieu mathieu@geod.emr.ca
Robert Bernstein rocky@panix.com
-Rene' Seindal seindal@diku.dk
+Rene' Seindal rene@seindal.dk
Richard Stallman rms@gnu.ai.mit.edu
Roland H. Pesch roland@wrs.com
Roland McGrath roland@gnu.ai.mit.edu
diff --git a/acconfig.h b/acconfig.h
index 190db4f2..efc4649d 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -59,6 +59,9 @@
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
+/* Define to the sizeof(long long int) if supported */
+#undef SIZEOF_LONG_LONG_INT
+
/* Path to directory containing system wide message catalog sources. */
#undef STD_INC_PATH
diff --git a/aclocal.m4 b/aclocal.m4
index f290c750..c0651f72 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -270,6 +270,8 @@ fi], [AC_MSG_RESULT(no)])
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
+# Modified for GNU m4 by René Seindal (rene@seindal.dk)
+
# serial 5
AC_DEFUN(AM_WITH_NLS,
@@ -310,12 +312,10 @@ AC_DEFUN(AM_WITH_NLS,
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_CHECK_LIB(intl, gettext,
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)],
- gt_cv_func_gettext_libintl=no)])
+ [AC_CHECK_LIB(intl, gettext,
+ [LIBS="$LIBS -lintl"
+ gt_cv_func_gettext_libintl=yes],
+ [gt_cv_func_gettext_libintl=no])])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
diff --git a/checks/01.define b/checks/01.define
index 823c2087..7645704f 100644
--- a/checks/01.define
+++ b/checks/01.define
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:937: Origin of test
+dnl ../doc/m4.texinfo:885: Origin of test
define(`foo', `Hello world.')
dnl @result{}
foo
diff --git a/checks/02.arguments b/checks/02.arguments
deleted file mode 100644
index d605ffe7..00000000
--- a/checks/02.arguments
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:961: Origin of test
-define(`exch', `$2, $1')
-dnl @result{}
-exch(arg1, arg2)
-dnl @result{}arg2, arg1
diff --git a/checks/02.define b/checks/02.define
new file mode 100644
index 00000000..de8bc66d
--- /dev/null
+++ b/checks/02.define
@@ -0,0 +1,13 @@
+dnl ../doc/m4.texinfo:905: Origin of test
+define(`array', `defn(format(``array[%d]'', `$1'))')
+dnl @result{}
+define(`array_set', `define(format(``array[%d]'', `$1'), `$2')')
+dnl @result{}
+array_set(4, `array element no. 4')
+dnl @result{}
+array_set(17, `array element no. 17')
+dnl @result{}
+array(4)
+dnl @result{}array element no. 4
+array(eval(10+7))
+dnl @result{}array element no. 17
diff --git a/checks/03.arguments b/checks/03.arguments
index f29aa4da..47360463 100644
--- a/checks/03.arguments
+++ b/checks/03.arguments
@@ -1,7 +1,5 @@
-dnl ../doc/m4.texinfo:971: Origin of test
+dnl ../doc/m4.texinfo:934: Origin of test
define(`exch', `$2, $1')
dnl @result{}
-define(exch(``expansion text'', ``macro''))
-dnl @result{}
-macro
-dnl @result{}expansion text
+exch(arg1, arg2)
+dnl @result{}arg2, arg1
diff --git a/checks/04.arguments b/checks/04.arguments
index 324c1668..4cbfbca8 100644
--- a/checks/04.arguments
+++ b/checks/04.arguments
@@ -1,5 +1,7 @@
-dnl ../doc/m4.texinfo:991: Origin of test
-define(`test', ``Macro name: $0'')
+dnl ../doc/m4.texinfo:944: Origin of test
+define(`exch', `$2, $1')
dnl @result{}
-test
-dnl @result{}Macro name: test
+define(exch(``expansion text'', ``macro''))
+dnl @result{}
+macro
+dnl @result{}expansion text
diff --git a/checks/05.arguments b/checks/05.arguments
index b0fba85c..2a9ac33f 100644
--- a/checks/05.arguments
+++ b/checks/05.arguments
@@ -1,5 +1,5 @@
-dnl ../doc/m4.texinfo:1001: Origin of test
-define(`foo', `This is macro `foo'.')
+dnl ../doc/m4.texinfo:964: Origin of test
+define(`test', ``Macro name: $0'')
dnl @result{}
-foo
-dnl @result{}This is macro foo.
+test
+dnl @result{}Macro name: test
diff --git a/checks/06.arguments b/checks/06.arguments
new file mode 100644
index 00000000..b866e6c9
--- /dev/null
+++ b/checks/06.arguments
@@ -0,0 +1,5 @@
+dnl ../doc/m4.texinfo:974: Origin of test
+define(`foo', `This is macro `foo'.')
+dnl @result{}
+foo
+dnl @result{}This is macro foo.
diff --git a/checks/06.pseudo_argu b/checks/06.pseudo_argu
deleted file mode 100644
index cd6b6ea3..00000000
--- a/checks/06.pseudo_argu
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1025: Origin of test
-define(`nargs', `$#')
-dnl @result{}
-nargs
-dnl @result{}0
-nargs()
-dnl @result{}1
-nargs(arg1, arg2, arg3)
-dnl @result{}3
diff --git a/checks/07.pseudo_argu b/checks/07.pseudo_argu
index 557b01ac..d03159ca 100644
--- a/checks/07.pseudo_argu
+++ b/checks/07.pseudo_argu
@@ -1,5 +1,9 @@
-dnl ../doc/m4.texinfo:1039: Origin of test
-define(`echo', `$*')
+dnl ../doc/m4.texinfo:998: Origin of test
+define(`nargs', `$#')
dnl @result{}
-echo(arg1, arg2, arg3 , arg4)
-dnl @result{}arg1,arg2,arg3 ,arg4
+nargs
+dnl @result{}0
+nargs()
+dnl @result{}1
+nargs(arg1, arg2, arg3)
+dnl @result{}3
diff --git a/checks/08.pseudo_argu b/checks/08.pseudo_argu
index c887d610..bbc26f5d 100644
--- a/checks/08.pseudo_argu
+++ b/checks/08.pseudo_argu
@@ -1,5 +1,5 @@
-dnl ../doc/m4.texinfo:1050: Origin of test
-define(`echo', `$@')
+dnl ../doc/m4.texinfo:1012: Origin of test
+define(`echo', `$*')
dnl @result{}
echo(arg1, arg2, arg3 , arg4)
dnl @result{}arg1,arg2,arg3 ,arg4
diff --git a/checks/09.pseudo_argu b/checks/09.pseudo_argu
index 566b2531..9fa15eba 100644
--- a/checks/09.pseudo_argu
+++ b/checks/09.pseudo_argu
@@ -1,11 +1,5 @@
-dnl ../doc/m4.texinfo:1060: Origin of test
-define(`echo1', `$*')
+dnl ../doc/m4.texinfo:1023: Origin of test
+define(`echo', `$@')
dnl @result{}
-define(`echo2', `$@')
-dnl @result{}
-define(`foo', `This is macro `foo'.')
-dnl @result{}
-echo1(foo)
-dnl @result{}This is macro This is macro foo..
-echo2(foo)
-dnl @result{}This is macro foo.
+echo(arg1, arg2, arg3 , arg4)
+dnl @result{}arg1,arg2,arg3 ,arg4
diff --git a/checks/10.pseudo_argu b/checks/10.pseudo_argu
index 1da4c30d..049af0a2 100644
--- a/checks/10.pseudo_argu
+++ b/checks/10.pseudo_argu
@@ -1,5 +1,11 @@
-dnl ../doc/m4.texinfo:1080: Origin of test
-define(`foo', `$$$ hello $$$')
+dnl ../doc/m4.texinfo:1033: Origin of test
+define(`echo1', `$*')
dnl @result{}
-foo
-dnl @result{}$$$ hello $$$
+define(`echo2', `$@')
+dnl @result{}
+define(`foo', `This is macro `foo'.')
+dnl @result{}
+echo1(foo)
+dnl @result{}This is macro This is macro foo..
+echo2(foo)
+dnl @result{}This is macro foo.
diff --git a/checks/11.pseudo_argu b/checks/11.pseudo_argu
new file mode 100644
index 00000000..dd46c979
--- /dev/null
+++ b/checks/11.pseudo_argu
@@ -0,0 +1,5 @@
+dnl ../doc/m4.texinfo:1053: Origin of test
+define(`foo', `$$$ hello $$$')
+dnl @result{}
+foo
+dnl @result{}$$$ hello $$$
diff --git a/checks/11.undefine b/checks/12.undefine
index 65daa4df..1f61131d 100644
--- a/checks/11.undefine
+++ b/checks/12.undefine
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1111: Origin of test
+dnl ../doc/m4.texinfo:1084: Origin of test
foo
dnl @result{}foo
define(`foo', `expansion text')
diff --git a/checks/12.defn b/checks/13.defn
index 8526c40b..1deb3f44 100644
--- a/checks/12.defn
+++ b/checks/13.defn
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1156: Origin of test
+dnl ../doc/m4.texinfo:1128: Origin of test
define(`zap', defn(`undefine'))
dnl @result{}
zap(`undefine')
diff --git a/checks/14.defn b/checks/14.defn
new file mode 100644
index 00000000..11ece953
--- /dev/null
+++ b/checks/14.defn
@@ -0,0 +1,9 @@
+dnl ../doc/m4.texinfo:1148: Origin of test
+define(`string', `The macro dnl is very useful
+')
+dnl @result{}
+string
+dnl @result{}The macro
+defn(`string')
+dnl @result{}The macro dnl is very useful
+dnl @result{}
diff --git a/checks/13.pushdef b/checks/15.pushdef
index e01a40c0..df2859af 100644
--- a/checks/13.pushdef
+++ b/checks/15.pushdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1202: Origin of test
+dnl ../doc/m4.texinfo:1192: Origin of test
define(`foo', `Expansion one.')
dnl @result{}
foo
diff --git a/checks/14.pushdef b/checks/16.pushdef
index 4158768c..48c0cec6 100644
--- a/checks/14.pushdef
+++ b/checks/16.pushdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1226: Origin of test
+dnl ../doc/m4.texinfo:1216: Origin of test
define(`foo', `Expansion one.')
dnl @result{}
foo
diff --git a/checks/17.ifelse b/checks/17.ifelse
deleted file mode 100644
index e763723d..00000000
--- a/checks/17.ifelse
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1379: Origin of test
-ifelse(foo, bar, `true')
-dnl @result{}
-ifelse(foo, foo, `true')
-dnl @result{}true
-ifelse(foo, bar, `true', `false')
-dnl @result{}false
-ifelse(foo, foo, `true', `false')
-dnl @result{}true
diff --git a/checks/15.indir b/checks/17.indir
index 19fe37db..d573a386 100644
--- a/checks/15.indir
+++ b/checks/17.indir
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1270: Origin of test
+dnl ../doc/m4.texinfo:1267: Origin of test
define(`$$internal$macro', `Internal macro (name `$0')')
dnl @result{}
$$internal$macro
diff --git a/checks/16.ifdef b/checks/18.ifdef
index 371723e3..40c355ca 100644
--- a/checks/16.ifdef
+++ b/checks/18.ifdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1341: Origin of test
+dnl ../doc/m4.texinfo:1338: Origin of test
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
dnl @result{}foo is not defined
define(`foo', `')
diff --git a/checks/19.ifelse b/checks/19.ifelse
new file mode 100644
index 00000000..0886f6db
--- /dev/null
+++ b/checks/19.ifelse
@@ -0,0 +1,9 @@
+dnl ../doc/m4.texinfo:1376: Origin of test
+ifelse(`foo', `bar', `true')
+dnl @result{}
+ifelse(`foo', `foo', `true')
+dnl @result{}true
+ifelse(`foo', `bar', `true', `false')
+dnl @result{}false
+ifelse(`foo', `foo', `true', `false')
+dnl @result{}true
diff --git a/checks/18.ifelse b/checks/20.ifelse
index 18d56760..aff53225 100644
--- a/checks/18.ifelse
+++ b/checks/20.ifelse
@@ -1,3 +1,3 @@
-dnl ../doc/m4.texinfo:1398: Origin of test
+dnl ../doc/m4.texinfo:1395: Origin of test
ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
dnl @result{}seventh
diff --git a/checks/19.loops b/checks/21.loops
index 3f22906c..2b0290b1 100644
--- a/checks/19.loops
+++ b/checks/21.loops
@@ -1,4 +1,6 @@
-dnl ../doc/m4.texinfo:1435: Origin of test
+dnl ../doc/m4.texinfo:1432: Origin of test
+shift
+dnl @result{}
shift(bar)
dnl @result{}
shift(foo, bar, baz)
diff --git a/checks/20.loops b/checks/22.loops
index b52aaea0..1ecdc076 100644
--- a/checks/20.loops
+++ b/checks/22.loops
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1445: Origin of test
+dnl ../doc/m4.texinfo:1444: Origin of test
define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
`reverse(shift($@)), `$1'')')
dnl @result{}
diff --git a/checks/21.dumpdef b/checks/23.dumpdef
index df0c0021..c65f6934 100644
--- a/checks/21.dumpdef
+++ b/checks/23.dumpdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1559: Origin of test
+dnl ../doc/m4.texinfo:1558: Origin of test
define(`foo', `Hello world.')
dnl @result{}
dumpdef(`foo')
diff --git a/checks/24.changequote b/checks/24.changequote
deleted file mode 100644
index a523f2e9..00000000
--- a/checks/24.changequote
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1793: Origin of test
-changequote([, ])
-dnl @result{}
-define([foo], [Macro [foo].])
-dnl @result{}
-foo
-dnl @result{}Macro foo.
diff --git a/checks/22.trace b/checks/24.trace
index 467f9690..491eef27 100644
--- a/checks/22.trace
+++ b/checks/24.trace
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1604: Origin of test
+dnl ../doc/m4.texinfo:1603: Origin of test
define(`foo', `Hello World.')
dnl @result{}
define(`echo', `$@')
diff --git a/checks/23.dnl b/checks/25.dnl
index ecdb9b24..ecdb9b24 100644
--- a/checks/23.dnl
+++ b/checks/25.dnl
diff --git a/checks/26.changequote b/checks/26.changequote
index ed067f50..a523f2e9 100644
--- a/checks/26.changequote
+++ b/checks/26.changequote
@@ -1,9 +1,7 @@
-dnl ../doc/m4.texinfo:1817: Origin of test
-define(`foo', `Macro `FOO'.')
+dnl ../doc/m4.texinfo:1793: Origin of test
+changequote([, ])
dnl @result{}
-changequote(, )
+define([foo], [Macro [foo].])
dnl @result{}
foo
-dnl @result{}Macro `FOO'.
-`foo'
-dnl @result{}`Macro `FOO'.'
+dnl @result{}Macro foo.
diff --git a/checks/25.changequote b/checks/27.changequote
index bd71cb96..bd71cb96 100644
--- a/checks/25.changequote
+++ b/checks/27.changequote
diff --git a/checks/28.changequote b/checks/28.changequote
new file mode 100644
index 00000000..ed067f50
--- /dev/null
+++ b/checks/28.changequote
@@ -0,0 +1,9 @@
+dnl ../doc/m4.texinfo:1817: Origin of test
+define(`foo', `Macro `FOO'.')
+dnl @result{}
+changequote(, )
+dnl @result{}
+foo
+dnl @result{}Macro `FOO'.
+`foo'
+dnl @result{}`Macro `FOO'.'
diff --git a/checks/27.changecom b/checks/29.changecom
index 7a1dfa60..7a1dfa60 100644
--- a/checks/27.changecom
+++ b/checks/29.changecom
diff --git a/checks/28.changecom b/checks/30.changecom
index fce2579c..fce2579c 100644
--- a/checks/28.changecom
+++ b/checks/30.changecom
diff --git a/checks/30.include b/checks/30.include
deleted file mode 100644
index 9a2052ea..00000000
--- a/checks/30.include
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:2076: Origin of test
-include(`no-such-file')
-dnl @result{}
-dnl @error{}30.include:2: m4: Cannot open no-such-file: No such file or directory
-sinclude(`no-such-file')
-dnl @result{}
diff --git a/checks/31.changesynta b/checks/31.changesynta
new file mode 100644
index 00000000..02f0ac23
--- /dev/null
+++ b/checks/31.changesynta
@@ -0,0 +1,11 @@
+dnl ../doc/m4.texinfo:2023: Origin of test
+define(`test.1', `TEST ONE')
+dnl @result{}
+__file__
+dnl @result{}31.changesynta
+changesyntax(`O_', `W.')
+dnl @result{}
+__file__
+dnl @result{}__file__
+test.1
+dnl @result{}TEST ONE
diff --git a/checks/32.changesynta b/checks/32.changesynta
new file mode 100644
index 00000000..8bd2f388
--- /dev/null
+++ b/checks/32.changesynta
@@ -0,0 +1,11 @@
+dnl ../doc/m4.texinfo:2039: Origin of test
+define(`test', `$#')
+dnl @result{}
+test(a, b, c)
+dnl @result{}3
+changesyntax(`(<', `,|', `)>', `O(,)')
+dnl @result{}
+test(a, b, c)
+dnl @result{}0(a, b, c)
+test<a|b|c>
+dnl @result{}3
diff --git a/checks/33.changesynta b/checks/33.changesynta
new file mode 100644
index 00000000..e4f76f71
--- /dev/null
+++ b/checks/33.changesynta
@@ -0,0 +1,9 @@
+dnl ../doc/m4.texinfo:2056: Origin of test
+define(`test', `$1$2$3')
+dnl @result{}
+test(a, b, c)
+dnl @result{}abc
+changesyntax(`O ')
+dnl @result{}
+test(a, b, c)
+dnl @result{}a b c
diff --git a/checks/34.changesynta b/checks/34.changesynta
new file mode 100644
index 00000000..7b430d69
--- /dev/null
+++ b/checks/34.changesynta
@@ -0,0 +1,9 @@
+dnl ../doc/m4.texinfo:2075: Origin of test
+define(`@', `TEST')
+dnl @result{}
+@
+dnl @result{}@
+changesyntax(`A@')
+dnl @result{}
+@
+dnl @result{}TEST
diff --git a/checks/35.changesynta b/checks/35.changesynta
new file mode 100644
index 00000000..d2ab2d3f
--- /dev/null
+++ b/checks/35.changesynta
@@ -0,0 +1,15 @@
+dnl ../doc/m4.texinfo:2099: Origin of test
+define(`test', `TEST')
+dnl @result{}
+changesyntax(`L<', `R>')
+dnl @result{}
+<test>
+dnl @result{}test
+`test>
+dnl @result{}test
+changequote(<[>, `]')
+dnl @result{}
+<test>
+dnl @result{}<TEST>
+[test]
+dnl @result{}test
diff --git a/checks/36.changesynta b/checks/36.changesynta
new file mode 100644
index 00000000..db3f46f2
--- /dev/null
+++ b/checks/36.changesynta
@@ -0,0 +1,5 @@
+dnl ../doc/m4.texinfo:2121: Origin of test
+changesyntax(`({<', `)}>', `,;:', `O(,)')
+dnl @result{}
+eval{2**4-1; 2 : 8>
+dnl @result{}00001111
diff --git a/checks/37.changesynta b/checks/37.changesynta
new file mode 100644
index 00000000..378d6d51
--- /dev/null
+++ b/checks/37.changesynta
@@ -0,0 +1,13 @@
+dnl ../doc/m4.texinfo:2132: Origin of test
+define(`test', `==$1==')
+dnl @result{}
+changequote(`<<', `>>')
+dnl @result{}
+changesyntax(<<L[>>, <<R]>>)
+dnl @result{}
+test(<<testing]>>)
+dnl @result{}==testing]==
+test([testing>>])
+dnl @result{}==testing>>==
+test([<<testing>>])
+dnl @result{}==<<testing>>==
diff --git a/checks/29.m4wrap b/checks/38.m4wrap
index 39d6682e..95fb12dd 100644
--- a/checks/29.m4wrap
+++ b/checks/38.m4wrap
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2017: Origin of test
+dnl ../doc/m4.texinfo:2293: Origin of test
define(`cleanup', `This is the `cleanup' actions.
')
dnl @result{}
diff --git a/checks/39.include b/checks/39.include
new file mode 100644
index 00000000..68cba854
--- /dev/null
+++ b/checks/39.include
@@ -0,0 +1,6 @@
+dnl ../doc/m4.texinfo:2352: Origin of test
+include(`no-such-file')
+dnl @result{}
+dnl @error{}39.include:2: m4: Cannot open no-such-file: No such file or directory
+sinclude(`no-such-file')
+dnl @result{}
diff --git a/checks/31.include b/checks/40.include
index 4f6b5d3e..1afae8e2 100644
--- a/checks/31.include
+++ b/checks/40.include
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2096: Origin of test
+dnl ../doc/m4.texinfo:2372: Origin of test
define(`foo', `FOO')
dnl @result{}
include(`incl.m4')
diff --git a/checks/32.include b/checks/41.include
index d76a1c82..e5965be9 100644
--- a/checks/32.include
+++ b/checks/41.include
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2111: Origin of test
+dnl ../doc/m4.texinfo:2387: Origin of test
define(`bar', include(`incl.m4'))
dnl @result{}
This is `bar': >>>bar<<<
diff --git a/checks/33.divert b/checks/42.divert
index 79d7c688..9c86c5de 100644
--- a/checks/33.divert
+++ b/checks/42.divert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2199: Origin of test
+dnl ../doc/m4.texinfo:2478: Origin of test
divert(1)
This text is diverted.
divert
diff --git a/checks/34.divert b/checks/43.divert
index e7d403f2..252fc982 100644
--- a/checks/34.divert
+++ b/checks/43.divert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2219: Origin of test
+dnl ../doc/m4.texinfo:2498: Origin of test
divert(-1)
define(`foo', `Macro `foo'.')
define(`bar', `Macro `bar'.')
diff --git a/checks/35.undivert b/checks/44.undivert
index 84acc9c3..f99162c6 100644
--- a/checks/35.undivert
+++ b/checks/44.undivert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2250: Origin of test
+dnl ../doc/m4.texinfo:2529: Origin of test
divert(1)
This text is diverted.
divert
diff --git a/checks/36.undivert b/checks/45.undivert
index 81976413..8835f78e 100644
--- a/checks/36.undivert
+++ b/checks/45.undivert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2274: Origin of test
+dnl ../doc/m4.texinfo:2553: Origin of test
divert(1)
This text is diverted first.
divert(0)undivert(1)dnl
diff --git a/checks/37.undivert b/checks/46.undivert
index f3a92875..f951d011 100644
--- a/checks/37.undivert
+++ b/checks/46.undivert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2300: Origin of test
+dnl ../doc/m4.texinfo:2579: Origin of test
define(`bar', `BAR')
dnl @result{}
undivert(`foo')
diff --git a/checks/38.divnum b/checks/47.divnum
index ed2a0fee..c64945f8 100644
--- a/checks/38.divnum
+++ b/checks/47.divnum
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2326: Origin of test
+dnl ../doc/m4.texinfo:2605: Origin of test
Initial divnum
dnl @result{}Initial 0
divert(1)
diff --git a/checks/39.cleardiv b/checks/48.cleardiv
index eac813db..cd779109 100644
--- a/checks/39.cleardiv
+++ b/checks/48.cleardiv
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2357: Origin of test
+dnl ../doc/m4.texinfo:2636: Origin of test
divert(1)
Diversion one: divnum
divert(2)
diff --git a/checks/40.cleardiv b/checks/49.cleardiv
index 6e04cec9..8d4b7501 100644
--- a/checks/40.cleardiv
+++ b/checks/49.cleardiv
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2372: Origin of test
+dnl ../doc/m4.texinfo:2651: Origin of test
define(`cleardivert',
`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
dnl @result{}
diff --git a/checks/41.len b/checks/50.len
index 0575a98e..37c7cf72 100644
--- a/checks/41.len
+++ b/checks/50.len
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2414: Origin of test
+dnl ../doc/m4.texinfo:2693: Origin of test
len()
dnl @result{}0
len(`abcdef')
diff --git a/checks/42.index b/checks/51.index
index cbff9c35..e540cdd8 100644
--- a/checks/42.index
+++ b/checks/51.index
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2440: Origin of test
+dnl ../doc/m4.texinfo:2719: Origin of test
index(`gnus, gnats, and armadillos', `nat')
dnl @result{}7
index(`gnus, gnats, and armadillos', `dag')
diff --git a/checks/43.regexp b/checks/52.regexp
index 1291f4e2..27ad63d5 100644
--- a/checks/43.regexp
+++ b/checks/52.regexp
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2472: Origin of test
+dnl ../doc/m4.texinfo:2751: Origin of test
regexp(`GNUs not Unix', `\<[a-z]\w+')
dnl @result{}5
regexp(`GNUs not Unix', `\<Q\w*')
diff --git a/checks/44.regexp b/checks/53.regexp
index 58594f5e..b9263838 100644
--- a/checks/44.regexp
+++ b/checks/53.regexp
@@ -1,3 +1,3 @@
-dnl ../doc/m4.texinfo:2484: Origin of test
+dnl ../doc/m4.texinfo:2763: Origin of test
regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
dnl @result{}*** Unix *** nix ***
diff --git a/checks/45.substr b/checks/54.substr
index 6b2d6577..b2ad41ff 100644
--- a/checks/45.substr
+++ b/checks/54.substr
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2510: Origin of test
+dnl ../doc/m4.texinfo:2789: Origin of test
substr(`gnus, gnats, and armadillos', 6)
dnl @result{}gnats, and armadillos
substr(`gnus, gnats, and armadillos', 6, 5)
diff --git a/checks/46.translit b/checks/55.translit
index 38084917..d0c1a522 100644
--- a/checks/46.translit
+++ b/checks/55.translit
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2551: Origin of test
+dnl ../doc/m4.texinfo:2830: Origin of test
translit(`GNUs not Unix', `A-Z')
dnl @result{}s not nix
translit(`GNUs not Unix', `a-z', `A-Z')
diff --git a/checks/56.errprint b/checks/56.errprint
deleted file mode 100644
index 551a7844..00000000
--- a/checks/56.errprint
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:3057: Origin of test
-errprint(`m4:'__file__:__line__: `Input error
-')
-dnl @error{}m4:56.errprint:2: Input error
-dnl @result{}
diff --git a/checks/47.patsubst b/checks/56.patsubst
index fd9f9458..5da8e3c7 100644
--- a/checks/47.patsubst
+++ b/checks/56.patsubst
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2602: Origin of test
+dnl ../doc/m4.texinfo:2881: Origin of test
patsubst(`GNUs not Unix', `^', `OBS: ')
dnl @result{}OBS: GNUs not Unix
patsubst(`GNUs not Unix', `\<', `OBS: ')
diff --git a/checks/48.patsubst b/checks/57.patsubst
index 51a3494a..36f0f315 100644
--- a/checks/48.patsubst
+++ b/checks/57.patsubst
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2619: Origin of test
+dnl ../doc/m4.texinfo:2898: Origin of test
define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl
define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
define(`capitalize1',
diff --git a/checks/49.format b/checks/58.format
index e4b8a981..edeefd7e 100644
--- a/checks/49.format
+++ b/checks/58.format
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2654: Origin of test
+dnl ../doc/m4.texinfo:2933: Origin of test
define(`foo', `The brown fox jumped over the lazy dog')
dnl @result{}
format(`The string "%s" is %d characters long', foo, len(foo))
diff --git a/checks/50.incr b/checks/59.incr
index 6371806e..a6c4f6f2 100644
--- a/checks/50.incr
+++ b/checks/59.incr
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2724: Origin of test
+dnl ../doc/m4.texinfo:3003: Origin of test
incr(4)
dnl @result{}5
decr(7)
diff --git a/checks/51.eval b/checks/60.eval
index 2b544493..89490b2e 100644
--- a/checks/51.eval
+++ b/checks/60.eval
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2806: Origin of test
+dnl ../doc/m4.texinfo:3097: Origin of test
eval(-3 * 5)
dnl @result{}-15
eval(index(`Hello world', `llo') >= 0)
@@ -12,7 +12,7 @@ dnl @result{}676
define(`foo', `666')
dnl @result{}
eval(`foo'/6)
-dnl @error{}51.eval:14: m4: Bad expression in eval: foo/6
+dnl @error{}60.eval:14: m4: Bad expression in eval: foo/6
dnl @result{}
eval(foo/6)
dnl @result{}111
diff --git a/checks/52.eval b/checks/61.eval
index 71f15b42..64594c57 100644
--- a/checks/52.eval
+++ b/checks/61.eval
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2837: Origin of test
+dnl ../doc/m4.texinfo:3128: Origin of test
eval(666, 10)
dnl @result{}666
eval(666, 11)
diff --git a/checks/53.esyscmd b/checks/62.esyscmd
index 23d2b30f..27c3bda4 100644
--- a/checks/53.esyscmd
+++ b/checks/62.esyscmd
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2922: Origin of test
+dnl ../doc/m4.texinfo:3213: Origin of test
define(`vice', `esyscmd(grep Vice ../COPYING)')
dnl @result{}
vice
diff --git a/checks/54.sysval b/checks/63.sysval
index 09a981a5..1b7b110a 100644
--- a/checks/54.sysval
+++ b/checks/63.sysval
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2953: Origin of test
+dnl ../doc/m4.texinfo:3244: Origin of test
syscmd(`false')
dnl @result{}
ifelse(sysval, 0, zero, non-zero)
diff --git a/checks/55.errprint b/checks/64.errprint
index 4917106c..b0cfbffd 100644
--- a/checks/55.errprint
+++ b/checks/64.errprint
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:3032: Origin of test
+dnl ../doc/m4.texinfo:3324: Origin of test
errprint(`Illegal arguments to forloop
')
dnl @error{}Illegal arguments to forloop
diff --git a/checks/65.errprint b/checks/65.errprint
new file mode 100644
index 00000000..230093e8
--- /dev/null
+++ b/checks/65.errprint
@@ -0,0 +1,5 @@
+dnl ../doc/m4.texinfo:3349: Origin of test
+errprint(`m4:'__file__:__line__: `Input error
+')
+dnl @error{}m4:65.errprint:2: Input error
+dnl @result{}
diff --git a/checks/57.m4exit b/checks/66.m4exit
index 311ef914..eccef14b 100644
--- a/checks/57.m4exit
+++ b/checks/66.m4exit
@@ -1,6 +1,6 @@
-dnl ../doc/m4.texinfo:3080: Origin of test
+dnl ../doc/m4.texinfo:3372: Origin of test
define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
')m4exit(1)')
dnl @result{}
fatal_error(`This is a BAD one, buster')
-dnl @error{}m4: 57.m4exit: 5: fatal error: This is a BAD one, buster
+dnl @error{}m4: 66.m4exit: 5: fatal error: This is a BAD one, buster
diff --git a/checks/Makefile.am b/checks/Makefile.am
index 81549ea5..b3d7ffda 100644
--- a/checks/Makefile.am
+++ b/checks/Makefile.am
@@ -1,15 +1,19 @@
EXTRA_DIST = check-them foo get-them incl.m4 stamp-checks $(CHECKS)
+
+CHECKS = 01.define 02.define 03.arguments 04.arguments 05.arguments \
+ 06.arguments 07.pseudo_argu 08.pseudo_argu 09.pseudo_argu \
+ 10.pseudo_argu 11.pseudo_argu 12.undefine 13.defn 14.defn \
+ 15.pushdef 16.pushdef 17.indir 18.ifdef 19.ifelse 20.ifelse \
+ 21.loops 22.loops 23.dumpdef 24.trace 25.dnl 26.changequote \
+ 27.changequote 28.changequote 29.changecom 30.changecom \
+ 31.changesynta 32.changesynta 33.changesynta 34.changesynta \
+ 35.changesynta 36.changesynta 37.changesynta 38.m4wrap \
+ 39.include 40.include 41.include 42.divert 43.divert 44.undivert \
+ 45.undivert 46.undivert 47.divnum 48.cleardiv 49.cleardiv 50.len \
+ 51.index 52.regexp 53.regexp 54.substr 55.translit 56.patsubst \
+ 57.patsubst 58.format 59.incr 60.eval 61.eval 62.esyscmd \
+ 63.sysval 64.errprint 65.errprint 66.m4exit
-CHECKS = 01.define 02.arguments 03.arguments 04.arguments 05.arguments \
- 06.pseudo_argu 07.pseudo_argu 08.pseudo_argu 09.pseudo_argu \
- 10.pseudo_argu 11.undefine 12.defn 13.pushdef 14.pushdef 15.indir \
- 16.ifdef 17.ifelse 18.ifelse 19.loops 20.loops 21.dumpdef 22.trace \
- 23.dnl 24.changequote 25.changequote 26.changequote 27.changecom \
- 28.changecom 29.m4wrap 30.include 31.include 32.include 33.divert \
- 34.divert 35.undivert 36.undivert 37.undivert 38.divnum 39.cleardiv \
- 40.cleardiv 41.len 42.index 43.regexp 44.regexp 45.substr 46.translit \
- 47.patsubst 48.patsubst 49.format 50.incr 51.eval 52.eval 53.esyscmd \
- 54.sysval 55.errprint 56.errprint 57.m4exit
all: stamp-checks
diff --git a/checks/Makefile.in b/checks/Makefile.in
index ddab3464..a347a799 100644
--- a/checks/Makefile.in
+++ b/checks/Makefile.in
@@ -89,16 +89,19 @@ l = @l@
EXTRA_DIST = check-them foo get-them incl.m4 stamp-checks $(CHECKS)
-CHECKS = 01.define 02.arguments 03.arguments 04.arguments 05.arguments \
- 06.pseudo_argu 07.pseudo_argu 08.pseudo_argu 09.pseudo_argu \
- 10.pseudo_argu 11.undefine 12.defn 13.pushdef 14.pushdef 15.indir \
- 16.ifdef 17.ifelse 18.ifelse 19.loops 20.loops 21.dumpdef 22.trace \
- 23.dnl 24.changequote 25.changequote 26.changequote 27.changecom \
- 28.changecom 29.m4wrap 30.include 31.include 32.include 33.divert \
- 34.divert 35.undivert 36.undivert 37.undivert 38.divnum 39.cleardiv \
- 40.cleardiv 41.len 42.index 43.regexp 44.regexp 45.substr 46.translit \
- 47.patsubst 48.patsubst 49.format 50.incr 51.eval 52.eval 53.esyscmd \
- 54.sysval 55.errprint 56.errprint 57.m4exit
+CHECKS = 01.define 02.define 03.arguments 04.arguments 05.arguments \
+ 06.arguments 07.pseudo_argu 08.pseudo_argu 09.pseudo_argu \
+ 10.pseudo_argu 11.pseudo_argu 12.undefine 13.defn 14.defn \
+ 15.pushdef 16.pushdef 17.indir 18.ifdef 19.ifelse 20.ifelse \
+ 21.loops 22.loops 23.dumpdef 24.trace 25.dnl 26.changequote \
+ 27.changequote 28.changequote 29.changecom 30.changecom \
+ 31.changesynta 32.changesynta 33.changesynta 34.changesynta \
+ 35.changesynta 36.changesynta 37.changesynta 38.m4wrap \
+ 39.include 40.include 41.include 42.divert 43.divert 44.undivert \
+ 45.undivert 46.undivert 47.divnum 48.cleardiv 49.cleardiv 50.len \
+ 51.index 52.regexp 53.regexp 54.substr 55.translit 56.patsubst \
+ 57.patsubst 58.format 59.incr 60.eval 61.eval 62.esyscmd \
+ 63.sysval 64.errprint 65.errprint 66.m4exit
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
diff --git a/checks/get-them b/checks/get-them
index 84300f02..932cbb77 100755
--- a/checks/get-them
+++ b/checks/get-them
@@ -58,6 +58,8 @@ BEGIN {
prefix = "dnl ";
else
prefix = "";
+ gsub("@{", "{", $0);
+ gsub("@}", "}", $0);
gsub("@@", "@", $0);
printf("%s%s\n", prefix, $0) >> file;
}
diff --git a/config.h.in b/config.h.in
index 8a101dc3..352f5685 100644
--- a/config.h.in
+++ b/config.h.in
@@ -98,6 +98,9 @@
site ftp.antaire.com in antaire/src, file dmalloc/dmalloc.tar.gz. */
#undef WITH_DMALLOC
+/* Define to 1 if the GNU multiple precision library should be used. */
+#undef WITH_GMP
+
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
@@ -116,6 +119,9 @@
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
+/* The number of bytes in a long long int. */
+#undef SIZEOF_LONG_LONG_INT
+
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
diff --git a/configure b/configure
index 07fcf22d..79ed1cdb 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,8 @@ ac_default_prefix=/usr/local
ac_help="$ac_help
--enable-changeword enable -W and changeword() builtin"
ac_help="$ac_help
+ --with-gmp use gmp for extended and fractional arithmetic"
+ac_help="$ac_help
--with-dmalloc use dmalloc, as in
ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz"
ac_help="$ac_help
@@ -582,7 +584,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:586: checking for a BSD compatible install" >&5
+echo "configure:588: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -635,7 +637,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:639: checking whether build environment is sane" >&5
+echo "configure:641: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -673,7 +675,7 @@ fi
rm -f conftest*
echo "$ac_t""yes" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:677: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:679: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -702,7 +704,7 @@ fi
PACKAGE=m4
-VERSION=1.4e
+VERSION=1.4f
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -719,7 +721,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:723: checking for working aclocal" >&5
+echo "configure:725: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -732,7 +734,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:736: checking for working autoconf" >&5
+echo "configure:738: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -745,7 +747,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:749: checking for working automake" >&5
+echo "configure:751: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -758,7 +760,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:762: checking for working autoheader" >&5
+echo "configure:764: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -771,7 +773,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:775: checking for working makeinfo" >&5
+echo "configure:777: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -791,7 +793,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:795: checking for $ac_word" >&5
+echo "configure:797: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -822,7 +824,7 @@ done
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:826: checking for $ac_word" >&5
+echo "configure:828: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -851,7 +853,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:855: checking for $ac_word" >&5
+echo "configure:857: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -899,7 +901,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -909,11 +911,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 913 "configure"
+#line 915 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -933,12 +935,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:942: checking whether we are using GNU C" >&5
+echo "configure:944: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -947,7 +949,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -962,7 +964,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:966: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:968: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1000,7 +1002,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1004: checking for a BSD compatible install" >&5
+echo "configure:1006: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1050,7 +1052,7 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1054: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1056: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1079,7 +1081,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1083: checking for $ac_word" >&5
+echo "configure:1085: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1107,7 +1109,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1111: checking how to run the C preprocessor" >&5
+echo "configure:1113: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1122,13 +1124,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1128 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1139,13 +1141,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1143 "configure"
+#line 1145 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1168,9 +1170,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1172: checking for AIX" >&5
+echo "configure:1174: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
+#line 1176 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -1192,7 +1194,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1196: checking for POSIXized ISC" >&5
+echo "configure:1198: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1214,17 +1216,17 @@ fi
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1218: checking for minix/config.h" >&5
+echo "configure:1220: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1223 "configure"
+#line 1225 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1265,7 +1267,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:1269: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:1271: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1281,7 +1283,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 1285 "configure"
+#line 1287 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1318,7 +1320,7 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
; return 0; }
EOF
-if { (eval echo configure:1322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
@@ -1344,7 +1346,7 @@ esac
echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
-echo "configure:1348: checking for function prototypes" >&5
+echo "configure:1350: checking for function prototypes" >&5
if test "$am_cv_prog_cc_stdc" != no; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -1357,12 +1359,12 @@ else
U=_ ANSI2KNR=./ansi2knr
# Ensure some checks needed by ansi2knr itself.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1361: checking for ANSI C header files" >&5
+echo "configure:1363: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1366 "configure"
+#line 1368 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1370,7 +1372,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1387,7 +1389,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1391 "configure"
+#line 1393 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1405,7 +1407,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1409 "configure"
+#line 1411 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1426,7 +1428,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1430 "configure"
+#line 1432 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1437,7 +1439,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1464,17 +1466,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1468: checking for $ac_hdr" >&5
+echo "configure:1470: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1473 "configure"
+#line 1475 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1503,12 +1505,12 @@ done
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1507: checking for working const" >&5
+echo "configure:1509: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1512 "configure"
+#line 1514 "configure"
#include "confdefs.h"
int main() {
@@ -1557,7 +1559,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1582,17 +1584,17 @@ for ac_hdr in limits.h locale.h memory.h siginfo.h string.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1586: checking for $ac_hdr" >&5
+echo "configure:1588: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1591 "configure"
+#line 1593 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1619,12 +1621,12 @@ fi
done
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1623: checking for ANSI C header files" >&5
+echo "configure:1625: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1628 "configure"
+#line 1630 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1632,7 +1634,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1649,7 +1651,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1653 "configure"
+#line 1655 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1667,7 +1669,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1671 "configure"
+#line 1673 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1688,7 +1690,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1692 "configure"
+#line 1694 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1699,7 +1701,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1723,12 +1725,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1727: checking return type of signal handlers" >&5
+echo "configure:1729: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1732 "configure"
+#line 1734 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1745,7 +1747,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1764,12 +1766,12 @@ EOF
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1768: checking for size_t" >&5
+echo "configure:1770: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1773 "configure"
+#line 1775 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1800,12 +1802,12 @@ fi
for ac_func in mkstemp sigaction sigaltstack sigstack sigvec strerror tmpfile
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1804: checking for $ac_func" >&5
+echo "configure:1806: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1809 "configure"
+#line 1811 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1828,7 +1830,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1855,19 +1857,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1859: checking for working alloca.h" >&5
+echo "configure:1861: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1864 "configure"
+#line 1866 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1888,12 +1890,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1892: checking for alloca" >&5
+echo "configure:1894: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1897 "configure"
+#line 1899 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1916,7 +1918,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1948,12 +1950,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1952: checking whether alloca needs Cray hooks" >&5
+echo "configure:1954: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1957 "configure"
+#line 1959 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1978,12 +1980,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1982: checking for $ac_func" >&5
+echo "configure:1984: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1987 "configure"
+#line 1989 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2006,7 +2008,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2033,7 +2035,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2037: checking stack direction for C alloca" >&5
+echo "configure:2039: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2041,7 +2043,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2045 "configure"
+#line 2047 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2060,7 +2062,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2082,12 +2084,12 @@ EOF
fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2086: checking for vprintf" >&5
+echo "configure:2088: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2091 "configure"
+#line 2093 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@@ -2110,7 +2112,7 @@ vprintf();
; return 0; }
EOF
-if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@@ -2134,12 +2136,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2138: checking for _doprnt" >&5
+echo "configure:2140: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2143 "configure"
+#line 2145 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@@ -2162,7 +2164,7 @@ _doprnt();
; return 0; }
EOF
-if { (eval echo configure:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@@ -2189,12 +2191,12 @@ fi
for ac_func in strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2193: checking for $ac_func" >&5
+echo "configure:2195: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2198 "configure"
+#line 2200 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2217,7 +2219,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2244,9 +2246,9 @@ done
echo $ac_n "checking ecvt declaration""... $ac_c" 1>&6
-echo "configure:2248: checking ecvt declaration" >&5
+echo "configure:2250: checking ecvt declaration" >&5
cat > conftest.$ac_ext <<EOF
-#line 2250 "configure"
+#line 2252 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2262,12 +2264,12 @@ else
echo "$ac_t""no" 1>&6; for ac_func in ecvt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2266: checking for $ac_func" >&5
+echo "configure:2268: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2271 "configure"
+#line 2273 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2290,7 +2292,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2319,7 +2321,7 @@ rm -f conftest*
echo $ac_n "checking if stack overflow is detectable""... $ac_c" 1>&6
-echo "configure:2323: checking if stack overflow is detectable" >&5
+echo "configure:2325: checking if stack overflow is detectable" >&5
# Code from Jim Avera <jima@netcom.com>.
# stackovf.c requires:
# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
@@ -2329,7 +2331,7 @@ use_stackovf=no
if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 2333 "configure"
+#line 2335 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <sys/resource.h>
@@ -2342,7 +2344,7 @@ choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
#endif
; return 0; }
EOF
-if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
use_stackovf=yes
else
@@ -2361,7 +2363,7 @@ EOF
STACKOVF=stackovf.${U}o
cat > conftest.$ac_ext <<EOF
-#line 2365 "configure"
+#line 2367 "configure"
#include "confdefs.h"
#include <sys/resource.h>
EOF
@@ -2378,7 +2380,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2382 "configure"
+#line 2384 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
@@ -2395,7 +2397,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 2399 "configure"
+#line 2401 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
@@ -2412,7 +2414,7 @@ rm -f conftest*
fi
echo $ac_n "checking if changeword is wanted""... $ac_c" 1>&6
-echo "configure:2416: checking if changeword is wanted" >&5
+echo "configure:2418: checking if changeword is wanted" >&5
# Check whether --enable-changeword or --disable-changeword was given.
if test "${enable_changeword+set}" = set; then
enableval="$enable_changeword"
@@ -2430,19 +2432,136 @@ else
fi
-#AC_MSG_CHECKING(if extended and fractional arithmetic is wanted)
-#AC_ARG_WITH(gmp,
-#[ --with-gmp use gmp for extended and fractional arithmetic],
-#[if test "$withval" = yes; then
-# AC_MSG_RESULT(yes)
-# AC_DEFINE(WITH_GMP)
-# LIBS="$LIBS -lgmp"
-#else
-# AC_MSG_RESULT(no)
-#fi], [AC_MSG_RESULT(no)])
+echo $ac_n "checking if extended and fractional arithmetic is wanted""... $ac_c" 1>&6
+echo "configure:2437: checking if extended and fractional arithmetic is wanted" >&5
+# Check whether --with-gmp or --without-gmp was given.
+if test "${with_gmp+set}" = set; then
+ withval="$with_gmp"
+ use_gmp=$withval
+else
+ use_gmp=no
+fi
+
+echo "$ac_t""$use_gmp" 1>&6
+
+if test "$use_gmp" = yes; then
+ LIBS="$LIBS -lgmp"
+ ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
+echo "configure:2452: checking for gmp.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2457 "configure"
+#include "confdefs.h"
+#include <gmp.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for mpq_init in libgmp""... $ac_c" 1>&6
+echo "configure:2479: checking for mpq_init in libgmp" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mpq_init_libgmp'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2484 "configure"
+#include "confdefs.h"
+#include <gmp.h>
+int main() {
+mpq_t x; (void)mpq_init(x)
+; return 0; }
+EOF
+if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_func_mpq_init_libgmp=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_mpq_init_libgmp=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_mpq_init_libgmp" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+ac_cv_func_mpq_init_libgmp=no
+fi
+
+
+ if test "$ac_cv_func_mpq_init_libgmp$ac_cv_header_gmp_h" = yesyes; then
+ cat >> confdefs.h <<\EOF
+#define WITH_GMP 1
+EOF
+
+ else
+ LIBS=`echo $LIBS | sed -e 's/-lgmp//'`
+ echo "configure: warning: gmp library not found or does not appear to work" 1>&2
+ use_gmp=no
+ fi
+fi
+
+if test "$use_gmp" != yes; then
+ echo $ac_n "checking size of long long int""... $ac_c" 1>&6
+echo "configure:2524: checking size of long long int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_long_long_int=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2532 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(long long int));
+ exit(0);
+}
+EOF
+if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_long_long_int=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_long_long_int=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+EOF
+
+
+fi
echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
-echo "configure:2446: checking if malloc debugging is wanted" >&5
+echo "configure:2565: checking if malloc debugging is wanted" >&5
# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
withval="$with_dmalloc"
@@ -2463,21 +2582,21 @@ fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2467: checking for inline" >&5
+echo "configure:2586: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2474 "configure"
+#line 2593 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2503,12 +2622,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2507: checking for off_t" >&5
+echo "configure:2626: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2512 "configure"
+#line 2631 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2539,17 +2658,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2543: checking for $ac_hdr" >&5
+echo "configure:2662: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2548 "configure"
+#line 2667 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2578,12 +2697,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2582: checking for $ac_func" >&5
+echo "configure:2701: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2587 "configure"
+#line 2706 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2606,7 +2725,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2631,7 +2750,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2635: checking for working mmap" >&5
+echo "configure:2754: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2639,7 +2758,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2643 "configure"
+#line 2762 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2779,7 +2898,7 @@ main()
}
EOF
-if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -2807,17 +2926,17 @@ unistd.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2811: checking for $ac_hdr" >&5
+echo "configure:2930: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2816 "configure"
+#line 2935 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2847,12 +2966,12 @@ done
strdup __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2851: checking for $ac_func" >&5
+echo "configure:2970: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2856 "configure"
+#line 2975 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2875,7 +2994,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2904,12 +3023,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2908: checking for $ac_func" >&5
+echo "configure:3027: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2913 "configure"
+#line 3032 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2932,7 +3051,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2966,19 +3085,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2970: checking for LC_MESSAGES" >&5
+echo "configure:3089: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2975 "configure"
+#line 3094 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2999,7 +3118,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3003: checking whether NLS is requested" >&5
+echo "configure:3122: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3019,7 +3138,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3023: checking whether included gettext is requested" >&5
+echo "configure:3142: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3038,17 +3157,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3042: checking for libintl.h" >&5
+echo "configure:3161: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3047 "configure"
+#line 3166 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3065,19 +3184,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3069: checking for gettext in libc" >&5
+echo "configure:3188: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3074 "configure"
+#line 3193 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3093,7 +3212,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3097: checking for bindtextdomain in -lintl" >&5
+echo "configure:3216: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3101,7 +3220,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3105 "configure"
+#line 3224 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3112,7 +3231,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3127,13 +3246,8 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3132: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:3137: checking for gettext in -lintl" >&5
+echo "configure:3251: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3141,7 +3255,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3145 "configure"
+#line 3259 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3152,7 +3266,7 @@ int main() {
gettext()
; return 0; }
EOF
-if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3167,15 +3281,13 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- gt_cv_func_gettext_libintl=yes
+ LIBS="$LIBS -lintl"
+ gt_cv_func_gettext_libintl=yes
else
echo "$ac_t""no" 1>&6
gt_cv_func_gettext_libintl=no
fi
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
else
echo "$ac_t""no" 1>&6
fi
@@ -3191,7 +3303,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3195: checking for $ac_word" >&5
+echo "configure:3307: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3225,12 +3337,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3229: checking for $ac_func" >&5
+echo "configure:3341: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3234 "configure"
+#line 3346 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3253,7 +3365,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3280,7 +3392,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3284: checking for $ac_word" >&5
+echo "configure:3396: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3312,7 +3424,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3316: checking for $ac_word" >&5
+echo "configure:3428: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3344,7 +3456,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3348 "configure"
+#line 3460 "configure"
#include "confdefs.h"
int main() {
@@ -3352,7 +3464,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3375,7 +3487,7 @@ fi
if test "$CATOBJEXT" = "NONE"; then
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
-echo "configure:3379: checking whether catgets can be used" >&5
+echo "configure:3491: checking whether catgets can be used" >&5
# Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then
withval="$with_catgets"
@@ -3388,7 +3500,7 @@ fi
if test "$nls_cv_use_catgets" = "yes"; then
echo $ac_n "checking for main in -li""... $ac_c" 1>&6
-echo "configure:3392: checking for main in -li" >&5
+echo "configure:3504: checking for main in -li" >&5
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3396,14 +3508,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-li $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3400 "configure"
+#line 3512 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3431,12 +3543,12 @@ else
fi
echo $ac_n "checking for catgets""... $ac_c" 1>&6
-echo "configure:3435: checking for catgets" >&5
+echo "configure:3547: checking for catgets" >&5
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3440 "configure"
+#line 3552 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char catgets(); below. */
@@ -3459,7 +3571,7 @@ catgets();
; return 0; }
EOF
-if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_catgets=yes"
else
@@ -3481,7 +3593,7 @@ EOF
# Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3485: checking for $ac_word" >&5
+echo "configure:3597: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3513,7 +3625,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3517: checking for $ac_word" >&5
+echo "configure:3629: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3546,7 +3658,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3550: checking for $ac_word" >&5
+echo "configure:3662: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3581,7 +3693,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3585: checking for $ac_word" >&5
+echo "configure:3697: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3639,7 +3751,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3643: checking for $ac_word" >&5
+echo "configure:3755: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3673,7 +3785,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3677: checking for $ac_word" >&5
+echo "configure:3789: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3705,7 +3817,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3709: checking for $ac_word" >&5
+echo "configure:3821: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3798,7 +3910,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:3802: checking for catalogs to be installed" >&5
+echo "configure:3914: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -3826,17 +3938,17 @@ echo "configure:3802: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:3830: checking for linux/version.h" >&5
+echo "configure:3942: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3835 "configure"
+#line 3947 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
diff --git a/configure.in b/configure.in
index e79b9a1d..0e5043ba 100644
--- a/configure.in
+++ b/configure.in
@@ -8,7 +8,7 @@ AC_INIT(src/m4.c)
AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE(m4,1.4e)
+AM_INIT_AUTOMAKE(m4,1.4f)
ALL_LINGUAS="de fr it ja nl ru sv"
AC_PROG_AWK
@@ -78,16 +78,34 @@ else
AC_MSG_RESULT(no)
fi], [AC_MSG_RESULT(no)])
-#AC_MSG_CHECKING(if extended and fractional arithmetic is wanted)
-#AC_ARG_WITH(gmp,
-#[ --with-gmp use gmp for extended and fractional arithmetic],
-#[if test "$withval" = yes; then
-# AC_MSG_RESULT(yes)
-# AC_DEFINE(WITH_GMP)
-# LIBS="$LIBS -lgmp"
-#else
-# AC_MSG_RESULT(no)
-#fi], [AC_MSG_RESULT(no)])
+AC_MSG_CHECKING(if extended and fractional arithmetic is wanted)
+AC_ARG_WITH(gmp,
+[ --with-gmp use gmp for extended and fractional arithmetic],
+[use_gmp=$withval], [use_gmp=no])
+AC_MSG_RESULT($use_gmp)
+
+if test "$use_gmp" = yes; then
+ LIBS="$LIBS -lgmp"
+ AC_CHECK_HEADER([gmp.h],
+ [AC_CACHE_CHECK([for mpq_init in libgmp], ac_cv_func_mpq_init_libgmp,
+ [AC_TRY_LINK([#include <gmp.h>],
+ [mpq_t x; (void)mpq_init(x)],
+ ac_cv_func_mpq_init_libgmp=yes,
+ ac_cv_func_mpq_init_libgmp=no)])],
+ ac_cv_func_mpq_init_libgmp=no)
+
+ if test "$ac_cv_func_mpq_init_libgmp$ac_cv_header_gmp_h" = yesyes; then
+ AC_DEFINE(WITH_GMP)
+ else
+ LIBS=`echo $LIBS | sed -e 's/-lgmp//'`
+ AC_MSG_WARN([gmp library not found or does not appear to work])
+ use_gmp=no
+ fi
+fi
+
+if test "$use_gmp" != yes; then
+ AC_CHECK_SIZEOF(long long int, 0)
+fi
AM_WITH_DMALLOC
AM_GNU_GETTEXT
diff --git a/doc/m4.info b/doc/m4.info
index af76d358..cfa88df1 100644
--- a/doc/m4.info
+++ b/doc/m4.info
@@ -27,86 +27,91 @@ translation approved by the Foundation.

Indirect:
m4.info-1: 973
-m4.info-2: 50747
-m4.info-3: 97541
+m4.info-2: 50487
+m4.info-3: 99627

Tag Table:
(Indirect)
Node: Top973
-Node: Preliminaries6973
-Node: Intro7698
-Node: History9306
-Node: Invoking m410227
-Node: Bugs17021
-Node: Manual18289
-Node: Syntax19655
-Node: Names20242
-Node: Quoted strings20616
-Node: Other tokens21200
-Node: Comments21417
-Node: Macros22079
-Node: Invocation22572
-Node: Inhibiting Invocation23383
-Node: Macro Arguments26528
-Node: Quoting Arguments27792
-Node: Macro expansion28597
-Node: Definitions29260
-Node: Define30037
-Node: Arguments30848
-Node: Pseudo Arguments32329
-Node: Undefine34180
-Node: Defn34842
-Node: Pushdef35999
-Node: Indir37835
-Node: Builtin38597
-Node: Conditionals39041
-Node: Ifdef39748
-Node: Ifelse40517
-Node: Loops42283
-Node: Debugging45556
-Node: Dumpdef46135
-Node: Trace46983
-Node: Debug Levels48362
-Node: Debug Output50747
-Node: Input Control51267
-Node: Dnl51804
-Node: Changequote52930
-Node: Changecom54294
-Node: Changeword55578
-Node: M4wrap58787
-Node: File Inclusion59989
-Node: Include60305
-Node: Search Path62233
-Node: Diversions63020
-Node: Divert64257
-Node: Undivert65389
-Node: Divnum67324
-Node: Cleardiv67869
-Node: Text handling68905
-Node: Len69625
-Node: Index70023
-Node: Regexp70608
-Node: Substr71699
-Node: Translit72319
-Node: Patsubst73762
-Node: Format75853
-Node: Arithmetic77342
-Node: Incr77787
-Node: Eval78291
-Node: UNIX commands81290
-Node: Syscmd81761
-Node: Esyscmd82474
-Node: Sysval83420
-Node: Maketemp83827
-Node: Miscellaneous84884
-Node: Errprint85253
-Node: M4exit86244
-Node: Frozen files87030
-Node: Compatibility91950
-Node: Extensions92568
-Node: Incompatibilities94936
-Node: Other Incompat95378
-Node: Concept index97541
-Node: Macro index104546
+Node: Preliminaries3070
+Node: Intro3795
+Node: History5403
+Node: Invoking m46324
+Node: Bugs13188
+Node: Manual14456
+Node: Syntax15822
+Node: Names16660
+Node: Quoted strings17273
+Node: Other tokens17857
+Node: Comments18074
+Node: Input processing18761
+Node: Macros19914
+Node: Invocation20407
+Node: Inhibiting Invocation21218
+Node: Macro Arguments24363
+Node: Quoting Arguments25678
+Node: Macro expansion26483
+Node: Definitions27146
+Node: Define27923
+Node: Arguments29477
+Node: Pseudo Arguments30958
+Node: Undefine32809
+Node: Defn33471
+Node: Pushdef34946
+Node: Indir37005
+Node: Builtin37783
+Node: Conditionals38227
+Node: Ifdef38934
+Node: Ifelse39703
+Node: Loops41485
+Node: Debugging44777
+Node: Dumpdef45355
+Node: Trace46203
+Node: Debug Levels47582
+Node: Debug Output49967
+Node: Input Control50487
+Node: Dnl51100
+Node: Changequote52226
+Node: Changecom53590
+Node: Changesyntax54876
+Node: Changeword61162
+Node: M4wrap64397
+Node: File Inclusion65599
+Node: Include65915
+Node: Search Path67942
+Node: Diversions68729
+Node: Divert69966
+Node: Undivert71098
+Node: Divnum73069
+Node: Cleardiv73614
+Node: Text handling74669
+Node: Len75389
+Node: Index75787
+Node: Regexp76372
+Node: Substr77463
+Node: Translit78083
+Node: Patsubst79526
+Node: Format81617
+Node: Arithmetic83106
+Node: Incr83563
+Node: Eval84067
+Node: UNIX commands87679
+Node: Syscmd88150
+Node: Esyscmd88863
+Node: Sysval89809
+Node: Maketemp90216
+Node: Miscellaneous91273
+Node: Errprint91704
+Node: M4exit92695
+Node: Syncoutput93500
+Node: Frozen files94092
+Node: Compatibility99011
+Node: Extensions99627
+Node: Incompatibilities102097
+Node: Other Incompat102539
+Node: Experiments104702
+Node: Answers106209
+Node: Concept index106841
+Node: Macro index114262

End Tag Table
diff --git a/doc/m4.info-1 b/doc/m4.info-1
index 0907cb58..e0622667 100644
--- a/doc/m4.info-1
+++ b/doc/m4.info-1
@@ -42,18 +42,10 @@ changes by Franc,ois Pinard and other volunteers on the Internet. All
names and email addresses can be found in the file `THANKS' from the
GNU `m4' distribution.
- This is release 1.4e. It is now to be considered stable, future
+ This is release 1.4f. It is now to be considered stable, future
releases are only meant to fix bugs, increase speed, or improve
documentation. However...
- An experimental feature, which would improve `m4' usefulness, allows
-for changing the syntax for what is a "word" in `m4'. You should use:
- ./configure --enable-changeword
-
-if you want this feature compiled in. The current implementation slows
-down `m4' considerably and is hardly acceptable. So, it might go away,
-do not count on it yet.
-
* Menu:
* Preliminaries:: Introduction and preliminaries
@@ -76,6 +68,8 @@ do not count on it yet.
* Frozen files:: Fast loading of frozen states
* Compatibility:: Compatibility with other versions of m4
+* Experiments:: Experimental features in GNU m4
+* Answers:: Correct version of some examples
* Concept index:: Index for many concepts
* Macro index:: Index for all m4 macros
@@ -83,105 +77,6 @@ do not count on it yet.
Introduction and preliminaries
-* Intro:: Introduction to `m4'
-* History:: Historical references
-* Invoking m4:: Invoking `m4'
-* Bugs:: Problems and bugs
-* Manual:: Using this manual
-
-Lexical and syntactic conventions
-
-* Names:: Macro names
-* Quoted strings:: Quoting input to m4
-* Other tokens:: Other kinds of input tokens
-* Comments:: Comments in m4 input
-
-How to invoke macros
-
-* Invocation:: Macro invocation
-* Inhibiting Invocation:: Preventing macro invocation
-* Macro Arguments:: Macro arguments
-* Quoting Arguments:: On Quoting Arguments to macros
-* Macro expansion:: Expanding macros
-
-How to define new macros
-
-* Define:: Defining a new macro
-* Arguments:: Arguments to macros
-* Pseudo Arguments:: Pseudo arguments to macros
-* Undefine:: Deleting a macro
-* Defn:: Renaming macros
-* Pushdef:: Temporarily redefining macros
-
-* Indir:: Indirect call of macros
-* Builtin:: Indirect call of builtins
-
-Conditionals, loops and recursion
-
-* Ifdef:: Testing if a macro is defined
-* Ifelse:: If-else construct, or multibranch
-* Loops:: Loops and recursion in m4
-
-How to debug macros and input
-
-* Dumpdef:: Displaying macro definitions
-* Trace:: Tracing macro calls
-* Debug Levels:: Controlling debugging output
-* Debug Output:: Saving debugging output
-
-Input control
-
-* Dnl:: Deleting whitespace in input
-* Changequote:: Changing the quote characters
-* Changecom:: Changing the comment delimiters
-* Changeword:: Changing the lexical structure of words
-* M4wrap:: Saving input until end of input
-
-File inclusion
-
-* Include:: Including named files
-* Search Path:: Searching for include files
-
-Diverting and undiverting output
-
-* Divert:: Diverting output
-* Undivert:: Undiverting output
-* Divnum:: Diversion numbers
-* Cleardiv:: Discarding diverted text
-
-Macros for text handling
-
-* Len:: Calculating length of strings
-* Index:: Searching for substrings
-* Regexp:: Searching for regular expressions
-* Substr:: Extracting substrings
-* Translit:: Translating characters
-* Patsubst:: Substituting text by regular expression
-* Format:: Formatting strings (printf-like)
-
-Macros for doing arithmetic
-
-* Incr:: Decrement and increment operators
-* Eval:: Evaluating integer expressions
-
-Running UNIX commands
-
-* Syscmd:: Executing simple commands
-* Esyscmd:: Reading the output of commands
-* Sysval:: Exit codes
-* Maketemp:: Making names for temporary files
-
-Miscellaneous builtin macros
-
-* Errprint:: Printing error messages
-* M4exit:: Exiting from m4
-
-Compatibility with other versions of `m4'
-
-* Extensions:: Extensions in GNU m4
-* Incompatibilities:: Facilities in System V m4 not in GNU m4
-* Other Incompat:: Other incompatibilities
-

File: m4.info, Node: Preliminaries, Next: Syntax, Prev: Top, Up: Top
@@ -335,7 +230,8 @@ options:
Synchronisation directives are always given on complete lines per
themselves. When a synchronisation discrepancy occurs in the
middle of an output line, the associated synchronisation directive
- is delayed until the beginning of the next generated line.
+ is delayed until the beginning of the next generated line. *Note
+ Syncoutput:: for runtime control.
`-P'
`--prefix-builtins'
@@ -348,7 +244,7 @@ options:
`--word-regexp=REGEXP'
Use an alternative syntax for macro names. This experimental
option might not be present on all GNU `m4' implementations.
- (*note Changeword::.).
+ (*note Changeword::. and *Note Experiments::).
`-HN'
`--hashsize=N'
@@ -519,12 +415,17 @@ either a name, a quoted string, or any single character, that is not a
part of either a name or a string. Input to `m4' can also contain
comments.
+ GNU `m4' passes all ISO-8859-1 characters, except `'\0''. Eight bit
+ISO-8859-1 characters can be used as quotes, comment delimiters and in
+macro names, depending on the active locale.
+
* Menu:
* Names:: Macro names
* Quoted strings:: Quoting input to m4
* Other tokens:: Other kinds of input tokens
* Comments:: Comments in m4 input
+* Input processing:: How m4 copies input to output

File: m4.info, Node: Names, Next: Quoted strings, Prev: Syntax, Up: Syntax
@@ -532,13 +433,17 @@ File: m4.info, Node: Names, Next: Quoted strings, Prev: Syntax, Up: Syntax
Names
=====
- A name is any sequence of letters, digits, and the character `_'
-(underscore), where the first character is not a digit. If a name has
-a macro definition, it will be subject to macro expansion (*note
-Macros::.).
+ A name is a sequence of letters, digits, and the character `_'
+(underscore), where the first character is not a digit. `M4' will use
+the longest such sequences found in the input. If a name has a macro
+definition, it will be subject to macro expansion (*note Macros::.).)
Examples of legal names are: `foo', `_tmp', and `name01'.
+ The definitions of letters, digits and other input characters can be
+changed at any time, using the builtin macro `changesyntax'. *Note
+Changesyntax:: for more information.
+

File: m4.info, Node: Quoted strings, Next: Other tokens, Prev: Names, Up: Syntax
@@ -573,7 +478,7 @@ Other tokens
string, is a token by itself.

-File: m4.info, Node: Comments, Prev: Other tokens, Up: Syntax
+File: m4.info, Node: Comments, Next: Input processing, Prev: Other tokens, Up: Syntax
Comments
========
@@ -592,6 +497,42 @@ using the builtin macro `changecom'. *Note Changecom:: for more
information.

+File: m4.info, Node: Input processing, Prev: Comments, Up: Syntax
+
+Input Processing
+================
+
+ As `m4' reads the input token by token, it will copy each token
+directly to the output immediately.
+
+ The exception is when it finds a word with a macro definition. In
+that case `m4' will calculate the macro's expansion, possibly reading
+more input to get the arguments. It then insert the expansion in front
+of the remaining input. In other words, the resulting text from a macro
+call will be read and parsed into tokens again.
+
+ `M4' expands a macro as soon as possible. It it finds a macro call
+when collecting the arguments to another, it will expand the second
+call first. If the input is
+
+ format(`Result is %d', eval(2**15))
+
+`m4' will first expand `eval(2**15)' to `32768', and only then expand
+the resulting call
+
+ format(`Result is %d', 32768)
+
+which will give the output
+
+ Result is 32768
+
+ The order in which `m4' expands the macros can be explored using the
+*Note Trace:: facilities of GNU `m4'.
+
+ This process continues until there are no more macro calls to expand
+and all the input has been consumed.
+
+
File: m4.info, Node: Macros, Next: Definitions, Prev: Syntax, Up: Top
How to invoke macros
@@ -732,7 +673,8 @@ expanded as a macro.
If the name is followed by an opening parenthesis, the arguments
will be collected before the macro is called. If too few arguments are
supplied, the missing arguments are taken to be the empty string. If
-there are too many arguments, the excess arguments are ignored.
+there are too many arguments, the excess arguments are ignored. Leading
+whitespace are stripped of all arguments.
Normally `m4' will issue warnings if a builtin macro is called with
an inappropriate number of arguments, but it can be suppressed with the
@@ -846,6 +788,28 @@ part of the macro definition, and it is consequently copied to the
output. This can be avoided by use of the macro `dnl'. *Note Dnl::,
for details.
+ The first argument to `define' does not have to be a simple word.
+It can be any text string. A macro with a non standard name cannot be
+invoked in the normal way, as the name is not recognised. It can only
+be referenced by the builtins *Note Indir:: and *Note Defn::.
+
+ Arrays and associative arrays can be simulated by using this trick.
+
+ define(`array', `defn(format(``array[%d]'', `$1'))')
+ =>
+ define(`array_set', `define(format(``array[%d]'', `$1'), `$2')')
+ =>
+ array_set(4, `array element no. 4')
+ =>
+ array_set(17, `array element no. 17')
+ =>
+ array(4)
+ =>array element no. 4
+ array(eval(10+7))
+ =>array element no. 17
+
+ Change the `%d' to `%s' and it is an associative array.
+
The macro `define' is recognized only with parameters.

@@ -1012,11 +976,10 @@ need the builtin `defn':
which expands to the *quoted definition* of NAME. If the argument is
not a defined macro, the expansion is void.
- If NAME is a user-defined macro, the quoted definition is simply the
-quoted expansion text. If, instead, NAME is a builtin, the expansion
-is a special token, which points to the builtin's internal definition.
-This token is only meaningful as the second argument to `define' (and
-`pushdef'), and is ignored in any other context.
+ If NAME is a builtin, the expansion is a special token, which points
+to the builtin's internal definition. This token is only meaningful as
+the second argument to `define' (and `pushdef'), and is ignored in any
+other context.
Its normal use is best understood through an example, which shows
how to rename `undefine' to `zap':
@@ -1028,9 +991,25 @@ how to rename `undefine' to `zap':
undefine(`zap')
=>undefine(zap)
- In this way, `defn' can be used to copy macro definitions, and also
-definitions of builtin macros. Even if the original macro is removed,
-the other name can still be used to access the definition.
+ In this way, `defn' can be used to copy definitions of builtin
+macros. Even if the original macro is removed, the other name can still
+be used to access the definition.
+
+ If, instead, NAME is a user-defined macro, the expansion is simply
+the quoted text of the macro, and `defn' can therefore be used to copy
+user macro definitions as well.
+
+ Macros used as string variables should be referred through `defn',
+to avoid unwanted expansion of the text:
+
+ define(`string', `The macro dnl is very useful
+ ')
+ =>
+ string
+ =>The macro
+ defn(`string')
+ =>The macro dnl is very useful
+ =>
The macro `defn' is recognized only with parameters.
@@ -1098,6 +1077,11 @@ only the topmost one.
foo
=>foo
+ Local variables within macros are made with `pushdef' and `popdef'.
+At the start of the macro a new definition is pushed, within the macro
+it is manipulated and at the end it is popped, revealing the former
+definition.
+
It is possible to temporarily redefine a builtin with `pushdef' and
`defn'.
@@ -1115,8 +1099,8 @@ Indirect call of macros
indir(NAME, ...)
which results in a call to the macro NAME, which is passed the rest of
-the arguments. This can be used to call macros with "illegal" names
-(`define' allows such names to be defined):
+the arguments. This can be used to call macros with computed or
+with"illegal" names (`define' allows such names to be defined):
define(`$$internal$macro', `Internal macro (name `$0')')
=>
@@ -1213,13 +1197,13 @@ warning about missing arguments is never triggered.
if STRING-1 and STRING-2 are equal (character for character), otherwise
it expands to NOT-EQUAL.
- ifelse(foo, bar, `true')
+ ifelse(`foo', `bar', `true')
=>
- ifelse(foo, foo, `true')
+ ifelse(`foo', `foo', `true')
=>true
- ifelse(foo, bar, `true', `false')
+ ifelse(`foo', `bar', `true', `false')
=>false
- ifelse(foo, foo, `true', `false')
+ ifelse(`foo', `foo', `true', `false')
=>true
However, `ifelse' can take more than four arguments. If given more
@@ -1258,6 +1242,8 @@ used for iterating through the actual arguments to a macro:
It takes any number of arguments, and expands to all but the first
argument, separated by commas, with each argument quoted.
+ shift
+ =>
shift(bar)
=>
shift(foo, bar, baz)
@@ -1335,7 +1321,7 @@ File: m4.info, Node: Debugging, Next: Input Control, Prev: Conditionals, Up:
How to debug macros and input
*****************************
- When writing macros for `m4', most of the time they woould not work
+ When writing macros for `m4', most of the time they would not work
as intended (as is the case with most programming languages). There is
a little support for macro debugging in `m4'.
@@ -1492,3 +1478,19 @@ removed. If no argument is present, the debugging flags are set to
zero (as if no `-d' was given), and with an empty argument the flags
are reset to the default.
+
+File: m4.info, Node: Debug Output, Prev: Debug Levels, Up: Debugging
+
+Saving debugging output
+=======================
+
+ Debug and tracing output can be redirected to files using either the
+`-o' option to `m4', or with the builtin macro `debugfile':
+
+ debugfile(opt FILENAME)
+
+will send all further debug and trace output to FILENAME. If FILENAME
+is empty, debug and trace output are discarded and if `debugfile' is
+called without any arguments, debug and trace output are sent to the
+standard error output.
+
diff --git a/doc/m4.info-2 b/doc/m4.info-2
index cdd56db4..0e47ee8e 100644
--- a/doc/m4.info-2
+++ b/doc/m4.info-2
@@ -25,22 +25,6 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

-File: m4.info, Node: Debug Output, Prev: Debug Levels, Up: Debugging
-
-Saving debugging output
-=======================
-
- Debug and tracing output can be redirected to files using either the
-`-o' option to `m4', or with the builtin macro `debugfile':
-
- debugfile(opt FILENAME)
-
-will send all further debug and trace output to FILENAME. If FILENAME
-is empty, debug and trace output are discarded and if `debugfile' is
-called without any arguments, debug and trace output are sent to the
-standard error output.
-
-
File: m4.info, Node: Input Control, Next: File Inclusion, Prev: Debugging, Up: Top
Input control
@@ -54,6 +38,7 @@ input to `m4'.
* Dnl:: Deleting whitespace in input
* Changequote:: Changing the quote characters
* Changecom:: Changing the comment delimiters
+* Changesyntax:: Changing the lexical structure of the input
* Changeword:: Changing the lexical structure of words
* M4wrap:: Saving input until end of input
@@ -141,7 +126,7 @@ as they will be confused with names in the input. Doing so disables
the quoting mechanism.

-File: m4.info, Node: Changecom, Next: Changeword, Prev: Changequote, Up: Input Control
+File: m4.info, Node: Changecom, Next: Changesyntax, Prev: Changequote, Up: Input Control
Changing comment delimiters
===========================
@@ -184,17 +169,257 @@ mechanism completely.
=># Not a COMMENT anymore

-File: m4.info, Node: Changeword, Next: M4wrap, Prev: Changecom, Up: Input Control
+File: m4.info, Node: Changesyntax, Next: Changeword, Prev: Changecom, Up: Input Control
+
+Changing the lexical structure of the input
+===========================================
+
+ The macro `changesyntax' and all associated functionality is
+ experimental (*note Experiments::.). The functionality might
+ change in the future. Please direct your comments about it the
+ same way you would do for bugs.
+
+ The input to `m4' is read character per character, and these
+characters are grouped together to form input tokens (such as macro
+names, strings, comments, etc.).
+
+ Each token is parsed according to certain rules. For example, a
+macro name starts with a letter or `_' and consists of the longest
+possible string of letters, `_' and digits. But who is to decide what
+characters are letters, digits, quotes, white space? Earlier the
+operating system decided, now you do.
+
+ Input characters belong to different categories:
+
+"Letters"
+ Characters that start a macro name. The default is the letters as
+ defined by the operating system and the character `_'.
+
+"Digits"
+ Characters that, together with the letters, form the remainder of a
+ macro name. The default is the ten digits `0'...`9'.
+
+"White space"
+ Characters that should be trimmed from the beginning of each
+ argument to a macro call. The default is `SPC', `TAB', `newline'
+ and possibly others as defined by the operating system.
+
+"Open parenthesis"
+ Characters that open the argument list of a macro call. Default
+ is `('.
+
+"Close parenthesis"
+ Characters that close the argument list of a macro call. Default
+ is `)'.
+
+"Argument separator"
+ Characters that separate the arguments of a macro call. Default
+ is `,'.
+
+"Other"
+ Characters that have no special syntactical meaning to `m4'.
+ Default is all characters expect those in the categories above.
+
+"Active"
+ Characters that themselves, alone, form macro names. No default.
+
+Each character can, besides the basic syntax category, have some syntax
+attributes. These are:
+
+"Left quote"
+ The characters that start a quoted string. Default is ``'. Basic
+ syntax category is `Other'.
+
+"Right quote"
+ The characters that end a quoted string. Default is `''. Basic
+ syntax category is `Other'.
+
+"Begin comment"
+ The characters that begin a comment. Default is `#'. Basic syntax
+ category is `Other'.
+
+"End comment"
+ The characters that end a comment. Default is `newline'. Basic
+ syntax category is `White space'.
+
+The builtin macro `changesyntax' is used to change the way `m4' parses
+the input stream into tokens.
+
+ changesyntax(SYNTAX-SPEC, ...)
+
+The SYNTAX-SPEC is a string, whose first characters determines the
+syntax category of the other characters. Character ranges are expanded
+as for *Note Translit::. If there are no other characters, *all*
+characters are given the syntax code.
+
+ The characters for the syntax categories are:
+
+`W'
+ Letters
+
+`D'
+ Digits
+
+`S'
+ White space
+
+`('
+ Open parenthesis
+
+`)'
+ Close parenthesis
+
+`,'
+ Argument separator
+
+`O'
+ Other
+
+`A'
+ Active
+
+`L'
+ Left quote
+
+`R'
+ Right quote
+
+`B'
+ Begin comment
+
+`E'
+ End comment
+
+`'
+With `changesyntax' we can modify the meaning of a word.
+
+ define(`test.1', `TEST ONE')
+ =>
+ __file__
+ =>31.changesynta
+ changesyntax(`O_', `W.')
+ =>
+ __file__
+ =>__file__
+ test.1
+ =>TEST ONE
+
+Another possibility is to change the syntax of a macro call.
+
+ define(`test', `$#')
+ =>
+ test(a, b, c)
+ =>3
+ changesyntax(`(<', `,|', `)>', `O(,)')
+ =>
+ test(a, b, c)
+ =>0(a, b, c)
+ test<a|b|c>
+ =>3
+
+Leading spaces are always removed from macro arguments in `m4', but by
+changing the syntax categories we can avoid it.
+
+ define(`test', `$1$2$3')
+ =>
+ test(a, b, c)
+ =>abc
+ changesyntax(`O ')
+ =>
+ test(a, b, c)
+ =>a b c
+
+It is not yet possible to redefine the `$' used to indicate macro
+arguments in user defined macros.
+
+ Active characters are known from TeX. In `m4' a active character is
+always seen as a one-letter word, and so, if it has a macro definition,
+che macro will be called.
+
+ define(`@', `TEST')
+ =>
+ @
+ =>@
+ changesyntax(`A@')
+ =>
+ @
+ =>TEST
+
+ There is obviously an overlap with `changecom' and `changequote'.
+Comment delimiters and quotes can now be defined in two different ways.
+To avoid incompatibilites, if the quotes are set with `changequote',
+all characters marked in the syntax table as quotes will be unmarked,
+leaving only one set of defined quotes as before. Since the quotes are
+syntax attributes rather than syntax categories, the old quotes simply
+revert to their old category. If the quotes are set with
+`changesyntax', other characters marked as quotes are left untouched,
+resulting in at least two sets of quotes. This applies to comment
+delimiters as well, *mutatis mutandis*.
+
+ define(`test', `TEST')
+ =>
+ changesyntax(`L<', `R>')
+ =>
+ <test>
+ =>test
+ `test>
+ =>test
+ changequote(<[>, `]')
+ =>
+ <test>
+ =><TEST>
+ [test]
+ =>test
+
+If categories, that form single character tokens, contain several
+characters, all are treated as equal. Any open parenthesis will match
+any close parenthesis, etc.
+
+ changesyntax(`({<', `)}>', `,;:', `O(,)')
+ =>
+ eval{2**4-1; 2 : 8>
+ =>00001111
+
+This is not so for long quotes, which cannot be matched by single
+character quote and vice versa. The same goes for comment delimiters.
+
+ define(`test', `==$1==')
+ =>
+ changequote(`<<', `>>')
+ =>
+ changesyntax(<<L[>>, <<R]>>)
+ =>
+ test(<<testing]>>)
+ =>==testing]==
+ test([testing>>])
+ =>==testing>>==
+ test([<<testing>>])
+ =>==<<testing>>==
+
+Note how it is possible to have both long and short quotes, if
+`changequote' is used before `changesyntax'.
+
+ The syntax table is initialiased to be backwards compatible, so if
+you never calls `changesyntax', nothing will have changed.
+
+ Debugging output continue to use `(', `,' and `)' to show macro
+calls.
+
+ The builtin macros `changesyntax' is recognized only when given
+arguments.
+
+
+File: m4.info, Node: Changeword, Next: M4wrap, Prev: Changesyntax, Up: Input Control
Changing the lexical structure of words
=======================================
- The macro `changeword' and all associated functionnality is
- experimental. It is only available if the `--enable-changeword'
- option was given to `configure', at GNU `m4' installation time.
- The functionnality might change or even go away in the future.
- *Do not rely on it*. Please direct your comments about it the
- same way you would do for bugs.
+ The macro `changeword' and all associated functionality is
+ experimental (*note Experiments::.). It is only available if the
+ `--enable-changeword' option was given to `configure', at GNU `m4'
+ installation time. The functionality might change or even go away
+ in the future. *Do not rely on it*. Please direct your comments
+ about it the same way you would do for bugs.
A file being processed by `m4' is split into quoted strings, words
(potential macro names) and simple tokens (any other single character).
@@ -343,7 +568,7 @@ include a file, if it exists, expanding to nothing if it does not.
include(`no-such-file')
=>
- error-->30.include:2: m4: Cannot open no-such-file: No such file or directory
+ error-->39.include:2: m4: Cannot open no-such-file: No such file or directory
sinclude(`no-such-file')
=>
@@ -381,6 +606,9 @@ is an example, which defines `bar' to expand to the contents of
quotes, commas and parentheses, which can interfere with the way the
`m4' parser works.
+ In GNU `m4', an alternative method of reading files is using *Note
+Undivert:: on a named file.
+
The builtin macros `include' and `sinclude' are recognized only when
given arguments.
@@ -486,9 +714,9 @@ Undiverting output
undivert(opt NUMBER, ...)
-which undiverts the diversions given by the arguments, in the order
-given. If no arguments are supplied, all diversions are undiverted, in
-numerical order.
+which reinserts the diverted output given by the arguments into the
+current output stream, in the order given. If no arguments are
+supplied, all diversions are undiverted, in numerical order.
The expansion of `undivert' is void.
@@ -604,7 +832,7 @@ No output is produced at all.
It is called just like `undivert', but the effect is to clear the
diversions, given by the arguments. (This macro has a nasty bug! You
-should try to see if you can find it and correct it.)
+should try to see if you can find it and correct it. *Note Answers::.)

File: m4.info, Node: Text handling, Next: Arithmetic, Prev: Diversions, Up: Top
@@ -869,7 +1097,7 @@ decrement operations.
* Menu:
* Incr:: Decrement and increment operators
-* Eval:: Evaluating integer expressions
+* Eval:: Evaluating integer or rational expressions

File: m4.info, Node: Incr, Next: Eval, Prev: Arithmetic, Up: Arithmetic
@@ -897,8 +1125,8 @@ arguments.

File: m4.info, Node: Eval, Prev: Incr, Up: Arithmetic
-Evaluating integer expressions
-==============================
+Evaluating integer or rational expressions
+==========================================
Integer expressions are evaluated with `eval':
@@ -915,8 +1143,8 @@ decreasing precedence.
`**'
Exponentiation
-`* / %'
- Multiplication, division and modulo
+`* / % :'
+ Multiplication, division, modulo and ratio
`+ -'
Addition and subtraction
@@ -965,6 +1193,18 @@ then the digits making the number. For any radix, the digits are `0',
Lower and upper case letters can be used interchangeably in numbers
prefixes and as number digits.
+ Calculations are done in 32 bit, but `m4' will use wider integers if
+available.
+
+ When compiled with a multiple precision arithmetic library (*note
+Experiments::.), numbers may be of any length. The `:' operator
+rationally divides two numbers and canonicalizes the result. The `/'
+operator always returns the quotient of the division. To convert a
+rational value to integral, divide (`/') by 1. Some operators such as
+`%', `<<', `>>', `~', `&', `|' and `^' operate only on integers and
+will truncate any rational remainder. `**' assumes that the exponent
+is integral.
+
Parentheses may be used to group subexpressions whenever needed.
For the relational operators, a true relation returns `1', and a false
relation return `0'.
@@ -984,7 +1224,7 @@ relation return `0'.
define(`foo', `666')
=>
eval(`foo'/6)
- error-->51.eval:14: m4: Bad expression in eval: foo/6
+ error-->60.eval:14: m4: Bad expression in eval: foo/6
=>
eval(foo/6)
=>111
@@ -1148,6 +1388,7 @@ any of the previous chapters.
* Errprint:: Printing error messages
* M4exit:: Exiting from m4
+* Syncoutput:: Turning on and off sync lines

File: m4.info, Node: Errprint, Next: M4exit, Prev: Miscellaneous, Up: Miscellaneous
@@ -1184,11 +1425,11 @@ current input line number in that file.
errprint(`m4:'__file__:__line__: `Input error
')
- error-->m4:56.errprint:2: Input error
+ error-->m4:65.errprint:2: Input error
=>

-File: m4.info, Node: M4exit, Prev: Errprint, Up: Miscellaneous
+File: m4.info, Node: M4exit, Next: Syncoutput, Prev: Errprint, Up: Miscellaneous
Exiting from `m4'
=================
@@ -1205,7 +1446,7 @@ the exit code is zero.
')m4exit(1)')
=>
fatal_error(`This is a BAD one, buster')
- error-->m4: 57.m4exit: 5: fatal error: This is a BAD one, buster
+ error-->m4: 66.m4exit: 5: fatal error: This is a BAD one, buster
After this macro call, `m4' will exit with exit code 1. This macro
is only intended for error exits, since the normal exit procedures are
@@ -1213,6 +1454,24 @@ not followed, e.g., diverted text is not undiverted, and saved text
(*note M4wrap::.) is not reread.

+File: m4.info, Node: Syncoutput, Prev: M4exit, Up: Miscellaneous
+
+Turning sync lines on and off within `m4'
+=========================================
+
+ If you need to toggle sync lines on and off while processing macros,
+or to insure that they are off or on, you may do so using `syncoutput'.
+
+ `syncoutput(1)', `syncoutput(on)', and `syncoutput(yes)' causes
+`m4'] to emit sync lines of the form: `#line <number> ["<filename>"]'.
+
+ `syncoutput(0)', `syncoutput(off)', and `syncoutput(no)' turn them
+off.
+
+ All other arguments are ignored as is `syncoutput' without
+parenthesis.
+
+
File: m4.info, Node: Frozen files, Next: Compatibility, Prev: Miscellaneous, Up: Top
Fast loading of frozen states
@@ -1290,7 +1549,7 @@ directory. It is looked up the same way as an `include' file (*note
Search Path::.).
Frozen files are sharable across architectures. It is safe to write
-a frozen file one one machine and read it on another, given that the
+a frozen file on one machine and read it on another, given that the
second machine uses the same, or a newer version of GNU `m4'. These
are simple (editable) text files, made up of directives, each starting
with a capital letter and ending with a newline (<NL>). Wherever a
@@ -1327,7 +1586,7 @@ decimal. The directives are:
however this may not be produced from within `m4'.

-File: m4.info, Node: Compatibility, Next: Concept index, Prev: Frozen files, Up: Top
+File: m4.info, Node: Compatibility, Next: Experiments, Prev: Frozen files, Up: Top
Compatibility with other versions of `m4'
*****************************************
@@ -1345,124 +1604,3 @@ made to summarize these here.
* Incompatibilities:: Facilities in System V m4 not in GNU m4
* Other Incompat:: Other incompatibilities
-
-File: m4.info, Node: Extensions, Next: Incompatibilities, Prev: Compatibility, Up: Compatibility
-
-Extensions in GNU `m4'
-======================
-
- This version of `m4' contains a few facilities, that do not exist in
-System V `m4'. These extra facilities are all suppressed by using the
-`-G' command line option, unless overridden by other command line
-options.
-
- * In the `$'N notation for macro arguments, N can contain several
- digits, while the System V `m4' only accepts one digit. This
- allows macros in GNU `m4' to take any number of arguments, and not
- only nine (*note Arguments::.).
-
- * Files included with `include' and `sinclude' are sought in a user
- specified search path, if they are not found in the working
- directory. The search path is specified by the `-I' option and the
- `M4PATH' environment variable (*note Search Path::.).
-
- * Arguments to `undivert' can be non-numeric, in which case the named
- file will be included uninterpreted in the output (*note
- Undivert::.).
-
- * Formatted output is supported through the `format' builtin, which
- is modeled after the C library function `printf' (*note Format::.).
-
- * Searches and text substitution through regular expressions are
- supported by the `regexp' (*note Regexp::.) and `patsubst' (*note
- Patsubst::.) builtins.
-
- * The output of shell commands can be read into `m4' with `esyscmd'
- (*note Esyscmd::.).
-
- * There is indirect access to any builtin macro with `builtin'
- (*note Builtin::.).
-
- * Macros can be called indirectly through `indir' (*note Indir::.).
-
- * The name of the current input file and the current input line
- number are accessible through the builtins `__file__' and
- `__line__' (*note Errprint::.).
-
- * The format of the output from `dumpdef' and macro tracing can be
- controlled with `debugmode' (*note Debug Levels::.).
-
- * The destination of trace and debug output can be controlled with
- `debugfile' (*note Debug Output::.).
-
- In addition to the above extensions, GNU `m4' implements the
-following command line options: `-F', `-G', `-I', `-L', `-R', `-V',
-`-W', `-d', `-l', `-o' and `-t'. *Note Invoking m4::, for a
-description of these options.
-
- Also, the debugging and tracing facilities in GNU `m4' are much more
-extensive than in most other versions of `m4'.
-
-
-File: m4.info, Node: Incompatibilities, Next: Other Incompat, Prev: Extensions, Up: Compatibility
-
-Facilities in System V `m4' not in GNU `m4'
-===========================================
-
- The version of `m4' from System V contains a few facilities that
-have not been implemented in GNU `m4' yet.
-
- * System V `m4' supports multiple arguments to `defn'. This is not
- implemented in GNU `m4'. Its usefulness is unclear to me.
-
-
-File: m4.info, Node: Other Incompat, Prev: Incompatibilities, Up: Compatibility
-
-Other incompatibilities
-=======================
-
- There are a few other incompatibilities between this implementation
-of `m4', and the System V version.
-
- * GNU `m4' implements sync lines differently from System V `m4',
- when text is being diverted. GNU `m4' outputs the sync lines when
- the text is being diverted, and System V `m4' when the diverted
- text is being brought back.
-
- The problem is which lines and filenames should be attached to
- text that is being, or has been, diverted. System V `m4' regards
- all the diverted text as being generated by the source line
- containing the `undivert' call, whereas GNU `m4' regards the
- diverted text as being generated at the time it is diverted.
-
- I expect the sync line option to be used mostly when using `m4' as
- a front end to a compiler. If a diverted line causes a compiler
- error, the error messages should most probably refer to the place
- where the diversion were made, and not where it was inserted again.
-
- * GNU `m4' makes no attempt at prohiting autoreferential definitions
- like:
-
- define(`x', `x')
- define(`x', `x ')
-
- There is nothing inherently wrong with defining `x' to return `x'.
- The wrong thing is to expand `x' unquoted. In `m4', one might
- use macros to hold strings, as we do for variables in other
- programming languages, further checking them with:
-
- ifelse(defn(`HOLDER'), `VALUE', ...)
-
- In cases like this one, an interdiction for a macro to hold its own
- name would be a useless limitation. Of course, this leave more
- rope for the GNU `m4' user to hang himself! Rescanning hangs may
- be avoided through careful programming, a little like for endless
- loops in traditional programming languages.
-
- * GNU `m4' without `-G' option will define the macro `__gnu__' to
- expand to the empty string.
-
- On UNIX systems, GNU `m4' without the `-G' option will define the
- macro `__unix__', otherwise the macro `unix'. Both will expand to
- the empty string.
-
diff --git a/doc/m4.info-3 b/doc/m4.info-3
index 7e0b8580..28bf9c5b 100644
--- a/doc/m4.info-3
+++ b/doc/m4.info-3
@@ -25,7 +25,199 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

-File: m4.info, Node: Concept index, Next: Macro index, Prev: Compatibility, Up: Top
+File: m4.info, Node: Extensions, Next: Incompatibilities, Prev: Compatibility, Up: Compatibility
+
+Extensions in GNU `m4'
+======================
+
+ This version of `m4' contains a few facilities, that do not exist in
+System V `m4'. These extra facilities are all suppressed by using the
+`-G' command line option, unless overridden by other command line
+options.
+
+ * In the `$'N notation for macro arguments, N can contain several
+ digits, while the System V `m4' only accepts one digit. This
+ allows macros in GNU `m4' to take any number of arguments, and not
+ only nine (*note Arguments::.).
+
+ * Files included with `include' and `sinclude' are sought in a user
+ specified search path, if they are not found in the working
+ directory. The search path is specified by the `-I' option and the
+ `M4PATH' environment variable (*note Search Path::.).
+
+ * Arguments to `undivert' can be non-numeric, in which case the named
+ file will be included uninterpreted in the output (*note
+ Undivert::.).
+
+ * Formatted output is supported through the `format' builtin, which
+ is modeled after the C library function `printf' (*note Format::.).
+
+ * Searches and text substitution through regular expressions are
+ supported by the `regexp' (*note Regexp::.) and `patsubst' (*note
+ Patsubst::.) builtins.
+
+ * The output of shell commands can be read into `m4' with `esyscmd'
+ (*note Esyscmd::.).
+
+ * There is indirect access to any builtin macro with `builtin'
+ (*note Builtin::.).
+
+ * Macros can be called indirectly through `indir' (*note Indir::.).
+
+ * The name of the current input file and the current input line
+ number are accessible through the builtins `__file__' and
+ `__line__' (*note Errprint::.).
+
+ * The generation of sync lines can be controlled through `syncoutput'
+ (*note Syncoutput::.).
+
+ * The format of the output from `dumpdef' and macro tracing can be
+ controlled with `debugmode' (*note Debug Levels::.).
+
+ * The destination of trace and debug output can be controlled with
+ `debugfile' (*note Debug Output::.).
+
+ In addition to the above extensions, GNU `m4' implements the
+following command line options: `-F', `-G', `-I', `-L', `-R', `-V',
+`-W', `-d', `-l', `-o' and `-t'. *Note Invoking m4::, for a
+description of these options.
+
+ Also, the debugging and tracing facilities in GNU `m4' are much more
+extensive than in most other versions of `m4'.
+
+
+File: m4.info, Node: Incompatibilities, Next: Other Incompat, Prev: Extensions, Up: Compatibility
+
+Facilities in System V `m4' not in GNU `m4'
+===========================================
+
+ The version of `m4' from System V contains a few facilities that
+have not been implemented in GNU `m4' yet.
+
+ * System V `m4' supports multiple arguments to `defn'. This is not
+ implemented in GNU `m4'. Its usefulness is unclear to me.
+
+
+File: m4.info, Node: Other Incompat, Prev: Incompatibilities, Up: Compatibility
+
+Other incompatibilities
+=======================
+
+ There are a few other incompatibilities between this implementation
+of `m4', and the System V version.
+
+ * GNU `m4' implements sync lines differently from System V `m4',
+ when text is being diverted. GNU `m4' outputs the sync lines when
+ the text is being diverted, and System V `m4' when the diverted
+ text is being brought back.
+
+ The problem is which lines and filenames should be attached to
+ text that is being, or has been, diverted. System V `m4' regards
+ all the diverted text as being generated by the source line
+ containing the `undivert' call, whereas GNU `m4' regards the
+ diverted text as being generated at the time it is diverted.
+
+ I expect the sync line option to be used mostly when using `m4' as
+ a front end to a compiler. If a diverted line causes a compiler
+ error, the error messages should most probably refer to the place
+ where the diversion were made, and not where it was inserted again.
+
+ * GNU `m4' makes no attempt at prohiting autoreferential definitions
+ like:
+
+ define(`x', `x')
+ define(`x', `x ')
+
+ There is nothing inherently wrong with defining `x' to return `x'.
+ The wrong thing is to expand `x' unquoted. In `m4', one might
+ use macros to hold strings, as we do for variables in other
+ programming languages, further checking them with:
+
+ ifelse(defn(`HOLDER'), `VALUE', ...)
+
+ In cases like this one, an interdiction for a macro to hold its own
+ name would be a useless limitation. Of course, this leave more
+ rope for the GNU `m4' user to hang himself! Rescanning hangs may
+ be avoided through careful programming, a little like for endless
+ loops in traditional programming languages.
+
+ * GNU `m4' without `-G' option will define the macro `__gnu__' to
+ expand to the empty string.
+
+ On UNIX systems, GNU `m4' without the `-G' option will define the
+ macro `__unix__', otherwise the macro `unix'. Both will expand to
+ the empty string.
+
+
+File: m4.info, Node: Experiments, Next: Answers, Prev: Compatibility, Up: Top
+
+Experimental features in GNU m4
+*******************************
+
+ Certain features of GNU `m4' are experimental.
+
+ Some are only available if activated by an option given to
+`configure' at GNU `m4' installation time. The functionality might
+change or even go away in the future. *Do not rely on it*. Please
+direct your comments about it the same way you would do for bugs.
+
+Changesyntax
+============
+
+ An experimental feature, which would improve `m4' usefulness, allows
+for changing the way the input is parsed (*note Changesyntax::.).
+
+ No compile time option is needed for `changesyntax'.
+
+ The implementation does not seem to slow down `m4', more likely the
+contrary.
+
+Changeword
+==========
+
+ An experimental feature, which would improve `m4' usefulness, allows
+for changing the syntax for what is a "word" in `m4'. You should use:
+
+ ./configure --enable-changeword
+
+if you want this feature compiled in. The current implementation slows
+down `m4' considerably and is hardly acceptable. So, it might go away,
+do not count on it yet.
+
+Multiple precision arithmetic
+=============================
+
+ Another experimental feature, which would improve `m4' usefulness,
+allows for multiple precision rational arithmetic in `eval'. You
+should use:
+
+ ./configure --with-gmp
+
+if you want this feature compiled in. The current implementation is
+unproven and might go away. Do not count on it yet.
+
+
+File: m4.info, Node: Answers, Next: Concept index, Prev: Experiments, Up: Top
+
+Answers
+*******
+
+ Some of the examples in this manuals are buggy. Correctly working
+macros are presented here.
+
+ The `cleardivert' macro (*note Cleardiv::.) cannot, as it stands, be
+called without arguments to clear all pending diversions. A macro that
+achieves that as well is:
+
+ define(`cleardivert',
+ `pushdef(`_num', divnum)divert(-1)ifelse($#, 0,
+ `undivert`'', `undivert($@)')divert(_num)popdef(`_num')')
+
+If called without arguments, it will call undivert without argument,
+otherwise they will be passed to undivert().
+
+
+File: m4.info, Node: Concept index, Next: Macro index, Prev: Answers, Up: Top
Concept index
*************
@@ -37,6 +229,7 @@ Concept index
* arguments to macros, special: Pseudo Arguments.
* arguments, quoted macro: Quoting Arguments.
* arithmetic: Arithmetic.
+* arrays: Define.
* builtins, indirect call of: Builtin.
* call of builtins, indirect: Builtin.
* call of macros, indirect: Indir.
@@ -95,10 +288,11 @@ Concept index
* GNU extensions <6>: Regexp.
* GNU extensions <7>: Undivert.
* GNU extensions <8>: Search Path.
-* GNU extensions <9>: Debug Output.
-* GNU extensions <10>: Debug Levels.
-* GNU extensions <11>: Builtin.
-* GNU extensions <12>: Indir.
+* GNU extensions <9>: Changesyntax.
+* GNU extensions <10>: Debug Output.
+* GNU extensions <11>: Debug Levels.
+* GNU extensions <12>: Builtin.
+* GNU extensions <13>: Indir.
* GNU extensions: Arguments.
* included files, search path for: Search Path.
* inclusion, of files <1>: Undivert.
@@ -108,11 +302,14 @@ Concept index
* indirect call of macros: Indir.
* initialization, frozen states: Frozen files.
* input tokens: Syntax.
+* input, lexical structure of the: Changesyntax.
* input, saving: M4wrap.
* integer arithmetic: Arithmetic.
* integer expression evaluation: Eval.
* length of strings: Len.
+* lexical structure of the input: Changesyntax.
* lexical structure of words: Changeword.
+* local variables: Pushdef.
* loops: Loops.
* loops, counting: Loops.
* macro definitions, on the command line: Invoking m4.
@@ -156,14 +353,17 @@ Concept index
* strings, length of: Len.
* substitution by regular expression: Patsubst.
* substrings, extracting: Substr.
+* syntax table: Changesyntax.
* temporary filenames: Maketemp.
* temporary redefinition of macros: Pushdef.
+* Toggling sync lines within m4: Syncoutput.
* tokens: Syntax.
* tracing macro expansion: Trace.
* translating characters: Translit.
* undefining macros: Undefine.
* UNIX commands, exit code from: Sysval.
* UNIX commands, running: UNIX commands.
+* variables, local: Pushdef.
* words, lexical structure of: Changeword.

@@ -181,6 +381,7 @@ these characters removed in the index.
* builtin: Builtin.
* changecom: Changecom.
* changequote: Changequote.
+* changesyntax: Changesyntax.
* changeword: Changeword.
* debugfile: Debug Output.
* debugmode: Debug Levels.
@@ -215,6 +416,7 @@ these characters removed in the index.
* shift: Loops.
* sinclude: Include.
* substr: Substr.
+* syncoutput: Syncoutput.
* syscmd: Syscmd.
* sysval: Sysval.
* traceoff: Trace.
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 1381ab42..ba12f8b2 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -96,18 +96,6 @@ This is release @value{VERSION}. It is now to be considered stable,
future releases are only meant to fix bugs, increase speed, or improve
documentation. However@dots{}
-An experimental feature, which would improve @code{m4} usefulness,
-allows for changing the syntax for what is a @dfn{word} in @code{m4}.
-You should use:
-@comment ignore
-@example
-./configure --enable-changeword
-@end example
-@noindent
-if you want this feature compiled in. The current implementation
-slows down @code{m4} considerably and is hardly acceptable. So, it
-might go away, do not count on it yet.
-
@menu
* Preliminaries:: Introduction and preliminaries
* Syntax:: Lexical and syntactic conventions
@@ -129,6 +117,8 @@ might go away, do not count on it yet.
* Frozen files:: Fast loading of frozen states
* Compatibility:: Compatibility with other versions of m4
+* Experiments:: Experimental features in GNU m4
+* Answers:: Correct version of some examples
* Concept index:: Index for many concepts
* Macro index:: Index for all m4 macros
@@ -136,104 +126,6 @@ might go away, do not count on it yet.
Introduction and preliminaries
-* Intro:: Introduction to @code{m4}
-* History:: Historical references
-* Invoking m4:: Invoking @code{m4}
-* Bugs:: Problems and bugs
-* Manual:: Using this manual
-
-Lexical and syntactic conventions
-
-* Names:: Macro names
-* Quoted strings:: Quoting input to m4
-* Other tokens:: Other kinds of input tokens
-* Comments:: Comments in m4 input
-
-How to invoke macros
-
-* Invocation:: Macro invocation
-* Inhibiting Invocation:: Preventing macro invocation
-* Macro Arguments:: Macro arguments
-* Quoting Arguments:: On Quoting Arguments to macros
-* Macro expansion:: Expanding macros
-
-How to define new macros
-
-* Define:: Defining a new macro
-* Arguments:: Arguments to macros
-* Pseudo Arguments:: Pseudo arguments to macros
-* Undefine:: Deleting a macro
-* Defn:: Renaming macros
-* Pushdef:: Temporarily redefining macros
-
-* Indir:: Indirect call of macros
-* Builtin:: Indirect call of builtins
-
-Conditionals, loops and recursion
-
-* Ifdef:: Testing if a macro is defined
-* Ifelse:: If-else construct, or multibranch
-* Loops:: Loops and recursion in m4
-
-How to debug macros and input
-
-* Dumpdef:: Displaying macro definitions
-* Trace:: Tracing macro calls
-* Debug Levels:: Controlling debugging output
-* Debug Output:: Saving debugging output
-
-Input control
-
-* Dnl:: Deleting whitespace in input
-* Changequote:: Changing the quote characters
-* Changecom:: Changing the comment delimiters
-* Changeword:: Changing the lexical structure of words
-* M4wrap:: Saving input until end of input
-
-File inclusion
-
-* Include:: Including named files
-* Search Path:: Searching for include files
-
-Diverting and undiverting output
-
-* Divert:: Diverting output
-* Undivert:: Undiverting output
-* Divnum:: Diversion numbers
-* Cleardiv:: Discarding diverted text
-
-Macros for text handling
-
-* Len:: Calculating length of strings
-* Index:: Searching for substrings
-* Regexp:: Searching for regular expressions
-* Substr:: Extracting substrings
-* Translit:: Translating characters
-* Patsubst:: Substituting text by regular expression
-* Format:: Formatting strings (printf-like)
-
-Macros for doing arithmetic
-
-* Incr:: Decrement and increment operators
-* Eval:: Evaluating integer expressions
-
-Running UNIX commands
-
-* Syscmd:: Executing simple commands
-* Esyscmd:: Reading the output of commands
-* Sysval:: Exit codes
-* Maketemp:: Making names for temporary files
-
-Miscellaneous builtin macros
-
-* Errprint:: Printing error messages
-* M4exit:: Exiting from m4
-
-Compatibility with other versions of @code{m4}
-
-* Extensions:: Extensions in GNU m4
-* Incompatibilities:: Facilities in System V m4 not in GNU m4
-* Other Incompat:: Other incompatibilities
@end menu
@end ifinfo
@@ -386,7 +278,8 @@ the file name did not change from the previous directive.
Synchronisation directives are always given on complete lines per
themselves. When a synchronisation discrepancy occurs in the middle of
an output line, the associated synchronisation directive is delayed
-until the beginning of the next generated line.
+until the beginning of the next generated line. @xref{Syncoutput} for
+runtime control.
@item -P
@itemx --prefix-builtins
@@ -399,7 +292,7 @@ instead of @samp{__file__}.
@itemx --word-regexp=@var{REGEXP}
Use an alternative syntax for macro names. This experimental
option might not be present on all GNU @code{m4} implementations.
-(@pxref{Changeword}).
+(@pxref{Changeword} and @ref{Experiments}).
@item -H@var{n}
@itemx --hashsize=@var{n}
@@ -581,24 +474,34 @@ token is either a name, a quoted string, or any single character, that
is not a part of either a name or a string. Input to @code{m4} can also
contain comments.
+GNU @code{m4} passes all ISO-8859-1 characters, except @kbd{'\0'}. Eight
+bit ISO-8859-1 characters can be used as quotes, comment delimiters and
+in macro names, depending on the active locale.
+
@menu
* Names:: Macro names
* Quoted strings:: Quoting input to m4
* Other tokens:: Other kinds of input tokens
* Comments:: Comments in m4 input
+* Input processing:: How m4 copies input to output
@end menu
@node Names, Quoted strings, Syntax, Syntax
@section Names
@cindex names
-A name is any sequence of letters, digits, and the character @kbd{_}
-(underscore), where the first character is not a digit. If a
-name has a macro definition, it will be subject to macro expansion
-(@pxref{Macros}).
+A name is a sequence of letters, digits, and the character @kbd{_}
+(underscore), where the first character is not a digit. @code{M4} will
+use the longest such sequences found in the input. If a name has a
+macro definition, it will be subject to macro expansion
+(@pxref{Macros}).)
Examples of legal names are: @samp{foo}, @samp{_tmp}, and @samp{name01}.
+The definitions of letters, digits and other input characters can be
+changed at any time, using the builtin macro @code{changesyntax}.
+@xref{Changesyntax} for more information.
+
@node Quoted strings, Other tokens, Names, Syntax
@section Quoted strings
@@ -636,7 +539,7 @@ The quote characters can be changed at any time, using the builtin macro
Any character, that is neither a part of a name, nor of a quoted string,
is a token by itself.
-@node Comments, , Other tokens, Syntax
+@node Comments, Input processing, Other tokens, Syntax
@section Comments
@cindex comments
@@ -655,6 +558,50 @@ information.
@c FIXME: more examples would be useful here --ADR
+@node Input processing, , Comments, Syntax
+@section Input Processing
+
+As @code{m4} reads the input token by token, it will copy each token
+directly to the output immediately.
+
+The exception is when it finds a word with a macro definition. In that
+case @code{m4} will calculate the macro's expansion, possibly reading
+more input to get the arguments. It then insert the expansion in front
+of the remaining input. In other words, the resulting text from a macro
+call will be read and parsed into tokens again.
+
+@code{M4} expands a macro as soon as possible. It it finds a macro call
+when collecting the arguments to another, it will expand the second
+call first. If the input is
+
+@comment ignore
+@example
+format(`Result is %d', eval(2**15))
+@end example
+
+@noindent
+@code{m4} will first expand @samp{eval(2**15)} to @samp{32768}, and only
+then expand the resulting call
+
+@comment ignore
+@example
+format(`Result is %d', 32768)
+@end example
+
+@noindent
+which will give the output
+
+@comment ignore
+@example
+Result is 32768
+@end example
+
+The order in which @code{m4} expands the macros can be explored using
+the @ref{Trace} facilities of GNU @code{m4}.
+
+This process continues until there are no more macro calls to expand and
+all the input has been consumed.
+
@node Macros, Definitions, Syntax, Top
@chapter How to invoke macros
@@ -818,7 +765,8 @@ as a macro.
If the name is followed by an opening parenthesis, the arguments will be
collected before the macro is called. If too few arguments are
supplied, the missing arguments are taken to be the empty string. If
-there are too many arguments, the excess arguments are ignored.
+there are too many arguments, the excess arguments are ignored. Leading
+whitespace are stripped of all arguments.
Normally @code{m4} will issue warnings if a builtin macro is called
with an inappropriate number of arguments, but it can be suppressed with
@@ -946,6 +894,31 @@ a part of the macro definition, and it is consequently copied to
the output. This can be avoided by use of the macro @code{dnl}.
@xref{Dnl}, for details.
+The first argument to @code{define} does not have to be a simple word.
+It can be any text string. A macro with a non standard name cannot be
+invoked in the normal way, as the name is not recognised. It can only
+be referenced by the builtins @ref{Indir} and @ref{Defn}.
+
+@cindex arrays
+Arrays and associative arrays can be simulated by using this trick.
+
+@example
+define(`array', `defn(format(``array[%d]'', `$1'))')
+@result{}
+define(`array_set', `define(format(``array[%d]'', `$1'), `$2')')
+@result{}
+array_set(4, `array element no. 4')
+@result{}
+array_set(17, `array element no. 17')
+@result{}
+array(4)
+@result{}array element no. 4
+array(eval(10+7))
+@result{}array element no. 17
+@end example
+
+Change the @code{%d} to @code{%s} and it is an associative array.
+
The macro @code{define} is recognized only with parameters.
@node Arguments, Pseudo Arguments, Define, Definitions
@@ -1144,11 +1117,10 @@ defn(@var{name})
which expands to the @emph{quoted definition} of @var{name}. If the
argument is not a defined macro, the expansion is void.
-If @var{name} is a user-defined macro, the quoted definition is simply
-the quoted expansion text. If, instead, @var{name} is a builtin, the
-expansion is a special token, which points to the builtin's internal
-definition. This token is only meaningful as the second argument to
-@code{define} (and @code{pushdef}), and is ignored in any other context.
+If @var{name} is a builtin, the expansion is a special token, which
+points to the builtin's internal definition. This token is only
+meaningful as the second argument to @code{define} (and @code{pushdef}),
+and is ignored in any other context.
Its normal use is best understood through an example, which shows how to
rename @code{undefine} to @code{zap}:
@@ -1162,9 +1134,27 @@ undefine(`zap')
@result{}undefine(zap)
@end example
-In this way, @code{defn} can be used to copy macro definitions, and also
-definitions of builtin macros. Even if the original macro is removed,
-the other name can still be used to access the definition.
+In this way, @code{defn} can be used to copy definitions of builtin
+macros. Even if the original macro is removed, the other name can still
+be used to access the definition.
+
+If, instead, @var{name} is a user-defined macro, the expansion is simply
+the quoted text of the macro, and @code{defn} can therefore be used to
+copy user macro definitions as well.
+
+Macros used as string variables should be referred through @code{defn},
+to avoid unwanted expansion of the text:
+
+@example
+define(`string', `The macro dnl is very useful
+')
+@result{}
+string
+@result{}The macro
+defn(`string')
+@result{}The macro dnl is very useful
+@result{}
+@end example
The macro @code{defn} is recognized only with parameters.
@@ -1242,6 +1232,13 @@ foo
@result{}foo
@end example
+@cindex local variables
+@cindex variables, local
+Local variables within macros are made with @code{pushdef} and
+@code{popdef}. At the start of the macro a new definition is pushed,
+within the macro it is manipulated and at the end it is popped,
+revealing the former definition.
+
It is possible to temporarily redefine a builtin with @code{pushdef}
and @code{defn}.
@@ -1264,8 +1261,8 @@ indir(@var{name}, ...)
@end example
@noindent
which results in a call to the macro @var{name}, which is passed the
-rest of the arguments. This can be used to call macros with ``illegal''
-names (@code{define} allows such names to be defined):
+rest of the arguments. This can be used to call macros with computed or
+with``illegal'' names (@code{define} allows such names to be defined):
@example
define(`$$internal$macro', `Internal macro (name `$0')')
@@ -1377,13 +1374,13 @@ If called with three or four arguments, @code{ifelse} expands into
for character), otherwise it expands to @var{not-equal}.
@example
-ifelse(foo, bar, `true')
+ifelse(`foo', `bar', `true')
@result{}
-ifelse(foo, foo, `true')
+ifelse(`foo', `foo', `true')
@result{}true
-ifelse(foo, bar, `true', `false')
+ifelse(`foo', `bar', `true', `false')
@result{}false
-ifelse(foo, foo, `true', `false')
+ifelse(`foo', `foo', `true', `false')
@result{}true
@end example
@@ -1433,6 +1430,8 @@ It takes any number of arguments, and expands to all but the first
argument, separated by commas, with each argument quoted.
@example
+shift
+@result{}
shift(bar)
@result{}
shift(foo, bar, baz)
@@ -1522,7 +1521,7 @@ a name. Correcting these errors are left as an exercise to the reader.
@node Debugging, Input Control, Conditionals, Top
@chapter How to debug macros and input
-When writing macros for @code{m4}, most of the time they woould not
+When writing macros for @code{m4}, most of the time they would not
work as intended (as is the case with most programming languages).
There is a little support for macro debugging in @code{m4}.
@@ -1732,6 +1731,7 @@ to @code{m4}.
* Dnl:: Deleting whitespace in input
* Changequote:: Changing the quote characters
* Changecom:: Changing the comment delimiters
+* Changesyntax:: Changing the lexical structure of the input
* Changeword:: Changing the lexical structure of words
* M4wrap:: Saving input until end of input
@end menu
@@ -1833,7 +1833,7 @@ Neither quote string should start with a letter or @samp{_} (underscore),
as they will be confused with names in the input. Doing so disables
the quoting mechanism.
-@node Changecom, Changeword, Changequote, Input Control
+@node Changecom, Changesyntax, Changequote, Input Control
@section Changing comment delimiters
@cindex changing comment delimiters
@@ -1884,19 +1884,295 @@ changecom
@result{}# Not a COMMENT anymore
@end example
-@node Changeword, M4wrap, Changecom, Input Control
+
+
+
+@node Changesyntax, Changeword, Changecom, Input Control
+@section Changing the lexical structure of the input
+
+@cindex lexical structure of the input
+@cindex input, lexical structure of the
+@cindex syntax table
+@cindex GNU extensions
+@findex changesyntax
+@quotation
+The macro @code{changesyntax} and all associated functionality is
+experimental (@pxref{Experiments}). The functionality might change in
+the future. Please direct your comments about it the same way you would
+do for bugs.
+@end quotation
+
+The input to @code{m4} is read character per character, and these
+characters are grouped together to form input tokens (such as macro
+names, strings, comments, etc.).
+
+Each token is parsed according to certain rules. For example, a macro
+name starts with a letter or @kbd{_} and consists of the longest
+possible string of letters, @kbd{_} and digits. But who is to decide
+what characters are letters, digits, quotes, white space? Earlier the
+operating system decided, now you do.
+
+Input characters belong to different categories:
+
+@table @dfn
+@item Letters
+Characters that start a macro name. The default is the letters as
+defined by the operating system and the character @kbd{_}.
+
+@item Digits
+Characters that, together with the letters, form the remainder of a
+macro name. The default is the ten digits @kbd{0}@dots{}@kbd{9}.
+
+@item White space
+Characters that should be trimmed from the beginning of each
+argument to a macro call. The default is @kbd{SPC}, @kbd{TAB},
+@kbd{newline} and possibly others as defined by the operating system.
+
+@item Open parenthesis
+Characters that open the argument list of a macro call. Default
+is @kbd{(}.
+
+@item Close parenthesis
+Characters that close the argument list of a macro call. Default is
+@kbd{)}.
+
+@item Argument separator
+Characters that separate the arguments of a macro call. Default
+is @kbd{,}.
+
+@item Other
+Characters that have no special syntactical meaning to @code{m4}.
+Default is all characters expect those in the categories above.
+
+@item Active
+Characters that themselves, alone, form macro names. No default.
+
+@end table
+
+@noindent
+Each character can, besides the basic syntax category, have some syntax
+attributes. These are:
+
+@table @dfn
+@item Left quote
+The characters that start a quoted string. Default is @kbd{`}. Basic
+syntax category is `Other'.
+
+@item Right quote
+The characters that end a quoted string. Default is @kbd{'}. Basic
+syntax category is `Other'.
+
+@item Begin comment
+The characters that begin a comment. Default is @kbd{#}. Basic syntax
+category is `Other'.
+
+@item End comment
+The characters that end a comment. Default is @kbd{newline}. Basic
+syntax category is `White space'.
+@end table
+
+@noindent
+
+The builtin macro @code{changesyntax} is used to change the way
+@code{m4} parses the input stream into tokens.
+
+@comment ignore
+@example
+changesyntax(@var{syntax-spec}, ...)
+@end example
+
+@noindent
+The @var{syntax-spec} is a string, whose first characters determines the
+syntax category of the other characters. Character ranges are expanded
+as for @ref{Translit}. If there are no other
+characters, @emph{all} characters are given the syntax code.
+
+The characters for the syntax categories are:
+
+@table @kbd
+@item W
+Letters
+@item D
+Digits
+@item S
+White space
+@item (
+Open parenthesis
+@item )
+Close parenthesis
+@item ,
+Argument separator
+@item O
+Other
+@item A
+Active
+@item L
+Left quote
+@item R
+Right quote
+@item B
+Begin comment
+@item E
+End comment
+@item
+@end table
+
+@noindent
+With @code{changesyntax} we can modify the meaning of a word.
+
+@example
+define(`test.1', `TEST ONE')
+@result{}
+__file__
+@result{}31.changesynta
+changesyntax(`O_', `W.')
+@result{}
+__file__
+@result{}__file__
+test.1
+@result{}TEST ONE
+@end example
+
+@noindent
+Another possibility is to change the syntax of a macro call.
+
+@example
+define(`test', `$#')
+@result{}
+test(a, b, c)
+@result{}3
+changesyntax(`(<', `,|', `)>', `O(,)')
+@result{}
+test(a, b, c)
+@result{}0(a, b, c)
+test<a|b|c>
+@result{}3
+@end example
+
+@noindent
+Leading spaces are always removed from macro arguments in @code{m4}, but
+by changing the syntax categories we can avoid it.
+
+@example
+define(`test', `$1$2$3')
+@result{}
+test(a, b, c)
+@result{}abc
+changesyntax(`O ')
+@result{}
+test(a, b, c)
+@result{}a b c
+@end example
+
+@noindent
+It is not yet possible to redefine the @samp{$} used to indicate macro
+arguments in user defined macros.
+
+Active characters are known from @TeX{}. In @code{m4} a active
+character is always seen as a one-letter word, and so, if it has a macro
+definition, che macro will be called.
+
+@example
+define(`@@', `TEST')
+@result{}
+@@
+@result{}@@
+changesyntax(`A@@')
+@result{}
+@@
+@result{}TEST
+@end example
+
+
+
+There is obviously an overlap with @code{changecom} and
+@code{changequote}. Comment delimiters and quotes can now be defined in
+two different ways. To avoid incompatibilites, if the quotes are set
+with @code{changequote}, all characters marked in the syntax table as
+quotes will be unmarked, leaving only one set of defined quotes as
+before. Since the quotes are syntax attributes rather than syntax
+categories, the old quotes simply revert to their old category. If the
+quotes are set with @code{changesyntax}, other characters marked as
+quotes are left untouched, resulting in at least two sets of quotes.
+This applies to comment delimiters as well, @emph{mutatis mutandis}.
+
+@example
+define(`test', `TEST')
+@result{}
+changesyntax(`L<', `R>')
+@result{}
+<test>
+@result{}test
+`test>
+@result{}test
+changequote(<[>, `]')
+@result{}
+<test>
+@result{}<TEST>
+[test]
+@result{}test
+@end example
+
+@noindent
+If categories, that form single character tokens, contain several
+characters, all are treated as equal. Any open parenthesis will match
+any close parenthesis, etc.
+
+@example
+changesyntax(`(@{<', `)@}>', `,;:', `O(,)')
+@result{}
+eval@{2**4-1; 2 : 8>
+@result{}00001111
+@end example
+
+@noindent
+This is not so for long quotes, which cannot be matched by single
+character quote and vice versa. The same goes for comment delimiters.
+
+@example
+define(`test', `==$1==')
+@result{}
+changequote(`<<', `>>')
+@result{}
+changesyntax(<<L[>>, <<R]>>)
+@result{}
+test(<<testing]>>)
+@result{}==testing]==
+test([testing>>])
+@result{}==testing>>==
+test([<<testing>>])
+@result{}==<<testing>>==
+@end example
+
+@noindent
+Note how it is possible to have both long and short quotes, if
+@code{changequote} is used before @code{changesyntax}.
+
+The syntax table is initialiased to be backwards compatible, so if you
+never calls @code{changesyntax}, nothing will have changed.
+
+Debugging output continue to use @kbd{(}, @kbd{,} and @kbd{)} to show
+macro calls.
+
+The builtin macros @code{changesyntax} is recognized only when given
+arguments.
+
+
+
+
+@node Changeword, M4wrap, Changesyntax, Input Control
@section Changing the lexical structure of words
@cindex lexical structure of words
@cindex words, lexical structure of
@findex changeword
@quotation
-The macro @code{changeword} and all associated functionnality is
-experimental. It is only available if the @code{--enable-changeword}
-option was given to @code{configure}, at GNU @code{m4} installation
-time. The functionnality might change or even go away in the future.
-@emph{Do not rely on it}. Please direct your comments about it the
-same way you would do for bugs.
+The macro @code{changeword} and all associated functionality is
+experimental (@pxref{Experiments}). It is only available if the
+@code{--enable-changeword} option was given to @code{configure}, at GNU
+@code{m4} installation time. The functionality might change or even go
+away in the future. @emph{Do not rely on it}. Please direct your
+comments about it the same way you would do for bugs.
@end quotation
A file being processed by @code{m4} is split into quoted strings, words
@@ -2076,7 +2352,7 @@ does not.
@example
include(`no-such-file')
@result{}
-@error{}30.include:2: m4: Cannot open no-such-file: No such file or directory
+@error{}39.include:2: m4: Cannot open no-such-file: No such file or directory
sinclude(`no-such-file')
@result{}
@end example
@@ -2122,6 +2398,9 @@ This use of @code{include} is not trivial, though, as files can contain
quotes, commas and parentheses, which can interfere with the way the
@code{m4} parser works.
+In GNU @code{m4}, an alternative method of reading files is using
+@ref{Undivert} on a named file.
+
The builtin macros @code{include} and @code{sinclude} are recognized
only when given arguments.
@@ -2239,9 +2518,9 @@ undivert(opt @var{number}, ...)
@end example
@noindent
-which undiverts the diversions given by the arguments, in the order
-given. If no arguments are supplied, all diversions are undiverted, in
-numerical order.
+which reinserts the diverted output given by the arguments into the
+current output stream, in the order given. If no arguments are
+supplied, all diversions are undiverted, in numerical order.
@c FIXME: Explain what happens when undiverting all to else than 0.
@@ -2377,7 +2656,7 @@ define(`cleardivert',
It is called just like @code{undivert}, but the effect is to clear the
diversions, given by the arguments. (This macro has a nasty bug! You
-should try to see if you can find it and correct it.)
+should try to see if you can find it and correct it. @xref{Answers}.)
@node Text handling, Arithmetic, Diversions, Top
@chapter Macros for text handling
@@ -2698,7 +2977,7 @@ decrement operations.
@menu
* Incr:: Decrement and increment operators
-* Eval:: Evaluating integer expressions
+* Eval:: Evaluating integer or rational expressions
@end menu
@node Incr, Eval, Arithmetic, Arithmetic
@@ -2732,7 +3011,7 @@ The builtin macros @code{incr} and @code{decr} are recognized only when
given arguments.
@node Eval, , Incr, Arithmetic
-@section Evaluating integer expressions
+@section Evaluating integer or rational expressions
@cindex integer expression evaluation
@cindex evaluation, of integer expressions
@@ -2756,8 +3035,8 @@ decreasing precedence.
Unary minus
@item **
Exponentiation
-@item * / %
-Multiplication, division and modulo
+@item * / % :
+Multiplication, division, modulo and ratio
@item + -
Addition and subtraction
@item << >>
@@ -2797,6 +3076,18 @@ then the digits making the number. For any radix, the digits are
@samp{a}, @samp{b} @dots{} up to @samp{z}. Lower and upper case letters
can be used interchangeably in numbers prefixes and as number digits.
+Calculations are done in 32 bit, but @code{m4} will use wider integers
+if available.
+
+When compiled with a multiple precision arithmetic library
+(@pxref{Experiments}), numbers may be of any length. The @code{:}
+operator rationally divides two numbers and canonicalizes the result.
+The @code{/} operator always returns the quotient of the division. To
+convert a rational value to integral, divide (@code{/}) by 1. Some
+operators such as @code{%}, @code{<<}, @code{>>}, @code{~}, @code{&},
+@code{|} and @code{^} operate only on integers and will truncate any
+rational remainder. @code{**} assumes that the exponent is integral.
+
Parentheses may be used to group subexpressions whenever needed. For the
relational operators, a true relation returns @code{1}, and a false
relation return @code{0}.
@@ -2817,7 +3108,7 @@ square(square(5)+1)
define(`foo', `666')
@result{}
eval(`foo'/6)
-@error{}51.eval:14: m4: Bad expression in eval: foo/6
+@error{}60.eval:14: m4: Bad expression in eval: foo/6
@result{}
eval(foo/6)
@result{}111
@@ -3008,6 +3299,7 @@ any of the previous chapters.
@menu
* Errprint:: Printing error messages
* M4exit:: Exiting from m4
+* Syncoutput:: Turning on and off sync lines
@end menu
@node Errprint, M4exit, Miscellaneous, Miscellaneous
@@ -3057,11 +3349,11 @@ current input line number in that file.
@example
errprint(`m4:'__file__:__line__: `Input error
')
-@error{}m4:56.errprint:2: Input error
+@error{}m4:65.errprint:2: Input error
@result{}
@end example
-@node M4exit, , Errprint, Miscellaneous
+@node M4exit, Syncoutput, Errprint, Miscellaneous
@section Exiting from @code{m4}
@cindex exiting from @code{m4}
@@ -3082,7 +3374,7 @@ define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
')m4exit(1)')
@result{}
fatal_error(`This is a BAD one, buster')
-@error{}m4: 57.m4exit: 5: fatal error: This is a BAD one, buster
+@error{}m4: 66.m4exit: 5: fatal error: This is a BAD one, buster
@end example
After this macro call, @code{m4} will exit with exit code 1. This macro
@@ -3090,6 +3382,25 @@ is only intended for error exits, since the normal exit procedures are
not followed, e.g., diverted text is not undiverted, and saved text
(@pxref{M4wrap}) is not reread.
+@node Syncoutput, , M4exit, Miscellaneous
+@section Turning sync lines on and off within @code{m4}
+
+@cindex Toggling sync lines within @code{m4}
+@findex syncoutput
+If you need to toggle sync lines on and off while processing macros, or
+to insure that they are off or on, you may do so using
+@code{syncoutput}.
+
+@code{syncoutput(1)}, @code{syncoutput(on)}, and @code{syncoutput(yes)}
+causes @code{m4}] to emit sync lines of the form: @code{#line <number>
+["<filename>"]}.
+
+@code{syncoutput(0)}, @code{syncoutput(off)}, and @code{syncoutput(no)}
+turn them off.
+
+All other arguments are ignored as is @code{syncoutput} without
+parenthesis.
+
@node Frozen files, Compatibility, Miscellaneous, Top
@chapter Fast loading of frozen states
@@ -3190,7 +3501,7 @@ It is looked up the same way as an @code{include} file (@pxref{Search
Path}).
Frozen files are sharable across architectures. It is safe to write
-a frozen file one one machine and read it on another, given that the
+a frozen file on one machine and read it on another, given that the
second machine uses the same, or a newer version of GNU @code{m4}.
These are simple (editable) text files, made up of directives,
each starting with a capital letter and ending with a newline
@@ -3230,7 +3541,7 @@ at reload time, however this may not be produced from within @code{m4}.
@end table
-@node Compatibility, Concept index, Frozen files, Top
+@node Compatibility, Experiments, Frozen files, Top
@chapter Compatibility with other versions of @code{m4}
@cindex compatibility
@@ -3299,6 +3610,10 @@ accessible through the builtins @code{__file__} and @code{__line__}
(@pxref{Errprint}).
@item
+The generation of sync lines can be controlled through @code{syncoutput}
+(@pxref{Syncoutput}).
+
+@item
The format of the output from @code{dumpdef} and macro tracing can be
controlled with @code{debugmode} (@pxref{Debug Levels}).
@@ -3390,7 +3705,85 @@ the macro @code{__unix__}, otherwise the macro @code{unix}. Both will
expand to the empty string.
@end itemize
-@node Concept index, Macro index, Compatibility, Top
+
+@node Experiments, Answers, Compatibility, Top
+@chapter Experimental features in GNU m4
+
+Certain features of GNU @code{m4} are experimental.
+
+Some are only available if activated by an option given to
+@code{configure} at GNU @code{m4} installation time. The functionality
+might change or even go away in the future. @emph{Do not rely on it}.
+Please direct your comments about it the same way you would do for bugs.
+
+@section Changesyntax
+
+An experimental feature, which would improve @code{m4} usefulness,
+allows for changing the way the input is parsed (@pxref{Changesyntax}).
+
+No compile time option is needed for @code{changesyntax}.
+
+The implementation does not seem to slow down @code{m4}, more likely the
+contrary.
+
+
+@section Changeword
+
+An experimental feature, which would improve @code{m4} usefulness,
+allows for changing the syntax for what is a @dfn{word} in @code{m4}.
+You should use:
+
+@comment ignore
+@example
+./configure --enable-changeword
+@end example
+
+@noindent
+if you want this feature compiled in. The current implementation
+slows down @code{m4} considerably and is hardly acceptable. So, it
+might go away, do not count on it yet.
+
+@section Multiple precision arithmetic
+
+Another experimental feature, which would improve @code{m4} usefulness,
+allows for multiple precision rational arithmetic in @code{eval}.
+You should use:
+
+@comment ignore
+@example
+./configure --with-gmp
+@end example
+
+@noindent
+if you want this feature compiled in. The current implementation is
+unproven and might go away. Do not count on it yet.
+
+
+@node Answers, Concept index, Experiments, Top
+@chapter Answers
+
+Some of the examples in this manuals are buggy. Correctly working
+macros are presented here.
+
+The @code{cleardivert} macro (@pxref{Cleardiv}) cannot, as it stands, be called without
+arguments to clear all pending diversions. A macro that achieves that
+as well is:
+
+@comment ignore
+@example
+define(`cleardivert',
+`pushdef(`_num', divnum)divert(-1)ifelse($#, 0,
+ `undivert`'', `undivert($@@)')divert(_num)popdef(`_num')')
+@end example
+
+@noindent
+If called without arguments, it will call undivert without argument,
+otherwise they will be passed to undivert().
+
+
+
+
+@node Concept index, Macro index, Answers, Top
@unnumbered Concept index
@printindex cp
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 04e26ad1..6e7e7911 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 3 August 1998
-@set EDITION 1.4e
-@set VERSION 1.4e
+@set UPDATED 10 August 1998
+@set EDITION 1.4f
+@set VERSION 1.4f
diff --git a/doc/version.texi b/doc/version.texi
index 04e26ad1..6e7e7911 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 3 August 1998
-@set EDITION 1.4e
-@set VERSION 1.4e
+@set UPDATED 10 August 1998
+@set EDITION 1.4f
+@set VERSION 1.4f
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 71566618..5011cf7f 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -4,4 +4,4 @@ pkgdata_DATA = capitalize.m4 comments.m4 ddivert.m4 debug.m4 esyscmd.m4 \
exp.m4 file.m4 foreach.m4 forloop.m4 fstab.m4 hanoi.m4 incl-test.m4 \
include.m4 indir.m4 misc.m4 multiquotes.m4 patsubst.m4 pushpop.m4 \
regexp.m4 reverse.m4 stackovf.sh sync-lines.m4 sysv-args.m4 trace.m4 \
- translit.m4 undivert.incl undivert.m4 wrap.m4
+ translit.m4 undivert.incl undivert.m4 wrap.m4 iso8859.m4
diff --git a/examples/Makefile.in b/examples/Makefile.in
index cd8a0d8a..a1bbc357 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -93,7 +93,7 @@ pkgdata_DATA = capitalize.m4 comments.m4 ddivert.m4 debug.m4 esyscmd.m4 \
exp.m4 file.m4 foreach.m4 forloop.m4 fstab.m4 hanoi.m4 incl-test.m4 \
include.m4 indir.m4 misc.m4 multiquotes.m4 patsubst.m4 pushpop.m4 \
regexp.m4 reverse.m4 stackovf.sh sync-lines.m4 sysv-args.m4 trace.m4 \
- translit.m4 undivert.incl undivert.m4 wrap.m4
+ translit.m4 undivert.incl undivert.m4 wrap.m4 iso8859.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
diff --git a/examples/iso8859.m4 b/examples/iso8859.m4
new file mode 100644
index 00000000..4ac1d196
--- /dev/null
+++ b/examples/iso8859.m4
Binary files differ
diff --git a/gettext.m4 b/gettext.m4
new file mode 100644
index 00000000..969d0922
--- /dev/null
+++ b/gettext.m4
@@ -0,0 +1,384 @@
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# Modified for GNU m4 by René Seindal (rene@seindal.dk)
+
+# serial 5
+
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, gettext,
+ [LIBS="$LIBS -lintl"
+ gt_cv_func_gettext_libintl=yes],
+ [gt_cv_func_gettext_libintl=no])])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi])
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next])
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ AC_CHECK_FUNCS(stpcpy)
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ AC_DEFINE(HAVE_STPCPY)
+ fi
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
index 1b2a52f9..bb285e20 100644
--- a/po/cat-id-tbl.c
+++ b/po/cat-id-tbl.c
@@ -22,38 +22,38 @@ const struct _msg_ent _msg_tbl[] = {
{"Negative width to eval", 13},
{"Non-numeric argument to %s", 14},
{"Cannot undivert %s", 15},
- {"Cannot open %s", 16},
- {"Debugmode: bad debug flags: `%s'", 17},
- {"Cannot set error file: %s", 18},
- {"WARNING: \\0 will disappear, use \\& instead in replacements", 19},
- {"Bad regular expression `%s': %s", 20},
- {"Error matching regular expression `%s'", 21},
- {"INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())", 22},
- {"INTERNAL ERROR: Bad token data type (trace_pre ())", 23},
- {"Bad expression in eval (missing right parenthesis): %s", 24},
- {"Bad expression in eval: %s", 25},
- {"Bad expression in eval (bad input): %s", 26},
- {"Bad expression in eval (excess input): %s", 27},
- {"Divide by zero in eval: %s", 28},
- {"Modulo by zero in eval: %s", 29},
- {"INTERNAL ERROR: Bad error code in evaluate ()", 30},
- {"INTERNAL ERROR: Bad comparison operator in cmp_term ()", 31},
- {"INTERNAL ERROR: Bad shift operator in shift_term ()", 32},
- {"INTERNAL ERROR: Bad operator in mult_term ()", 33},
- {"INTERNAL ERROR: Built-in not found in builtin table!", 34},
- {"INTERNAL ERROR: Bad token data type in freeze_one_symbol ()", 35},
- {"Expecting line feed in frozen file", 36},
- {"Expecting character `%c' in frozen file", 37},
- {"Ill-formated frozen file", 38},
- {"Premature end of frozen file", 39},
- {"`%s' from frozen file not found in builtin table!", 40},
- {"Input read from %s", 41},
- {"INTERNAL ERROR: Recursive push_string!", 42},
- {"Input reverted to %s, line %d", 43},
- {"INTERNAL ERROR: Input stack botch in pop_input ()", 44},
+ {"Undefined syntax code %c", 16},
+ {"Cannot open %s", 17},
+ {"Debugmode: bad debug flags: `%s'", 18},
+ {"Cannot set error file: %s", 19},
+ {"WARNING: \\0 will disappear, use \\& instead in replacements", 20},
+ {"Bad regular expression `%s': %s", 21},
+ {"Error matching regular expression `%s'", 22},
+ {"INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())", 23},
+ {"INTERNAL ERROR: Bad token data type (trace_pre ())", 24},
+ {"Bad expression in eval (missing right parenthesis): %s", 25},
+ {"Bad expression in eval: %s", 26},
+ {"Bad expression in eval (bad input): %s", 27},
+ {"Bad expression in eval (excess input): %s", 28},
+ {"Divide by zero in eval: %s", 29},
+ {"Modulo by zero in eval: %s", 30},
+ {"INTERNAL ERROR: Bad error code in evaluate ()", 31},
+ {"INTERNAL ERROR: Bad comparison operator in cmp_term ()", 32},
+ {"INTERNAL ERROR: Bad shift operator in shift_term ()", 33},
+ {"INTERNAL ERROR: Bad operator in mult_term ()", 34},
+ {"INTERNAL ERROR: Built-in not found in builtin table!", 35},
+ {"INTERNAL ERROR: Bad token data type in freeze_one_symbol ()", 36},
+ {"Expecting line feed in frozen file", 37},
+ {"Expecting character `%c' in frozen file", 38},
+ {"Ill-formated frozen file", 39},
+ {"Premature end of frozen file", 40},
+ {"`%s' from frozen file not found in builtin table!", 41},
+ {"Input reverted to %s, line %d", 42},
+ {"Input read from %s", 43},
+ {"INTERNAL ERROR: Recursive push_string!", 44},
{"INTERNAL ERROR: Bad call to init_macro_token ()", 45},
- {"INTERNAL ERROR: Input stack botch in peek_input ()", 46},
- {"INTERNAL ERROR: Input stack botch in next_char ()", 47},
+ {"INTERNAL ERROR: Input stack botch in next_char ()", 46},
+ {"INTERNAL ERROR: Input stack botch in peek_input ()", 47},
{"NONE", 48},
{"ERROR: EOF in string", 49},
{"ERROR: Stack overflow. (Infinite define recursion?)", 50},
diff --git a/po/de.gmo b/po/de.gmo
index d61f7983..9932a400 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index f6c51f48..ef5017b1 100644
--- a/po/de.po
+++ b/po/de.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"PO-Revision-Date: 1996-09-30 10:38 GMT+0100\n"
"Last-Translator: Martin von Löwis <martin@mira.isdn.cs.tu-berlin.de>\n"
"Language-Team: German <de@li.org>\n"
@@ -14,45 +14,45 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "Warnung: Zu wenig Argumente für eingebaute Funktion `%s'"
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr ""
"Warnung: Überschüssige Argumente für eingebaute Funktion `%s' ignoriert"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "Nicht-numerisches Argument in eingebauter Funktion `%s'"
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in define_macro ()"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr "Name %s nicht definiert"
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in m4_dumpdef ()"
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr "Makro `%s' nicht definiert"
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "INTERNER FEHLER: Falscher Symboltyp in m4_defn ()"
@@ -61,50 +61,55 @@ msgstr "INTERNER FEHLER: Falscher Symboltyp in m4_defn ()"
msgid "Cannot open pipe to command `%s'"
msgstr "Kann keine `pipe' für Kommando `%s' öffnen"
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "Basis in `eval' nicht in den Grenzen (Basis = %d)"
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr "Negative Breite in `eval'"
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr "Nicht-numerisches Argument in %s"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr "Kann Umleitung %s nicht aufheben"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "Name %s nicht definiert"
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr "Kann %s nicht öffnen"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "Debug Modus: falsche Debug Flags: `%s'"
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr "Kann Fehlerdatei nicht vorbereiten: %s"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr "WARNUNG: \\0 wird wegfallen, benutze \\& stattdessen"
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr "Falscher regulärer Ausdruck `%s': %s"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr "Fehler beim Erkennen des regulären Ausdrucks `%s'"
@@ -119,49 +124,49 @@ msgstr ""
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens (trace_pre ())"
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "Falscher Ausdruck in `eval' (fehlende rechte Klammer): %s"
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr "Falscher Ausdruck in `eval': %s"
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr "Falscher Ausdruck in `eval' (falsche Eingabe): %s"
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "Falscher Ausdruck in `eval' (zu große Eingabe): %s"
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr "Division durch Null in `eval': %s"
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr "Modulo Null in `eval': %s"
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "INTERNER FEHLER: Falscher Fehlerkode in evaluate ()"
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr "INTERNER FEHLER: Falscher Vergleichsoperator in cmp_term ()"
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr "INTERNER FEHLER: Falscher Shift-Operator in shift_term ()"
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "INTERNER FEHLER: Falscher Operator in mult_term ()"
@@ -197,46 +202,41 @@ msgstr ""
"`%s' aus eingefrorener Datei nicht in Tabelle der eingebauten Funktionen "
"gefunden!"
-#: src/input.c:174
+#: src/input.c:306
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Eingabe zurückgenommen zu %s, Zeile %d"
+
+#: src/input.c:334
#, c-format
msgid "Input read from %s"
msgstr "Eingabe gelesen von %s"
-#: src/input.c:231
+#: src/input.c:494
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "INTERNER FEHLER: Rekursives push_string!"
-#: src/input.c:311
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Eingabe zurückgenommen zu %s, Zeile %d"
-
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr ""
-"INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in pop_input ()"
-
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "INTERNER FEHLER: Falscher Aufruf von init_macro_token ()"
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr ""
-"INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in peek_input ()"
-
-#: src/input.c:470
+#: src/input.c:651
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr ""
"INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in next_char ()"
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr ""
+"INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in peek_input ()"
+
# This is the name of the input file when there is no current input file.
# Is this ever printed in a message?
-#: src/input.c:550
+#: src/input.c:791
msgid "NONE"
msgstr "NONE"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr "FEHLER: Dateiende in Zeichenkette"
@@ -469,6 +469,10 @@ msgstr "INTERNER FEHLER: Illegaler Modus bei symbol_lookup ()"
msgid "Name `%s' is unknown\n"
msgstr "Name `%s' ist unbekannt\n"
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr ""
+#~ "INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in pop_input ()"
+
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "Falscher regulärer Ausdruck: `%s': %s"
diff --git a/po/fr.gmo b/po/fr.gmo
index 84e0aab7..1d7d37ee 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index d9986766..3ac46321 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4d\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"PO-Revision-Date: 1998-05-23 11:53+02:00\n"
"Last-Translator: Erick Branderhorst <Erick.Branderhorst@asml.nl>\n"
"Language-Team: dutch <nl@li.org>\n"
@@ -15,44 +15,44 @@ msgstr ""
"Content-Type: text/plain; charset=\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "Attention: Trop peu d'arguments pour «%s» prédéfini"
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr "Attention: Les arguments superflus pour «%s» prédéfini sont ignorés"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "Argument non-numérique pour «%s» prédéfini"
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "ERREUR INTERNE: Mauvais type de lexème dans define_macro ()"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr "Nom «%s» non-défini"
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr "ERREUR INTERNE: Prédéfini introuvable dans la table des prédéfinis!"
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr "ERREUR INTERNE: Mauvais type de données pour lexème dans m4_dumpdef ()"
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr "Macro «%s» non-défini"
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "ERREUR INTERNE: Mauvais type de symbole dans m4_defn ()"
@@ -61,51 +61,56 @@ msgstr "ERREUR INTERNE: Mauvais type de symbole dans m4_defn ()"
msgid "Cannot open pipe to command `%s'"
msgstr "Incapable d'ouvrir un «pipe» pour la commande «%s»"
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "Base hors intervalle dans «eval» (base = %d)"
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr "Largeur négative dans «eval»"
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr "Argument non-numérique pour %s"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr "Incapble de ramener la diversion %s"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "Nom «%s» non-défini"
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr "Incapable d'ouvrir %s"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "Debugmode: mauvais indicateurs de mise-au-point: «%s»"
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr "Incapable de préparer le fichier d'erreurs: %s"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr ""
"ATTENTION: \\\\0 disparaîtra, utiliser \\\\& plutôt pour les remplacements"
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr "Mauvaise expression régulière «%s»: %s"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr "Erreur d'appariement pour l'expressio régulière «%s»"
@@ -120,49 +125,49 @@ msgstr ""
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr "ERREUR INTERNE: Mauvais type de donnée pour de lexème (trace_pre ())"
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "Mauvaise expression dans «eval» (parenthèse droite manquante): %s"
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr "Mauvaise expression dans «eval»: %s"
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr "Mauvaise expression dans «eval» (mauvaise entrée): %s"
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "Mauvaise expression dans «eval» (entrée superflue): %s"
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr "Division par zéro dans «eval»: %s"
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr "Module par zéro dans «eval»: %s"
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "ERREUR INTERNE: Mauvais code d'erreur dans evaluate ()"
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr "ERREUR INTERNE: Mauvais opérateur de comparaison dans cmp_term ()"
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr "ERREUR INTERNE: Mauvais opérateur de décalage dans shift_term ()"
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "ERREUR INTERNE: Mauvais opérateur dans mult_term ()"
@@ -198,41 +203,37 @@ msgid "`%s' from frozen file not found in builtin table!"
msgstr ""
"«%s» dans le fichier figé est introuvable dans la table des prédéfinis!"
-#: src/input.c:174
+#: src/input.c:306
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Entrée reprise de %s, ligne %d"
+
+#: src/input.c:334
#, c-format
msgid "Input read from %s"
msgstr "Entrée lue de %s"
-#: src/input.c:231
+#: src/input.c:494
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "ERREUR INTERNE: Utilisation récursive de push_string!"
-#: src/input.c:311
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Entrée reprise de %s, ligne %d"
-
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr "ERREUR INTERNE: Pile d'entrée douteuse dans pop_input ()"
-
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "ERREUR INTERNE: Mauvais appel à init_macro_token ()"
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "ERREUR INTERNE: Pile d'entrée douteuse dans peek_input ()"
-
-#: src/input.c:470
+#: src/input.c:651
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr "ERREUR INTERNE: Pile d'entrée douteuse dans next_char ()"
-#: src/input.c:550
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERREUR INTERNE: Pile d'entrée douteuse dans peek_input ()"
+
+#: src/input.c:791
msgid "NONE"
msgstr "AUCUN"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr "ERREUR: Fin-de-fichier dans la chaîne"
@@ -464,5 +465,8 @@ msgstr "ERREUR INTERNE: Mode illégal dans symbol_lookup ()"
msgid "Name `%s' is unknown\n"
msgstr "Le nom «%s» est inconnu\n"
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "ERREUR INTERNE: Pile d'entrée douteuse dans pop_input ()"
+
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "Mauvaise expression régulière: «%s»: %s"
diff --git a/po/it.gmo b/po/it.gmo
index 106f8cc8..dac9a641 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index cbc04699..96fd6429 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"Version: \n"
"Date: 1995-06-30 21:00:12+0200\n"
"From: Ulrich Drepper <drepper@myware>\n"
@@ -12,46 +12,46 @@ msgstr ""
"Files: ../lib/regex.c ../lib/xmalloc.c\n"
"Update on Fri Jun 30 21:00:27 MET 1995 \n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "Attenzione: Troppo pochi argomenti per la funzione predefinita `%s'"
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr ""
"Attenzione: Gli argumenti in eccesso alla funzione predefinita `%s' sono "
"ignorati"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "Argumento non numerico a funzione predefinita `%s'"
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "ERRORE INTERNO: Tipo dato `token' errato in define_macro ()"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr "Nome `%s' non definito"
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr ""
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr ""
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr "Macro `%s' non definita"
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "ERRORE INTERNO: Tipo simbolo errato in m4_defn ()"
@@ -60,50 +60,55 @@ msgstr "ERRORE INTERNO: Tipo simbolo errato in m4_defn ()"
msgid "Cannot open pipe to command `%s'"
msgstr "Impossibile aprire una `pipe' per il comando `%s'"
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "Base fuori intervallo in `eval' (base = %d)"
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr "Larghezza negativa in `eval'"
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr "Argumento non numerico a %s"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr "Impossibile ripristinare la deviazione %s"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "Nome `%s' non definito"
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr "Impossibile aprire %s"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "Modalità di debug: indicatori di debug errati: `%s'"
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr "Impossibile aprire l' archivio di errore: %s"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr ""
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr "Espressione regolare errata `%s': %s"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr "Errore nel confronto dell' espressione regolare `%s'"
@@ -116,49 +121,49 @@ msgstr ""
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr ""
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "Espressione errata in `eval' (manca la parentesi destra): %s"
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr "Espressione errata in `eval': %s"
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr "Espressione errata in `eval' (testo errato): %s"
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "Espressione errata in `eval' (testo in eccesso): %s"
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr "Divisione per zero in `eval': %s"
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr "Modulo zero in `eval': %s"
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "ERRORE INTERNO: Code di errore errato in evaluate ()"
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr ""
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr ""
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "ERRORE INTERNO: Operatore errato in mult_term ()"
@@ -192,41 +197,37 @@ msgstr "Fine prematura dell' archivio congelato"
msgid "`%s' from frozen file not found in builtin table!"
msgstr ""
-#: src/input.c:174
+#: src/input.c:306
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Ingresso ripristinato su %s, linea %d"
+
+#: src/input.c:334
#, c-format
msgid "Input read from %s"
msgstr "Errore di lettura da %s"
-#: src/input.c:231
+#: src/input.c:494
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "ERRORE INTERNO: Utilizzo ricorsivo di push_string!"
-#: src/input.c:311
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Ingresso ripristinato su %s, linea %d"
-
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr "ERRORE INTERNO: Stack di ingresso corrotto in pop_input ()"
-
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "ERRORE INTERNO: Chiamata errata a init_macro_token ()"
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "ERRORE INTERNO: Stack di ingresso corrotto in peek_input ()"
-
-#: src/input.c:470
+#: src/input.c:651
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr "ERRORE INTERNO: Stack di ingresso corrotto in next_char ()"
-#: src/input.c:550
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERRORE INTERNO: Stack di ingresso corrotto in peek_input ()"
+
+#: src/input.c:791
msgid "NONE"
msgstr "NESSUNO"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr "ERRORE: Fine prematura di una stringa"
@@ -402,5 +403,8 @@ msgstr "ERRORE INTERNO: Modo illegale in symbol_lookup ()"
msgid "Name `%s' is unknown\n"
msgstr "Il nome `%s' è sconosciuto\n"
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "ERRORE INTERNO: Stack di ingresso corrotto in pop_input ()"
+
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "Espressione regolare errata: `%s': %s"
diff --git a/po/ja.gmo b/po/ja.gmo
index da665805..f0f20883 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index f5bf54dd..84f8fae3 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"PO-Revision-Date: 1996-03-28 11:52 EST\n"
"Last-Translator: Akiko Matsushita <matusita@sra.co.jp>\n"
"Language-Team: Japanese <ja@li.org>\n"
@@ -13,44 +13,44 @@ msgstr ""
"Content-Type: text/plain; charset=EUC\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "·Ù¹ð¡§%s ¤Ø¤Î°ú¿ô¤¬ÉÔ­¤·¤Æ¤¤¤Þ¤¹¡£"
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr "·Ù¹ð¡§%s ¤Ø¤Î°ú¿ô¤¬Â¿²á¤®¤Þ¤¹ (Ķ¤¨¤¿Ê¬¤Ï̵»ë¤µ¤ì¤Þ¤¹)¡£"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "`%s' ¤Ë¿ô»ú¤Ç¤Ê¤¤°ú¿ô¤¬ÅϤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô define_macro () Æâ¤Î¥È¡¼¥¯¥ó¥Ç¡¼¥¿¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr "`%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr "ÆâÉô¥¨¥é¡¼¡§`Built-in' ¤È¤¤¤¦¥Ó¥ë¥È¥¤¥ó¥Þ¥¯¥í¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô m4_dumpdef () ¤Î¥È¡¼¥¯¥ó¥Ç¡¼¥¿¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr "¥Þ¥¯¥í `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô m4_defn () Æâ¤Î¥·¥ó¥Ü¥ë¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
@@ -59,50 +59,55 @@ msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô m4_defn () Æâ¤Î¥·¥ó¥Ü¥ë¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
msgid "Cannot open pipe to command `%s'"
msgstr "¥³¥Þ¥ó¥É `%s' ¤Ø¤Î¥Ñ¥¤¥×¤¬¥ª¡¼¥×¥ó¤Ç¤­¤Þ¤»¤ó¡£"
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "eval ¤Î´ð¿ô ( %d ¿ÊË¡) ¤Î·å¿ô¤¬µöÍÆÈϰϳ°¤Ë¤¢¤ê¤Þ¤¹¡£"
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr "eval ¤Î½ÐÎÏ·å¿ô¤¬Éé¿ô¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£"
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr "`%s' ¤Ë¿ô»ú¤Ç¤Ê¤¤°ú¿ô¤¬ÅϤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr "`%s' ¤ò undivert ¤Ç¤­¤Þ¤»¤ó¡£"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "`%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr "`%s' ¤ò¥ª¡¼¥×¥ó¤Ç¤­¤Þ¤»¤ó¡£"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "debugmode ¥Þ¥¯¥í¤Ë¤ª¤¤¤Æ %s ¤ÏÉÔÀµ¤Ê¥Ç¥Ð¥Ã¥°¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£"
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr "`%s' ¤ò¥¨¥é¡¼¥í¥°¥Õ¥¡¥¤¥ë¤È¤·¤Æ¥»¥Ã¥È¤Ç¤­¤Þ¤»¤ó¡£"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr "·Ù¹ð¡§\\0 ¤Ïµì¼°¤ÎÍÑË¡¤Ç¤¹¡£\\& ¤òÂå¤ï¤ê¤Ë»È¤Ã¤Æ²¼¤µ¤¤¡£"
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr "`%s' : %s ¤Ï¡¢ÉÔÀµ¤ÊÀµµ¬É½¸½¤Ç¤¹¡£"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr "Àµµ¬É½¸½ %s ¤Î¥Þ¥Ã¥Á¥ó¥°¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"
@@ -119,51 +124,51 @@ msgstr ""
"ÆâÉô¥¨¥é¡¼¡§¥È¡¼¥¯¥ó¥Ç¡¼¥¿¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£\n"
" (´Ø¿ô trace_pre () ¤¬¤³¤Î¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò½Ð¤·¤Æ¤¤¤Þ¤¹¡£)"
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "eval ¤Ç %s ¤È¤¤¤¦ÉÔÀµ¤Êɽ¸½¤¬ÍѤ¤¤é¤ì¤Æ¤¤¤Þ¤¹ (ÊĤ¸³ç¸Ì¤¬¤¢¤ê¤Þ¤»¤ó)¡£"
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr "eval ¤Ç %s ¤È¤¤¤¦ÉÔÀµ¤Ê¼°¤¬ÍѤ¤¤é¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr ""
"eval ¤Ç `%s' ¤È¤¤¤¦ÉÔÀµ¤Êɽ¸½¤¬ÍѤ¤¤é¤ì¤Æ¤¤¤Þ¤¹ \n"
" (ÆþÎϥǡ¼¥¿¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó)¡£"
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "eval ¤Ç %s ¤È¤¤¤¦ÉÔÀµ¤Ê¼°¤¬ÍѤ¤¤é¤ì¤Æ¤¤¤Þ¤¹ (ÆþÎϥǡ¼¥¿¤¬Â¿²á¤®¤Þ¤¹)¡£"
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr "`%s' ¤È¤¤¤¦É½¸½¤Ç¡¢0 ¤Ë¤è¤ë³ä»»¤¬¹Ô¤ï¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr "`%s' ¤È¤¤¤¦ eval ¤Ç¡¢´ð¿ô¤¬ 0 ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£"
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô evaluate () Æâ¤Î¥¨¥é¡¼¥³¡¼¥É¤¬ÉÔÀµ¤Ç¤¹¡£"
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô cmp_term () ¤ÎÈæ³Ó±é»»»Ò¤¬ÉÔÀµ¤Ç¤¹¡£"
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§shift_term () ¤Î¥·¥Õ¥È±é»»»Ò¤¬ÉÔÀµ¤Ç¤¹¡£"
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô mult_term () Æâ¤Î±é»»»Ò¤¬ÉÔÀµ¤Ç¤¹¡£"
@@ -198,41 +203,37 @@ msgstr "Åà·ë¥Õ¥¡¥¤¥ë¤Î EOF ¤¬Á᤯Íè²á¤®¤Æ¤¤¤Þ¤¹¡£"
msgid "`%s' from frozen file not found in builtin table!"
msgstr "Åà·ë¥Õ¥¡¥¤¥ë¤Î %s ¤Ï¥Ó¥ë¥È¥¤¥ó¥³¥Þ¥ó¥É¤Î¥Æ¡¼¥Ö¥ë¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: src/input.c:174
+#: src/input.c:306
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "¥Õ¥¡¥¤¥ë %s, %d ¹ÔÌܤ«¤éÆþÎϤ·Ä¾¤·¤Þ¤¹¡£"
+
+#: src/input.c:334
#, c-format
msgid "Input read from %s"
msgstr "%s ¤«¤é¤ÎÆþÎϤòÆɤ߹þ¤ß¤Þ¤¹¡£"
-#: src/input.c:231
+#: src/input.c:494
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "ÆâÉô¥¨¥é¡¼¡§ºÆµ¢Åª¤Ëʸ»úÎó¤ò push ¤·¤Æ¤¤¤Þ¤¹¡£"
-#: src/input.c:311
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "¥Õ¥¡¥¤¥ë %s, %d ¹ÔÌܤ«¤éÆþÎϤ·Ä¾¤·¤Þ¤¹¡£"
-
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô pop_input () Æâ¤Ç¥¹¥¿¥Ã¥¯¤ÎÆþÎϤ˼ºÇÔ¤·¤Æ¤¤¤Þ¤¹¡£"
-
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô init_macro_token () ¤¬ÉÔÀµ¤Ë¸Æ¤Ð¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô peek_input () Æâ¤Ç¥¹¥¿¥Ã¥¯¤ÎÆþÎϤ˼ºÇÔ¤·¤Æ¤¤¤Þ¤¹¡£"
-
-#: src/input.c:470
+#: src/input.c:651
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô next_char () Æâ¤Ç¥¹¥¿¥Ã¥¯¤ÎÆþÎϤ˼ºÇÔ¤·¤Æ¤¤¤Þ¤¹¡£"
-#: src/input.c:550
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô peek_input () Æâ¤Ç¥¹¥¿¥Ã¥¯¤ÎÆþÎϤ˼ºÇÔ¤·¤Æ¤¤¤Þ¤¹¡£"
+
+#: src/input.c:791
msgid "NONE"
msgstr "¤Ê¤·"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr "¥¨¥é¡¼: ʸ»úÎóÆâ¤Ë¥Õ¥¡¥¤¥ë¤Î½ªÃ¼µ­¹æ¤¬¤¢¤ê¤Þ¤¹¡£"
@@ -478,6 +479,9 @@ msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô symbol_lookup () ¤Ø¤Î°ú¿ô mode ¤¬ÉÔÀµ¤Ç¤¹¡£"
msgid "Name `%s' is unknown\n"
msgstr "`%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£\n"
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô pop_input () Æâ¤Ç¥¹¥¿¥Ã¥¯¤ÎÆþÎϤ˼ºÇÔ¤·¤Æ¤¤¤Þ¤¹¡£"
+
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "`%s' : %s ¤Ï¡¢ÉÔÀµ¤ÊÀµµ¬É½¸½¤Ç¤¹¡£"
diff --git a/po/m4.pot b/po/m4.pot
index 6fd3c44c..e52d23cd 100644
--- a/po/m4.pot
+++ b/po/m4.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,44 +14,44 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr ""
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr ""
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr ""
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr ""
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr ""
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr ""
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr ""
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr ""
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr ""
@@ -60,50 +60,55 @@ msgstr ""
msgid "Cannot open pipe to command `%s'"
msgstr ""
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr ""
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr ""
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr ""
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr ""
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr ""
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr ""
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr ""
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr ""
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr ""
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr ""
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr ""
@@ -116,49 +121,49 @@ msgstr ""
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr ""
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr ""
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr ""
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr ""
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr ""
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr ""
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr ""
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr ""
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr ""
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr ""
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr ""
@@ -192,41 +197,37 @@ msgstr ""
msgid "`%s' from frozen file not found in builtin table!"
msgstr ""
-#: src/input.c:174
+#: src/input.c:306
#, c-format
-msgid "Input read from %s"
-msgstr ""
-
-#: src/input.c:231
-msgid "INTERNAL ERROR: Recursive push_string!"
+msgid "Input reverted to %s, line %d"
msgstr ""
-#: src/input.c:311
+#: src/input.c:334
#, c-format
-msgid "Input reverted to %s, line %d"
+msgid "Input read from %s"
msgstr ""
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#: src/input.c:494
+msgid "INTERNAL ERROR: Recursive push_string!"
msgstr ""
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr ""
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+#: src/input.c:651
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr ""
-#: src/input.c:470
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
msgstr ""
-#: src/input.c:550
+#: src/input.c:791
msgid "NONE"
msgstr ""
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr ""
diff --git a/po/nl.gmo b/po/nl.gmo
index 13e14d96..0898b840 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index d4efd62f..8d72d241 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4d\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"PO-Revision-Date: 1998-05-23 09:27+02:00\n"
"Last-Translator: Erick Branderhorst <Erick.Branderhorst@asml.nl>\n"
"Language-Team: dutch <nl@li.org>\n"
@@ -13,45 +13,45 @@ msgstr ""
"Content-Type: text/plain; charset=\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "Let op: Te weinig argument voor ingebouwde functie `%s'"
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr ""
"Let op: Overbodige argumenten voor ingebouwde functie `%s' worden genegeerd"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "Niet numeriek argument voor ingebouwde functie `%s'"
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "INTERNE FOUT: Onjuist teken data type in define_macro ()"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr "Ongedefinieerde naam %s"
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr "INTERNE FOUT: Ingebouwde functie niet gevonden in functie tabel!"
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr "INTERNE FOUT: Onjuist teken data type in m4_dumpdef ()"
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr "Ongedefinieerde macro `%s'"
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "INTERNE FOUT: Onjuist symbool type in m4_defn ()"
@@ -60,50 +60,55 @@ msgstr "INTERNE FOUT: Onjuist symbool type in m4_defn ()"
msgid "Cannot open pipe to command `%s'"
msgstr "Kan geen pijp openen voor commando `%s'"
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "Radix in evaluatie buiten bereik (radix = %d)"
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr "Negatieve breedte te evalueren"
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr "Niet numeriek argument voor %s"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr "Cannot undivert %s"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "Ongedefinieerde naam %s"
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr "Kan %s niet openen"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "Debugmode: onjuiste debug vlaggen: `%s'"
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr "Kan fout bestand niet instellen: %s"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr "LET OP: \\0 zal verdwijnen, gebruik hiervoor \\& als vervanging"
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr "Onjuiste reguliere expressie `%s': %s"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr "Fout overeenkomen reguliere expressies `%s'"
@@ -118,49 +123,49 @@ msgstr ""
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr "INTERNE FOUT: Onjuiste teken data type (trace_pre ())"
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "Onjuiste expressie in evaluatie (ontbrekend rechter haakje): %s"
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr "Onjuist expressie in evaluatie: %s"
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr "Onjuist expressie in evaluatie (onjuiste invoer): %s"
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "Onjuist expressie in evaluatie (te veel invoer): %s"
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr "Delen door nul in evaluatie: %s"
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr "Modulo door nul in evaluatie: %s"
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "INTERNE FOUT: Onjuiste fout code in evaluate ()"
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr "INTERNE FOUT: Onjuiste vergelijkings operator in cmp_term ()"
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr "INTERNE FOUT: Onjuiste schuif operator in shift_term ()"
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "INTERNE FOUT: Onjuiste operator in mult_term ()"
@@ -194,41 +199,37 @@ msgstr "Voorbarig einde van gefixeerd bestand"
msgid "`%s' from frozen file not found in builtin table!"
msgstr "`%s' van gefixeerd bestand niet gevonden in functie tabel!"
-#: src/input.c:174
+#: src/input.c:306
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Invoer reverted naar %s, lijn %d"
+
+#: src/input.c:334
#, c-format
msgid "Input read from %s"
msgstr "Invoer gelezen vanuit %s"
-#: src/input.c:231
+#: src/input.c:494
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "INTERNE FOUT: Recursieve push_string!"
-#: src/input.c:311
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Invoer reverted naar %s, lijn %d"
-
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr "INTERNE FOUT: Invoer stapel botch in pop_input ()"
-
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "INTERNE FOUT: Onjuiste aanroep naar init_macro_token ()"
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "INTERNE FOUT: Invoer stapel botch in peek_input ()"
-
-#: src/input.c:470
+#: src/input.c:651
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr "INTERNE FOUT: Invoer stapel botch in next_char ()"
-#: src/input.c:550
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERNE FOUT: Invoer stapel botch in peek_input ()"
+
+#: src/input.c:791
msgid "NONE"
msgstr "GEEN"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr "FOUT: Einde van bestand teken in string"
@@ -460,5 +461,8 @@ msgstr "INTERNE FOUT: Ongeldige mode voor symbol_lookup ()"
msgid "Name `%s' is unknown\n"
msgstr "Naam `%s' is niet bekend\n"
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "INTERNE FOUT: Invoer stapel botch in pop_input ()"
+
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "Onjuiste reguliere expressie: `%s': %s"
diff --git a/po/ru.gmo b/po/ru.gmo
index bd27331a..9642582e 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index 1f847158..c7843792 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
"PO-Revision-Date: 1997-07-12 20:58\n"
"Last-Translator: Denis Y. Pershin <dyp@siblug.org>\n"
"Language-Team: Russian <ru@li.org>\n"
@@ -12,46 +12,46 @@ msgstr ""
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: óÌÉÛËÏÍ ÍÁÌÏ ÁÒÇÕÍÅÎÔÏ× ÄÌÑ ×ÓÔÒÏÅÎÎÏÊ ÌÅËÓÅÍÙ '%s'"
-#: src/builtin.c:278
+#: src/builtin.c:282
#, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr ""
"ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: éÚÂÙÔÏÞÎÙÅ ÁÒÇÕÍÅÎÔÙ ÄÌÑ ×ÓÔÒÏÅÎÎÏÊ ÌÅËÓÅÍÙ '%s' "
"ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÙ"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "îÅ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÄÌÑ ×ÓÔÒÏÅÎÎÏÊ ÌÅËÓÅÍÙ '%s'"
-#: src/builtin.c:438
+#: src/builtin.c:409
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÔÉÐ ÌÅËÓÅÍÙ × define_macro ()"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, c-format
msgid "Undefined name %s"
msgstr "éÍÑ %s ÎÅÏÐÒÅÄÅÌÅÎÏ"
-#: src/builtin.c:636
+#: src/builtin.c:607
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr "÷îõôòåîîññ ïûéâëá: ÷ÓÔÒÏÅÎÎÁÑ ÌÅËÓÅÍÁ ÎÅ ÎÁÊÄÅÎÁ!"
-#: src/builtin.c:644
+#: src/builtin.c:615
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÔÉÐ ÌÅËÓÅÍÙ × m4_dumpdef ()"
-#: src/builtin.c:695
+#: src/builtin.c:666
#, c-format
msgid "Undefined macro `%s'"
msgstr "îÅÏÐÒÅÄÅÌÅÎÎÙÊ ÍÁËÒÏÓ '%s'"
-#: src/builtin.c:735
+#: src/builtin.c:706
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÔÉÐ ÓÉÍ×ÏÌÁ × m4_defn ()"
@@ -60,50 +60,55 @@ msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÔÉÐ ÓÉÍ×ÏÌÁ × m4_defn ()"
msgid "Cannot open pipe to command `%s'"
msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ËÁÎÁÌ ÄÌÑ ËÏÍÍÁÎÄÙ '%s'"
-#: src/builtin.c:811
+#: src/builtin.c:809
#, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "òÁÄÉËÓ × ×ÙÒÁÖÅÎÉÉ ×ÙÈÏÄÉÔ ÚÁ ÐÒÅÄÅÌÙ (radix = %d)"
-#: src/builtin.c:820
+#: src/builtin.c:818
msgid "Negative width to eval"
msgstr "ïÔÒÉÃÁÔÅÌØÎÁÑ ÛÉÒÉÎÁ"
-#: src/builtin.c:925
+#: src/builtin.c:910
#, c-format
msgid "Non-numeric argument to %s"
msgstr "îÅ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÄÌÑ %s"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, c-format
msgid "Cannot undivert %s"
msgstr "îÅ×ÏÚÍÏÖÎÏ ×ÅÒÎÕÔØ ×Ù×ÏÄ ÉÚ %s"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "éÍÑ %s ÎÅÏÐÒÅÄÅÌÅÎÏ"
+
+#: src/builtin.c:1116 src/freeze.c:207
#, c-format
msgid "Cannot open %s"
msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ %s"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "òÅÖÉÍ ÏÔÌÁÄËÉ: ÎÅ×ÅÒÎÙÊ ÆÌÁÇ ÏÔÌÁÄËÉ: '%s'"
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, c-format
msgid "Cannot set error file: %s"
msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÚÎÁÞÉÔØ ÆÁÊÌ ÏÛÉÂÏË %s"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr "ðòåäõðòåöäåîéå: \\0 ÉÓÞÅÚÎÅÔ, ÉÓÐÏÌØÚÕÊÔÅ \\& × ÚÁÍÅÎÁÈ"
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, c-format
msgid "Bad regular expression `%s': %s"
msgstr "îÅ×ÅÒÎÏÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ: '%s': %s"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, c-format
msgid "Error matching regular expression `%s'"
msgstr "ïÛÉÂËÁ ÓÏÐÏÓÔÁ×ÌÅÎÉÑ ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑ '%s'"
@@ -116,49 +121,49 @@ msgstr "÷îõôòåîîññ ïûéâëá: ÷ÓÔÒÏÅÎÎÁÑ ÌÅËÓÅÍÁ ÎÅ ÎÁÊÄÅÎÁ! (trace_pre ())"
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÔÉÐ ÌÅËÓÅÍÙ (trace_pre ())"
-#: src/eval.c:277
+#: src/eval.c:297
#, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "îÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ (ÏÔÓÕÔÓÔ×ÕÅÔ ÐÒÁ×ÙÅ ÓËÏÂËÉ): %s"
-#: src/eval.c:283
+#: src/eval.c:303
#, c-format
msgid "Bad expression in eval: %s"
msgstr "îÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ: %s"
-#: src/eval.c:288
+#: src/eval.c:308
#, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr "îÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ (bad input): %s"
-#: src/eval.c:293
+#: src/eval.c:313
#, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "îÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ (excess input): %s"
-#: src/eval.c:298
+#: src/eval.c:318
#, c-format
msgid "Divide by zero in eval: %s"
msgstr "äÅÌÅÎÉÅ ÎÁ ÎÏÌØ × ×ÙÒÁÖÅÎÉÉ: %s"
-#: src/eval.c:303
+#: src/eval.c:323
#, c-format
msgid "Modulo by zero in eval: %s"
msgstr "íÏÄÕÌØÎÏÅ ÄÅÌÅÎÉÅ ÎÁ ÎÏÌØ × ×ÙÒÁÖÅÎÉÉ: %s"
-#: src/eval.c:308
+#: src/eval.c:328
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ËÏÄ ÏÛÉÂËÉ × evaluate ()"
-#: src/eval.c:547
+#: src/eval.c:582
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÏÅ ÓÒÁ×ÎÅÎÉÅ × cmp_term ()"
-#: src/eval.c:590
+#: src/eval.c:627
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÏÐÅÒÁÔÏÒ ÓÄ×ÉÇÁ × shift_term ()"
-#: src/eval.c:674
+#: src/eval.c:726
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ÏÐÅÒÁÔÏÒ × mult_term ()"
@@ -192,41 +197,37 @@ msgstr "ðÒÅÖÄÅ×ÒÅÍÅÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ-ÏÂÒÁÚÁ ÐÁÍÑÔÉ"
msgid "`%s' from frozen file not found in builtin table!"
msgstr "'%s' ÉÚ ÆÁÊÌÁ-ÏÂÒÁÚÁ ÐÁÍÑÔÉ ÎÅ ÎÁÊÄÅÎÁ ×Ï ×ÓÔÒÏÅÎÎÏÊ ÔÁÂÌÉÃÅ!"
-#: src/input.c:174
+#: src/input.c:306
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "÷×ÏÄ ÐÅÒÅÎÁÐÒÁ×ÌÅÎ × %s , ÓÔÒÏËÁ %d"
+
+#: src/input.c:334
#, c-format
msgid "Input read from %s"
msgstr "÷×ÏÄ ÉÚ %s"
-#: src/input.c:231
+#: src/input.c:494
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "÷îõôòåîîññ ïûéâëá: òÅËÕÒÓÉ×ÎÁÑ push_string!"
-#: src/input.c:311
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "÷×ÏÄ ÐÅÒÅÎÁÐÒÁ×ÌÅÎ × %s , ÓÔÒÏËÁ %d"
-
-#: src/input.c:325
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr "÷îõôòåîîññ ïûéâëá: ïÛÉÂËÁ ×ÈÏÄÎÏÇÏ ÓÔÅËÁ × pop_input ()"
-
-#: src/input.c:364
+#: src/input.c:611
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "÷îõôòåîîññ ïûéâëá: îÅ×ÅÒÎÙÊ ×ÙÚÏ× init_macro_token ()"
-#: src/input.c:413
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "÷îõôòåîîññ ïûéâëá: ïÛÉÂËÁ ×ÈÏÄÎÏÇÏ ÓÔÅËÁ × peek_input ()"
-
-#: src/input.c:470
+#: src/input.c:651
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr "÷îõôòåîîññ ïûéâëá: ïÛÉÂËÁ ×ÈÏÄÎÏÇÏ ÓÔÅËÁ × next_char ()"
-#: src/input.c:550
+#: src/input.c:688
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "÷îõôòåîîññ ïûéâëá: ïÛÉÂËÁ ×ÈÏÄÎÏÇÏ ÓÔÅËÁ × peek_input ()"
+
+#: src/input.c:791
msgid "NONE"
msgstr "îéþåçï"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
msgid "ERROR: EOF in string"
msgstr "ïûéâëá: ëÏÎÅà ÆÁÊÌÁ × ÓÔÒÏËÅ"
@@ -461,6 +462,9 @@ msgstr "÷îõôòåîîññ ïûéâëá: ÎÅ×ÅÒÎÙÊ ÒÅÖÉÍ ÄÌÑ symbol_lookup ()"
msgid "Name `%s' is unknown\n"
msgstr "éÍÑ `%s' ÎÅÉÚ×ÅÓÔÎÏ\n"
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "÷îõôòåîîññ ïûéâëá: ïÛÉÂËÁ ×ÈÏÄÎÏÇÏ ÓÔÅËÁ × pop_input ()"
+
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "îÅ×ÅÒÎÏÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ: '%s': %s"
diff --git a/po/sv.gmo b/po/sv.gmo
index 9898e0ea..1a47c5ff 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 0ef9639b..25e7f65d 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,60 +1,60 @@
# Swedish messages for m4
# Copyright (C) 1996 Free Software Foundation, Inc.
# <Jan.Djarv@mbox200.swipnet.se>, 1996.
-# $Revision: 1.1.1.1 $
+# $Revision: 1.1.1.2 $
#
msgid ""
msgstr ""
"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
-"PO-Revision-Date: $Date: 2000/02/17 03:06:54 $\n"
+"POT-Creation-Date: 1998-08-10 06:45+0200\n"
+"PO-Revision-Date: $Date: 2000/02/17 03:07:04 $\n"
"Last-Translator: Jan Djärv <Jan.Djarv@mbox200.swipnet.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: src/builtin.c:272
+#: src/builtin.c:276
#, fuzzy, c-format
msgid "Warning: Too few arguments to built-in `%s'"
msgstr "Varning: För få argument till inbyggt makro \"%s\""
-#: src/builtin.c:278
+#: src/builtin.c:282
#, fuzzy, c-format
msgid "Warning: Excess arguments to built-in `%s' ignored"
msgstr "Varning: Överskottsargument till inbyggt makro \"%s\" ignorerade"
-#: src/builtin.c:298
+#: src/builtin.c:310
#, fuzzy, c-format
msgid "Non-numeric argument to built-in `%s'"
msgstr "Ickenumeriskt argument till inbyggt makro \"%s\""
-#: src/builtin.c:438
+#: src/builtin.c:409
#, fuzzy
msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
msgstr "INTERNT FEL: Otillåten lexikalisk datatyp i define_macro ()"
-#: src/builtin.c:608 src/builtin.c:671 src/builtin.c:1188 src/builtin.c:1212
+#: src/builtin.c:579 src/builtin.c:642 src/builtin.c:1261 src/builtin.c:1285
#, fuzzy, c-format
msgid "Undefined name %s"
msgstr "Odefinierat namn \"%s\""
-#: src/builtin.c:636
+#: src/builtin.c:607
#, fuzzy
msgid "INTERNAL ERROR: Builtin not found in builtin table!"
msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
-#: src/builtin.c:644
+#: src/builtin.c:615
#, fuzzy
msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
msgstr "INTERNT FEL: Otillåten lexikalisk datatyp i m4_dumpdef ()"
-#: src/builtin.c:695
+#: src/builtin.c:666
#, fuzzy, c-format
msgid "Undefined macro `%s'"
msgstr "Odefinierat makro \"%s\""
-#: src/builtin.c:735
+#: src/builtin.c:706
#, fuzzy
msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
msgstr "INTERNT FEL: Otillåten symboltyp i m4_defn ()"
@@ -64,52 +64,57 @@ msgstr "INTERNT FEL: Otillåten symboltyp i m4_defn ()"
msgid "Cannot open pipe to command `%s'"
msgstr "Kan inte skapa rör till kommandot \"%s\""
-#: src/builtin.c:811
+#: src/builtin.c:809
#, fuzzy, c-format
msgid "Radix in eval out of range (radix = %d)"
msgstr "Otillåten bas i \"eval\" (bas = %d)"
-#: src/builtin.c:820
+#: src/builtin.c:818
#, fuzzy
msgid "Negative width to eval"
msgstr "Negativ bredd till \"eval\""
-#: src/builtin.c:925
+#: src/builtin.c:910
#, fuzzy, c-format
msgid "Non-numeric argument to %s"
msgstr "Ickenumeriskt argument till %s"
-#: src/builtin.c:937
+#: src/builtin.c:922
#, fuzzy, c-format
msgid "Cannot undivert %s"
msgstr "Kan inte återleda %s"
-#: src/builtin.c:1043 src/freeze.c:207
+#: src/builtin.c:1066
+#, fuzzy, c-format
+msgid "Undefined syntax code %c"
+msgstr "Odefinierat namn \"%s\""
+
+#: src/builtin.c:1116 src/freeze.c:207
#, fuzzy, c-format
msgid "Cannot open %s"
msgstr "Kan inte öppna %s"
-#: src/builtin.c:1248
+#: src/builtin.c:1321
#, fuzzy, c-format
msgid "Debugmode: bad debug flags: `%s'"
msgstr "Felsökningsläge: okänd flagga: \"%s\""
-#: src/builtin.c:1284
+#: src/builtin.c:1357
#, fuzzy, c-format
msgid "Cannot set error file: %s"
msgstr "Kan inte sätta felutskriftsfil: %s"
-#: src/builtin.c:1501
+#: src/builtin.c:1574
#, fuzzy
msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
msgstr "VARNING: \\0 kommer att försvinna, använd \\& i ersättningar"
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
+#: src/builtin.c:1635 src/builtin.c:1695 src/input.c:979
#, fuzzy, c-format
msgid "Bad regular expression `%s': %s"
msgstr "Otillåtet reguljäruttryck \"%s\": %s"
-#: src/builtin.c:1573 src/builtin.c:1646
+#: src/builtin.c:1646 src/builtin.c:1719
#, fuzzy, c-format
msgid "Error matching regular expression `%s'"
msgstr "Reguljäruttrycket \"%s\" matchar inte"
@@ -124,52 +129,52 @@ msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen (trace_pre ())"
msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
msgstr "INTERNT FEL: Otillåten lexikalisk datatyp (trace_pre ())"
-#: src/eval.c:277
+#: src/eval.c:297
#, fuzzy, c-format
msgid "Bad expression in eval (missing right parenthesis): %s"
msgstr "Otillåtet uttryck i \"eval\" (högerparentes saknas): %s"
-#: src/eval.c:283
+#: src/eval.c:303
#, fuzzy, c-format
msgid "Bad expression in eval: %s"
msgstr "Otillåtet uttryck i \"eval\": %s"
-#: src/eval.c:288
+#: src/eval.c:308
#, fuzzy, c-format
msgid "Bad expression in eval (bad input): %s"
msgstr "Otillåtet uttryck i \"eval\" (otillåtet indata): %s"
-#: src/eval.c:293
+#: src/eval.c:313
#, fuzzy, c-format
msgid "Bad expression in eval (excess input): %s"
msgstr "Otillåtet uttryck i \"eval\" (för mycket indata): %s"
-#: src/eval.c:298
+#: src/eval.c:318
#, fuzzy, c-format
msgid "Divide by zero in eval: %s"
msgstr "Division med noll i \"eval\": %s"
-#: src/eval.c:303
+#: src/eval.c:323
#, fuzzy, c-format
msgid "Modulo by zero in eval: %s"
msgstr "Modulo med noll i \"eval\": %s"
-#: src/eval.c:308
+#: src/eval.c:328
#, fuzzy
msgid "INTERNAL ERROR: Bad error code in evaluate ()"
msgstr "INTERNT FEL: Otillåten felkod i evaluate ()"
-#: src/eval.c:547
+#: src/eval.c:582
#, fuzzy
msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
msgstr "INTERNT FEL: Otillåten jämförelseoperator i cmp_term ()"
-#: src/eval.c:590
+#: src/eval.c:627
#, fuzzy
msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
msgstr "INTERNT FEL: Otillåten skiftoperator i shift_term ()"
-#: src/eval.c:674
+#: src/eval.c:726
#, fuzzy
msgid "INTERNAL ERROR: Bad operator in mult_term ()"
msgstr "INTERNT FEL: Otillåten operator i mult_term ()"
@@ -209,47 +214,42 @@ msgstr "För tidigt filslut i fryst fil"
msgid "`%s' from frozen file not found in builtin table!"
msgstr "\"%s\" från fryst fil hittades inte i tabellen för inbyggda makron!"
-#: src/input.c:174
+#: src/input.c:306
+#, fuzzy, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Indata återgår till %s, rad %d"
+
+#: src/input.c:334
#, fuzzy, c-format
msgid "Input read from %s"
msgstr "Indata läses från %s"
-#: src/input.c:231
+#: src/input.c:494
#, fuzzy
msgid "INTERNAL ERROR: Recursive push_string!"
msgstr "INTERNT FEL: Rekursiv push_string!"
-#: src/input.c:311
-#, fuzzy, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Indata återgår till %s, rad %d"
-
-#: src/input.c:325
-#, fuzzy
-msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-msgstr "INTERNT FEL: Instacken havererade i pop_input ()"
-
-#: src/input.c:364
+#: src/input.c:611
#, fuzzy
msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
msgstr "INTERNT FEL: Otillåtet anrop till init_macro_token ()"
-#: src/input.c:413
-#, fuzzy
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "INTERNT FEL: Instacken havererade i peek_input ()"
-
-#: src/input.c:470
+#: src/input.c:651
#, fuzzy
msgid "INTERNAL ERROR: Input stack botch in next_char ()"
msgstr "INTERNT FEL: Instacken havererade i next_char ()"
-#: src/input.c:550
+#: src/input.c:688
+#, fuzzy
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERNT FEL: Instacken havererade i peek_input ()"
+
+#: src/input.c:791
#, fuzzy
msgid "NONE"
msgstr "INGET"
-#: src/input.c:777
+#: src/input.c:1130 src/input.c:1157
#, fuzzy
msgid "ERROR: EOF in string"
msgstr "FEL: Filslut i sträng"
@@ -501,6 +501,10 @@ msgid "Name `%s' is unknown\n"
msgstr "Namnet \"%s\" är okänt\n"
#, fuzzy
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "INTERNT FEL: Instacken havererade i pop_input ()"
+
+#, fuzzy
#~ msgid "Bad regular expression: `%s': %s"
#~ msgstr "Otillåtet reguljäruttryck \"%s\": %s"
diff --git a/src/Makefile.am b/src/Makefile.am
index 203d36c7..d70aa081 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,8 +7,8 @@ bin_PROGRAMS = m4
INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib
-m4_SOURCES = m4.c m4.h builtin.c debug.c eval.c format.c freeze.c input.c \
- macro.c output.c path.c symtab.c stackovf.c
+m4_SOURCES = m4.c m4.h builtin.c debug.c eval.c numb.c numb.h format.c \
+ freeze.c input.c macro.c output.c path.c symtab.c stackovf.c
m4_LDADD = ../lib/libm4.a @INTLLIBS@
diff --git a/src/Makefile.in b/src/Makefile.in
index 7ca24bbe..c09bdcdf 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -96,8 +96,8 @@ bin_PROGRAMS = m4
INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(top_srcdir)/lib
-m4_SOURCES = m4.c m4.h builtin.c debug.c eval.c format.c freeze.c input.c \
- macro.c output.c path.c symtab.c stackovf.c
+m4_SOURCES = m4.c m4.h builtin.c debug.c eval.c numb.c numb.h format.c \
+ freeze.c input.c macro.c output.c path.c symtab.c stackovf.c
m4_LDADD = ../lib/libm4.a @INTLLIBS@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -110,7 +110,7 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
ANSI2KNR = @ANSI2KNR@
-m4_OBJECTS = m4$U.o builtin$U.o debug$U.o eval$U.o format$U.o \
+m4_OBJECTS = m4$U.o builtin$U.o debug$U.o eval$U.o numb$U.o format$U.o \
freeze$U.o input$U.o macro$U.o output$U.o path$U.o symtab$U.o \
stackovf$U.o
m4_DEPENDENCIES = ../lib/libm4.a
@@ -224,6 +224,8 @@ m4_.c: m4.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/m4.c; then echo $(srcdir)/m4.c; else echo m4.c; fi` | $(ANSI2KNR) m4_.c
macro_.c: macro.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/macro.c; then echo $(srcdir)/macro.c; else echo macro.c; fi` | $(ANSI2KNR) macro_.c
+numb_.c: numb.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/numb.c; then echo $(srcdir)/numb.c; else echo numb.c; fi` | $(ANSI2KNR) numb_.c
output_.c: output.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/output.c; then echo $(srcdir)/output.c; else echo output.c; fi` | $(ANSI2KNR) output_.c
path_.c: path.c $(ANSI2KNR)
@@ -233,7 +235,7 @@ stackovf_.c: stackovf.c $(ANSI2KNR)
symtab_.c: symtab.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | $(ANSI2KNR) symtab_.c
builtin_.o debug_.o eval_.o format_.o freeze_.o input_.o m4_.o macro_.o \
-output_.o path_.o stackovf_.o symtab_.o : $(ANSI2KNR)
+numb_.o output_.o path_.o stackovf_.o symtab_.o : $(ANSI2KNR)
tags: TAGS
@@ -273,12 +275,13 @@ distdir: $(DISTFILES)
done
builtin.o: builtin.c m4.h ../config.h ../lib/obstack.h ../lib/regex.h
debug.o: debug.c m4.h ../config.h ../lib/obstack.h
-eval.o: eval.c m4.h ../config.h ../lib/obstack.h
+eval.o: eval.c m4.h ../config.h ../lib/obstack.h numb.h
format.o: format.c m4.h ../config.h ../lib/obstack.h
freeze.o: freeze.c m4.h ../config.h ../lib/obstack.h
input.o: input.c m4.h ../config.h ../lib/obstack.h
m4.o: m4.c m4.h ../config.h ../lib/obstack.h ../lib/getopt.h
macro.o: macro.c m4.h ../config.h ../lib/obstack.h
+numb.o: numb.c m4.h ../config.h ../lib/obstack.h numb.h
output.o: output.c m4.h ../config.h ../lib/obstack.h
path.o: path.c m4.h ../config.h ../lib/obstack.h
stackovf.o: stackovf.c m4.h ../config.h ../lib/obstack.h
diff --git a/src/builtin.c b/src/builtin.c
index d96ca220..941c799d 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -39,6 +39,7 @@ DECLARE (m4___line__);
DECLARE (m4_builtin);
DECLARE (m4_changecom);
DECLARE (m4_changequote);
+DECLARE (m4_changesyntax);
#ifdef ENABLE_CHANGEWORD
DECLARE (m4_changeword);
#endif
@@ -72,6 +73,7 @@ DECLARE (m4_regexp);
DECLARE (m4_shift);
DECLARE (m4_sinclude);
DECLARE (m4_substr);
+DECLARE (m4_syncoutput);
DECLARE (m4_syscmd);
DECLARE (m4_sysval);
DECLARE (m4_traceoff);
@@ -93,6 +95,7 @@ builtin_tab[] =
{ "builtin", TRUE, FALSE, TRUE, m4_builtin },
{ "changecom", FALSE, FALSE, FALSE, m4_changecom },
{ "changequote", FALSE, FALSE, FALSE, m4_changequote },
+ { "changesyntax", TRUE, FALSE, TRUE, m4_changesyntax },
#ifdef ENABLE_CHANGEWORD
{ "changeword", TRUE, FALSE, FALSE, m4_changeword },
#endif
@@ -126,6 +129,7 @@ builtin_tab[] =
{ "shift", FALSE, FALSE, FALSE, m4_shift },
{ "sinclude", FALSE, FALSE, TRUE, m4_sinclude },
{ "substr", FALSE, FALSE, TRUE, m4_substr },
+ { "syncoutput", TRUE, FALSE, TRUE, m4_syncoutput },
{ "syscmd", FALSE, FALSE, TRUE, m4_syscmd },
{ "sysval", FALSE, FALSE, FALSE, m4_sysval },
{ "traceoff", FALSE, FALSE, FALSE, m4_traceoff },
@@ -286,13 +290,21 @@ bad_argc (token_data *name, int argc, int min, int max)
| If the conversion fails, print error message for macro MACRO. Return |
| TRUE iff conversion succeeds. |
`--------------------------------------------------------------------------*/
+static const char *
+skip_space (const char *arg)
+{
+ while (IS_SPACE(*arg))
+ arg++;
+ return arg;
+}
static boolean
numeric_arg (token_data *macro, const char *arg, int *valuep)
{
char *endp;
- if (*arg == 0 || (*valuep = strtol (arg, &endp, 10), *endp != 0))
+ if (*arg == 0 || (*valuep = strtol (skip_space(arg), &endp, 10),
+ *skip_space(endp) != 0))
{
M4ERROR ((warning_status, 0,
_("Non-numeric argument to built-in `%s'"),
@@ -302,47 +314,6 @@ numeric_arg (token_data *macro, const char *arg, int *valuep)
return TRUE;
}
-/*------------------------------------------------------------------------.
-| The function ntoa () converts VALUE to a signed ascii representation in |
-| radix RADIX. |
-`------------------------------------------------------------------------*/
-
-/* Digits for number to ascii conversions. */
-static char const digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-static const char *
-ntoa (register eval_t value, int radix)
-{
- boolean negative;
- unsigned_eval_t uvalue;
- static char str[256];
- register char *s = &str[sizeof str];
-
- *--s = '\0';
-
- if (value < 0)
- {
- negative = TRUE;
- uvalue = (unsigned_eval_t) -value;
- }
- else
- {
- negative = FALSE;
- uvalue = (unsigned_eval_t) value;
- }
-
- do
- {
- *--s = digits[uvalue % radix];
- uvalue /= radix;
- }
- while (uvalue > 0);
-
- if (negative)
- *--s = '-';
- return s;
-}
-
/*----------------------------------------------------------------------.
| Format an int VAL, and stuff it into an obstack OBS. Used for macros |
| expanding to numbers. |
@@ -351,10 +322,10 @@ ntoa (register eval_t value, int radix)
static void
shipout_int (struct obstack *obs, int val)
{
- const char *s;
+ char buf[128];
- s = ntoa ((eval_t) val, 10);
- obstack_grow (obs, s, strlen (s));
+ sprintf(buf, "%d", val);
+ obstack_grow (obs, buf, strlen (buf));
}
/*----------------------------------------------------------------------.
@@ -738,6 +709,35 @@ m4_defn (struct obstack *obs, int argc, token_data **argv)
}
/*------------------------------------------------------------------------.
+| This contains macro which implements syncoutput() which takes one arg |
+| 1, on, yes - turn on sync lines |
+| 0, off, no - turn off sync lines |
+| everything else is silently ignored |
+| |
+`------------------------------------------------------------------------*/
+
+static void
+m4_syncoutput (struct obstack *obs, int argc, token_data **argv)
+{
+ if (bad_argc (argv[0], argc, 2, 2))
+ return;
+
+ if (TOKEN_DATA_TYPE (argv[1]) != TOKEN_TEXT)
+ return;
+
+ if (TOKEN_DATA_TEXT(argv[1])[0] == '0'
+ || TOKEN_DATA_TEXT(argv[1])[0] == 'n'
+ || (TOKEN_DATA_TEXT(argv[1])[0] == 'o'
+ && TOKEN_DATA_TEXT(argv[1])[1] == 'f'))
+ sync_output = 0;
+ else if (TOKEN_DATA_TEXT(argv[1])[0] == '1'
+ || TOKEN_DATA_TEXT(argv[1])[0] == 'y'
+ || (TOKEN_DATA_TEXT(argv[1])[0] == 'o'
+ && TOKEN_DATA_TEXT(argv[1])[1] == 'n'))
+ sync_output = 1;
+}
+
+/*------------------------------------------------------------------------.
| This section contains macros to handle the builtins "syscmd", "esyscmd" |
| and "sysval". "esyscmd" is GNU specific. |
`------------------------------------------------------------------------*/
@@ -794,10 +794,8 @@ m4_sysval (struct obstack *obs, int argc, token_data **argv)
static void
m4_eval (struct obstack *obs, int argc, token_data **argv)
{
- eval_t value;
int radix = 10;
int min = 1;
- const char *s;
if (bad_argc (argv[0], argc, 2, 4))
return;
@@ -805,7 +803,7 @@ m4_eval (struct obstack *obs, int argc, token_data **argv)
if (argc >= 3 && !numeric_arg (argv[0], ARG (2), &radix))
return;
- if (radix <= 1 || radix > (int) strlen (digits))
+ if (radix <= 1 || radix > 36)
{
M4ERROR ((warning_status, 0,
_("Radix in eval out of range (radix = %d)"), radix));
@@ -821,21 +819,8 @@ m4_eval (struct obstack *obs, int argc, token_data **argv)
return;
}
- if (evaluate (ARG (1), &value))
+ if (evaluate (obs, ARG (1), radix, min))
return;
-
- s = ntoa (value, radix);
-
- if (*s == '-')
- {
- obstack_1grow (obs, '-');
- min--;
- s++;
- }
- for (min -= strlen (s); --min >= 0;)
- obstack_1grow (obs, '0');
-
- obstack_grow (obs, s, strlen (s));
}
static void
@@ -939,9 +924,11 @@ m4_undivert (struct obstack *obs, int argc, token_data **argv)
}
}
-/* This section contains various macros, which does not fall into any
- specific group. These are "dnl", "shift", "changequote", "changecom"
- and "changeword". */
+/*-------------------------------------------------------------------.
+| This section contains various macros, which does not fall into any |
+| specific group. These are "dnl", "shift", "changequote", |
+| "changecom", "changesyntax" and "changeword". |
+`-------------------------------------------------------------------*/
/*------------------------------------------------------------------------.
| Delete all subsequent whitespace from input. The function skip_line () |
@@ -1000,6 +987,92 @@ m4_changecom (struct obstack *obs, int argc, token_data **argv)
(argc >= 3) ? TOKEN_DATA_TEXT (argv[2]) : NULL);
}
+/*-------------------------------------------------------------------.
+| Change the current input syntax. The function set_syntax () lives |
+| in input.c. For compability reasons, this function is not called, |
+| if not followed by an SYNTAX_OPEN. Also, any changes to comment |
+| delimiters and quotes made here will be overridden by a call to |
+| `changecom' or `changequote'. |
+`-------------------------------------------------------------------*/
+
+/* expand_ranges () from m4_translit () are used here. */
+static const char *expand_ranges (const char *s, struct obstack *obs);
+
+static void
+m4_changesyntax (struct obstack *obs, int argc, token_data **argv)
+{
+ int i;
+ int code;
+
+ if (bad_argc (argv[0], argc, 1, -1))
+ return;
+
+ for (i = 1; i < argc; i++)
+ {
+ switch (*TOKEN_DATA_TEXT (argv[i])) {
+ case 'I': case 'i':
+ code = SYNTAX_IGNORE;
+ break;
+ case 'O': case 'o':
+ code = SYNTAX_OTHER;
+ break;
+ case 'S': case 's':
+ code = SYNTAX_SPACE;
+ break;
+ case 'W': case 'w':
+ code = SYNTAX_ALPHA;
+ break;
+ case 'D': case 'd':
+ code = SYNTAX_NUM;
+ break;
+
+ case '(':
+ code = SYNTAX_OPEN;
+ break;
+ case ')':
+ code = SYNTAX_CLOSE;
+ break;
+ case ',':
+ code = SYNTAX_COMMA;
+ break;
+#if 0 /* not yet used */
+ case '$':
+ code = SYNTAX_DOLLAR;
+ break;
+#endif
+
+ case 'L': case 'l':
+ code = SYNTAX_LQUOTE;
+ break;
+ case 'R': case 'r':
+ code = SYNTAX_RQUOTE;
+ break;
+ case 'B': case 'b':
+ code = SYNTAX_BCOMM;
+ break;
+ case 'E': case 'e':
+ code = SYNTAX_ECOMM;
+ break;
+
+ case 'A': case 'a':
+ code = SYNTAX_ACTIVE;
+ break;
+
+ case '\0':
+ code = -1;
+ break;
+ default:
+ M4ERROR ((warning_status, 0,
+ _("Undefined syntax code %c"), *TOKEN_DATA_TEXT (argv[i])));
+ code = -1;
+ }
+
+ if (code >= 0)
+ set_syntax (code,
+ expand_ranges (TOKEN_DATA_TEXT (argv[i])+1, obs));
+ }
+}
+
#ifdef ENABLE_CHANGEWORD
/*-----------------------------------------------------------------------.
@@ -1684,7 +1757,7 @@ void
expand_user_macro (struct obstack *obs, symbol *sym,
int argc, token_data **argv)
{
- register const char *text;
+ const char *text;
int i;
for (text = SYMBOL_TEXT (sym); *text != '\0';)
@@ -1700,14 +1773,15 @@ expand_user_macro (struct obstack *obs, symbol *sym,
{
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- if (no_gnu_extensions)
+ if (no_gnu_extensions || !isdigit(text[1]))
{
i = *text++ - '0';
}
else
{
- for (i = 0; isdigit (*text); text++)
- i = i*10 + (*text - '0');
+ char *endp;
+ i = (int)strtol (text, &endp, 10);
+ text = endp;
}
if (i < argc)
obstack_grow (obs, TOKEN_DATA_TEXT (argv[i]),
diff --git a/src/debug.c b/src/debug.c
index e4df8d65..ba01e1e4 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -267,11 +267,11 @@ trace_format (...)
break;
case 'l':
- s = (debug_level & DEBUG_TRACE_QUOTE) ? lquote.string : "";
+ s = (debug_level & DEBUG_TRACE_QUOTE) ? (char *)lquote.string : "";
break;
case 'r':
- s = (debug_level & DEBUG_TRACE_QUOTE) ? rquote.string : "";
+ s = (debug_level & DEBUG_TRACE_QUOTE) ? (char *)rquote.string : "";
break;
case 'd':
diff --git a/src/eval.c b/src/eval.c
index cc89c545..32d64f32 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -22,6 +22,7 @@
is evaluate (). */
#include "m4.h"
+#include "numb.h"
/* Evaluates token types. */
@@ -30,7 +31,7 @@ typedef enum eval_token
ERROR,
PLUS, MINUS,
EXPONENT,
- TIMES, DIVIDE, MODULO,
+ TIMES, DIVIDE, MODULO, RATIO,
EQ, NOTEQ, GT, GTEQ, LS, LSEQ,
LSHIFT, RSHIFT,
LNOT, LAND, LOR,
@@ -145,7 +146,7 @@ eval_lex (eval_t *val)
else
base = 10;
- (*val) = 0;
+ numb_set_si(val,0);
for (; *eval_text; eval_text++)
{
if (isdigit (*eval_text))
@@ -160,7 +161,20 @@ eval_lex (eval_t *val)
if (digit >= base)
break;
- (*val) = (*val) * base + digit;
+ { /* (*val) = (*val) * base; */
+ eval_t xbase;
+ numb_init(xbase);
+ numb_set_si(&xbase,base);
+ numb_times(*val,xbase);
+ numb_fini(xbase);
+ }
+ { /* (*val) = (*val) + digit; */
+ eval_t xdigit;
+ numb_init(xdigit);
+ numb_set_si(&xdigit,digit);
+ numb_plus(*val,xdigit);
+ numb_fini(xdigit);
+ }
}
return NUMBER;
}
@@ -183,6 +197,8 @@ eval_lex (eval_t *val)
return DIVIDE;
case '%':
return MODULO;
+ case ':':
+ return RATIO;
case '=':
if (*eval_text == '=')
eval_text++;
@@ -255,14 +271,18 @@ eval_lex (eval_t *val)
`---------------------------------------*/
boolean
-evaluate (const char *expr, eval_t *val)
+evaluate (struct obstack *obs, const char *expr, const int radix, int min)
{
+ eval_t val;
eval_token et;
eval_error err;
+ numb_initialise();
eval_init_lex (expr);
- et = eval_lex (val);
- err = logical_or_term (et, val);
+
+ numb_init(val);
+ et = eval_lex (&val);
+ err = logical_or_term (et, &val);
if (err == NO_ERROR && *eval_text != '\0')
err = EXCESS_INPUT;
@@ -309,6 +329,10 @@ evaluate (const char *expr, eval_t *val)
abort ();
}
+ if (err == NO_ERROR)
+ numb_obstack(obs, val, radix, min);
+
+ numb_fini(val);
return (boolean) (err != NO_ERROR);
}
@@ -325,6 +349,7 @@ logical_or_term (eval_token et, eval_t *v1)
if ((er = logical_and_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((et = eval_lex (&v2)) == LOR)
{
et = eval_lex (&v2);
@@ -334,8 +359,9 @@ logical_or_term (eval_token et, eval_t *v1)
if ((er = logical_and_term (et, &v2)) != NO_ERROR)
return er;
- *v1 = *v1 || v2;
+ numb_lior(*v1,v2);
}
+ numb_fini(v2);
if (et == ERROR)
return UNKNOWN_INPUT;
@@ -352,6 +378,7 @@ logical_and_term (eval_token et, eval_t *v1)
if ((er = or_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((et = eval_lex (&v2)) == LAND)
{
et = eval_lex (&v2);
@@ -361,8 +388,9 @@ logical_and_term (eval_token et, eval_t *v1)
if ((er = or_term (et, &v2)) != NO_ERROR)
return er;
- *v1 = *v1 && v2;
+ numb_land(*v1,v2);
}
+ numb_fini(v2);
if (et == ERROR)
return UNKNOWN_INPUT;
@@ -379,6 +407,7 @@ or_term (eval_token et, eval_t *v1)
if ((er = xor_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((et = eval_lex (&v2)) == OR)
{
et = eval_lex (&v2);
@@ -388,8 +417,9 @@ or_term (eval_token et, eval_t *v1)
if ((er = xor_term (et, &v2)) != NO_ERROR)
return er;
- *v1 = *v1 | v2;
+ numb_ior(v1,&v2);
}
+ numb_fini(v2);
if (et == ERROR)
return UNKNOWN_INPUT;
@@ -406,6 +436,7 @@ xor_term (eval_token et, eval_t *v1)
if ((er = and_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((et = eval_lex (&v2)) == XOR)
{
et = eval_lex (&v2);
@@ -415,8 +446,9 @@ xor_term (eval_token et, eval_t *v1)
if ((er = and_term (et, &v2)) != NO_ERROR)
return er;
- *v1 = *v1 ^ v2;
+ numb_eor(v1,&v2);
}
+ numb_fini(v2);
if (et == ERROR)
return UNKNOWN_INPUT;
@@ -433,6 +465,7 @@ and_term (eval_token et, eval_t *v1)
if ((er = not_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((et = eval_lex (&v2)) == AND)
{
et = eval_lex (&v2);
@@ -442,8 +475,9 @@ and_term (eval_token et, eval_t *v1)
if ((er = not_term (et, &v2)) != NO_ERROR)
return er;
- *v1 = *v1 & v2;
+ numb_and(v1,&v2);
}
+ numb_fini(v2);
if (et == ERROR)
return UNKNOWN_INPUT;
@@ -464,7 +498,7 @@ not_term (eval_token et, eval_t *v1)
if ((er = not_term (et, v1)) != NO_ERROR)
return er;
- *v1 = ~*v1;
+ numb_not(v1);
}
else
if ((er = logical_not_term (et, v1)) != NO_ERROR)
@@ -486,7 +520,7 @@ logical_not_term (eval_token et, eval_t *v1)
if ((er = logical_not_term (et, v1)) != NO_ERROR)
return er;
- *v1 = !*v1;
+ numb_lnot(*v1);
}
else
if ((er = cmp_term (et, v1)) != NO_ERROR)
@@ -505,6 +539,7 @@ cmp_term (eval_token et, eval_t *v1)
if ((er = shift_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((op = eval_lex (&v2)) == EQ || op == NOTEQ
|| op == GT || op == GTEQ
|| op == LS || op == LSEQ)
@@ -520,27 +555,27 @@ cmp_term (eval_token et, eval_t *v1)
switch (op)
{
case EQ:
- *v1 = *v1 == v2;
+ numb_eq(*v1,v2);
break;
case NOTEQ:
- *v1 = *v1 != v2;
+ numb_ne(*v1,v2);
break;
case GT:
- *v1 = *v1 > v2;
+ numb_gt(*v1,v2);
break;
case GTEQ:
- *v1 = *v1 >= v2;
+ numb_ge(*v1,v2);
break;
case LS:
- *v1 = *v1 < v2;
+ numb_lt(*v1,v2);
break;
case LSEQ:
- *v1 = *v1 <= v2;
+ numb_le(*v1,v2);
break;
default:
@@ -549,6 +584,7 @@ INTERNAL ERROR: Bad comparison operator in cmp_term ()")));
abort ();
}
}
+ numb_fini(v2);
if (op == ERROR)
return UNKNOWN_INPUT;
@@ -566,6 +602,7 @@ shift_term (eval_token et, eval_t *v1)
if ((er = add_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((op = eval_lex (&v2)) == LSHIFT || op == RSHIFT)
{
@@ -579,11 +616,11 @@ shift_term (eval_token et, eval_t *v1)
switch (op)
{
case LSHIFT:
- *v1 = *v1 << v2;
+ numb_lshift(v1,&v2);
break;
case RSHIFT:
- *v1 = *v1 >> v2;
+ numb_rshift(v1,&v2);
break;
default:
@@ -592,6 +629,7 @@ INTERNAL ERROR: Bad shift operator in shift_term ()")));
abort ();
}
}
+ numb_fini(v2);
if (op == ERROR)
return UNKNOWN_INPUT;
@@ -609,6 +647,7 @@ add_term (eval_token et, eval_t *v1)
if ((er = mult_term (et, v1)) != NO_ERROR)
return er;
+ numb_init(v2);
while ((op = eval_lex (&v2)) == PLUS || op == MINUS)
{
et = eval_lex (&v2);
@@ -618,11 +657,13 @@ add_term (eval_token et, eval_t *v1)
if ((er = mult_term (et, &v2)) != NO_ERROR)
return er;
- if (op == PLUS)
- *v1 = *v1 + v2;
- else
- *v1 = *v1 - v2;
+ if (op == PLUS) {
+ numb_plus(*v1,v2);
+ } else {
+ numb_minus(*v1,v2);
+ }
}
+ numb_fini(v2);
if (op == ERROR)
return UNKNOWN_INPUT;
@@ -640,7 +681,8 @@ mult_term (eval_token et, eval_t *v1)
if ((er = exp_term (et, v1)) != NO_ERROR)
return er;
- while ((op = eval_lex (&v2)) == TIMES || op == DIVIDE || op == MODULO)
+ numb_init(v2);
+ while ((op = eval_lex (&v2)) == TIMES || op == DIVIDE || op == MODULO || op == RATIO)
{
et = eval_lex (&v2);
if (et == ERROR)
@@ -652,21 +694,31 @@ mult_term (eval_token et, eval_t *v1)
switch (op)
{
case TIMES:
- *v1 = *v1 * v2;
+ numb_times(*v1,v2);
break;
case DIVIDE:
- if (v2 == 0)
+ if (numb_zerop(v2))
return DIVIDE_ZERO;
- else
- *v1 = *v1 / v2;
+ else {
+ numb_divide(v1,&v2);
+ }
+ break;
+
+ case RATIO:
+ if (numb_zerop(v2))
+ return DIVIDE_ZERO;
+ else {
+ numb_ratio(*v1,v2);
+ }
break;
case MODULO:
- if (v2 == 0)
+ if (numb_zerop(v2))
return MODULO_ZERO;
- else
- *v1 = *v1 % v2;
+ else {
+ numb_modulo(v1,&v2);
+ }
break;
default:
@@ -675,6 +727,7 @@ mult_term (eval_token et, eval_t *v1)
abort ();
}
}
+ numb_fini(v2);
if (op == ERROR)
return UNKNOWN_INPUT;
@@ -685,14 +738,15 @@ mult_term (eval_token et, eval_t *v1)
static eval_error
exp_term (eval_token et, eval_t *v1)
{
- register eval_t result;
+ eval_t result;
eval_t v2;
eval_error er;
if ((er = unary_term (et, v1)) != NO_ERROR)
return er;
- result = *v1;
+ memcpy(&result, v1, sizeof(eval_t));
+ numb_init(v2);
while ((et = eval_lex (&v2)) == EXPONENT)
{
et = eval_lex (&v2);
@@ -702,11 +756,9 @@ exp_term (eval_token et, eval_t *v1)
if ((er = exp_term (et, &v2)) != NO_ERROR)
return er;
- result = 1;
- while (v2-- > 0)
- result *= *v1;
- *v1 = result;
+ numb_pow(v1,&v2);
}
+ numb_fini(v2);
if (et == ERROR)
return UNKNOWN_INPUT;
@@ -730,7 +782,7 @@ unary_term (eval_token et, eval_t *v1)
return er;
if (et == MINUS)
- *v1 = -*v1;
+ numb_negate(*v1);
}
else
if ((er = simple_term (et, v1)) != NO_ERROR)
diff --git a/src/input.c b/src/input.c
index 6a295755..f9bc23a1 100644
--- a/src/input.c
+++ b/src/input.c
@@ -20,12 +20,24 @@
#include "m4.h"
-/* Unread input can be either files, that should be read (eg. included
- files), strings, which should be rescanned (eg. macro expansion text),
- or quoted macro definitions (as returned by the builtin "defn").
- Unread input are organised in a stack, implemented with an obstack.
- Each input source is described by a "struct input_block". The obstack
- is "input_stack". The top of the input stack is "isp".
+#define DEBUG_INPUT_
+#define DEBUG_SYNTAX_
+
+/*
+ Unread input can be either files, that should be read (eg. included
+ files), strings, which should be rescanned (eg. macro expansion
+ text), single characters or quoted macro definitions (as returned by
+ the builtin "defn"). Unread input are organised in a stack,
+ implemented with an obstack. Each input source is described by a
+ "struct input_block". The obstack is "input_stack". The top of the
+ input stack is "isp".
+
+ Each input_block has an associated struct input_funcs, that defines
+ functions for peeking, reading, unget and cleanup. All input is done
+ through the functions pointers of the input_funcs of the top most
+ input_block. When a input_block is exausted, its reader returns
+ CHAR_RETRY which causes the input_block to be popped from the
+ input_stack.
The macro "m4wrap" places the text to be saved on another input stack,
on the obstack "wrapup_stack", whose top is "wsp". When EOF is seen
@@ -36,42 +48,111 @@
"input_stack" or "wrapup_stack".
Pushing new input on the input stack is done by push_file (),
- push_string (), push_wrapup () (for wrapup text), and push_macro ()
- (for macro definitions). Because macro expansion needs direct access
- to the current input obstack (for optimisation), push_string () are
- split in two functions, push_string_init (), which returns a pointer
- to the current input stack, and push_string_finish (), which return a
- pointer to the final text. The input_block *next is used to manage
- the coordination between the different push routines.
+ push_string (), push_single () or push_wrapup () (for wrapup text),
+ and push_macro () (for macro definitions). Because macro expansion
+ needs direct access to the current input obstack (for optimisation),
+ push_string () are split in two functions, push_string_init (), which
+ returns a pointer to the current input stack, and push_string_finish
+ (), which return a pointer to the final text. The input_block *next
+ is used to manage the coordination between the different push
+ routines.
The current file and line number are stored in two global variables,
for use by the error handling functions in m4.c. Whenever a file
input_block is pushed, the current file name and line number is saved
in the input_block, and the two variables are reset to match the new
- input file. */
-
+ input file.
+
+ THE SYNTAX TABLE
+
+ The input is read character by character and grouped together
+ according to a syntax table. The character groups are (definitions
+ are all in m4.h, those marked with a * are not yet in use):
+
+ SYNTAX_IGNORE *Character to be deleted from input as if not present
+ SYNTAX_OTHER Any character with no special meaning to m4
+ SYNTAX_SPACE Whitespace (ignored when leading macro arguments)
+ SYNTAX_OPEN Open list of macro arguments
+ SYNTAX_CLOSE Close list of macro arguments
+ SYNTAX_COMMA Separates macro arguments
+ SYNTAX_DOLLAR *Indicates macro argument in user macros
+
+ SYNTAX_ALPHA Alphabetic characters (can start macro names)
+ SYNTAX_NUM Numeric characters
+ SYNTAX_ALNUM Alphanumeric characters (can form macro names)
+
+ (These are bit masks)
+ SYNTAX_LQUOTE A single characters left quote
+ SYNTAX_RQUOTE A single characters right quote
+ SYNTAX_BCOMM A single characters begin comment delimiter
+ SYNTAX_ECOMM A single characters end comment delimiter
+
+ Besides adding new facilities, the use of a syntax table will reduce
+ the number of calls to next_token (). Now SYNTAX_OTHER characters
+ can be returned as a single token, since next_token () knows they
+ have no special syntactical meaning to m4.
+
+ Having a syntax table allows new facilities. The new builtin
+ "changesyntax" allows the the user to change the category of any
+ character.
+
+ Default '\n' is both ECOMM and SPACE, depending on the context. To
+ solve the problem of quotes and comments that have diffent syntax
+ code based on the context, the [LR]QUOTE and [BE]COMM codes are bit
+ masks to add to an ordinary code. If a character is made a quote it
+ will be recognised if the basis code does not have precedence.
+
+ When changing quotes and comment delimiters only the bits are
+ removed, and the characters are therefore reverted to its old
+ category code.
+
+ The precedence as implemented by next_token () is:
+
+ SYNTAX_IGNORE *Filtered out below next_token ()
+ SYNTAX_BCOMM Reads all until SYNTAX_ECOMM
+ SYNTAX_ALPHA Reads macro name
+ SYNTAX_LQUOTE Reads all until balanced SYNTAX_RQUOTE
+
+ SYNTAX_OTHER and SYNTAX_NUM
+ Reads all SYNTAX_OTHER and SYNTAX_NUM
+ SYNTAX_SPACE Reads all SYNTAX_SPACE
+ SYNTAX_ACTIVE Returns a single char as a word
+ the rest Returned as a single char
+
+ SYNTAX_DOLLAR is not currently used. The character $ is treated as a
+ SYNTAX_OTHER. It could be done, but it will slow next_token () down
+ a bit. The $ is not really a part of m4's input syntax in the sense
+ that a string is parsed equally whether there is a $ or not. The
+ character $ is used by convention in user macros. */
+
#ifdef ENABLE_CHANGEWORD
#include "regex.h"
#endif
-enum input_type
+struct input_funcs
{
- INPUT_FILE,
- INPUT_STRING,
- INPUT_MACRO
+ int (*peek_func)(void); /* function to peek input */
+ int (*read_func)(void); /* function to read input */
+ void (*unget_func)(int); /* function to unread input */
+ void (*clean_func)(void); /* function to clean up */
};
-typedef enum input_type input_type;
-
struct input_block
{
struct input_block *prev; /* previous input_block on the input stack */
- input_type type; /* INPUT_FILE, INPUT_STRING or INPUT_MACRO */
+ struct input_funcs *funcs; /* functions on this input_block */
+
union
{
struct
{
- char *string; /* string value */
+ unsigned int ch; /* single char value */
+ }
+ u_c;
+ struct
+ {
+ unsigned char *start; /* string value */
+ unsigned char *current; /* current value */
}
u_s;
struct
@@ -79,7 +160,7 @@ struct input_block
FILE *file; /* input file handle */
const char *name; /* name of PREVIOUS input file */
int lineno; /* current line number for do */
- /* Yet another attack of "The curse of global variables" (sic) */
+ /* Yet another attack of "The curse of global variables" (sigh) */
int out_lineno; /* current output line number do */
boolean advance_line; /* start_of_input_line from next_char () */
}
@@ -88,6 +169,7 @@ struct input_block
{
builtin_func *func; /* pointer to macros function */
boolean traced; /* TRUE iff builtin is traced */
+ boolean read; /* TRUE iff block has been read */
}
u_m;
}
@@ -130,17 +212,27 @@ static input_block *next;
/* Flag for next_char () to increment current_line. */
static boolean start_of_input_line;
+/* Input syntax table */
+unsigned short syntax_table[256];
+
#define CHAR_EOF 256 /* character return on EOF */
#define CHAR_MACRO 257 /* character return for MACRO token */
+#define CHAR_RETRY 258 /* character return for end of input block */
/* Quote chars. */
STRING rquote;
STRING lquote;
+/* TRUE iff strlen(rquote) == strlen(lquote) == 1 */
+static boolean single_quotes;
+
/* Comment chars. */
STRING bcomm;
STRING ecomm;
+/* TRUE iff strlen(bcomm) == strlen(ecomm) == 1 */
+static boolean single_comments;
+
#ifdef ENABLE_CHANGEWORD
#define DEFAULT_WORD_REGEXP "[_a-zA-Z][_a-zA-Z0-9]*"
@@ -151,13 +243,81 @@ static int default_word_regexp;
static struct re_registers regs;
#endif /* ENABLE_CHANGEWORD */
+
-/*-------------------------------------------------------------------------.
-| push_file () pushes an input file on the input stack, saving the current |
-| file name and line number. If next is non-NULL, this push invalidates a |
-| call to push_string_init (), whose storage are consequentely released. |
-`-------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------.
+| push_file () pushes an input file on the input stack, saving the |
+| current file name and line number. If next is non-NULL, this push |
+| invalidates a call to push_string_init (), whose storage are |
+| consequentely released. |
+| |
+| file_read () manages line numbers for error messages, so they do not |
+| get wrong, due to lookahead. The token consisting of a newline |
+| alone is taken as belonging to the line it ends, and the current |
+| line number is not incremented until the next character is read. |
+`---------------------------------------------------------------------*/
+
+static int
+file_peek(void)
+{
+ int ch;
+
+ ch = getc (isp->u.u_f.file);
+ if (ch == EOF)
+ return CHAR_RETRY;
+
+ ungetc (ch, isp->u.u_f.file);
+ return ch;
+}
+
+static int
+file_read(void)
+{
+ int ch;
+
+ if (start_of_input_line)
+ {
+ start_of_input_line = FALSE;
+ current_line++;
+ }
+
+ ch = getc (isp->u.u_f.file);
+ if (ch == EOF)
+ return CHAR_RETRY;
+
+ if (ch == '\n')
+ start_of_input_line = TRUE;
+ return ch;
+}
+
+static void
+file_unget(int ch)
+{
+ ungetc (ch, isp->u.u_f.file);
+ if (ch == '\n')
+ start_of_input_line = FALSE;
+}
+
+static void
+file_clean(void)
+{
+ if (debug_level & DEBUG_TRACE_INPUT)
+ DEBUG_MESSAGE2 (_("Input reverted to %s, line %d"),
+ isp->u.u_f.name, isp->u.u_f.lineno);
+
+ fclose (isp->u.u_f.file);
+ current_file = isp->u.u_f.name;
+ current_line = isp->u.u_f.lineno;
+ output_current_line = isp->u.u_f.out_lineno;
+ start_of_input_line = isp->u.u_f.advance_line;
+ if (isp->prev != NULL)
+ output_current_line = -1;
+}
+
+static struct input_funcs file_funcs = {
+ file_peek, file_read, file_unget, file_clean
+};
void
push_file (FILE *fp, const char *title)
@@ -175,17 +335,18 @@ push_file (FILE *fp, const char *title)
i = (input_block *) obstack_alloc (current_input,
sizeof (struct input_block));
- i->type = INPUT_FILE;
+ i->funcs = &file_funcs;
+ i->u.u_f.file = fp;
i->u.u_f.name = current_file;
i->u.u_f.lineno = current_line;
i->u.u_f.out_lineno = output_current_line;
i->u.u_f.advance_line = start_of_input_line;
+
current_file = obstack_copy0 (current_input, title, strlen (title));
current_line = 1;
output_current_line = -1;
- i->u.u_f.file = fp;
i->prev = isp;
isp = i;
}
@@ -196,6 +357,29 @@ push_file (FILE *fp, const char *title)
| whose storage are consequentely released. |
`-------------------------------------------------------------------------*/
+static int
+macro_peek(void)
+{
+ if (isp->u.u_m.read == TRUE)
+ return CHAR_RETRY;
+
+ return CHAR_MACRO;
+}
+
+static int
+macro_read(void)
+{
+ if (isp->u.u_m.read == TRUE)
+ return CHAR_RETRY;
+
+ isp->u.u_m.read = TRUE;
+ return CHAR_MACRO;
+}
+
+static struct input_funcs macro_funcs = {
+ macro_peek, macro_read, NULL, NULL
+};
+
void
push_macro (builtin_func *func, boolean traced)
{
@@ -209,10 +393,59 @@ push_macro (builtin_func *func, boolean traced)
i = (input_block *) obstack_alloc (current_input,
sizeof (struct input_block));
- i->type = INPUT_MACRO;
+ i->funcs = &macro_funcs;
i->u.u_m.func = func;
i->u.u_m.traced = traced;
+ i->u.u_m.read = FALSE;
+
+ i->prev = isp;
+ isp = i;
+}
+
+/*------------------------------------------------.
+| * Push a single character on to the input stack |
+`------------------------------------------------*/
+
+static int
+single_peek(void)
+{
+ return isp->u.u_c.ch;
+}
+
+static int
+single_read(void)
+{
+ int ch = isp->u.u_c.ch;
+
+ if (ch != CHAR_RETRY)
+ isp->u.u_c.ch = CHAR_RETRY;
+
+ return ch;
+}
+
+static struct input_funcs single_funcs = {
+ single_peek, single_read, NULL, NULL
+};
+
+void
+push_single (int ch)
+{
+ input_block *i;
+
+ if (next != NULL)
+ {
+ obstack_free (current_input, next);
+ next = NULL;
+ }
+
+ i = (input_block *) obstack_alloc (current_input,
+ sizeof (struct input_block));
+
+ i->funcs = &single_funcs;
+
+ i->u.u_c.ch = ch;
+
i->prev = isp;
isp = i;
}
@@ -222,6 +455,36 @@ push_macro (builtin_func *func, boolean traced)
| input_block. |
`------------------------------------------------------------------*/
+static int
+string_peek(void)
+{
+ int ch = *isp->u.u_s.current;
+
+ return (ch == '\0') ? CHAR_RETRY : ch;
+}
+
+static int
+string_read(void)
+{
+ int ch = *isp->u.u_s.current++;
+
+ return (ch == '\0') ? CHAR_RETRY : ch;
+
+}
+
+static void
+string_unget(int ch)
+{
+ if (isp->u.u_s.current > isp->u.u_s.start)
+ *--isp->u.u_s.current = ch;
+ else
+ push_single(ch);
+}
+
+static struct input_funcs string_funcs = {
+ string_peek, string_read, string_unget, NULL
+};
+
struct obstack *
push_string_init (void)
{
@@ -234,7 +497,8 @@ push_string_init (void)
next = (input_block *) obstack_alloc (current_input,
sizeof (struct input_block));
- next->type = INPUT_STRING;
+ next->funcs = &string_funcs;
+
return current_input;
}
@@ -258,10 +522,11 @@ push_string_finish (void)
if (obstack_object_size (current_input) > 0)
{
obstack_1grow (current_input, '\0');
- next->u.u_s.string = obstack_finish (current_input);
+ next->u.u_s.start = obstack_finish (current_input);
+ next->u.u_s.current = next->u.u_s.start;
next->prev = isp;
isp = next;
- ret = isp->u.u_s.string; /* for immediate use only */
+ ret = isp->u.u_s.start; /* for immediate use only */
}
else
obstack_free (current_input, next); /* people might leave garbage on it. */
@@ -283,8 +548,12 @@ push_wrapup (const char *s)
input_block *i = (input_block *) obstack_alloc (&wrapup_stack,
sizeof (struct input_block));
i->prev = wsp;
- i->type = INPUT_STRING;
- i->u.u_s.string = obstack_copy0 (&wrapup_stack, s, strlen (s));
+
+ i->funcs = &string_funcs;
+
+ i->u.u_s.start = obstack_copy0 (&wrapup_stack, s, strlen (s));
+ i->u.u_s.current = i->u.u_s.start;
+
wsp = i;
}
@@ -300,31 +569,9 @@ pop_input (void)
{
input_block *tmp = isp->prev;
- switch (isp->type)
- {
- case INPUT_STRING:
- case INPUT_MACRO:
- break;
-
- case INPUT_FILE:
- if (debug_level & DEBUG_TRACE_INPUT)
- DEBUG_MESSAGE2 (_("Input reverted to %s, line %d"),
- isp->u.u_f.name, isp->u.u_f.lineno);
-
- fclose (isp->u.u_f.file);
- current_file = isp->u.u_f.name;
- current_line = isp->u.u_f.lineno;
- output_current_line = isp->u.u_f.out_lineno;
- start_of_input_line = isp->u.u_f.advance_line;
- if (tmp != NULL)
- output_current_line = -1;
- break;
+ if (isp->funcs->clean_func != NULL)
+ (*isp->funcs->clean_func)();
- default:
- M4ERROR ((warning_status, 0,
- _("INTERNAL ERROR: Input stack botch in pop_input ()")));
- abort ();
- }
obstack_free (current_input, isp);
next = NULL; /* might be set in push_string_init () */
@@ -350,15 +597,15 @@ pop_wrapup (void)
return TRUE;
}
-/*--------------------------------------------------------------------.
-| When a MACRO token is seen, next_token () uses init_macro_token () to |
-| retrieve the value of the function pointer. |
-`--------------------------------------------------------------------*/
+/*-------------------------------------------------------------------.
+| When a MACRO token is seen, next_token () uses init_macro_token () |
+| to retrieve the value of the function pointer. |
+`-------------------------------------------------------------------*/
static void
init_macro_token (token_data *td)
{
- if (isp->type != INPUT_MACRO)
+ if (isp->funcs->read_func != macro_read)
{
M4ERROR ((warning_status, 0,
_("INTERNAL ERROR: Bad call to init_macro_token ()")));
@@ -368,106 +615,77 @@ init_macro_token (token_data *td)
TOKEN_DATA_TYPE (td) = TOKEN_FUNC;
TOKEN_DATA_FUNC (td) = isp->u.u_m.func;
TOKEN_DATA_FUNC_TRACED (td) = isp->u.u_m.traced;
+
}
-
-/*------------------------------------------------------------------------.
-| Low level input is done a character at a time. The function peek_input |
-| () is used to look at the next character in the input stream. At any |
-| given time, it reads from the input_block on the top of the current |
-| input stack. |
-`------------------------------------------------------------------------*/
+
+/*---------------------------------------------------------------.
+| Low level input is done a character at a time. The function |
+| next_char () is used to read and advance the input to the next |
+| character. |
+`---------------------------------------------------------------*/
-int
-peek_input (void)
+static int
+next_char (void)
{
- register int ch;
+ int ch;
+ int (*f)(void);
while (1)
{
if (isp == NULL)
return CHAR_EOF;
- switch (isp->type)
+ f = isp->funcs->read_func;
+ if (f != NULL)
{
- case INPUT_STRING:
- ch = isp->u.u_s.string[0];
- if (ch != '\0')
- return ch;
- break;
-
- case INPUT_FILE:
- ch = getc (isp->u.u_f.file);
- if (ch != EOF)
+ while ((ch = (*f)()) != CHAR_RETRY)
{
- ungetc (ch, isp->u.u_f.file);
- return ch;
+ /* if (!IS_IGNORE(ch)) */
+ return ch;
}
- break;
-
- case INPUT_MACRO:
- return CHAR_MACRO;
-
- default:
+ }
+ else
+ {
M4ERROR ((warning_status, 0,
- _("INTERNAL ERROR: Input stack botch in peek_input ()")));
+ _("INTERNAL ERROR: Input stack botch in next_char ()")));
abort ();
}
+
/* End of input source --- pop one level. */
pop_input ();
}
}
-/*-------------------------------------------------------------------------.
-| The function next_char () is used to read and advance the input to the |
-| next character. It also manages line numbers for error messages, so |
-| they do not get wrong, due to lookahead. The token consisting of a |
-| newline alone is taken as belonging to the line it ends, and the current |
-| line number is not incremented until the next character is read. |
-`-------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------.
+| The function peek_input () is used to look at the next character in |
+| the input stream. At any given time, it reads from the input_block |
+| on the top of the current input stack. |
+`--------------------------------------------------------------------*/
-static int
-next_char (void)
+int
+peek_input (void)
{
- register int ch;
-
- if (start_of_input_line)
- {
- start_of_input_line = FALSE;
- current_line++;
- }
+ int ch;
+ int (*f)(void);
while (1)
{
if (isp == NULL)
return CHAR_EOF;
- switch (isp->type)
+ f = isp->funcs->peek_func;
+ if (f != NULL)
{
- case INPUT_STRING:
- ch = *isp->u.u_s.string++;
- if (ch != '\0')
- return ch;
- break;
-
- case INPUT_FILE:
- ch = getc (isp->u.u_f.file);
- if (ch != EOF)
+ if ((ch = (*f)()) != CHAR_RETRY)
{
- if (ch == '\n')
- start_of_input_line = TRUE;
- return ch;
+ return /* (IS_IGNORE(ch)) ? next_char () : */ ch;
}
- break;
-
- case INPUT_MACRO:
- pop_input (); /* INPUT_MACRO input sources has only one
- token */
- return CHAR_MACRO;
-
- default:
+ }
+ else
+ {
M4ERROR ((warning_status, 0,
- _("INTERNAL ERROR: Input stack botch in next_char ()")));
+ _("INTERNAL ERROR: Input stack botch in peek_input ()")));
abort ();
}
@@ -476,6 +694,20 @@ next_char (void)
}
}
+/*---------------------------------------------------------------.
+| The function unget_input () puts back a character on the input |
+| stack, using an existing input_block if possible |
+`---------------------------------------------------------------*/
+
+static void
+unget_input (int ch)
+{
+ if (isp != NULL && isp->funcs->unget_func != NULL)
+ (*isp->funcs->unget_func)(ch);
+ else
+ push_single(ch);
+}
+
/*------------------------------------------------------------------------.
| skip_line () simply discards all immediately following characters, upto |
| the first newline. It is only used from m4_dnl (). |
@@ -491,19 +723,23 @@ skip_line (void)
}
-/*----------------------------------------------------------------------.
-| This function is for matching a string against a prefix of the input |
-| stream. If the string matches the input, the input is discarded, |
-| otherwise the characters read are pushed back again. The function is |
-| used only when multicharacter quotes or comment delimiters are used. |
-`----------------------------------------------------------------------*/
+/*---------------------------------------------------------------------.
+| This function is for matching a string against a prefix of the |
+| input stream. If the string matches the input, the input is |
+| discarded, otherwise the characters read are pushed back again. The |
+| function is used only when multicharacter quotes or comment |
+| delimiters are used. |
+| |
+| All strings herein should be unsigned. Otherwise sign-extension |
+| of individual chars might break quotes with 8-bit chars in it. |
+`---------------------------------------------------------------------*/
static int
-match_input (const char *s)
+match_input (const unsigned char *s)
{
int n; /* number of characters matched */
int ch; /* input character */
- const char *t;
+ const unsigned char *t;
ch = peek_input ();
if (ch != *s)
@@ -544,9 +780,14 @@ match_input (const char *s)
| Inititialise input stacks, and quote/comment characters. |
`----------------------------------------------------------*/
+static void set_syntax_internal (int code, int ch);
+static void unset_syntax_attribute (int code, int ch);
+
void
input_init (void)
{
+ int ch;
+
current_file = _("NONE");
current_line = 0;
@@ -569,10 +810,13 @@ input_init (void)
lquote.length = strlen (lquote.string);
rquote.string = xstrdup (DEF_RQUOTE);
rquote.length = strlen (rquote.string);
+ single_quotes = TRUE;
+
bcomm.string = xstrdup (DEF_BCOMM);
bcomm.length = strlen (bcomm.string);
ecomm.string = xstrdup (DEF_ECOMM);
ecomm.length = strlen (ecomm.string);
+ single_comments = TRUE;
#ifdef ENABLE_CHANGEWORD
if (user_word_regexp)
@@ -580,17 +824,49 @@ input_init (void)
else
set_word_regexp (DEFAULT_WORD_REGEXP);
#endif
+
+ for (ch = 256; --ch > 0; )
+ {
+ if (ch == '(')
+ set_syntax_internal(SYNTAX_OPEN, ch);
+ else if (ch == ')')
+ set_syntax_internal(SYNTAX_CLOSE, ch);
+ else if (ch == ',')
+ set_syntax_internal(SYNTAX_COMMA, ch);
+ else if (isspace(ch))
+ set_syntax_internal(SYNTAX_SPACE, ch);
+ else if (isalpha(ch) || ch == '_')
+ set_syntax_internal(SYNTAX_ALPHA, ch);
+ else if (isdigit(ch))
+ set_syntax_internal(SYNTAX_NUM, ch);
+ else
+ set_syntax_internal(SYNTAX_OTHER, ch);
+ }
+ /* set_syntax_internal(SYNTAX_IGNORE, 0); */
+
+ /* Default quotes and comment delimiters are always one char */
+ set_syntax_internal(SYNTAX_LQUOTE, lquote.string[0]);
+ set_syntax_internal(SYNTAX_RQUOTE, rquote.string[0]);
+ set_syntax_internal(SYNTAX_BCOMM, bcomm.string[0]);
+ set_syntax_internal(SYNTAX_ECOMM, ecomm.string[0]);
+
}
-/*--------------------------------------------------------------.
-| Functions for setting quotes and comment delimiters. Used by |
-| m4_changecom () and m4_changequote (). |
-`--------------------------------------------------------------*/
+/*---------------------------------------------------------------------.
+| Functions for setting quotes and comment delimiters. Used by |
+| m4_changecom () and m4_changequote (). Both functions overrides the |
+| syntax_table to maintain compatibility. |
+`---------------------------------------------------------------------*/
void
set_quotes (const char *lq, const char *rq)
{
+ int ch;
+ for (ch = 256; --ch >= 0; ) /* changequote overrides syntax_table */
+ if (IS_LQUOTE(ch) || IS_RQUOTE(ch))
+ unset_syntax_attribute(SYNTAX_LQUOTE|SYNTAX_RQUOTE, ch);
+
xfree (lquote.string);
xfree (rquote.string);
@@ -598,11 +874,24 @@ set_quotes (const char *lq, const char *rq)
lquote.length = strlen (lquote.string);
rquote.string = xstrdup (rq ? rq : DEF_RQUOTE);
rquote.length = strlen (rquote.string);
+
+ single_quotes = (lquote.length == 1 && rquote.length == 1);
+
+ if (single_quotes)
+ {
+ set_syntax_internal(SYNTAX_LQUOTE, lquote.string[0]);
+ set_syntax_internal(SYNTAX_RQUOTE, rquote.string[0]);
+ }
}
void
set_comment (const char *bc, const char *ec)
{
+ int ch;
+ for (ch = 256; --ch >= 0; ) /* changecom overrides syntax_table */
+ if (IS_BCOMM(ch) || IS_ECOMM(ch))
+ unset_syntax_attribute(SYNTAX_BCOMM|SYNTAX_ECOMM, ch);
+
xfree (bcomm.string);
xfree (ecomm.string);
@@ -610,6 +899,59 @@ set_comment (const char *bc, const char *ec)
bcomm.length = strlen (bcomm.string);
ecomm.string = xstrdup (ec ? ec : DEF_ECOMM);
ecomm.length = strlen (ecomm.string);
+
+ single_comments = (bcomm.length == 1 && ecomm.length == 1);
+
+ if (single_comments)
+ {
+ set_syntax_internal(SYNTAX_BCOMM, bcomm.string[0]);
+ set_syntax_internal(SYNTAX_ECOMM, ecomm.string[0]);
+ }
+}
+
+/*-------------------------------------------.
+| Functions to manipulate the syntax table. |
+`-------------------------------------------*/
+
+static void
+set_syntax_internal (int code, int ch)
+{
+ if (code & SYNTAX_MASKS)
+ syntax_table[ch] |= code;
+ else
+ syntax_table[ch] = code;
+
+#ifdef DEBUG_SYNTAX
+ fprintf(stderr, "Set syntax %o %c = %04X\n",
+ ch, isprint(ch) ? ch : '-',
+ syntax_table[ch]);
+#endif
+}
+
+static void
+unset_syntax_attribute (int code, int ch)
+{
+ if (code & SYNTAX_MASKS)
+ syntax_table[ch] &= ~code;
+
+#ifdef DEBUG_SYNTAX
+ fprintf(stderr, "Unset syntax %o %c = %04X\n",
+ ch, isprint(ch) ? ch : '-',
+ syntax_table[ch]);
+#endif
+}
+
+void
+set_syntax (int code, const char *chars)
+{
+ int ch;
+
+ if (*chars != '\0')
+ while ((ch = *chars++))
+ set_syntax_internal (code, ch);
+ else
+ for (ch = 256; --ch > 0; )
+ set_syntax_internal (code, ch);
}
#ifdef ENABLE_CHANGEWORD
@@ -684,22 +1026,36 @@ next_token (token_data *td)
token_bottom = obstack_finish (&token_stack);
ch = peek_input ();
- if (ch == CHAR_EOF)
+ if (ch == CHAR_EOF) /* EOF */
{
- return TOKEN_EOF;
#ifdef DEBUG_INPUT
fprintf (stderr, "next_token -> EOF\n");
#endif
+ return TOKEN_EOF;
}
- if (ch == CHAR_MACRO)
+
+ if (ch == CHAR_MACRO) /* MACRO TOKEN */
{
init_macro_token (td);
(void) next_char ();
+#ifdef DEBUG_INPUT
+ print_token("next_token", TOKEN_MACDEF, td);
+#endif
return TOKEN_MACDEF;
}
(void) next_char ();
- if (MATCH (ch, bcomm.string))
+ if (IS_BCOMM(ch)) /* COMMENT, SHORT DELIM */
+ {
+ obstack_1grow (&token_stack, ch);
+ while ((ch = next_char ()) != CHAR_EOF && !IS_ECOMM(ch))
+ obstack_1grow (&token_stack, ch);
+ if (ch != CHAR_EOF)
+ obstack_1grow (&token_stack, ch);
+ type = TOKEN_STRING;
+ }
+ /* COMMENT, LONGER DELIM */
+ else if (!single_comments && MATCH (ch, bcomm.string))
{
obstack_grow (&token_stack, bcomm.string, bcomm.length);
while ((ch = next_char ()) != CHAR_EOF && !MATCH (ch, ecomm.string))
@@ -708,18 +1064,19 @@ next_token (token_data *td)
obstack_grow (&token_stack, ecomm.string, ecomm.length);
type = TOKEN_STRING;
}
+ else if (
#ifdef ENABLE_CHANGEWORD
- else if (default_word_regexp && (isalpha (ch) || ch == '_'))
-#else
- else if (isalpha (ch) || ch == '_')
+ default_word_regexp &&
#endif
+ (IS_ALPHA (ch)))
{
obstack_1grow (&token_stack, ch);
- while ((ch = peek_input ()) != CHAR_EOF && (isalnum (ch) || ch == '_'))
+ while ((ch = next_char ()) != CHAR_EOF && (IS_ALNUM(ch)))
{
obstack_1grow (&token_stack, ch);
- (void) next_char ();
}
+ if (ch != CHAR_EOF)
+ unget_input(ch);
type = TOKEN_WORD;
}
@@ -761,12 +1118,35 @@ next_token (token_data *td)
#endif /* ENABLE_CHANGEWORD */
- else if (!MATCH (ch, lquote.string))
+
+ else if (IS_LQUOTE(ch)) /* QUOTED STRING, SINGLE QUOTES */
{
- type = TOKEN_SIMPLE;
- obstack_1grow (&token_stack, ch);
+ quote_level = 1;
+ while (1)
+ {
+ ch = next_char ();
+ if (ch == CHAR_EOF)
+ M4ERROR ((EXIT_FAILURE, 0,
+ _("ERROR: EOF in string")));
+
+ if (IS_RQUOTE(ch))
+ {
+ if (--quote_level == 0)
+ break;
+ obstack_1grow (&token_stack, ch);
+ }
+ else if (IS_LQUOTE(ch))
+ {
+ quote_level++;
+ obstack_1grow (&token_stack, ch);
+ }
+ else
+ obstack_1grow (&token_stack, ch);
+ }
+ type = TOKEN_STRING;
}
- else
+ /* QUOTED STRING, LONGER QUOTES */
+ else if (!single_quotes && MATCH (ch, lquote.string))
{
quote_level = 1;
while (1)
@@ -792,52 +1172,87 @@ next_token (token_data *td)
}
type = TOKEN_STRING;
}
+ else /* EVERYTHING ELSE */
+ {
+ obstack_1grow (&token_stack, ch);
+
+ if (IS_OTHER(ch) || IS_NUM(ch))
+ {
+ while ((ch = next_char()) != CHAR_EOF
+ && (IS_OTHER(ch) || IS_NUM(ch)))
+ obstack_1grow (&token_stack, ch);
+
+ if (ch != CHAR_EOF)
+ unget_input(ch);
+ type = TOKEN_STRING;
+ }
+ else if (IS_SPACE(ch))
+ {
+ if (!interactive)
+ {
+ while ((ch = next_char()) != CHAR_EOF && IS_SPACE(ch))
+ obstack_1grow (&token_stack, ch);
+
+ if (ch != CHAR_EOF)
+ unget_input(ch);
+ }
+ type = TOKEN_STRING;
+ }
+ else if (IS_ACTIVE(ch))
+ type = TOKEN_WORD;
+ else
+ type = TOKEN_SIMPLE;
+ }
+
obstack_1grow (&token_stack, '\0');
TOKEN_DATA_TYPE (td) = TOKEN_TEXT;
TOKEN_DATA_TEXT (td) = obstack_finish (&token_stack);
+
#ifdef ENABLE_CHANGEWORD
if (orig_text == NULL)
orig_text = TOKEN_DATA_TEXT (td);
TOKEN_DATA_ORIG_TEXT (td) = orig_text;
#endif
+
#ifdef DEBUG_INPUT
- fprintf (stderr, "next_token -> %d (%s)\n", type, TOKEN_DATA_TEXT (td));
+ print_token("next_token", type, td);
#endif
+
return type;
}
#ifdef DEBUG_INPUT
-static void
+int
print_token (const char *s, token_type t, token_data *td)
{
fprintf (stderr, "%s: ", s);
switch (t)
{ /* TOKSW */
case TOKEN_SIMPLE:
- fprintf (stderr, "char:");
+ fprintf (stderr, "char\t\"%s\"\n", TOKEN_DATA_TEXT (td));
break;
case TOKEN_WORD:
- fprintf (stderr, "word:");
+ fprintf (stderr, "word\t\"%s\"\n", TOKEN_DATA_TEXT (td));
break;
case TOKEN_STRING:
- fprintf (stderr, "string:");
+ fprintf (stderr, "string\t\"%s\"\n", TOKEN_DATA_TEXT (td));
break;
case TOKEN_MACDEF:
- fprintf (stderr, "macro: 0x%x\n", TOKEN_DATA_FUNC (td));
+ fprintf (stderr, "macro 0x%x\n", (int)TOKEN_DATA_FUNC (td));
break;
case TOKEN_EOF:
fprintf (stderr, "eof\n");
break;
}
- fprintf (stderr, "\t\"%s\"\n", TOKEN_DATA_TEXT (td));
+ return 0;
}
static void
diff --git a/src/m4.c b/src/m4.c
index 19964eec..0986e883 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -22,7 +22,7 @@
#include <signal.h>
/* Operate interactively (-e). */
-static int interactive = 0;
+int interactive = 0;
/* Enable sync output for /lib/cpp (-s). */
int sync_output = 0;
diff --git a/src/m4.h b/src/m4.h
index f4834910..d2c5f088 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -16,6 +16,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef M4_H
+#define M4_H
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -126,7 +129,7 @@ char *mktemp ();
struct string
{
- char *string; /* characters of the string */
+ unsigned char *string; /* characters of the string */
size_t length; /* length of the string */
};
typedef struct string STRING;
@@ -145,10 +148,12 @@ void error __P ((int, int, const char *, ...));
/* Those must come first. */
typedef void builtin_func ();
typedef struct token_data token_data;
+
/* File: m4.c --- global definitions. */
/* Option flags. */
+extern int interactive; /* -e */
extern int sync_output; /* -s */
extern int debug_level; /* -d */
extern int hash_table_size; /* -H */
@@ -172,6 +177,7 @@ void reference_error __P ((void));
void setup_stackovf_trap __P ((char *const *, char *const *,
void (*handler) (void)));
#endif
+
/* File: debug.c --- debugging and tracing function. */
@@ -266,6 +272,7 @@ void debug_message_prefix __P ((void));
void trace_prepre __P ((const char *, int));
void trace_pre __P ((const char *, int, int, token_data **));
void trace_post __P ((const char *, int, int, token_data **, const char *));
+
/* File: input.c --- lexical definitions. */
@@ -347,11 +354,65 @@ extern STRING lquote, rquote;
#define DEF_BCOMM "#"
#define DEF_ECOMM "\n"
+/* Syntax table definitions. */
+/* Please read the comment at the top of input.c for details */
+extern unsigned short syntax_table[256];
+
+/* These are simple values, not bit masks. There is no overlap. */
+#define SYNTAX_OTHER (0x0000)
+
+#define SYNTAX_IGNORE (0x0001)
+#define SYNTAX_SPACE (0x0002)
+#define SYNTAX_OPEN (0x0003)
+#define SYNTAX_CLOSE (0x0004)
+#define SYNTAX_COMMA (0x0005)
+#define SYNTAX_DOLLAR (0x0006) /* not used yet */
+#define SYNTAX_ACTIVE (0x0007)
+
+/* These are values to be assigned to syntax table entries, but they are
+ used as bit masks with IS_ALNUM.*/
+#define SYNTAX_ALPHA (0x0010)
+#define SYNTAX_NUM (0x0020)
+#define SYNTAX_ALNUM (SYNTAX_ALPHA|SYNTAX_NUM)
+
+/* These are bit masks to AND with other categories.
+ See input.c for details. */
+#define SYNTAX_LQUOTE (0x0100)
+#define SYNTAX_RQUOTE (0x0200)
+#define SYNTAX_BCOMM (0x0400)
+#define SYNTAX_ECOMM (0x0800)
+
+/* These bits define the syntax code of a character */
+#define SYNTAX_VALUE (0x00FF|SYNTAX_LQUOTE|SYNTAX_BCOMM)
+#define SYNTAX_MASKS (0xFF00)
+
+#define IS_OTHER(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_OTHER)
+#define IS_IGNORE(ch) ((syntax_table[(int)(ch)]) == SYNTAX_IGNORE)
+#define IS_SPACE(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_SPACE)
+
+#define IS_OPEN(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_OPEN)
+#define IS_CLOSE(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_CLOSE)
+#define IS_COMMA(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_COMMA)
+#define IS_DOLLAR(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_DOLLAR)
+#define IS_ACTIVE(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_ACTIVE)
+
+#define IS_ALPHA(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_ALPHA)
+#define IS_NUM(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_NUM)
+#define IS_ALNUM(ch) (((syntax_table[(int)(ch)]) & SYNTAX_ALNUM) != 0)
+
+#define IS_LQUOTE(ch) (syntax_table[(int)(ch)] & SYNTAX_LQUOTE)
+#define IS_RQUOTE(ch) (syntax_table[(int)(ch)] & SYNTAX_RQUOTE)
+#define IS_BCOMM(ch) (syntax_table[(int)(ch)] & SYNTAX_BCOMM)
+#define IS_ECOMM(ch) (syntax_table[(int)(ch)] & SYNTAX_ECOMM)
+
+
void set_quotes __P ((const char *, const char *));
void set_comment __P ((const char *, const char *));
+void set_syntax __P ((int, const char *));
#ifdef ENABLE_CHANGEWORD
void set_word_regexp __P ((const char *));
#endif
+
/* File: output.c --- output functions. */
extern int current_diversion;
@@ -363,6 +424,7 @@ void make_diversion __P ((int));
void insert_diversion __P ((int));
void insert_file __P ((FILE *));
void freeze_diversions __P ((FILE *));
+
/* File symtab.c --- symbol table definitions. */
@@ -410,11 +472,13 @@ extern symbol **symtab;
void symtab_init __P ((void));
symbol *lookup_symbol __P ((const char *, symbol_lookup));
void hack_all_symbols __P ((hack_symbol *, const char *));
+
/* File: macro.c --- macro expansion. */
void expand_input __P ((void));
void call_macro __P ((symbol *, int, token_data **, struct obstack *));
+
/* File: builtin.c --- builtins. */
@@ -446,6 +510,7 @@ void expand_user_macro __P ((struct obstack *, symbol *, int, token_data **));
const builtin *find_builtin_by_addr __P ((builtin_func *));
const builtin *find_builtin_by_name __P ((const char *));
+
/* File: path.c --- path search for include files. */
@@ -453,23 +518,24 @@ void include_init __P ((void));
void include_env_init __P ((void));
void add_include_directory __P ((const char *));
FILE *path_search __P ((const char *));
+
/* File: eval.c --- expression evaluation. */
-/* eval_t and unsigned_eval_t should be at least 32 bits. */
-typedef int eval_t;
-typedef unsigned int unsigned_eval_t;
+boolean evaluate __P ((struct obstack *obs,
+ const char *, const int radix, int min));
-boolean evaluate __P ((const char *, eval_t *));
/* File: format.c --- printf like formatting. */
void format __P ((struct obstack *, int, token_data **));
+
/* File: freeze.c --- frozen state files. */
void produce_frozen_state __P ((const char *));
void reload_frozen_state __P ((const char *));
+
/* Debugging the memory allocator. */
@@ -486,3 +552,5 @@ void reload_frozen_state __P ((const char *));
# define DEBUG_SYM
# define DEBUG_INCL
#endif
+
+#endif /* M4_H */
diff --git a/src/macro.c b/src/macro.c
index 03a0de3c..38cc9af2 100644
--- a/src/macro.c
+++ b/src/macro.c
@@ -73,7 +73,7 @@ expand_token (struct obstack *obs, token_type t, token_data *td)
if (sym == NULL || SYMBOL_TYPE (sym) == TOKEN_VOID
|| (SYMBOL_TYPE (sym) == TOKEN_FUNC
&& SYMBOL_BLIND_NO_ARGS (sym)
- && peek_input () != '('))
+ && !IS_OPEN(peek_input ())))
{
#ifdef ENABLE_CHANGEWORD
shipout_text (obs, TOKEN_DATA_ORIG_TEXT (td),
@@ -120,7 +120,7 @@ expand_argument (struct obstack *obs, token_data *argp)
{
t = next_token (&td);
}
- while (t == TOKEN_SIMPLE && isspace (*TOKEN_DATA_TEXT (&td)));
+ while (t == TOKEN_STRING && IS_SPACE (*TOKEN_DATA_TEXT (&td)));
paren_level = 0;
@@ -131,7 +131,7 @@ expand_argument (struct obstack *obs, token_data *argp)
{ /* TOKSW */
case TOKEN_SIMPLE:
text = TOKEN_DATA_TEXT (&td);
- if ((*text == ',' || *text == ')') && paren_level == 0)
+ if ((IS_COMMA(*text) || IS_CLOSE(*text)) && paren_level == 0)
{
/* The argument MUST be finished, whether we want it or not. */
@@ -143,12 +143,12 @@ expand_argument (struct obstack *obs, token_data *argp)
TOKEN_DATA_TYPE (argp) = TOKEN_TEXT;
TOKEN_DATA_TEXT (argp) = text;
}
- return (boolean) (*TOKEN_DATA_TEXT (&td) == ',');
+ return (boolean) (IS_COMMA(*TOKEN_DATA_TEXT (&td)));
}
- if (*text == '(')
+ if (IS_OPEN(*text))
paren_level++;
- else if (*text == ')')
+ else if (IS_CLOSE(*text))
paren_level--;
expand_token (obs, t, &td);
break;
@@ -204,7 +204,7 @@ collect_arguments (symbol *sym, struct obstack *argptr,
obstack_grow (argptr, (voidstar) &tdp, sizeof (tdp));
ch = peek_input ();
- if (ch == '(')
+ if (IS_OPEN(ch))
{
next_token (&td); /* gobble parenthesis */
do
diff --git a/src/numb.c b/src/numb.c
new file mode 100644
index 00000000..8dfa077e
--- /dev/null
+++ b/src/numb.c
@@ -0,0 +1,418 @@
+/* GNU m4 -- A simple macro processor
+ Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/* This file contains the functions to evaluate integer or multiple
+ precision expressions for the "eval" macro.
+ */
+
+#include "m4.h"
+#include "numb.h"
+
+
+#ifdef WITH_GMP
+
+eval_t numb_ZERO;
+eval_t numb_ONE;
+
+static int numb_initialised = 0;
+
+void
+numb_initialise(void) {
+ if (numb_initialised)
+ return;
+
+ numb_init(numb_ZERO);
+ numb_set_si(&numb_ZERO,0);
+
+ numb_init(numb_ONE);
+ numb_set_si(&numb_ONE,1);
+
+ numb_initialised = 1;
+}
+
+void
+numb_obstack(struct obstack *obs, const eval_t value,
+ const int radix, int min)
+{
+ const char *s;
+
+ mpz_t i;
+ mpz_init(i);
+
+ mpq_get_num(i,value);
+ s = mpz_get_str((char *)0, radix, i);
+
+ if (*s == '-')
+ {
+ obstack_1grow (obs, '-');
+ min--;
+ s++;
+ }
+ for (min -= strlen (s); --min >= 0;)
+ obstack_1grow (obs, '0');
+
+ obstack_grow (obs, s, strlen (s));
+
+ mpq_get_den(i,value);
+ if (mpz_cmp_si(i,(long)1)!=0) {
+ obstack_1grow (obs, ':');
+ s = mpz_get_str((char *)0, radix, i);
+ obstack_grow (obs, s, strlen (s));
+ }
+
+ mpz_clear(i);
+}
+
+#define NOISY ""
+#define QUIET (char *)0
+
+static void
+mpq2mpz(mpz_t z, const eval_t q, const char *noisily)
+{
+ if (noisily && mpz_cmp_si(mpq_denref(q),(long)1)!=0) {
+ M4ERROR((warning_status, 0,
+ _("Loss of precision in eval: %s"),
+ noisily));
+ }
+ mpz_div(z,mpq_numref(q),mpq_denref(q));
+}
+
+static void
+mpz2mpq(eval_t q, const mpz_t z)
+{
+ mpq_set_si(q,(long)0,(unsigned long)1);
+ mpq_set_num(q,z);
+}
+
+void
+numb_divide(eval_t *x, const eval_t *y)
+{
+ mpq_t qres;
+ mpz_t zres;
+
+ mpq_init(qres);
+ mpq_div(qres,*x,*y);
+
+ mpz_init(zres);
+ mpz_div(zres,mpq_numref(qres),mpq_denref(qres));
+ mpq_clear(qres);
+
+ mpz2mpq(*x,zres);
+ mpz_clear(zres);
+}
+
+void
+numb_modulo(eval_t *x, const eval_t *y)
+{
+ mpz_t xx, yy, res;
+
+ /* x should be integral */
+ /* y should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(yy);
+ mpq2mpz(yy,*y,NOISY);
+
+ mpz_init(res);
+ mpz_mod(res,xx,yy);
+
+ mpz_clear(xx);
+ mpz_clear(yy);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+void
+numb_and(eval_t *x, const eval_t *y)
+{
+ mpz_t xx, yy, res;
+
+ /* x should be integral */
+ /* y should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(yy);
+ mpq2mpz(yy,*y,NOISY);
+
+ mpz_init(res);
+ mpz_and(res,xx,yy);
+
+ mpz_clear(xx);
+ mpz_clear(yy);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+void
+numb_ior(eval_t *x, const eval_t *y)
+{
+ mpz_t xx, yy, res;
+
+ /* x should be integral */
+ /* y should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(yy);
+ mpq2mpz(yy,*y,NOISY);
+
+ mpz_init(res);
+ mpz_ior(res,xx,yy);
+
+ mpz_clear(xx);
+ mpz_clear(yy);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+void
+numb_eor(eval_t *x, const eval_t *y)
+{
+ mpz_t xx, yy, res;
+
+ /* x should be integral */
+ /* y should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(yy);
+ mpq2mpz(yy,*y,NOISY);
+
+ mpz_init(res);
+
+#if 0
+ mpz_xor(res,xx,yy);
+#else /* 0 */
+ /* a^b = (a|b) & !(a&b) */
+ {
+ mpz_t and_ab, ior_ab, nand_ab;
+
+ mpz_init(ior_ab);
+ mpz_ior(ior_ab,xx,yy);
+
+ mpz_init(and_ab);
+ mpz_and(and_ab,xx,yy);
+
+ mpz_init(nand_ab);
+ mpz_com(nand_ab,and_ab);
+
+ mpz_and(res,ior_ab,nand_ab);
+
+ mpz_clear(and_ab);
+ mpz_clear(ior_ab);
+ mpz_clear(nand_ab);
+ }
+#endif /* 0 */
+
+ mpz_clear(xx);
+ mpz_clear(yy);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+void
+numb_not(eval_t *x)
+{
+ mpz_t xx, res;
+
+ /* x should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(res);
+ mpz_com(res,xx);
+
+ mpz_clear(xx);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+void
+numb_lshift(eval_t *x, const eval_t *y)
+{
+ mpz_t xx, yy, res;
+
+ /* x should be integral */
+ /* y should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(yy);
+ mpq2mpz(yy,*y,NOISY);
+
+ mpz_init(res);
+ { /* bug: need to determine if y is too big or negative */
+ long int exp = mpz_get_si(yy);
+ if (exp >= 0) {
+ mpz_mul_2exp(res,xx,(unsigned)exp);
+ } else {
+ mpz_div_2exp(res,xx,(unsigned)-exp);
+ }
+ }
+
+ mpz_clear(xx);
+ mpz_clear(yy);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+void
+numb_rshift(eval_t *x, const eval_t *y)
+{
+ mpz_t xx, yy, res;
+
+ /* x should be integral */
+ /* y should be integral */
+
+ mpz_init(xx);
+ mpq2mpz(xx,*x,NOISY);
+
+ mpz_init(yy);
+ mpq2mpz(yy,*y,NOISY);
+
+ mpz_init(res);
+ { /* bug: need to determine if y is too big or negative */
+ long int exp = mpz_get_si(yy);
+ if (exp >= 0) {
+ mpz_div_2exp(res,xx,(unsigned)exp);
+ } else {
+ mpz_mul_2exp(res,xx,(unsigned)-exp);
+ }
+ }
+
+ mpz_clear(xx);
+ mpz_clear(yy);
+
+ mpz2mpq(*x,res);
+ mpz_clear(res);
+}
+
+
+#else /* WITH_GMP */
+
+void
+numb_initialise(void)
+{
+ ;
+}
+
+
+/*------------------------------------------------------------------------.
+| The function ntoa () converts VALUE to a signed ascii representation in |
+| radix RADIX. |
+`------------------------------------------------------------------------*/
+
+/* Digits for number to ascii conversions. */
+static char const ntoa_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+
+static const char *
+ntoa (eval_t value, int radix)
+{
+ boolean negative;
+ ueval_t uvalue;
+ static char str[256];
+ register char *s = &str[sizeof str];
+
+ *--s = '\0';
+
+ if (value < 0)
+ {
+ negative = TRUE;
+ uvalue = (ueval_t) -value;
+ }
+ else
+ {
+ negative = FALSE;
+ uvalue = (ueval_t) value;
+ }
+
+ do
+ {
+ *--s = ntoa_digits[uvalue % radix];
+ uvalue /= radix;
+ }
+ while (uvalue > 0);
+
+ if (negative)
+ *--s = '-';
+ return s;
+}
+
+void
+numb_obstack(struct obstack *obs, const eval_t value,
+ const int radix, int min)
+{
+ const char *s = ntoa (value, radix);
+
+ if (*s == '-')
+ {
+ obstack_1grow (obs, '-');
+ min--;
+ s++;
+ }
+ for (min -= strlen (s); --min >= 0;)
+ obstack_1grow (obs, '0');
+
+ obstack_grow (obs, s, strlen (s));
+}
+
+
+#endif /* WITH_GMP */
+
+
+void
+numb_pow (eval_t *x, const eval_t *y)
+{
+ /* y should be integral */
+
+ eval_t ans, yy;
+
+ numb_init(ans);
+ numb_set_si(&ans,1);
+
+ numb_init(yy);
+ numb_set(yy,*y);
+
+ if (numb_negativep(yy)) {
+ numb_invert(*x);
+ numb_negate(yy);
+ }
+
+ while (numb_positivep(yy)) {
+ numb_times(ans,*x);
+ numb_decr(yy);
+ }
+ numb_set(*x,ans);
+
+ numb_fini(ans);
+ numb_fini(yy);
+}
diff --git a/src/numb.h b/src/numb.h
new file mode 100644
index 00000000..2fa02a58
--- /dev/null
+++ b/src/numb.h
@@ -0,0 +1,156 @@
+/* GNU m4 -- A simple macro processor
+ Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "m4.h"
+
+#ifdef WITH_GMP
+#define NUMB_MP 1
+#endif
+
+#ifdef WITH_GMP
+#include "gmp.h"
+
+/* eval_t should be at least 32 bits. */
+typedef mpq_t eval_t;
+
+extern eval_t numb_ZERO;
+extern eval_t numb_ONE;
+
+#define numb_set(ans,i) mpq_set(ans,i)
+#define numb_set_si(ans,i) mpq_set_si(*(ans),(long)i,(unsigned long)1)
+
+#define numb_init(x) mpq_init((x))
+#define numb_fini(x) mpq_clear((x))
+
+#define numb_zerop(x) (mpq_cmp(x,numb_ZERO) == 0)
+#define numb_positivep(x) (mpq_cmp(x,numb_ZERO) > 0)
+#define numb_negativep(x) (mpq_cmp(x,numb_ZERO) < 0)
+
+#define numb_eq(x,y) numb_set(x,mpq_cmp(x,y)==0? numb_ONE: numb_ZERO)
+#define numb_ne(x,y) numb_set(x,mpq_cmp(x,y)!=0? numb_ONE: numb_ZERO)
+#define numb_lt(x,y) numb_set(x,mpq_cmp(x,y)< 0? numb_ONE: numb_ZERO)
+#define numb_le(x,y) numb_set(x,mpq_cmp(x,y)<=0? numb_ONE: numb_ZERO)
+#define numb_gt(x,y) numb_set(x,mpq_cmp(x,y)> 0? numb_ONE: numb_ZERO)
+#define numb_ge(x,y) numb_set(x,mpq_cmp(x,y)>=0? numb_ONE: numb_ZERO)
+
+#define numb_lnot(x) numb_set(x,numb_zerop(x)? numb_ONE: numb_ZERO)
+#define numb_lior(x,y) numb_set(x,numb_zerop(x)? y: numb_ONE)
+#define numb_land(x,y) numb_set(x,numb_zerop(x)? numb_ZERO: y)
+
+#define reduce1(f1,x) \
+{ eval_t T; mpq_init(T); f1(T,x); mpq_set(x,T); mpq_clear(T); }
+#define reduce2(f2,x,y) \
+{ eval_t T; mpq_init(T); f2(T,(x),(y)); mpq_set((x),T); mpq_clear(T); }
+
+#define numb_plus(x,y) reduce2(mpq_add,x,y)
+#define numb_minus(x,y) reduce2(mpq_sub,x,y)
+#define numb_negate(x) reduce1(mpq_neg,x)
+
+#define numb_times(x,y) reduce2(mpq_mul,x,y)
+#define numb_ratio(x,y) reduce2(mpq_div,x,y)
+#define numb_invert(x) reduce1(mpq_inv,x)
+
+#define numb_decr(n) numb_minus(n,numb_ONE)
+
+
+
+void numb_divide(eval_t *x, const eval_t *y);
+void numb_modulo(eval_t *x, const eval_t *y);
+void numb_and(eval_t *x, const eval_t *y);
+void numb_ior(eval_t *x, const eval_t *y);
+void numb_eor(eval_t *x, const eval_t *y);
+void numb_not(eval_t *x);;
+void numb_lshift(eval_t *x, const eval_t *y);
+void numb_rshift(eval_t *x, const eval_t *y);
+void numb_pow (eval_t *x, const eval_t *y);
+
+
+
+
+#else /* not WITH_GMP */
+
+/* eval_t should be at least 32 bits. */
+/* use GNU long long int if available */
+#if defined(SIZEOF_LONG_LONG_INT) && SIZEOF_LONG_LONG_INT > 0
+typedef long long int eval_t;
+typedef unsigned long long int ueval_t;
+#else
+typedef long int eval_t;
+typedef unsigned long int ueval_t;
+#endif
+
+extern eval_t numb_ZERO;
+extern eval_t numb_ONE;
+
+#define int2numb(i) ((eval_t)(i))
+#define numb2int(n) ((n))
+
+#define numb_set(ans,x) ((ans) = x)
+#define numb_set_si(ans,si) (*(ans) = int2numb(si))
+
+#define numb_init(x) x=((eval_t)0)
+#define numb_fini(x)
+
+#define numb_decr(n) (n) -= 1
+
+#define numb_ZERO ((eval_t)0)
+#define numb_ONE ((eval_t)1)
+
+#define numb_zerop(x) ((x) == numb_ZERO)
+#define numb_positivep(x) ((x) > numb_ZERO)
+#define numb_negativep(x) ((x) < numb_ZERO)
+
+
+#define numb_eq(x,y) ((x) = ((x) == (y)))
+#define numb_ne(x,y) ((x) = ((x) != (y)))
+#define numb_lt(x,y) ((x) = ((x) < (y)))
+#define numb_le(x,y) ((x) = ((x) <= (y)))
+#define numb_gt(x,y) ((x) = ((x) > (y)))
+#define numb_ge(x,y) ((x) = ((x) >= (y)))
+
+#define numb_lnot(x) ((x) = (! (x)))
+#define numb_lior(x,y) ((x) = ((x) || (y)))
+#define numb_land(x,y) ((x) = ((x) && (y)))
+
+#define numb_not(x) (*(x) = int2numb(~numb2int(*(x))))
+#define numb_eor(x,y) (*(x) = int2numb(numb2int(*(x)) ^ numb2int(*(y))))
+#define numb_ior(x,y) (*(x) = int2numb(numb2int(*(x)) | numb2int(*(y))))
+#define numb_and(x,y) (*(x) = int2numb(numb2int(*(x)) & numb2int(*(y))))
+
+#define numb_plus(x,y) ((x) = ((x) + (y)))
+#define numb_minus(x,y) ((x) = ((x) - (y)))
+#define numb_negate(x) ((x) = (- (x)))
+
+#define numb_times(x,y) ((x) = ((x) * (y)))
+#define numb_ratio(x,y) ((x) = ((x) / ((y))))
+#define numb_divide(x,y) (*(x) = (*(x) / (*(y))))
+#define numb_modulo(x,y) (*(x) = (*(x) % *(y)))
+#define numb_invert(x) ((x) = 1 / (x))
+
+#define numb_lshift(x,y) (*(x) = (*(x) << *(y)))
+#define numb_rshift(x,y) (*(x) = (*(x) >> *(y)))
+
+void numb_pow (eval_t *x, const eval_t *y);
+
+#endif /* WITH_GMP */
+
+
+void numb_initialise __P((void));
+void numb_obstack __P((struct obstack *obs,
+ const eval_t value,
+ const int radix, int min));
diff --git a/src/path.c b/src/path.c
index ebadf734..036f5fb7 100644
--- a/src/path.c
+++ b/src/path.c
@@ -128,7 +128,7 @@ path_search (const char *dir)
if (fp != NULL)
{
if (debug_level & DEBUG_TRACE_PATH)
- DEBUG_MESSAGE ((_("Path search for `%s' found `%s'"), dir, name));
+ DEBUG_MESSAGE2 (_("Path search for `%s' found `%s'"), dir, name);
break;
}
}