summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BACKLOG37
-rw-r--r--COPYING6
-rw-r--r--ChangeLog42
-rw-r--r--INSTALL46
-rw-r--r--Makefile.in402
-rw-r--r--NEWS7
-rw-r--r--README1
-rw-r--r--README-alpha12
-rw-r--r--THANKS1
-rw-r--r--TODO34
-rw-r--r--acconfig.h32
-rw-r--r--acinclude.m4418
-rw-r--r--aclocal.m4885
-rw-r--r--acm4/Makefile.am12
-rw-r--r--acm4/Makefile.in186
-rw-r--r--acm4/error.m411
-rw-r--r--acm4/gettext.m4384
-rw-r--r--acm4/gmp.m430
-rw-r--r--acm4/ltdl.m4429
-rw-r--r--acm4/modules.m427
-rw-r--r--acm4/regex.m423
-rw-r--r--c-boxes.el406
-rw-r--r--checks/01.define2
-rw-r--r--checks/02.arguments2
-rw-r--r--checks/02.define13
-rw-r--r--checks/03.arguments2
-rw-r--r--checks/04.arguments2
-rw-r--r--checks/05.arguments2
-rw-r--r--checks/06.arguments5
-rw-r--r--checks/06.pseudo_argu2
-rw-r--r--checks/07.pseudo_argu2
-rw-r--r--checks/08.pseudo_argu2
-rw-r--r--checks/09.pseudo_argu2
-rw-r--r--checks/10.pseudo_argu2
-rw-r--r--checks/11.pseudo_argu5
-rw-r--r--checks/11.undefine2
-rw-r--r--checks/12.defn2
-rw-r--r--checks/12.undefine11
-rw-r--r--checks/13.defn7
-rw-r--r--checks/13.pushdef2
-rw-r--r--checks/14.defn9
-rw-r--r--checks/14.pushdef2
-rw-r--r--checks/15.indir2
-rw-r--r--checks/15.pushdef17
-rw-r--r--checks/16.ifdef2
-rw-r--r--checks/16.pushdef17
-rw-r--r--checks/17.ifelse2
-rw-r--r--checks/17.indir7
-rw-r--r--checks/18.ifdef7
-rw-r--r--checks/18.ifelse2
-rw-r--r--checks/19.ifelse9
-rw-r--r--checks/19.loops2
-rw-r--r--checks/20.ifelse3
-rw-r--r--checks/20.loops2
-rw-r--r--checks/21.dumpdef2
-rw-r--r--checks/21.loops7
-rw-r--r--checks/22.loops10
-rw-r--r--checks/22.trace2
-rw-r--r--checks/23.dnl2
-rw-r--r--checks/23.dumpdef9
-rw-r--r--checks/24.changequote2
-rw-r--r--checks/24.trace13
-rw-r--r--checks/25.changequote2
-rw-r--r--checks/25.dnl4
-rw-r--r--checks/26.changequote2
-rw-r--r--checks/27.changecom2
-rw-r--r--checks/27.changequote7
-rw-r--r--checks/28.changecom2
-rw-r--r--checks/28.changequote9
-rw-r--r--checks/29.changecom11
-rw-r--r--checks/29.m4wrap2
-rw-r--r--checks/30.changecom7
-rw-r--r--checks/30.include2
-rw-r--r--checks/31.changesynta11
-rw-r--r--checks/31.include2
-rw-r--r--checks/32.changesynta11
-rw-r--r--checks/32.include2
-rw-r--r--checks/33.changesynta9
-rw-r--r--checks/33.divert2
-rw-r--r--checks/34.changesynta9
-rw-r--r--checks/34.divert2
-rw-r--r--checks/35.changesynta15
-rw-r--r--checks/35.undivert2
-rw-r--r--checks/36.changesynta5
-rw-r--r--checks/36.undivert2
-rw-r--r--checks/37.changesynta13
-rw-r--r--checks/37.undivert2
-rw-r--r--checks/38.divnum2
-rw-r--r--checks/38.m4wrap9
-rw-r--r--checks/39.cleardiv2
-rw-r--r--checks/39.include6
-rw-r--r--checks/40.cleardiv2
-rw-r--r--checks/40.include8
-rw-r--r--checks/41.include8
-rw-r--r--checks/41.len2
-rw-r--r--checks/42.divert9
-rw-r--r--checks/42.index2
-rw-r--r--checks/43.divert6
-rw-r--r--checks/43.regexp2
-rw-r--r--checks/44.regexp2
-rw-r--r--checks/44.undivert11
-rw-r--r--checks/45.substr2
-rw-r--r--checks/45.undivert13
-rw-r--r--checks/46.translit2
-rw-r--r--checks/46.undivert9
-rw-r--r--checks/47.divnum13
-rw-r--r--checks/47.patsubst2
-rw-r--r--checks/48.cleardiv7
-rw-r--r--checks/48.patsubst2
-rw-r--r--checks/49.cleardiv4
-rw-r--r--checks/49.format2
-rw-r--r--checks/50.incr2
-rw-r--r--checks/50.len5
-rw-r--r--checks/51.eval2
-rw-r--r--checks/51.index5
-rw-r--r--checks/52.eval2
-rw-r--r--checks/52.regexp5
-rw-r--r--checks/53.esyscmd2
-rw-r--r--checks/53.regexp3
-rw-r--r--checks/54.substr5
-rw-r--r--checks/54.sysval2
-rw-r--r--checks/55.errprint2
-rw-r--r--checks/55.translit7
-rw-r--r--checks/56.errprint2
-rw-r--r--checks/56.patsubst11
-rw-r--r--checks/57.m4exit2
-rw-r--r--checks/57.patsubst9
-rw-r--r--checks/58.format5
-rw-r--r--checks/59.incr5
-rw-r--r--checks/60.eval18
-rw-r--r--checks/61.eval11
-rw-r--r--checks/62.esyscmd6
-rw-r--r--checks/63.sysval9
-rw-r--r--checks/64.errprint5
-rw-r--r--checks/65.errprint5
-rw-r--r--checks/66.m4exit6
-rw-r--r--checks/Makefile.in220
-rw-r--r--config.h.in101
-rwxr-xr-xconfigure3506
-rw-r--r--configure.in38
-rw-r--r--doc/Makefile.in353
-rw-r--r--doc/helptoman.pl249
-rw-r--r--doc/m4.1121
-rw-r--r--doc/m4.info162
-rw-r--r--doc/m4.info-17
-rw-r--r--doc/m4.info-222
-rw-r--r--doc/m4.info-3356
-rw-r--r--doc/m4.texinfo1
-rw-r--r--doc/stamp-vti4
-rw-r--r--doc/texinfo.tex1583
-rw-r--r--doc/version.texi6
-rw-r--r--examples/Makefile.in197
-rw-r--r--examples/WWW/Makefile18
-rw-r--r--examples/WWW/_footer.htm15
-rw-r--r--examples/WWW/_header.htm234
-rw-r--r--examples/WWW/bugs.htm284
-rw-r--r--examples/WWW/changelog.htm2248
-rw-r--r--examples/WWW/download.htm302
-rw-r--r--examples/WWW/features.htm380
-rw-r--r--examples/WWW/feedback.htm297
-rw-r--r--examples/WWW/index.htm319
-rw-r--r--examples/WWW/lists.htm320
-rw-r--r--examples/WWW/m4lib/bugs.m452
-rw-r--r--examples/WWW/m4lib/changelog.m418
-rw-r--r--examples/WWW/m4lib/download.m421
-rw-r--r--examples/WWW/m4lib/features.m462
-rw-r--r--examples/WWW/m4lib/feedback.m420
-rw-r--r--examples/WWW/m4lib/html.m4119
-rw-r--r--examples/WWW/m4lib/index.m436
-rw-r--r--examples/WWW/m4lib/layout.m450
-rw-r--r--examples/WWW/m4lib/lists.m432
-rw-r--r--examples/WWW/m4lib/menu.m435
-rw-r--r--examples/WWW/m4lib/modules.m418
-rw-r--r--examples/WWW/m4lib/news.m418
-rw-r--r--examples/WWW/m4lib/readme.m418
-rw-r--r--examples/WWW/m4lib/setup.m47
-rw-r--r--examples/WWW/m4lib/test.m49
-rw-r--r--examples/WWW/m4lib/thanks.m418
-rw-r--r--examples/WWW/m4lib/thissite.m439
-rw-r--r--examples/WWW/m4lib/tmpl.m411
-rw-r--r--examples/WWW/m4lib/todo.m418
-rw-r--r--examples/WWW/m4lib/uses.m436
-rw-r--r--examples/WWW/m4lib/visions.m428
-rw-r--r--examples/WWW/m4lib/whatis.m443
-rw-r--r--examples/WWW/modules.htm347
-rw-r--r--examples/WWW/news.htm551
-rw-r--r--examples/WWW/readme.htm329
-rw-r--r--examples/WWW/thanks.htm377
-rw-r--r--examples/WWW/thissite.htm327
-rw-r--r--examples/WWW/todo.htm388
-rw-r--r--examples/WWW/uses.htm322
-rw-r--r--examples/WWW/visions.htm309
-rw-r--r--examples/WWW/whatis.htm327
-rwxr-xr-xexamples/capitalize.test21
-rwxr-xr-xexamples/comments.test24
-rwxr-xr-xexamples/ddivert.test18
-rwxr-xr-xexamples/debug.test33
-rw-r--r--examples/defs54
-rwxr-xr-xexamples/esyscmd.test18
-rwxr-xr-xexamples/exp.test23
-rwxr-xr-xexamples/foreach.test28
-rwxr-xr-xexamples/forloop.test26
-rwxr-xr-xexamples/fstab.test21
-rwxr-xr-xexamples/hanoi.test23
-rwxr-xr-xexamples/include.test28
-rwxr-xr-xexamples/indir.test24
-rw-r--r--examples/iso8859.m4bin1146 -> 0 bytes
-rwxr-xr-xexamples/iso8859.test33
-rwxr-xr-xexamples/misc.test17
-rw-r--r--examples/mktests.sh65
-rwxr-xr-xexamples/multiquotes.test47
-rwxr-xr-xexamples/patsubst.test26
-rwxr-xr-xexamples/pushpop.test28
-rwxr-xr-xexamples/regexp.test39
-rwxr-xr-xexamples/reverse.test20
-rwxr-xr-xexamples/sysv-args.test53
-rwxr-xr-xexamples/trace.test96
-rwxr-xr-xexamples/translit.test22
-rwxr-xr-xexamples/undivert.test21
-rwxr-xr-xexamples/wrap.test22
-rw-r--r--gettext.m4384
-rwxr-xr-xinstall-sh22
-rw-r--r--lib/Makefile.in331
-rw-r--r--lib/alloca.c18
-rw-r--r--lib/error.c123
-rw-r--r--lib/getopt.c354
-rw-r--r--lib/getopt.h28
-rw-r--r--lib/getopt1.c43
-rw-r--r--lib/m4error.c259
-rw-r--r--lib/m4error.h98
-rw-r--r--lib/m4module.c214
-rw-r--r--lib/m4module.h240
-rw-r--r--lib/m4obstack.c598
-rw-r--r--lib/m4obstack.h593
-rw-r--r--lib/m4private.h68
-rw-r--r--lib/m4regex.c5880
-rw-r--r--lib/m4regex.h542
-rw-r--r--lib/obstack.c44
-rw-r--r--lib/obstack.h77
-rw-r--r--lib/regex.c1548
-rw-r--r--lib/regex.h89
-rw-r--r--lib/strtol.c334
-rw-r--r--lib/xmalloc.c54
-rw-r--r--lib/xstrdup.c20
-rw-r--r--libltdl/COPYING.LIB481
-rw-r--r--libltdl/Makefile.am44
-rw-r--r--libltdl/Makefile.in454
-rw-r--r--libltdl/README1
-rw-r--r--libltdl/acconfig.h12
-rw-r--r--libltdl/acinclude.m4427
-rw-r--r--libltdl/aclocal.m4566
-rw-r--r--libltdl/config.h.in80
-rwxr-xr-xlibltdl/configure3077
-rw-r--r--libltdl/configure.in373
-rw-r--r--libltdl/ltdl.c1577
-rw-r--r--libltdl/ltdl.h91
-rw-r--r--libltdl/stamp-h.in1
-rwxr-xr-xmkinstalldirs18
-rw-r--r--modules/Makefile.am9
-rw-r--r--modules/Makefile.in300
-rw-r--r--modules/README62
-rw-r--r--modules/TODO3
-rw-r--r--modules/defs58
-rwxr-xr-xmodules/modpath1.test26
-rwxr-xr-xmodules/modpath2.test25
-rwxr-xr-xmodules/modpath3.test30
-rwxr-xr-xmodules/modpath4.test24
-rw-r--r--modules/shadow.c75
-rw-r--r--modules/shadow.m459
-rwxr-xr-xmodules/shadow.test91
-rw-r--r--modules/stdlib.c293
-rw-r--r--modules/stdlib.m441
-rw-r--r--modules/test.c58
-rw-r--r--modules/test.m43
-rwxr-xr-xmodules/test.test24
-rw-r--r--modules/time.c193
-rw-r--r--modules/time.m416
-rwxr-xr-xmodules/time.test50
-rw-r--r--modules/time2.m414
-rw-r--r--po/cs.gmobin12502 -> 0 bytes
-rw-r--r--po/cs.po725
-rw-r--r--po/de.gmobin12496 -> 0 bytes
-rw-r--r--po/de.po507
-rw-r--r--po/el.gmobin12751 -> 0 bytes
-rw-r--r--po/el.po690
-rw-r--r--po/fr.gmobin12645 -> 0 bytes
-rw-r--r--po/fr.po468
-rw-r--r--po/it.gmobin6243 -> 0 bytes
-rw-r--r--po/it.po406
-rw-r--r--po/ja.gmobin13592 -> 0 bytes
-rw-r--r--po/ja.po515
-rw-r--r--po/nl.gmobin12351 -> 0 bytes
-rw-r--r--po/nl.po464
-rw-r--r--po/pl.gmobin11935 -> 0 bytes
-rw-r--r--po/pl.po500
-rw-r--r--po/ru.gmobin12173 -> 0 bytes
-rw-r--r--po/ru.po498
-rw-r--r--po/sv.gmobin334 -> 0 bytes
-rw-r--r--po/sv.po549
-rw-r--r--src/Makefile.in417
-rw-r--r--src/ansi2knr.127
-rw-r--r--src/ansi2knr.c257
-rw-r--r--src/builtin.c59
-rw-r--r--src/builtin.h39
-rw-r--r--src/debug.c10
-rw-r--r--src/eval.c52
-rw-r--r--src/evalmp.c27
-rw-r--r--src/freeze.c26
-rw-r--r--src/getopt.c1051
-rw-r--r--src/getopt.h180
-rw-r--r--src/getopt1.c188
-rw-r--r--src/input.c20
-rw-r--r--src/ltdl.c1691
-rw-r--r--src/ltdl.h141
-rw-r--r--src/m4.c48
-rw-r--r--src/m4.h138
-rw-r--r--src/macro.c18
-rw-r--r--src/module.c206
-rw-r--r--src/numb.c418
-rw-r--r--src/numb.h156
-rw-r--r--src/output.c10
-rw-r--r--src/path.c2
-rw-r--r--src/stackovf.c17
-rw-r--r--src/symtab.c4
-rw-r--r--stamp-h.in2
-rw-r--r--tests/Makefile.am35
-rw-r--r--tests/Makefile.in235
-rwxr-xr-xtests/argument.1.test21
-rwxr-xr-xtests/argument.2.test23
-rwxr-xr-xtests/argument.3.test21
-rwxr-xr-xtests/argument.4.test21
-rwxr-xr-xtests/changeco.1.test27
-rwxr-xr-xtests/changeco.2.test23
-rwxr-xr-xtests/changequ.1.test23
-rwxr-xr-xtests/changequ.2.test23
-rwxr-xr-xtests/changequ.3.test25
-rwxr-xr-xtests/changesy.1.test27
-rwxr-xr-xtests/changesy.2.test27
-rwxr-xr-xtests/changesy.3.test25
-rwxr-xr-xtests/changesy.4.test25
-rwxr-xr-xtests/changesy.5.test31
-rwxr-xr-xtests/changesy.6.test21
-rwxr-xr-xtests/changesy.7.test29
-rwxr-xr-xtests/cleardiv.1.test23
-rwxr-xr-xtests/cleardiv.2.test20
-rwxr-xr-xtests/define.1.test21
-rwxr-xr-xtests/define.2.test29
-rwxr-xr-xtests/defn.1.test23
-rwxr-xr-xtests/defn.2.test25
-rw-r--r--tests/defs54
-rwxr-xr-xtests/divert.1.test25
-rwxr-xr-xtests/divert.2.test22
-rwxr-xr-xtests/divnum.1.test29
-rwxr-xr-xtests/dnl.1.test20
-rwxr-xr-xtests/dumpdef.1.test29
-rwxr-xr-xtests/errprint.1.test25
-rwxr-xr-xtests/errprint.2.test25
-rwxr-xr-xtests/esyscmd.1.test22
-rwxr-xr-xtests/eval.1.test38
-rwxr-xr-xtests/eval.2.test27
-rw-r--r--tests/foo1
-rwxr-xr-xtests/format.1.test21
-rwxr-xr-xtests/generated-tests/argument.1.test21
-rwxr-xr-xtests/generated-tests/argument.2.test23
-rwxr-xr-xtests/generated-tests/argument.3.test21
-rwxr-xr-xtests/generated-tests/argument.4.test21
-rwxr-xr-xtests/generated-tests/changeco.1.test27
-rwxr-xr-xtests/generated-tests/changeco.2.test23
-rwxr-xr-xtests/generated-tests/changequ.1.test23
-rwxr-xr-xtests/generated-tests/changequ.2.test23
-rwxr-xr-xtests/generated-tests/changequ.3.test25
-rwxr-xr-xtests/generated-tests/changesy.1.test27
-rwxr-xr-xtests/generated-tests/changesy.2.test27
-rwxr-xr-xtests/generated-tests/changesy.3.test25
-rwxr-xr-xtests/generated-tests/changesy.4.test25
-rwxr-xr-xtests/generated-tests/changesy.5.test31
-rwxr-xr-xtests/generated-tests/changesy.6.test21
-rwxr-xr-xtests/generated-tests/changesy.7.test29
-rwxr-xr-xtests/generated-tests/changesy.8.test29
-rwxr-xr-xtests/generated-tests/cleardiv.1.test23
-rwxr-xr-xtests/generated-tests/cleardiv.2.test20
-rwxr-xr-xtests/generated-tests/define.1.test21
-rwxr-xr-xtests/generated-tests/define.2.test29
-rwxr-xr-xtests/generated-tests/defn.1.test23
-rwxr-xr-xtests/generated-tests/defn.2.test25
-rwxr-xr-xtests/generated-tests/divert.1.test25
-rwxr-xr-xtests/generated-tests/divert.2.test22
-rwxr-xr-xtests/generated-tests/divnum.1.test29
-rwxr-xr-xtests/generated-tests/dnl.1.test20
-rwxr-xr-xtests/generated-tests/dumpdef.1.test29
-rwxr-xr-xtests/generated-tests/errprint.1.test25
-rwxr-xr-xtests/generated-tests/errprint.2.test25
-rwxr-xr-xtests/generated-tests/esyscmd.1.test22
-rwxr-xr-xtests/generated-tests/eval.1.test38
-rwxr-xr-xtests/generated-tests/eval.2.test27
-rwxr-xr-xtests/generated-tests/format.1.test21
-rwxr-xr-xtests/generated-tests/ifdef.1.test23
-rwxr-xr-xtests/generated-tests/ifelse.1.test25
-rwxr-xr-xtests/generated-tests/ifelse.2.test19
-rwxr-xr-xtests/generated-tests/include.1.test26
-rwxr-xr-xtests/generated-tests/include.2.test24
-rwxr-xr-xtests/generated-tests/include.3.test24
-rwxr-xr-xtests/generated-tests/incr.1.test21
-rwxr-xr-xtests/generated-tests/index.1.test21
-rwxr-xr-xtests/generated-tests/indir.1.test23
-rwxr-xr-xtests/generated-tests/len.1.test21
-rwxr-xr-xtests/generated-tests/loops.1.test23
-rwxr-xr-xtests/generated-tests/loops.2.test26
-rwxr-xr-xtests/generated-tests/m4exit.1.test26
-rwxr-xr-xtests/generated-tests/m4wrap.1.test25
-rwxr-xr-xtests/generated-tests/patsubst.1.test27
-rwxr-xr-xtests/generated-tests/patsubst.2.test25
-rwxr-xr-xtests/generated-tests/pseudoar.1.test25
-rwxr-xr-xtests/generated-tests/pseudoar.2.test21
-rwxr-xr-xtests/generated-tests/pseudoar.3.test21
-rwxr-xr-xtests/generated-tests/pseudoar.4.test27
-rwxr-xr-xtests/generated-tests/pseudoar.5.test21
-rwxr-xr-xtests/generated-tests/pushdef.1.test33
-rwxr-xr-xtests/generated-tests/pushdef.2.test33
-rwxr-xr-xtests/generated-tests/regexp.1.test21
-rwxr-xr-xtests/generated-tests/regexp.2.test19
-rwxr-xr-xtests/generated-tests/substr.1.test21
-rwxr-xr-xtests/generated-tests/symbols.1.test19
-rwxr-xr-xtests/generated-tests/sysval.1.test25
-rwxr-xr-xtests/generated-tests/trace.1.test33
-rwxr-xr-xtests/generated-tests/translit.1.test23
-rwxr-xr-xtests/generated-tests/undefine.1.test27
-rwxr-xr-xtests/generated-tests/undivert.1.test27
-rwxr-xr-xtests/generated-tests/undivert.2.test29
-rwxr-xr-xtests/generated-tests/undivert.3.test25
-rwxr-xr-xtests/gentest/argument.1.m421
-rwxr-xr-xtests/gentest/argument.1.test21
-rwxr-xr-xtests/gentest/argument.2.m423
-rwxr-xr-xtests/gentest/argument.2.test23
-rwxr-xr-xtests/gentest/argument.3.m421
-rwxr-xr-xtests/gentest/argument.3.test21
-rwxr-xr-xtests/gentest/argument.4.m421
-rwxr-xr-xtests/gentest/argument.4.test21
-rwxr-xr-xtests/gentest/changeco.1.m427
-rwxr-xr-xtests/gentest/changeco.1.test27
-rwxr-xr-xtests/gentest/changeco.2.m423
-rwxr-xr-xtests/gentest/changeco.2.test23
-rwxr-xr-xtests/gentest/changequ.1.m423
-rwxr-xr-xtests/gentest/changequ.1.test23
-rwxr-xr-xtests/gentest/changequ.2.m423
-rwxr-xr-xtests/gentest/changequ.2.test23
-rwxr-xr-xtests/gentest/changequ.3.m425
-rwxr-xr-xtests/gentest/changequ.3.test25
-rwxr-xr-xtests/gentest/changesy.1.m427
-rwxr-xr-xtests/gentest/changesy.1.test27
-rwxr-xr-xtests/gentest/changesy.2.m427
-rwxr-xr-xtests/gentest/changesy.2.test27
-rwxr-xr-xtests/gentest/changesy.3.m425
-rwxr-xr-xtests/gentest/changesy.3.test25
-rwxr-xr-xtests/gentest/changesy.4.m425
-rwxr-xr-xtests/gentest/changesy.4.test25
-rwxr-xr-xtests/gentest/changesy.5.m431
-rwxr-xr-xtests/gentest/changesy.5.test31
-rwxr-xr-xtests/gentest/changesy.6.m421
-rwxr-xr-xtests/gentest/changesy.6.test21
-rwxr-xr-xtests/gentest/changesy.7.m429
-rwxr-xr-xtests/gentest/changesy.7.test29
-rwxr-xr-xtests/gentest/cleardiv.1.m423
-rwxr-xr-xtests/gentest/cleardiv.1.test23
-rwxr-xr-xtests/gentest/cleardiv.2.m420
-rwxr-xr-xtests/gentest/cleardiv.2.test20
-rwxr-xr-xtests/gentest/define.1.m421
-rwxr-xr-xtests/gentest/define.1.test21
-rwxr-xr-xtests/gentest/define.2.m429
-rwxr-xr-xtests/gentest/define.2.test29
-rwxr-xr-xtests/gentest/defn.1.m423
-rwxr-xr-xtests/gentest/defn.1.test23
-rwxr-xr-xtests/gentest/defn.2.m425
-rwxr-xr-xtests/gentest/defn.2.test25
-rwxr-xr-xtests/gentest/divert.1.m425
-rwxr-xr-xtests/gentest/divert.1.test25
-rwxr-xr-xtests/gentest/divert.2.m422
-rwxr-xr-xtests/gentest/divert.2.test22
-rwxr-xr-xtests/gentest/divnum.1.m429
-rwxr-xr-xtests/gentest/divnum.1.test29
-rwxr-xr-xtests/gentest/dnl.1.m420
-rwxr-xr-xtests/gentest/dnl.1.test20
-rwxr-xr-xtests/gentest/dumpdef.1.m429
-rwxr-xr-xtests/gentest/dumpdef.1.test29
-rwxr-xr-xtests/gentest/errprint.1.m425
-rwxr-xr-xtests/gentest/errprint.1.test25
-rwxr-xr-xtests/gentest/errprint.2.m425
-rwxr-xr-xtests/gentest/errprint.2.test25
-rwxr-xr-xtests/gentest/esyscmd.1.m422
-rwxr-xr-xtests/gentest/esyscmd.1.test22
-rwxr-xr-xtests/gentest/eval.1.m438
-rwxr-xr-xtests/gentest/eval.1.test38
-rwxr-xr-xtests/gentest/eval.2.m427
-rwxr-xr-xtests/gentest/eval.2.test27
-rwxr-xr-xtests/gentest/format.1.m421
-rwxr-xr-xtests/gentest/format.1.test21
-rwxr-xr-xtests/gentest/ifdef.1.m423
-rwxr-xr-xtests/gentest/ifdef.1.test23
-rwxr-xr-xtests/gentest/ifelse.1.m425
-rwxr-xr-xtests/gentest/ifelse.1.test25
-rwxr-xr-xtests/gentest/ifelse.2.m419
-rwxr-xr-xtests/gentest/ifelse.2.test19
-rwxr-xr-xtests/gentest/include.1.m426
-rwxr-xr-xtests/gentest/include.1.test26
-rwxr-xr-xtests/gentest/include.2.m424
-rwxr-xr-xtests/gentest/include.2.test24
-rwxr-xr-xtests/gentest/include.3.m424
-rwxr-xr-xtests/gentest/include.3.test24
-rwxr-xr-xtests/gentest/incr.1.m421
-rwxr-xr-xtests/gentest/incr.1.test21
-rwxr-xr-xtests/gentest/index.1.m421
-rwxr-xr-xtests/gentest/index.1.test21
-rwxr-xr-xtests/gentest/indir.1.m423
-rwxr-xr-xtests/gentest/indir.1.test23
-rwxr-xr-xtests/gentest/len.1.m421
-rwxr-xr-xtests/gentest/len.1.test21
-rwxr-xr-xtests/gentest/loops.1.m423
-rwxr-xr-xtests/gentest/loops.1.test23
-rwxr-xr-xtests/gentest/loops.2.m426
-rwxr-xr-xtests/gentest/loops.2.test26
-rwxr-xr-xtests/gentest/m4exit.1.m426
-rwxr-xr-xtests/gentest/m4exit.1.test26
-rwxr-xr-xtests/gentest/m4wrap.1.m425
-rwxr-xr-xtests/gentest/m4wrap.1.test25
-rwxr-xr-xtests/gentest/patsubst.1.m427
-rwxr-xr-xtests/gentest/patsubst.1.test27
-rwxr-xr-xtests/gentest/patsubst.2.m425
-rwxr-xr-xtests/gentest/patsubst.2.test25
-rwxr-xr-xtests/gentest/pseudoar.1.m425
-rwxr-xr-xtests/gentest/pseudoar.1.test25
-rwxr-xr-xtests/gentest/pseudoar.2.m421
-rwxr-xr-xtests/gentest/pseudoar.2.test21
-rwxr-xr-xtests/gentest/pseudoar.3.m421
-rwxr-xr-xtests/gentest/pseudoar.3.test21
-rwxr-xr-xtests/gentest/pseudoar.4.m427
-rwxr-xr-xtests/gentest/pseudoar.4.test27
-rwxr-xr-xtests/gentest/pseudoar.5.m421
-rwxr-xr-xtests/gentest/pseudoar.5.test21
-rwxr-xr-xtests/gentest/pushdef.1.m433
-rwxr-xr-xtests/gentest/pushdef.1.test33
-rwxr-xr-xtests/gentest/pushdef.2.m433
-rwxr-xr-xtests/gentest/pushdef.2.test33
-rwxr-xr-xtests/gentest/regexp.1.m421
-rwxr-xr-xtests/gentest/regexp.1.test21
-rwxr-xr-xtests/gentest/regexp.2.m419
-rwxr-xr-xtests/gentest/regexp.2.test19
-rwxr-xr-xtests/gentest/substr.1.m421
-rwxr-xr-xtests/gentest/substr.1.test21
-rwxr-xr-xtests/gentest/sysval.1.m425
-rwxr-xr-xtests/gentest/sysval.1.test25
-rwxr-xr-xtests/gentest/trace.1.m433
-rwxr-xr-xtests/gentest/trace.1.test33
-rwxr-xr-xtests/gentest/translit.1.m423
-rwxr-xr-xtests/gentest/translit.1.test23
-rwxr-xr-xtests/gentest/undefine.1.m427
-rwxr-xr-xtests/gentest/undefine.1.test27
-rwxr-xr-xtests/gentest/undivert.1.m427
-rwxr-xr-xtests/gentest/undivert.1.test27
-rwxr-xr-xtests/gentest/undivert.2.m429
-rwxr-xr-xtests/gentest/undivert.2.test29
-rwxr-xr-xtests/gentest/undivert.3.m425
-rwxr-xr-xtests/gentest/undivert.3.test25
-rwxr-xr-xtests/get-them112
-rwxr-xr-xtests/ifdef.1.test23
-rwxr-xr-xtests/ifelse.1.test25
-rwxr-xr-xtests/ifelse.2.test19
-rw-r--r--tests/incl.m43
-rwxr-xr-xtests/include.1.test26
-rwxr-xr-xtests/include.2.test24
-rwxr-xr-xtests/include.3.test24
-rwxr-xr-xtests/incr.1.test21
-rwxr-xr-xtests/index.1.test21
-rwxr-xr-xtests/indir.1.test23
-rwxr-xr-xtests/len.1.test21
-rwxr-xr-xtests/loops.1.test23
-rwxr-xr-xtests/loops.2.test26
-rwxr-xr-xtests/m4exit.1.test26
-rwxr-xr-xtests/m4wrap.1.test25
-rw-r--r--tests/mkconfig.sh4
-rw-r--r--tests/other-tests/discard-comments.m47
-rwxr-xr-xtests/other-tests/discard-comments.test17
-rw-r--r--tests/other-tests/gmp.m410
-rwxr-xr-xtests/other-tests/gmp.test120
-rw-r--r--tests/other-tests/import-environment.m44
-rwxr-xr-xtests/other-tests/import-environment.test28
-rw-r--r--tests/other-tests/iso8859.m4bin1146 -> 0 bytes
-rwxr-xr-xtests/other-tests/iso8859.test31
-rwxr-xr-xtests/other-tests/stackovf.test86
-rw-r--r--tests/other-tests/sync-lines.m412
-rwxr-xr-xtests/other-tests/sync-lines.test35
-rwxr-xr-xtests/patsubst.1.test27
-rwxr-xr-xtests/patsubst.2.test25
-rwxr-xr-xtests/pseudoar.1.test25
-rwxr-xr-xtests/pseudoar.2.test21
-rwxr-xr-xtests/pseudoar.3.test21
-rwxr-xr-xtests/pseudoar.4.test27
-rwxr-xr-xtests/pseudoar.5.test21
-rwxr-xr-xtests/pushdef.1.test33
-rwxr-xr-xtests/pushdef.2.test33
-rwxr-xr-xtests/regexp.1.test21
-rwxr-xr-xtests/regexp.2.test19
-rwxr-xr-xtests/run-test29
-rw-r--r--tests/stamp-TESTS0
-rwxr-xr-xtests/substr.1.test21
-rwxr-xr-xtests/sysval.1.test25
-rwxr-xr-xtests/trace.1.test33
-rwxr-xr-xtests/translit.1.test23
-rwxr-xr-xtests/undefine.1.test27
-rwxr-xr-xtests/undivert.1.test27
-rwxr-xr-xtests/undivert.2.test29
-rwxr-xr-xtests/undivert.3.test25
611 files changed, 9355 insertions, 49349 deletions
diff --git a/BACKLOG b/BACKLOG
index addae38e..c14711e1 100644
--- a/BACKLOG
+++ b/BACKLOG
@@ -1,9 +1,12 @@
-# Summary of pending email for GNU m4 1.4.
-# Last updated: Saturday, November 05, 1994.
+# Summary of pending email for GNU m4 1.4.1.
+# Last updated: Saturday, December 03, 1994.
rmail/announce
1. 15 Sep 94 <pinard@IRO.UMontreal.CA> Release: GNU m4 1.3
2. 29 Oct 94 <pinard@IRO.UMontreal.CA> Prerelease: GNU m4 1.3.1
+ 3. 06 Nov 94 <pinard@IRO.UMontreal.CA> Release: GNU m4 1.4
+ 4. 06 Nov 94 <pinard@iro.umontreal.ca> Release: GNU m4 1.4
+ 5. 06 Nov 94 <pinard@iro.umontreal.ca> Release: GNU m4 1.4
rmail/changeword
1. 02 Sep 94 <pinard> Re: Prerelease: GNU m4 1.2.3
@@ -12,6 +15,7 @@ rmail/changeword
rmail/configuration
1. 03 Nov 94 <Fredrik_Lundh@ivab.se> Re: m4 1.3 on DEC OSF/1 3.0
2. 05 Nov 94 <pinard> Re: m4 1.3 on DEC OSF/1 3.0
+ 3. 07 Nov 94 <marcus@ee.pdx.edu> m4-1.4 and NEXTSTEP 3.2
rmail/documentation
1. 05 Jun 92 <berstel@mipsmath.math.uqam.ca> Re: M4
@@ -22,19 +26,24 @@ rmail/documentation
6. 31 Aug 94 <kb@cs.umb.edu> Re: Frozen file documentation to proofread
rmail/floating-point
- 1. 27 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
- 2. 25 Oct 94 <johnm@vlibs.com> enhancement to m4
- 3. 27 Oct 94 <pinard> Re: enhancement to m4
- 4. 27 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
- 5. 27 Oct 94 <pinard> Re: enhancement to m4 eval()
- 6. 27 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
+ 1. 25 Oct 94 <johnm@vlibs.com> enhancement to m4
+ 2. 27 Oct 94 <pinard> Re: enhancement to m4
+ 3. 27 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
+ 4. 27 Oct 94 <pinard> Re: enhancement to m4 eval()
+ 5. 27 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
+ 6. 28 Oct 94 <pinard> Re: enhancement to m4 eval()
7. 28 Oct 94 <pinard> Re: enhancement to m4 eval()
- 8. 28 Oct 94 <pinard> Re: enhancement to m4 eval()
- 9. 28 Oct 94 <feeley@IRO.UMontreal.CA> Re: enhancement to m4 eval()
-10. 28 Oct 94 <pinard> Re: enhancement to m4 eval()
-11. 28 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
-12. 28 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
-13. 28 Oct 94 <pinard@IRO.UMontreal.CA> Re: enhancement to m4 eval()
+ 8. 28 Oct 94 <feeley@IRO.UMontreal.CA> Re: enhancement to m4 eval()
+ 9. 28 Oct 94 <pinard> Re: enhancement to m4 eval()
+10. 28 Oct 94 <johnm@vlibs.com> Re: enhancement to m4 eval()
+11. 28 Oct 94 <pinard@IRO.UMontreal.CA> Re: enhancement to m4 eval()
+12. 06 Nov 94 <johnm@vlibs.com> Re: progress on enhanced eval()
+13. 07 Nov 94 <pinard> Re: progress on enhanced eval()
+14. 07 Nov 94 <pinard> Re: progress on enhanced eval() [bis]
+15. 07 Nov 94 <johnm@vlibs.com> Re: progress on enhanced eval() [bis]
+16. 07 Nov 94 <pinard> Re: progress on enhanced eval() [bis]
+17. 21 Nov 94 <johnm@vlibs.com> m4 with extended arithmetic - status report
+18. 21 Nov 94 <pinard> Re: m4 with extended arithmetic - status report
rmail/format-rewrite
1. 25 Jun 94 <tmcconne@sedona.intel.com> Re: Prerelease: GNU m4 1.1.3
diff --git a/COPYING b/COPYING
index a43ea212..ee0775ea 100644
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -304,8 +304,8 @@ the "copyright" line and a pointer to where the full notice is found.
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.
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail.
diff --git a/ChangeLog b/ChangeLog
index 664472a5..9be114b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+Sat Dec 3 20:45:31 1994 Francois Pinard (pinard@icule)
+
+ * Prerelease 1.4.1.
+
+ * Makefile.in (realclean-local): Delete stamp-h.in.
+
+ * configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
+ Localize, adapting from how it is done in sharutils.
+
+ * fr.tt: New file, for French.
+
+ * configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
+ src/freeze.c: Rename PRODUCT to PACKAGE.
+
+Sat Nov 26 04:15:57 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Check for <libintl.h> and <locale.h>.
+ * src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
+ src/stackovf.c: Rename _ to __P.
+ * src/m4.h: Declare _ as a macro returning its argument, or else,
+ include <libintl.h> and declare _ as gettext.
+ * src/m4.c: Possibly include <locale.h> and call setlocale.
+ * src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
+ src/input.c, src/macro.c, src/output.c, src/path.c,
+ src/stackovf.c, src/symtab.c: Use _ macro over all localizable
+ strings.
+
+Mon Nov 7 11:25:12 1994 Francois Pinard (pinard@icule)
+
+ * doc/Makefile.in (stamp-vti): Use new -r option to date.
+
+ * configure.in: Put --with-gmp in place, in prevision for John
+ Gerard's work.
+ * acconfig.h: Document WITH_GMP.
+
Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
* Release 1.4.
@@ -672,12 +707,6 @@ Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
* m4.h (_): Change argument from `x' to `Args'.
-Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in: Remove all occurrences of $(MFLAGS), which were
- bringing more evil than good on a few systems.
- Reported by Greg A. Woods.
-
Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
* m4.h: Rename Args() to _().
@@ -1097,7 +1126,6 @@ Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
* Makefile.in (clean): Remove clutter from ansi2knr.
Reported by Pierre Gaumond.
- Reported by Greg A. Woods.
Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
diff --git a/INSTALL b/INSTALL
index 0338fbce..a2c8722c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -43,9 +43,13 @@ The simplest way to compile this package is:
documentation.
5. You can remove the program binaries and object files from the
- source directory by typing `make clean'. To also remove the files
- that `configure' created (so you can compile the package for a
- different kind of computer), type `make distclean'.
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
Compilers and Options
=====================
@@ -60,17 +64,22 @@ this:
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-Using a Different Build Directory
-=================================
+Compiling For Multiple Architectures
+====================================
- You can compile the package in a different directory from the one
-containing the source code. Doing so allows you to compile it on more
-than one kind of computer at the same time. To do this, you must use a
-version of `make' that supports the `VPATH' variable, such as GNU
-`make'. `cd' to the directory where you want the object files and
-executables to go and run the `configure' script. `configure'
-automatically checks for the source code in the directory that
-`configure' is in and in `..'.
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
Installation Names
==================
@@ -86,6 +95,11 @@ give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
@@ -143,9 +157,9 @@ Operation Controls
operates.
`--cache-file=FILE'
- Save the results of the tests in FILE instead of `config.cache'.
- Set FILE to `/dev/null' to disable caching, for debugging
- `configure'.
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
diff --git a/Makefile.in b/Makefile.in
index 3de59a49..03075029 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,138 +1,344 @@
-# Main Makefile for GNU m4.
-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
-# 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.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# 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.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 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.
-
-PRODUCT = @PRODUCT@
-VERSION = @VERSION@
SHELL = /bin/sh
+
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
-@SET_MAKE@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DISTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-CC = @CC@
-CFLAGS = @CFLAGS@
INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = $(exec_prefix)/bin
-infodir = $(prefix)/info
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLOCALE = @GLOCALE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NM = @NM@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+STACKOVF = @STACKOVF@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
+
+SUBDIRS=intl po doc lib src checks examples
-MDEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
-prefix='$(prefix)' exec_prefix='$(exec_prefix)' \
-bindir='$(bindir)' infodir='$(infodir)'
+EXTRA_DIST = LOCALE
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = README ABOUT-NLS AUTHORS BACKLOG COPYING ChangeLog \
+INSTALL Makefile.am Makefile.in NEWS THANKS TODO acconfig.h aclocal.m4 \
+config.guess config.h.in config.sub configure configure.in install-sh \
+ltconfig ltmain.sh missing mkinstalldirs stamp-h.in
-SUBDIRS = doc lib src checks examples
-DISTFILES = README NEWS TODO THANKS COPYING INSTALL ChangeLog c-boxes.el \
-configure.in acconfig.h aclocal.m4 mkinstalldirs install-sh Makefile.in \
-stamp-h.in config.h.in configure BACKLOG
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP = --best
+all: all-recursive-am all-am
.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
-all install uninstall: config.h
- for subdir in $(SUBDIRS); do \
- echo making $@ in $$subdir; \
- (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \
- done
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-info dvi:
- cd doc && $(MAKE) $@
+$(ACLOCAL_M4): configure.in
+ cd $(srcdir) && $(ACLOCAL)
-check: all
- cd checks && $(MAKE) $@
+config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
-tags:
- cd lib && $(MAKE) $@
- cd src && $(MAKE) $@
+config.h: stamp-h
+ @:
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in
-mostlyclean: mostlyclean-recursive mostlyclean-local
+mostlyclean-hdr:
-clean: clean-recursive clean-local
+clean-hdr:
-distclean: distclean-recursive distclean-local
- rm config.status
+distclean-hdr:
+ -rm -f config.h
-realclean: realclean-recursive realclean-local
- rm config.status
+maintainer-clean-hdr:
-mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive:
- for subdir in $(SUBDIRS); do \
- target=`echo $@ | sed 's/-recursive//'`; \
- echo making $$target in $$subdir; \
- (cd $$subdir && $(MAKE) $$target) || exit 1; \
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ target=`echo $@ | sed s/-recursive//`; \
+ echo "Making $$target in $$subdir"; \
+ (cd $$subdir && $(MAKE) $$target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ done; \
+ for subdir in $$rev; do \
+ target=`echo $@ | sed s/-recursive//`; \
+ echo "Making $$target in $$subdir"; \
+ (cd $$subdir && $(MAKE) $$target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir && $(MAKE) tags); \
done
-mostlyclean-local:
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
-clean-local: mostlyclean-local
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
-distclean-local: clean-local
- rm -f Makefile config.cache config.h config.log stamp-h
+mostlyclean-tags:
-realclean-local: distclean-local
+clean-tags:
-dist: $(DISTFILES)
- rm -rf $(PRODUCT)-$(VERSION)
- mkdir $(PRODUCT)-$(VERSION)
- chmod 777 $(PRODUCT)-$(VERSION)
- @echo "Copying distribution files"
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) \
+ && $(MAKE) dvi \
+ && $(MAKE) check \
+ && $(MAKE) install \
+ && $(MAKE) installcheck \
+ && $(MAKE) dist
+ -rm -rf $(distdir)
+ @echo "========================"; \
+ echo "$(distdir).tar.gz is ready for distribution"; \
+ echo "========================"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
@for file in $(DISTFILES); do \
- ln $(srcdir)/$$file $(PRODUCT)-$(VERSION) 2> /dev/null \
- || cp -p $(srcdir)/$$file $(PRODUCT)-$(VERSION); \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
done
for subdir in $(SUBDIRS); do \
- echo making $@ in $$subdir; \
- mkdir $(PRODUCT)-$(VERSION)/$$subdir; \
- chmod 777 $(PRODUCT)-$(VERSION)/$$subdir; \
- (cd $$subdir && $(MAKE) $@) || exit 1; \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
done
- chmod -R a+r $(PRODUCT)-$(VERSION)
- tar chozf $(PRODUCT)-$(VERSION).tar.gz $(PRODUCT)-$(VERSION)
- rm -rf $(PRODUCT)-$(VERSION)
-
-# For an explanation of the following Makefile rules, see node
-# `Automatic Remaking' in GNU Autoconf documentation.
-Makefile: Makefile.in config.status
- CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
-config.status: configure
- ./config.status --recheck
-configure: configure.in aclocal.m4
- cd $(srcdir) && autoconf
+info: info-recursive
+dvi: dvi-recursive
+check: all-am
+ $(MAKE) check-recursive
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+ $(MAKE) all-recursive
-config.h: stamp-h
-stamp-h: config.h.in config.status
- CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
-config.h.in: stamp-h.in
-stamp-h.in: configure.in aclocal.m4 acconfig.h
- cd $(srcdir) && autoheader
- date > $(srcdir)/stamp-h.in
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+all-am: Makefile config.h
+
+install-exec: install-exec-recursive
+ @$(NORMAL_INSTALL)
+
+install-data: install-data-recursive
+ @$(NORMAL_INSTALL)
+
+install: install-recursive
+ @:
+
+uninstall: uninstall-recursive
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs: installdirs-recursive
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+
+distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+
+mostlyclean: mostlyclean-recursive mostlyclean-am
+
+clean: clean-recursive clean-am
+
+distclean: distclean-recursive distclean-am
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-recursive maintainer-clean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
+installcheck all-recursive-am all-am install-exec install-data install \
+uninstall all installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/NEWS b/NEWS
index 932085e5..155dc4e1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,13 @@
GNU m4 NEWS - User visible changes.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+Version 1.4a - October 1997, by Erick Branderhorst
+* Standardized package from automake support.
+
+Version 1.4.x
+
+* Implement a GNU message catalog for French.
+
Version 1.4 - October 1994, by Franc,ois Pinard
(No user visible changes)
diff --git a/README b/README
index 0b010f5f..e017cba3 100644
--- a/README
+++ b/README
@@ -18,6 +18,7 @@ use m4 seriously, you might find useful material down there.
See file `BACKLOG' for a summary of pending mail and articles.
See file `COPYING' for copying conditions.
See file `INSTALL' for compilation and installation instructions.
+See file `LOCALE' for how to customize this program to your language.
See file `NEWS' for a list of major changes in the current release.
See file `THANKS' for a list of contributors.
diff --git a/README-alpha b/README-alpha
deleted file mode 100644
index 4ed792df..00000000
--- a/README-alpha
+++ /dev/null
@@ -1,12 +0,0 @@
-This is a alpha version of GNU m4.
-
-Please see the file TODO for a list of open problems and known bugs.
-
-Send bug reports, comments or ideas to `bug-m4@gnu.org'. 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 describe a solution, from which the problem might be uneasy to
-infer. Don't forget all relevant information about your operating
-system, compiler, libraries, ...
-
-GNU m4 has a web-site at http://www.seindal.dk/rene/gnu/
diff --git a/THANKS b/THANKS
index d5e4a905..c19ab7d7 100644
--- a/THANKS
+++ b/THANKS
@@ -23,7 +23,6 @@ Eric Allman eric@cs.berkeley.edu
Eric Backus ericb@lsid.hp.com
Franc,ois Pinard pinard@iro.umontreal.ca
Geoff Russell grussell@guest.adelaide.edu.au
-Greg A. Woods woods@web.apc.org
Hal Peterson hrp@pecan.cray.com
Hoang Uong hoang@ornews.intel.com
Ian Taylor ian@cygnus.com
diff --git a/TODO b/TODO
index c53e93b8..3da61db6 100644
--- a/TODO
+++ b/TODO
@@ -1,28 +1,29 @@
-TODO file for GNU m4
+* TODO file for GNU m4 -*- outline -*-
Tell <pinard@iro.umontreal.ca> if you feel like volunteering for any
of these ideas, listed more or less in decreasing order of priority.
+Some TODO items are implicit from received email. See file BACKLOG.
-* Features or problems
- - Update documentation from accumulated mail about it
- - Changeword without arguments should restore default behavior
- - Study synclines at the very beginning of each diverted sequence
- - Make eval work on bignums - the 32 bits limit is artificial
+.* Features or problems
+. + Update documentation from accumulated mail about it
+. + Changeword without arguments should restore default behavior
+. + Study synclines at the very beginning of each diverted sequence
+. + Make eval work on bignums - the 32 bits limit is artificial
From Krste Asanovic <krste@icsi.berkeley.edu>, 1993-03-20
-* Optimization and clean up
- - Check for memory leaks and uninitialized reads
+.* Optimization and clean up
+. + Check for memory leaks and uninitialized reads
From Vern Paxson <vern@horse.ee.lbl.gov> on 1993-12-06
- - Simplify format/ecvt code, together with HAVE_EFGCVT
- - Finalize the stdarg vs varargs thing
- - Profile GNU m4 and speed it up
+. + Simplify format/ecvt code, together with HAVE_EFGCVT
+. + Finalize the stdarg vs varargs thing
+. + Profile GNU m4 and speed it up
From David J. MacKenzie <djm@eng.umd.edu>, 1993-01-20
GNU m4 should be sped up by a factor of three for competing
with other versions (I think that the lexer is not agressive
enough and too often return single characters; obstacks might
be a little abused, too).
- - Have NULs go really undisturbed through GNU m4
+. + Have NULs go really undisturbed through GNU m4
See `dumpdef' and debugging section, which abuses %s
From Thorsten Ohl <ohl@chico.harvard.edu>, 1992-12-21
@@ -31,11 +32,6 @@ of these ideas, listed more or less in decreasing order of priority.
GNU m4 is lousy regarding NULs in streams (this would require
maintaining the string lengths, and avoiding strlen, strcpy,
etc.).
- - Clean up the obstack.[ch] code
- - Use rx.[ch] instead of regex.[ch]
+. + Clean up the obstack.[ch] code
+. + Use rx.[ch] instead of regex.[ch]
From Hal Peterson <hrp@ironwood.cray.com>, 1994-04-22
-
-Local Variables:
-mode: outline
-outline-regexp: " *[-+*.] \\| "
-End:
diff --git a/acconfig.h b/acconfig.h
index 807221aa..190db4f2 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -14,7 +14,7 @@
#undef HAVE_SIGCONTEXT
/* Define to the name of the distribution. */
-#undef PRODUCT
+#undef PACKAGE
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
@@ -34,3 +34,33 @@
/* Define to 1 for better use of the debugging malloc library. See
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
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the valloc function. */
+#undef HAVE_VALLOC
+
+/* Define to 1 if stpcpy function is available. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if ANSI function prototypes are usable. */
+#undef PROTOTYPES
+
+/* Path to directory containing system wide message catalog sources. */
+#undef STD_INC_PATH
+
+/* Define to 1 if using the `glocale' package for message catalogs. */
+#undef WITH_CATALOGS
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index a670f1cb..00000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,418 +0,0 @@
-#serial 1
-
-dnl FIXME: put these prerequisite-only *.m4 files in a separate
-dnl directory -- otherwise, they'll conflict with existing files.
-
-dnl These are the prerequisite macros for GNU's error.c file.
-AC_DEFUN(jm_PREREQ_ERROR,
-[
- AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
- AC_HEADER_STDC
-])
-# 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])
-
-#serial 2
-
-dnl Derived from code in GNU grep.
-
-AC_DEFUN(jm_WITH_REGEX,
- [
- dnl Even packages that don't use regex.c can use this macro.
- dnl Of course, for them it doesn't do anything.
-
- syscmd([test -f lib/regex.c])
- ifelse(sysval, 0,
- [
- AC_ARG_WITH(included-regex,
- [ --without-included-regex don't compile regex (use with caution)],
- jm_with_regex=$withval,
- jm_with_regex=yes)
- if test "$jm_with_regex" = yes; then
- LIBOBJS="$LIBOBJS regex.o"
- fi
- ],
- )
- ]
-)
diff --git a/aclocal.m4 b/aclocal.m4
index 90812401..a8f9c727 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,400 @@
-# Local additions to Autoconf macros.
-# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
+dnl aclocal.m4 generated automatically by aclocal 1.2f
+
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AM_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+
+# serial 1
+
+AC_DEFUN(AM_PROG_INSTALL,
+[AC_REQUIRE([AC_PROG_INSTALL])
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+AC_SUBST(INSTALL_SCRIPT)dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# 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.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+
+# serial 24 AM_PROG_LIBTOOL
+AC_DEFUN(AM_PROG_LIBTOOL,
+[AC_REQUIRE([AM_ENABLE_SHARED])dnl
+AC_REQUIRE([AM_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AM_PROG_LD])dnl
+AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| AC_MSG_ERROR([libtool configure failed])
+])
+
+# AM_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_SHARED,
+[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+changequote([, ])dnl
+[ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AM_DISABLE_SHARED,
+[AM_ENABLE_SHARED(no)])
+
+# AM_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AM_DISABLE_STATIC,
+[AM_ENABLE_STATIC(no)])
+
+# AM_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_STATIC,
+[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+changequote([, ])dnl
+[ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+])
+
+
+# AM_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AM_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | [A-Za-z]:\\*)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_SUBST(LD)
+AM_PROG_LD_GNU
+])
+
+AC_DEFUN(AM_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AM_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AM_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[case "$NM" in
+/* | [A-Za-z]:\\*)
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+AC_SUBST(NM)
+])
+
+
+# serial 1
+
+AC_DEFUN(AM_C_PROTOTYPES,
+[AC_REQUIRE([AM_PROG_CC_STDC])
+AC_MSG_CHECKING([for function prototypes])
+if test "$am_cv_prog_cc_stdc" != no; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(PROTOTYPES)
+ U= ANSI2KNR=
+else
+ AC_MSG_RESULT(no)
+ U=_ ANSI2KNR=./ansi2knr
+ # Ensure some checks needed by ansi2knr itself.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(string.h)
+fi
+AC_SUBST(U)dnl
+AC_SUBST(ANSI2KNR)dnl
+])
+
+
+# serial 1
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
@@ -8,72 +402,93 @@
# If the C compiler in not in ANSI C mode by default, try to add an option
# to output variable @code{CC} to make it so. This macro tries various
# options that select ANSI C on some system or another. It considers the
-# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
-# handles function prototypes correctly.
-#
+# compiler to be in ANSI C mode if it handles function prototypes correctly.
+#
# If you use this macro, you should check after calling it whether the C
# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{ac_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
# program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac
-define(fp_PROG_CC_STDC,
-[AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
-AC_CACHE_VAL(ac_cv_prog_cc_stdc,
-[ac_cv_prog_cc_stdc=no
-ac_save_CFLAGS="$CFLAGS"
+AC_DEFUN(AM_PROG_CC_STDC,
+[AC_REQUIRE([AC_PROG_CC])
+AC_BEFORE([$0], [AC_C_INLINE])
+AC_BEFORE([$0], [AC_C_CONST])
+dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+dnl a magic option to avoid problems with ANSI preprocessor commands
+dnl like #elif.
+dnl FIXME: can't do this because then AC_AIX won't work due to a
+dnl circular dependency.
+dnl AC_BEFORE([$0], [AC_PROG_CPP])
+AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+AC_CACHE_VAL(am_cv_prog_cc_stdc,
+[am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX -Aa -D_HPUX_SOURCE
-# SVR4 -Xc
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
- CFLAGS="$ac_save_CFLAGS $ac_arg"
+ CC="$ac_save_CC $ac_arg"
AC_TRY_COMPILE(
-[#if !defined(__STDC__) || __STDC__ != 1
-choke me
-#endif
-], [int test (int i, double x);
+[#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};],
-[ac_cv_prog_cc_stdc="$ac_arg"; break])
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+], [
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+],
+[am_cv_prog_cc_stdc="$ac_arg"; break])
done
-CFLAGS="$ac_save_CFLAGS"
+CC="$ac_save_CC"
])
-AC_MSG_RESULT($ac_cv_prog_cc_stdc)
-case "x$ac_cv_prog_cc_stdc" in
+if test -z "$am_cv_prog_cc_stdc"; then
+ AC_MSG_RESULT([none needed])
+else
+ AC_MSG_RESULT($am_cv_prog_cc_stdc)
+fi
+case "x$am_cv_prog_cc_stdc" in
x|xno) ;;
- *) CC="$CC $ac_cv_prog_cc_stdc" ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
])
-# Check for function prototypes.
-
-AC_DEFUN(fp_C_PROTOTYPES,
-[AC_REQUIRE([fp_PROG_CC_STDC])
-AC_MSG_CHECKING([for function prototypes])
-if test "$ac_cv_prog_cc_stdc" != no; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(PROTOTYPES)
- U= ANSI2KNR=
-else
- AC_MSG_RESULT(no)
- U=_ ANSI2KNR=ansi2knr
-fi
-AC_SUBST(U)dnl
-AC_SUBST(ANSI2KNR)dnl
-])
-# Check if --with-dmalloc was given.
+# serial 1
-AC_DEFUN(fp_WITH_DMALLOC,
+AC_DEFUN(AM_WITH_DMALLOC,
[AC_MSG_CHECKING(if malloc debugging is wanted)
AC_ARG_WITH(dmalloc,
-[ --with-dmalloc use dmalloc, as in dmalloc.tar.gz from
- @/ftp.antaire.com:antaire/src/dmalloc.],
+[ --with-dmalloc use dmalloc, as in
+ ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
[if test "$withval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_DMALLOC)
@@ -81,5 +496,383 @@ AC_ARG_WITH(dmalloc,
LDFLAGS="$LDFLAGS -g"
else
AC_MSG_RESULT(no)
-fi], [AC_MSG_RESULT(no)])])
+fi], [AC_MSG_RESULT(no)])
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file file 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 3
+
+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_CACHE_CHECK([for gettext in libintl],
+ gt_cv_func_gettext_libintl,
+ [AC_TRY_LINK([], [return (int) gettext ("")],
+ 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 programs 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
+
+ # 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 values.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__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 file 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 file 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/acm4/Makefile.am b/acm4/Makefile.am
deleted file mode 100644
index 1d2df7af..00000000
--- a/acm4/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-EXTRA_DIST = $(ACINCLUDES_M4)
-
-ACINCLUDES_M4 = error.m4 gettext.m4 regex.m4
-
-ACINCLUDE_M4 = $(top_srcdir)/acinclude.m4
-
-all: $(ACINCLUDE_M4)
-
-$(ACINCLUDE_M4): $(ACINCLUDES_M4)
- cat $(ACINCLUDES_M4) > $@
- cd $(top_srcdir) && $(ACLOCAL)
-# cd $(top_srcdir) && $(MAKE)
diff --git a/acm4/Makefile.in b/acm4/Makefile.in
deleted file mode 100644
index 77d1cdd7..00000000
--- a/acm4/Makefile.in
+++ /dev/null
@@ -1,186 +0,0 @@
-# Makefile.in generated automatically by automake 1.3b from Makefile.am
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CPP = @CPP@
-DATADIRNAME = @DATADIRNAME@
-GENCAT = @GENCAT@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
-INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-PACKAGE = @PACKAGE@
-PERL = @PERL@
-POFILES = @POFILES@
-POSUB = @POSUB@
-RANLIB = @RANLIB@
-STACKOVF = @STACKOVF@
-U = @U@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-l = @l@
-
-EXTRA_DIST = $(ACINCLUDES_M4)
-
-ACINCLUDES_M4 = error.m4 gettext.m4 regex.m4
-
-ACINCLUDE_M4 = $(top_srcdir)/acinclude.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP = --best
-all: Makefile
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps acm4/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-tags: TAGS
-TAGS:
-
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = acm4
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done
-info:
-dvi:
-check: all
-installcheck:
-install-exec:
- @$(NORMAL_INSTALL)
-
-install-data:
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall:
-
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean: mostlyclean-generic
-
-clean: clean-generic mostlyclean
-
-distclean: distclean-generic clean
- -rm -f config.status
-
-maintainer-clean: maintainer-clean-generic distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-.PHONY: tags distdir info dvi installcheck install-exec install-data \
-install uninstall all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-all: $(ACINCLUDE_M4)
-
-$(ACINCLUDE_M4): $(ACINCLUDES_M4)
- cat $(ACINCLUDES_M4) > $@
- cd $(top_srcdir) && $(ACLOCAL)
-# cd $(top_srcdir) && $(MAKE)
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/acm4/error.m4 b/acm4/error.m4
deleted file mode 100644
index eb0f776b..00000000
--- a/acm4/error.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-#serial 1
-
-dnl FIXME: put these prerequisite-only *.m4 files in a separate
-dnl directory -- otherwise, they'll conflict with existing files.
-
-dnl These are the prerequisite macros for GNU's error.c file.
-AC_DEFUN(jm_PREREQ_ERROR,
-[
- AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
- AC_HEADER_STDC
-])
diff --git a/acm4/gettext.m4 b/acm4/gettext.m4
deleted file mode 100644
index 969d0922..00000000
--- a/acm4/gettext.m4
+++ /dev/null
@@ -1,384 +0,0 @@
-# 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/acm4/gmp.m4 b/acm4/gmp.m4
deleted file mode 100644
index beea42b5..00000000
--- a/acm4/gmp.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-AC_DEFUN(AM_WITH_GMP,
- [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
- ])
diff --git a/acm4/ltdl.m4 b/acm4/ltdl.m4
deleted file mode 100644
index 1601efc2..00000000
--- a/acm4/ltdl.m4
+++ /dev/null
@@ -1,429 +0,0 @@
-## libltdl.m4 - Configure ltdl for the target system. -*-Shell-script-*-
-## Copyright (C) 1999 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 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 1 AC_LIB_LTDL
-
-AC_DEFUN(AC_LIB_LTDL,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_C_CONST])dnl
-AC_REQUIRE([AC_C_INLINE])dnl
-
-dnl AC_LIB_LTDL must perform all the checks necessary for compilation
-dnl of the ltdl objects -- including compiler checks (above) and header
-dnl checks (below).
-AC_REQUIRE([AC_HEADER_STDC])dnl
-
-AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h)
-AC_CHECK_HEADERS(string.h strings.h, break)
-AC_CHECK_FUNCS(strchr index, break)
-AC_CHECK_FUNCS(strrchr rindex, break)
-
-AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl
-AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl
-AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl
-AC_REQUIRE([AC_LTDL_OBJDIR])dnl
-AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl
-AC_REQUIRE([AC_LTDL_DLLIB])dnl
-AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
-])
-
-AC_DEFUN(AC_LTDL_ENABLE_INSTALL,
-[AC_ARG_ENABLE(ltdl-install,
-[ --enable-ltdl-install install libltdl])
-
-AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
-AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
-])])
-
-
-AC_DEFUN(AC_LTDL_SNARF_CONFIG,
-[# Read the libtool configuration
-rm -f conftest
-./libtool --config > conftest
-. ./conftest
-rm -f conftest
-])
-
-AC_DEFUN(AC_LTDL_SHLIBEXT,
-[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
-AC_CACHE_CHECK([which extension is used for shared libraries],
- libltdl_cv_shlibext, [dnl
-(
- last=
- for spec in $library_names_spec; do
- last="$spec"
- done
-changequote(, )
- echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest
-changequote([, ])
-)
-libltdl_cv_shlibext=`cat conftest`
-rm -f conftest
-])
-if test -n "$libltdl_cv_shlibext"; then
- AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
- [Define to the extension used for shared libraries, say, ".so". ])
-fi
-])
-
-AC_DEFUN(AC_LTDL_SHLIBPATH,
-[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
-AC_CACHE_CHECK([which variable specifies run-time library path],
- libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
-if test -n "$libltdl_cv_shlibpath_var"; then
- AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
- [Define to the name of the environment variable that determines the dynamic library search path. ])
-fi
-])
-
-AC_DEFUN(AC_LTDL_OBJDIR,
-[AC_CACHE_CHECK([for objdir],
- libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
-if test -n "$objdir"; then
- :
-else
- rm -f .libs 2>/dev/null
- mkdir .libs 2>/dev/null
- if test -d .libs; then
- libltdl_cv_objdir=.libs
- else
- # MS-DOS does not allow filenames that begin with a dot.
- libltdl_cv_objdir=_libs
- fi
-rmdir .libs 2>/dev/null
-fi])
-AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries. ])
-])
-
-AC_DEFUN(AC_LTDL_DLPREOPEN,
-[AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl
-AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
- libltdl_cv_preloaded_symbols, [dnl
- if test -n "$global_symbol_pipe"; then
- libltdl_cv_preloaded_symbols=yes
- else
- libltdl_cv_preloaded_symbols=no
- fi
-])
-if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
- AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
- [Define if libtool can extract symbol lists from object files. ])
-fi
-])
-
-AC_DEFUN(AC_LTDL_DLLIB,
-[LIBADD_DL=
-AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
- [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"],
-[AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
- [Define if you have the libdl library or equivalent.])])])
-AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1,
- [Define if you have the shl_load function.])],
-[AC_CHECK_LIB(dld, shl_load,
- [AC_DEFINE(HAVE_SHL_LOAD, 1,
- [Define if you have the shl_load function.])
- LIBADD_DL="$LIBADD_DL -ldld"])
-])
-AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1,
- [Define if you have the GNU dld library.])dnl
-test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
-AC_SUBST(LIBADD_DL)
-
-if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
- LIBS_SAVE="$LIBS"
- LIBS="$LIBS $LIBADD_DL"
- AC_CHECK_FUNCS(dlerror)
- LIBS="$LIBS_SAVE"
-fi
-])
-
-AC_DEFUN(AC_LTDL_GLOBAL_SYMBOL_PIPE,
-[dnl Check for command to grab the raw symbol name followed
-dnl by C symbol name from nm.
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
-[# These are sane defaults that work on at least a few old systems.
-# {They come from Ultrix. What could be older than Ultrix?!! ;)}
-
-changequote(,)dnl
-# Character class describing NM global symbol codes.
-ac_symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-ac_symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
- ac_symcode='[BCDT]'
- ;;
-cygwin* | mingw*)
- ac_symcode='[ABCDGISTW]'
- ;;
-hpux*)
- ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
- ;;
-irix*)
- ac_symcode='[BCDEGRST]'
- ;;
-solaris*)
- ac_symcode='[BDT]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- ac_symcode='[ABCDGISTW]'
-fi
-changequote([,])dnl
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- ac_pipe_works=no
- rm -f conftest.$ac_ext
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func;return 0;}
-EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
-
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
-
- # Try sorting and uniquifying the output.
- if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
- mv -f "$ac_nlist"T "$ac_nlist"
- else
- rm -f "$ac_nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
- cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
-
- cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-changequote(,)dnl
-lt_preloaded_symbols[] =
-changequote([,])dnl
-{
-EOF
- sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
- cat <<\EOF >> conftest.c
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- ac_save_LIBS="$LIBS"
- ac_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest; then
- ac_pipe_works=yes
- else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
- fi
- LIBS="$ac_save_LIBS"
- CFLAGS="$ac_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
- fi
- else
- echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
- fi
- else
- echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
- else
- echo "$progname: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$ac_pipe_works" = yes; then
- if test x"$ac_symprfx" = x"_"; then
- ac_cv_sys_symbol_underscore=yes
- else
- ac_cv_sys_symbol_underscore=no
- fi
- break
- else
- ac_cv_sys_global_symbol_pipe=
- fi
-done
-])
-
-ac_result=yes
-if test -z "$ac_cv_sys_global_symbol_pipe"; then
- ac_result=no
-fi
-AC_MSG_RESULT($ac_result)
-])
-
-AC_DEFUN(AC_LTDL_SYMBOL_USCORE,
-[dnl does the compiler prefix global symbols with an underscore?
-AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl
-AC_MSG_CHECKING([for _ prefix in compiled symbols])
-AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
-[ac_cv_sys_symbol_underscore=no
-cat > conftest.$ac_ext <<EOF
-void nm_test_func(){}
-int main(){nm_test_func;return 0;}
-EOF
-if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
- # See whether the symbols have a leading underscore.
- if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
- ac_cv_sys_symbol_underscore=yes
- else
- if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
- :
- else
- echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
- fi
- fi
- else
- echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
-fi
-rm -rf conftest*
-])
-AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
-AC_LTDL_DLSYM_USCORE
-])
-
-AC_DEFUN(AC_LTDL_DLSYM_USCORE,
-[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
-if test x"$ac_cv_sys_symbol_underscore" = xyes; then
- if test x"$ac_cv_func_dlopen" = xyes ||
- test x"$ac_cv_lib_dl_dlopen" = xyes ; then
- AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
- libltdl_cv_need_uscore, [dnl
- AC_TRY_RUN([
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
- if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
- if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); }
-], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
- libltdl_cv_need_uscore=cross
-)])
- fi
-fi
-
-if test x"$libltdl_cv_need_uscore" = xyes; then
- AC_DEFINE(NEED_USCORE, 1,
- [Define if dlsym() requires a leading underscode in symbol names. ])
-fi
-])
diff --git a/acm4/modules.m4 b/acm4/modules.m4
deleted file mode 100644
index c4a47b76..00000000
--- a/acm4/modules.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-AC_DEFUN(AM_WITH_MODULES,
- [AC_MSG_CHECKING(if support for dynamic modules is wanted)
- AC_ARG_WITH(modules,
- [ --with-modules add support for dynamic modules],
- [use_modules=$withval], [use_modules=no])
- AC_MSG_RESULT($use_modules)
-
- if test "$use_modules" = yes; then
- LIBS="$LIBS -ldl"
- AC_CHECK_HEADER([dlfcn.h],
- [AC_CACHE_CHECK([for dlopen in libdl], ac_cv_func_dlopen_libdl,
- [AC_TRY_LINK([#include <dlfcn.h>],
- [(void)dlopen(0, RTLD_NOW)],
- ac_cv_func_dlopen_libdl=yes,
- ac_cv_func_dlopen_libdl=no)])],
- ac_cv_func_dlopen_libdl=no)
-
- if test "$ac_cv_func_dlopen_libdl$ac_cv_header_dlfcn_h" = yesyes; then
- AC_DEFINE(WITH_MODULES)
- LDFLAGS="$LDFLAGS -rdynamic"
- else
- LIBS=`echo $LIBS | sed -e 's/-ldl//'`
- AC_MSG_WARN([-ldl library not found or does not appear to work])
- use_modules=no
- fi
- fi
- ])
diff --git a/acm4/regex.m4 b/acm4/regex.m4
deleted file mode 100644
index e5468c65..00000000
--- a/acm4/regex.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#serial 2
-
-dnl Derived from code in GNU grep.
-
-AC_DEFUN(jm_WITH_REGEX,
- [
- dnl Even packages that don't use regex.c can use this macro.
- dnl Of course, for them it doesn't do anything.
-
- syscmd([test -f lib/regex.c])
- ifelse(sysval, 0,
- [
- AC_ARG_WITH(included-regex,
- [ --without-included-regex don't compile regex (use with caution)],
- jm_with_regex=$withval,
- jm_with_regex=yes)
- if test "$jm_with_regex" = yes; then
- LIBOBJS="$LIBOBJS regex.o"
- fi
- ],
- )
- ]
-)
diff --git a/c-boxes.el b/c-boxes.el
deleted file mode 100644
index c1b80e33..00000000
--- a/c-boxes.el
+++ /dev/null
@@ -1,406 +0,0 @@
-;;; Boxed comments for C mode.
-;;; Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-;;; Francois Pinard <pinard@iro.umontreal.ca>, April 1991.
-;;;
-;;; I often refill paragraphs inside C comments, while stretching or
-;;; shrinking the surrounding box as needed. This is a real pain to
-;;; do by hand. Here is the code I made to ease my life on this,
-;;; usable from within GNU Emacs. It would not be fair giving all
-;;; sources for a product without also giving the means for nicely
-;;; modifying them.
-;;;
-;;; The function rebox-c-comment adjust comment boxes without
-;;; refilling comment paragraphs, while reindent-c-comment adjust
-;;; comment boxes after refilling. Numeric prefixes are used to add,
-;;; remove, or change the style of the box surrounding the comment.
-;;; Since refilling paragraphs in C mode does make sense only for
-;;; comments, this code redefines the M-q command in C mode. I use
-;;; this hack by putting, in my .emacs file:
-;;;
-;;; (setq c-mode-hook
-;;; '(lambda ()
-;;; (define-key c-mode-map "\M-q" 'reindent-c-comment)))
-;;; (autoload 'rebox-c-comment "c-boxes" nil t)
-;;; (autoload 'reindent-c-comment "c-boxes" nil t)
-;;;
-;;; The cursor should be within a comment before any of these
-;;; commands, or else it should be between two comments, in which case
-;;; the command applies to the next comment. When the command is
-;;; given without prefix, the current comment box type is recognized
-;;; and preserved. Given 0 as a prefix, the comment box disappears
-;;; and the comment stays between a single opening `/*' and a single
-;;; closing `*/'. Given 1 or 2 as a prefix, a single or doubled lined
-;;; comment box is forced. Given 3 as a prefix, a Taarna style box is
-;;; forced, but you do not even want to hear about those. When a
-;;; negative prefix is given, the absolute value is used, but the
-;;; default style is changed. Any other value (like C-u alone) forces
-;;; the default box style.
-;;;
-;;; I observed rounded corners first in some code from Warren Tucker
-;;; <wht@n4hgf.mt-park.ga.us>.
-
-(defvar c-box-default-style 'single "*Preferred style for box comments.")
-(defvar c-mode-taarna-style nil "*Non-nil for Taarna team C-style.")
-
-;;; Set or reset the Taarna team's own way for a C style.
-
-(defun taarna-mode ()
- (interactive)
- (if c-mode-taarna-style
- (progn
-
- (setq c-mode-taarna-style nil)
- (setq c-indent-level 2)
- (setq c-continued-statement-offset 2)
- (setq c-brace-offset 0)
- (setq c-argdecl-indent 5)
- (setq c-label-offset -2)
- (setq c-tab-always-indent t)
- (setq c-box-default-style 'single)
- (message "C mode: GNU style"))
-
- (setq c-mode-taarna-style t)
- (setq c-indent-level 4)
- (setq c-continued-statement-offset 4)
- (setq c-brace-offset -4)
- (setq c-argdecl-indent 4)
- (setq c-label-offset -4)
- (setq c-tab-always-indent t)
- (setq c-box-default-style 'taarna)
- (message "C mode: Taarna style")))
-
-;;; Return the minimum value of the left margin of all lines, or -1 if
-;;; all lines are empty.
-
-(defun buffer-left-margin ()
- (let ((margin -1))
- (goto-char (point-min))
- (while (not (eobp))
- (skip-chars-forward " \t")
- (if (not (looking-at "\n"))
- (setq margin
- (if (< margin 0)
- (current-column)
- (min margin (current-column)))))
- (forward-line 1))
- margin))
-
-;;; Return the maximum value of the right margin of all lines. Any
-;;; sentence ending a line has a space guaranteed before the margin.
-
-(defun buffer-right-margin ()
- (let ((margin 0) period)
- (goto-char (point-min))
- (while (not (eobp))
- (end-of-line)
- (if (bobp)
- (setq period 0)
- (backward-char 1)
- (setq period (if (looking-at "[.?!]") 1 0))
- (forward-char 1))
- (setq margin (max margin (+ (current-column) period)))
- (forward-char 1))
- margin))
-
-;;; Add, delete or adjust a C comment box. If FLAG is nil, the
-;;; current boxing style is recognized and preserved. When 0, the box
-;;; is removed; when 1, a single lined box is forced; when 2, a double
-;;; lined box is forced; when 3, a Taarna style box is forced. If
-;;; negative, the absolute value is used, but the default style is
-;;; changed. For any other value (like C-u), the default style is
-;;; forced. If REFILL is not nil, refill the comment paragraphs prior
-;;; to reboxing.
-
-(defun rebox-c-comment-engine (flag refill)
- (save-restriction
- (let ((undo-list buffer-undo-list)
- (marked-point (point-marker))
- (saved-point (point))
- box-style left-margin right-margin)
-
- ;; First, find the limits of the block of comments following or
- ;; enclosing the cursor, or return an error if the cursor is not
- ;; within such a block of comments, narrow the buffer, and
- ;; untabify it.
-
- ;; - insure the point is into the following comment, if any
-
- (skip-chars-forward " \t\n")
- (if (looking-at "/\\*")
- (forward-char 2))
-
- (let ((here (point)) start end temp)
-
- ;; - identify a minimal comment block
-
- (search-backward "/*")
- (setq temp (point))
- (beginning-of-line)
- (setq start (point))
- (skip-chars-forward " \t")
- (if (< (point) temp)
- (progn
- (goto-char saved-point)
- (error "text before comment's start")))
- (search-forward "*/")
- (setq temp (point))
- (end-of-line)
- (if (looking-at "\n")
- (forward-char 1))
- (setq end (point))
- (skip-chars-backward " \t\n")
- (if (> (point) temp)
- (progn
- (goto-char saved-point)
- (error "text after comment's end")))
- (if (< end here)
- (progn
- (goto-char saved-point)
- (error "outside any comment block")))
-
- ;; - try to extend the comment block backwards
-
- (goto-char start)
- (while (and (not (bobp))
- (progn (previous-line 1)
- (beginning-of-line)
- (looking-at "[ \t]*/\\*.*\\*/[ \t]*$")))
- (setq start (point)))
-
- ;; - try to extend the comment block forward
-
- (goto-char end)
- (while (looking-at "[ \t]*/\\*.*\\*/[ \t]*$")
- (forward-line 1)
- (beginning-of-line)
- (setq end (point)))
-
- ;; - narrow to the whole block of comments
-
- (narrow-to-region start end))
-
- ;; Second, remove all the comment marks, and move all the text
- ;; rigidly to the left to insure the left margin stays at the
- ;; same place. At the same time, recognize and save the box
- ;; style in BOX-STYLE.
-
- (let ((previous-margin (buffer-left-margin))
- actual-margin)
-
- ;; - remove all comment marks
-
- (goto-char (point-min))
- (replace-regexp "^\\([ \t]*\\)/\\*" "\\1 ")
- (goto-char (point-min))
- (replace-regexp "^\\([ \t]*\\)|" "\\1 ")
- (goto-char (point-min))
- (replace-regexp "\\(\\*/\\||\\)[ \t]*" "")
- (goto-char (point-min))
- (replace-regexp "\\*/[ \t]*/\\*" " ")
-
- ;; - remove the first and last dashed lines
-
- (setq box-style 'plain)
- (goto-char (point-min))
- (if (looking-at "^[ \t]*-*[.\+\\]?[ \t]*\n")
- (progn
- (setq box-style 'single)
- (replace-match ""))
- (if (looking-at "^[ \t]*=*[.\+\\]?[ \t]*\n")
- (progn
- (setq box-style 'double)
- (replace-match ""))))
- (goto-char (point-max))
- (previous-line 1)
- (beginning-of-line)
- (if (looking-at "^[ \t]*[`\+\\]?*[-=]+[ \t]*\n")
- (progn
- (if (eq box-style 'plain)
- (setq box-style 'taarna))
- (replace-match "")))
-
- ;; - remove all spurious whitespace
-
- (goto-char (point-min))
- (replace-regexp "[ \t]+$" "")
- (goto-char (point-min))
- (if (looking-at "\n+")
- (replace-match ""))
- (goto-char (point-max))
- (skip-chars-backward "\n")
- (if (looking-at "\n\n+")
- (replace-match "\n"))
- (goto-char (point-min))
- (replace-regexp "\n\n\n+" "\n\n")
-
- ;; - move the text left is adequate
-
- (setq actual-margin (buffer-left-margin))
- (if (not (= previous-margin actual-margin))
- (indent-rigidly (point-min) (point-max)
- (- previous-margin actual-margin))))
-
- ;; Third, select the new box style from the old box style and
- ;; the argument, choose the margins for this style and refill
- ;; each paragraph.
-
- ;; - modify box-style only if flag is defined
-
- (if flag
- (setq box-style
- (cond ((eq flag 0) 'plain)
- ((eq flag 1) 'single)
- ((eq flag 2) 'double)
- ((eq flag 3) 'taarna)
- ((eq flag '-) (setq c-box-default-style 'plain) 'plain)
- ((eq flag -1) (setq c-box-default-style 'single) 'single)
- ((eq flag -2) (setq c-box-default-style 'double) 'double)
- ((eq flag -3) (setq c-box-default-style 'taarna) 'taarna)
- (t c-box-default-style))))
-
- ;; - compute the left margin
-
- (setq left-margin (buffer-left-margin))
-
- ;; - temporarily set the fill prefix and column, then refill
-
- (untabify (point-min) (point-max))
-
- (if refill
- (let ((fill-prefix (make-string left-margin ? ))
- (fill-column (- fill-column
- (if (memq box-style '(single double)) 4 6))))
- (fill-region (point-min) (point-max))))
-
- ;; - compute the right margin after refill
-
- (setq right-margin (buffer-right-margin))
-
- ;; Fourth, put the narrowed buffer back into a comment box,
- ;; according to the value of box-style. Values may be:
- ;; plain: insert between a single pair of comment delimiters
- ;; single: complete box, overline and underline with dashes
- ;; double: complete box, overline and underline with equal signs
- ;; taarna: comment delimiters on each line, underline with dashes
-
- ;; - move the right margin to account for left inserts
-
- (setq right-margin (+ right-margin
- (if (memq box-style '(single double))
- 2
- 3)))
-
- ;; - construct the box comment, from top to bottom
-
- (goto-char (point-min))
- (cond ((eq box-style 'plain)
-
- ;; - construct a plain style comment
-
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "/* ")
- (end-of-line)
- (forward-char 1)
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- " ")
- (end-of-line)
- (forward-char 1))
- (backward-char 1)
- (insert " */"))
- ((eq box-style 'single)
-
- ;; - construct a single line style comment
-
- (indent-to left-margin)
- (insert "/*")
- (insert (make-string (- right-margin (current-column)) ?-)
- "-.\n")
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "| ")
- (end-of-line)
- (indent-to right-margin)
- (insert " |")
- (forward-char 1))
- (indent-to left-margin)
- (insert "`")
- (insert (make-string (- right-margin (current-column)) ?-)
- "*/\n"))
- ((eq box-style 'double)
-
- ;; - construct a double line style comment
-
- (indent-to left-margin)
- (insert "/*")
- (insert (make-string (- right-margin (current-column)) ?=)
- "=\\\n")
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "| ")
- (end-of-line)
- (indent-to right-margin)
- (insert " |")
- (forward-char 1))
- (indent-to left-margin)
- (insert "\\")
- (insert (make-string (- right-margin (current-column)) ?=)
- "*/\n"))
- ((eq box-style 'taarna)
-
- ;; - construct a Taarna style comment
-
- (while (not (eobp))
- (skip-chars-forward " " (+ (point) left-margin))
- (insert (make-string (- left-margin (current-column)) ? )
- "/* ")
- (end-of-line)
- (indent-to right-margin)
- (insert " */")
- (forward-char 1))
- (indent-to left-margin)
- (insert "/* ")
- (insert (make-string (- right-margin (current-column)) ?-)
- " */\n"))
- (t (error "unknown box style")))
-
- ;; Fifth, retabify, restore the point position, then cleanup the
- ;; undo list of any boundary since we started.
-
- ;; - retabify before left margin only (adapted from tabify.el)
-
- (goto-char (point-min))
- (while (re-search-forward "^[ \t][ \t][ \t]*" nil t)
- (let ((column (current-column))
- (indent-tabs-mode t))
- (delete-region (match-beginning 0) (point))
- (indent-to column)))
-
- ;; - restore the point position
-
- (goto-char (marker-position marked-point))
-
- ;; - remove all intermediate boundaries from the undo list
-
- (if (not (eq buffer-undo-list undo-list))
- (let ((cursor buffer-undo-list))
- (while (not (eq (cdr cursor) undo-list))
- (if (car (cdr cursor))
- (setq cursor (cdr cursor))
- (rplacd cursor (cdr (cdr cursor))))))))))
-
-;;; Rebox a C comment without refilling it.
-
-(defun rebox-c-comment (flag)
- (interactive "P")
- (rebox-c-comment-engine flag nil))
-
-;;; Rebox a C comment after refilling.
-
-(defun reindent-c-comment (flag)
- (interactive "P")
- (rebox-c-comment-engine flag t))
diff --git a/checks/01.define b/checks/01.define
index 7a044c01..206c0c3a 100644
--- a/checks/01.define
+++ b/checks/01.define
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:939: Origin of test
+dnl ../doc/m4.texinfo:938: Origin of test
define(`foo', `Hello world.')
dnl @result{}
foo
diff --git a/checks/02.arguments b/checks/02.arguments
index 0d459123..c8f820c7 100644
--- a/checks/02.arguments
+++ b/checks/02.arguments
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:963: Origin of test
+dnl ../doc/m4.texinfo:962: Origin of test
define(`exch', `$2, $1')
dnl @result{}
exch(arg1, arg2)
diff --git a/checks/02.define b/checks/02.define
deleted file mode 100644
index de8bc66d..00000000
--- a/checks/02.define
+++ /dev/null
@@ -1,13 +0,0 @@
-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 9117964b..358a4cfe 100644
--- a/checks/03.arguments
+++ b/checks/03.arguments
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:973: Origin of test
+dnl ../doc/m4.texinfo:972: Origin of test
define(`exch', `$2, $1')
dnl @result{}
define(exch(``expansion text'', ``macro''))
diff --git a/checks/04.arguments b/checks/04.arguments
index 8d325ac4..6d4f10ac 100644
--- a/checks/04.arguments
+++ b/checks/04.arguments
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:993: Origin of test
+dnl ../doc/m4.texinfo:992: Origin of test
define(`test', ``Macro name: $0'')
dnl @result{}
test
diff --git a/checks/05.arguments b/checks/05.arguments
index aaed75e0..d7ebbb3f 100644
--- a/checks/05.arguments
+++ b/checks/05.arguments
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1003: Origin of test
+dnl ../doc/m4.texinfo:1002: Origin of test
define(`foo', `This is macro `foo'.')
dnl @result{}
foo
diff --git a/checks/06.arguments b/checks/06.arguments
deleted file mode 100644
index b866e6c9..00000000
--- a/checks/06.arguments
+++ /dev/null
@@ -1,5 +0,0 @@
-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
index 8c1f9dfd..42b76444 100644
--- a/checks/06.pseudo_argu
+++ b/checks/06.pseudo_argu
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1027: Origin of test
+dnl ../doc/m4.texinfo:1026: Origin of test
define(`nargs', `$#')
dnl @result{}
nargs
diff --git a/checks/07.pseudo_argu b/checks/07.pseudo_argu
index 0517066c..88ecaf9f 100644
--- a/checks/07.pseudo_argu
+++ b/checks/07.pseudo_argu
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1041: Origin of test
+dnl ../doc/m4.texinfo:1040: Origin of test
define(`echo', `$*')
dnl @result{}
echo(arg1, arg2, arg3 , arg4)
diff --git a/checks/08.pseudo_argu b/checks/08.pseudo_argu
index 8787b016..69054410 100644
--- a/checks/08.pseudo_argu
+++ b/checks/08.pseudo_argu
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1052: Origin of test
+dnl ../doc/m4.texinfo:1051: Origin of test
define(`echo', `$@')
dnl @result{}
echo(arg1, arg2, arg3 , arg4)
diff --git a/checks/09.pseudo_argu b/checks/09.pseudo_argu
index 440d7e7f..2b83c3aa 100644
--- a/checks/09.pseudo_argu
+++ b/checks/09.pseudo_argu
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1062: Origin of test
+dnl ../doc/m4.texinfo:1061: Origin of test
define(`echo1', `$*')
dnl @result{}
define(`echo2', `$@')
diff --git a/checks/10.pseudo_argu b/checks/10.pseudo_argu
index 1842e3ed..a623244f 100644
--- a/checks/10.pseudo_argu
+++ b/checks/10.pseudo_argu
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1082: Origin of test
+dnl ../doc/m4.texinfo:1081: Origin of test
define(`foo', `$$$ hello $$$')
dnl @result{}
foo
diff --git a/checks/11.pseudo_argu b/checks/11.pseudo_argu
deleted file mode 100644
index dd46c979..00000000
--- a/checks/11.pseudo_argu
+++ /dev/null
@@ -1,5 +0,0 @@
-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/11.undefine
index 9709263d..254890d0 100644
--- a/checks/11.undefine
+++ b/checks/11.undefine
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1113: Origin of test
+dnl ../doc/m4.texinfo:1112: Origin of test
foo
dnl @result{}foo
define(`foo', `expansion text')
diff --git a/checks/12.defn b/checks/12.defn
index 9ebb42da..bc6e67f7 100644
--- a/checks/12.defn
+++ b/checks/12.defn
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1158: Origin of test
+dnl ../doc/m4.texinfo:1157: Origin of test
define(`zap', defn(`undefine'))
dnl @result{}
zap(`undefine')
diff --git a/checks/12.undefine b/checks/12.undefine
deleted file mode 100644
index 1f61131d..00000000
--- a/checks/12.undefine
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:1084: Origin of test
-foo
-dnl @result{}foo
-define(`foo', `expansion text')
-dnl @result{}
-foo
-dnl @result{}expansion text
-undefine(`foo')
-dnl @result{}
-foo
-dnl @result{}foo
diff --git a/checks/13.defn b/checks/13.defn
deleted file mode 100644
index 1deb3f44..00000000
--- a/checks/13.defn
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1128: Origin of test
-define(`zap', defn(`undefine'))
-dnl @result{}
-zap(`undefine')
-dnl @result{}
-undefine(`zap')
-dnl @result{}undefine(zap)
diff --git a/checks/13.pushdef b/checks/13.pushdef
index bdf078ba..a1269ec6 100644
--- a/checks/13.pushdef
+++ b/checks/13.pushdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1204: Origin of test
+dnl ../doc/m4.texinfo:1203: Origin of test
define(`foo', `Expansion one.')
dnl @result{}
foo
diff --git a/checks/14.defn b/checks/14.defn
deleted file mode 100644
index 11ece953..00000000
--- a/checks/14.defn
+++ /dev/null
@@ -1,9 +0,0 @@
-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/14.pushdef b/checks/14.pushdef
index dda7d3fe..fe781ce9 100644
--- a/checks/14.pushdef
+++ b/checks/14.pushdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1228: Origin of test
+dnl ../doc/m4.texinfo:1227: Origin of test
define(`foo', `Expansion one.')
dnl @result{}
foo
diff --git a/checks/15.indir b/checks/15.indir
index 881b4deb..4545df5b 100644
--- a/checks/15.indir
+++ b/checks/15.indir
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1272: Origin of test
+dnl ../doc/m4.texinfo:1271: Origin of test
define(`$$internal$macro', `Internal macro (name `$0')')
dnl @result{}
$$internal$macro
diff --git a/checks/15.pushdef b/checks/15.pushdef
deleted file mode 100644
index df2859af..00000000
--- a/checks/15.pushdef
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl ../doc/m4.texinfo:1192: Origin of test
-define(`foo', `Expansion one.')
-dnl @result{}
-foo
-dnl @result{}Expansion one.
-pushdef(`foo', `Expansion two.')
-dnl @result{}
-foo
-dnl @result{}Expansion two.
-popdef(`foo')
-dnl @result{}
-foo
-dnl @result{}Expansion one.
-popdef(`foo')
-dnl @result{}
-foo
-dnl @result{}foo
diff --git a/checks/16.ifdef b/checks/16.ifdef
index c4dec7b5..ae9bf780 100644
--- a/checks/16.ifdef
+++ b/checks/16.ifdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1343: Origin of test
+dnl ../doc/m4.texinfo:1342: Origin of test
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
dnl @result{}foo is not defined
define(`foo', `')
diff --git a/checks/16.pushdef b/checks/16.pushdef
deleted file mode 100644
index 48c0cec6..00000000
--- a/checks/16.pushdef
+++ /dev/null
@@ -1,17 +0,0 @@
-dnl ../doc/m4.texinfo:1216: Origin of test
-define(`foo', `Expansion one.')
-dnl @result{}
-foo
-dnl @result{}Expansion one.
-pushdef(`foo', `Expansion two.')
-dnl @result{}
-foo
-dnl @result{}Expansion two.
-define(`foo', `Second expansion two.')
-dnl @result{}
-foo
-dnl @result{}Second expansion two.
-undefine(`foo')
-dnl @result{}
-foo
-dnl @result{}foo
diff --git a/checks/17.ifelse b/checks/17.ifelse
index 836a98f0..5d1883f8 100644
--- a/checks/17.ifelse
+++ b/checks/17.ifelse
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1381: Origin of test
+dnl ../doc/m4.texinfo:1380: Origin of test
ifelse(foo, bar, `true')
dnl @result{}
ifelse(foo, foo, `true')
diff --git a/checks/17.indir b/checks/17.indir
deleted file mode 100644
index d573a386..00000000
--- a/checks/17.indir
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1267: Origin of test
-define(`$$internal$macro', `Internal macro (name `$0')')
-dnl @result{}
-$$internal$macro
-dnl @result{}$$internal$macro
-indir(`$$internal$macro')
-dnl @result{}Internal macro (name $$internal$macro)
diff --git a/checks/18.ifdef b/checks/18.ifdef
deleted file mode 100644
index 40c355ca..00000000
--- a/checks/18.ifdef
+++ /dev/null
@@ -1,7 +0,0 @@
-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', `')
-dnl @result{}
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-dnl @result{}foo is defined
diff --git a/checks/18.ifelse b/checks/18.ifelse
index ddfb7fbb..5d389288 100644
--- a/checks/18.ifelse
+++ b/checks/18.ifelse
@@ -1,3 +1,3 @@
-dnl ../doc/m4.texinfo:1400: Origin of test
+dnl ../doc/m4.texinfo:1399: Origin of test
ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
dnl @result{}seventh
diff --git a/checks/19.ifelse b/checks/19.ifelse
deleted file mode 100644
index 0886f6db..00000000
--- a/checks/19.ifelse
+++ /dev/null
@@ -1,9 +0,0 @@
-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/19.loops b/checks/19.loops
index 8ac68eb9..673a1bda 100644
--- a/checks/19.loops
+++ b/checks/19.loops
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1437: Origin of test
+dnl ../doc/m4.texinfo:1436: Origin of test
shift(bar)
dnl @result{}
shift(foo, bar, baz)
diff --git a/checks/20.ifelse b/checks/20.ifelse
deleted file mode 100644
index aff53225..00000000
--- a/checks/20.ifelse
+++ /dev/null
@@ -1,3 +0,0 @@
-dnl ../doc/m4.texinfo:1395: Origin of test
-ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
-dnl @result{}seventh
diff --git a/checks/20.loops b/checks/20.loops
index 55dfc86c..cb6a09ef 100644
--- a/checks/20.loops
+++ b/checks/20.loops
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1447: Origin of test
+dnl ../doc/m4.texinfo:1446: Origin of test
define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
`reverse(shift($@)), `$1'')')
dnl @result{}
diff --git a/checks/21.dumpdef b/checks/21.dumpdef
index 689bb786..16c31313 100644
--- a/checks/21.dumpdef
+++ b/checks/21.dumpdef
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1561: Origin of test
+dnl ../doc/m4.texinfo:1560: Origin of test
define(`foo', `Hello world.')
dnl @result{}
dumpdef(`foo')
diff --git a/checks/21.loops b/checks/21.loops
deleted file mode 100644
index 2b0290b1..00000000
--- a/checks/21.loops
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1432: Origin of test
-shift
-dnl @result{}
-shift(bar)
-dnl @result{}
-shift(foo, bar, baz)
-dnl @result{}bar,baz
diff --git a/checks/22.loops b/checks/22.loops
deleted file mode 100644
index 1ecdc076..00000000
--- a/checks/22.loops
+++ /dev/null
@@ -1,10 +0,0 @@
-dnl ../doc/m4.texinfo:1444: Origin of test
-define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
- `reverse(shift($@)), `$1'')')
-dnl @result{}
-reverse
-dnl @result{}
-reverse(foo)
-dnl @result{}foo
-reverse(foo, bar, gnats, and gnus)
-dnl @result{}and gnus, gnats, bar, foo
diff --git a/checks/22.trace b/checks/22.trace
index ae4e639c..58096168 100644
--- a/checks/22.trace
+++ b/checks/22.trace
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1606: Origin of test
+dnl ../doc/m4.texinfo:1605: Origin of test
define(`foo', `Hello World.')
dnl @result{}
define(`echo', `$@')
diff --git a/checks/23.dnl b/checks/23.dnl
index 763d9843..2ae11585 100644
--- a/checks/23.dnl
+++ b/checks/23.dnl
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1757: Origin of test
+dnl ../doc/m4.texinfo:1756: Origin of test
define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
foo
dnl @result{}Macro foo.
diff --git a/checks/23.dumpdef b/checks/23.dumpdef
deleted file mode 100644
index c65f6934..00000000
--- a/checks/23.dumpdef
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:1558: Origin of test
-define(`foo', `Hello world.')
-dnl @result{}
-dumpdef(`foo')
-dnl @error{}foo: `Hello world.'
-dnl @result{}
-dumpdef(`define')
-dnl @error{}define: <define>
-dnl @result{}
diff --git a/checks/24.changequote b/checks/24.changequote
index c74dafdf..a5a667a5 100644
--- a/checks/24.changequote
+++ b/checks/24.changequote
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1795: Origin of test
+dnl ../doc/m4.texinfo:1794: Origin of test
changequote([, ])
dnl @result{}
define([foo], [Macro [foo].])
diff --git a/checks/24.trace b/checks/24.trace
deleted file mode 100644
index 491eef27..00000000
--- a/checks/24.trace
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:1603: Origin of test
-define(`foo', `Hello World.')
-dnl @result{}
-define(`echo', `$@')
-dnl @result{}
-traceon(`foo', `echo')
-dnl @result{}
-foo
-dnl @error{}m4trace: -1- foo -> `Hello World.'
-dnl @result{}Hello World.
-echo(gnus, and gnats)
-dnl @error{}m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
-dnl @result{}gnus,and gnats
diff --git a/checks/25.changequote b/checks/25.changequote
index b3976016..dadb258c 100644
--- a/checks/25.changequote
+++ b/checks/25.changequote
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1807: Origin of test
+dnl ../doc/m4.texinfo:1806: Origin of test
changequote([[, ]])
dnl @result{}
define([[foo]], [[Macro [[[foo]]].]])
diff --git a/checks/25.dnl b/checks/25.dnl
deleted file mode 100644
index ecdb9b24..00000000
--- a/checks/25.dnl
+++ /dev/null
@@ -1,4 +0,0 @@
-dnl ../doc/m4.texinfo:1755: Origin of test
-define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
-foo
-dnl @result{}Macro foo.
diff --git a/checks/26.changequote b/checks/26.changequote
index 2187982b..954d9382 100644
--- a/checks/26.changequote
+++ b/checks/26.changequote
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1819: Origin of test
+dnl ../doc/m4.texinfo:1818: Origin of test
define(`foo', `Macro `FOO'.')
dnl @result{}
changequote(, )
diff --git a/checks/27.changecom b/checks/27.changecom
index 108cbb59..042f9ea1 100644
--- a/checks/27.changecom
+++ b/checks/27.changecom
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1859: Origin of test
+dnl ../doc/m4.texinfo:1858: Origin of test
define(`comment', `COMMENT')
dnl @result{}
# A normal comment
diff --git a/checks/27.changequote b/checks/27.changequote
deleted file mode 100644
index bd71cb96..00000000
--- a/checks/27.changequote
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1805: Origin of test
-changequote([[, ]])
-dnl @result{}
-define([[foo]], [[Macro [[[foo]]].]])
-dnl @result{}
-foo
-dnl @result{}Macro [foo].
diff --git a/checks/28.changecom b/checks/28.changecom
index 35604dee..9a981960 100644
--- a/checks/28.changecom
+++ b/checks/28.changecom
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:1880: Origin of test
+dnl ../doc/m4.texinfo:1879: Origin of test
define(`comment', `COMMENT')
dnl @result{}
changecom
diff --git a/checks/28.changequote b/checks/28.changequote
deleted file mode 100644
index ed067f50..00000000
--- a/checks/28.changequote
+++ /dev/null
@@ -1,9 +0,0 @@
-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/29.changecom b/checks/29.changecom
deleted file mode 100644
index 7a1dfa60..00000000
--- a/checks/29.changecom
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:1857: Origin of test
-define(`comment', `COMMENT')
-dnl @result{}
-# A normal comment
-dnl @result{}# A normal comment
-changecom(`/*', `*/')
-dnl @result{}
-# Not a comment anymore
-dnl @result{}# Not a COMMENT anymore
-But: /* this is a comment now */ while this is not a comment
-dnl @result{}But: /* this is a comment now */ while this is not a COMMENT
diff --git a/checks/29.m4wrap b/checks/29.m4wrap
index b303c56c..f981d47c 100644
--- a/checks/29.m4wrap
+++ b/checks/29.m4wrap
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2019: Origin of test
+dnl ../doc/m4.texinfo:2018: Origin of test
define(`cleanup', `This is the `cleanup' actions.
')
dnl @result{}
diff --git a/checks/30.changecom b/checks/30.changecom
deleted file mode 100644
index fce2579c..00000000
--- a/checks/30.changecom
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:1878: Origin of test
-define(`comment', `COMMENT')
-dnl @result{}
-changecom
-dnl @result{}
-# Not a comment anymore
-dnl @result{}# Not a COMMENT anymore
diff --git a/checks/30.include b/checks/30.include
index 85968c80..2428ff75 100644
--- a/checks/30.include
+++ b/checks/30.include
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2078: Origin of test
+dnl ../doc/m4.texinfo:2077: 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
diff --git a/checks/31.changesynta b/checks/31.changesynta
deleted file mode 100644
index 02f0ac23..00000000
--- a/checks/31.changesynta
+++ /dev/null
@@ -1,11 +0,0 @@
-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/31.include b/checks/31.include
index 1d3e01bc..b8c69e84 100644
--- a/checks/31.include
+++ b/checks/31.include
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2098: Origin of test
+dnl ../doc/m4.texinfo:2097: Origin of test
define(`foo', `FOO')
dnl @result{}
include(`incl.m4')
diff --git a/checks/32.changesynta b/checks/32.changesynta
deleted file mode 100644
index 8bd2f388..00000000
--- a/checks/32.changesynta
+++ /dev/null
@@ -1,11 +0,0 @@
-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/32.include b/checks/32.include
index ba3208f5..eb6e6e50 100644
--- a/checks/32.include
+++ b/checks/32.include
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2113: Origin of test
+dnl ../doc/m4.texinfo:2112: Origin of test
define(`bar', include(`incl.m4'))
dnl @result{}
This is `bar': >>>bar<<<
diff --git a/checks/33.changesynta b/checks/33.changesynta
deleted file mode 100644
index e4f76f71..00000000
--- a/checks/33.changesynta
+++ /dev/null
@@ -1,9 +0,0 @@
-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/33.divert b/checks/33.divert
index 1f90fa5f..c4c51dfa 100644
--- a/checks/33.divert
+++ b/checks/33.divert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2201: Origin of test
+dnl ../doc/m4.texinfo:2200: Origin of test
divert(1)
This text is diverted.
divert
diff --git a/checks/34.changesynta b/checks/34.changesynta
deleted file mode 100644
index 7b430d69..00000000
--- a/checks/34.changesynta
+++ /dev/null
@@ -1,9 +0,0 @@
-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/34.divert b/checks/34.divert
index 6f0a8a78..2802accd 100644
--- a/checks/34.divert
+++ b/checks/34.divert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2221: Origin of test
+dnl ../doc/m4.texinfo:2220: Origin of test
divert(-1)
define(`foo', `Macro `foo'.')
define(`bar', `Macro `bar'.')
diff --git a/checks/35.changesynta b/checks/35.changesynta
deleted file mode 100644
index d2ab2d3f..00000000
--- a/checks/35.changesynta
+++ /dev/null
@@ -1,15 +0,0 @@
-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/35.undivert b/checks/35.undivert
index a67dce3c..ee362526 100644
--- a/checks/35.undivert
+++ b/checks/35.undivert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2252: Origin of test
+dnl ../doc/m4.texinfo:2251: Origin of test
divert(1)
This text is diverted.
divert
diff --git a/checks/36.changesynta b/checks/36.changesynta
deleted file mode 100644
index db3f46f2..00000000
--- a/checks/36.changesynta
+++ /dev/null
@@ -1,5 +0,0 @@
-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/36.undivert b/checks/36.undivert
index 59e2741d..f9b88584 100644
--- a/checks/36.undivert
+++ b/checks/36.undivert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2276: Origin of test
+dnl ../doc/m4.texinfo:2275: Origin of test
divert(1)
This text is diverted first.
divert(0)undivert(1)dnl
diff --git a/checks/37.changesynta b/checks/37.changesynta
deleted file mode 100644
index 378d6d51..00000000
--- a/checks/37.changesynta
+++ /dev/null
@@ -1,13 +0,0 @@
-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/37.undivert b/checks/37.undivert
index 98a11953..94404752 100644
--- a/checks/37.undivert
+++ b/checks/37.undivert
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2302: Origin of test
+dnl ../doc/m4.texinfo:2301: Origin of test
define(`bar', `BAR')
dnl @result{}
undivert(`foo')
diff --git a/checks/38.divnum b/checks/38.divnum
index e56346ee..7ea8c682 100644
--- a/checks/38.divnum
+++ b/checks/38.divnum
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2328: Origin of test
+dnl ../doc/m4.texinfo:2327: Origin of test
Initial divnum
dnl @result{}Initial 0
divert(1)
diff --git a/checks/38.m4wrap b/checks/38.m4wrap
deleted file mode 100644
index 95fb12dd..00000000
--- a/checks/38.m4wrap
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2293: Origin of test
-define(`cleanup', `This is the `cleanup' actions.
-')
-dnl @result{}
-m4wrap(`cleanup')
-dnl @result{}
-This is the first and last normal input line.
-dnl @result{}This is the first and last normal input line.
-dnl @result{}This is the cleanup actions.
diff --git a/checks/39.cleardiv b/checks/39.cleardiv
index ab3176b7..d4d7fc45 100644
--- a/checks/39.cleardiv
+++ b/checks/39.cleardiv
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2359: Origin of test
+dnl ../doc/m4.texinfo:2358: Origin of test
divert(1)
Diversion one: divnum
divert(2)
diff --git a/checks/39.include b/checks/39.include
deleted file mode 100644
index 68cba854..00000000
--- a/checks/39.include
+++ /dev/null
@@ -1,6 +0,0 @@
-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/40.cleardiv b/checks/40.cleardiv
index 9d095038..8f00b9b7 100644
--- a/checks/40.cleardiv
+++ b/checks/40.cleardiv
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2374: Origin of test
+dnl ../doc/m4.texinfo:2373: Origin of test
define(`cleardivert',
`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
dnl @result{}
diff --git a/checks/40.include b/checks/40.include
deleted file mode 100644
index 1afae8e2..00000000
--- a/checks/40.include
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl ../doc/m4.texinfo:2372: Origin of test
-define(`foo', `FOO')
-dnl @result{}
-include(`incl.m4')
-dnl @result{}Include file start
-dnl @result{}FOO
-dnl @result{}Include file end
-dnl @result{}
diff --git a/checks/41.include b/checks/41.include
deleted file mode 100644
index e5965be9..00000000
--- a/checks/41.include
+++ /dev/null
@@ -1,8 +0,0 @@
-dnl ../doc/m4.texinfo:2387: Origin of test
-define(`bar', include(`incl.m4'))
-dnl @result{}
-This is `bar': >>>bar<<<
-dnl @result{}This is bar: >>>Include file start
-dnl @result{}foo
-dnl @result{}Include file end
-dnl @result{}<<<
diff --git a/checks/41.len b/checks/41.len
index 1c64b8e4..601a5e30 100644
--- a/checks/41.len
+++ b/checks/41.len
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2416: Origin of test
+dnl ../doc/m4.texinfo:2415: Origin of test
len()
dnl @result{}0
len(`abcdef')
diff --git a/checks/42.divert b/checks/42.divert
deleted file mode 100644
index 9c86c5de..00000000
--- a/checks/42.divert
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2478: Origin of test
-divert(1)
-This text is diverted.
-divert
-dnl @result{}
-This text is not diverted.
-dnl @result{}This text is not diverted.
-dnl @result{}
-dnl @result{}This text is diverted.
diff --git a/checks/42.index b/checks/42.index
index bac694f7..48be4827 100644
--- a/checks/42.index
+++ b/checks/42.index
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2442: Origin of test
+dnl ../doc/m4.texinfo:2441: Origin of test
index(`gnus, gnats, and armadillos', `nat')
dnl @result{}7
index(`gnus, gnats, and armadillos', `dag')
diff --git a/checks/43.divert b/checks/43.divert
deleted file mode 100644
index 252fc982..00000000
--- a/checks/43.divert
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:2498: Origin of test
-divert(-1)
-define(`foo', `Macro `foo'.')
-define(`bar', `Macro `bar'.')
-divert
-dnl @result{}
diff --git a/checks/43.regexp b/checks/43.regexp
index 3ea5cac3..2aed6eae 100644
--- a/checks/43.regexp
+++ b/checks/43.regexp
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2474: Origin of test
+dnl ../doc/m4.texinfo:2473: 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/44.regexp
index 8636b787..5c9ef4db 100644
--- a/checks/44.regexp
+++ b/checks/44.regexp
@@ -1,3 +1,3 @@
-dnl ../doc/m4.texinfo:2486: Origin of test
+dnl ../doc/m4.texinfo:2485: Origin of test
regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
dnl @result{}*** Unix *** nix ***
diff --git a/checks/44.undivert b/checks/44.undivert
deleted file mode 100644
index f99162c6..00000000
--- a/checks/44.undivert
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:2529: Origin of test
-divert(1)
-This text is diverted.
-divert
-dnl @result{}
-This text is not diverted.
-dnl @result{}This text is not diverted.
-undivert(1)
-dnl @result{}
-dnl @result{}This text is diverted.
-dnl @result{}
diff --git a/checks/45.substr b/checks/45.substr
index a60c791b..3e22f035 100644
--- a/checks/45.substr
+++ b/checks/45.substr
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2512: Origin of test
+dnl ../doc/m4.texinfo:2511: 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/45.undivert b/checks/45.undivert
deleted file mode 100644
index 8835f78e..00000000
--- a/checks/45.undivert
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:2553: Origin of test
-divert(1)
-This text is diverted first.
-divert(0)undivert(1)dnl
-dnl @result{}
-dnl @result{}This text is diverted first.
-undivert(1)
-dnl @result{}
-divert(1)
-This text is also diverted but not appended.
-divert(0)undivert(1)dnl
-dnl @result{}
-dnl @result{}This text is also diverted but not appended.
diff --git a/checks/46.translit b/checks/46.translit
index 78c10daa..25c29c35 100644
--- a/checks/46.translit
+++ b/checks/46.translit
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2553: Origin of test
+dnl ../doc/m4.texinfo:2552: 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/46.undivert b/checks/46.undivert
deleted file mode 100644
index f951d011..00000000
--- a/checks/46.undivert
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:2579: Origin of test
-define(`bar', `BAR')
-dnl @result{}
-undivert(`foo')
-dnl @result{}bar
-dnl @result{}
-include(`foo')
-dnl @result{}BAR
-dnl @result{}
diff --git a/checks/47.divnum b/checks/47.divnum
deleted file mode 100644
index c64945f8..00000000
--- a/checks/47.divnum
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl ../doc/m4.texinfo:2605: Origin of test
-Initial divnum
-dnl @result{}Initial 0
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert
-dnl @result{}
-dnl @result{}
-dnl @result{}Diversion one: 1
-dnl @result{}
-dnl @result{}Diversion two: 2
diff --git a/checks/47.patsubst b/checks/47.patsubst
index 8235b50c..5d0aea98 100644
--- a/checks/47.patsubst
+++ b/checks/47.patsubst
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2604: Origin of test
+dnl ../doc/m4.texinfo:2603: Origin of test
patsubst(`GNUs not Unix', `^', `OBS: ')
dnl @result{}OBS: GNUs not Unix
patsubst(`GNUs not Unix', `\<', `OBS: ')
diff --git a/checks/48.cleardiv b/checks/48.cleardiv
deleted file mode 100644
index cd779109..00000000
--- a/checks/48.cleardiv
+++ /dev/null
@@ -1,7 +0,0 @@
-dnl ../doc/m4.texinfo:2636: Origin of test
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert(-1)
-undivert
diff --git a/checks/48.patsubst b/checks/48.patsubst
index 0e042a62..6810b702 100644
--- a/checks/48.patsubst
+++ b/checks/48.patsubst
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2621: Origin of test
+dnl ../doc/m4.texinfo:2620: 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.cleardiv b/checks/49.cleardiv
deleted file mode 100644
index 8d4b7501..00000000
--- a/checks/49.cleardiv
+++ /dev/null
@@ -1,4 +0,0 @@
-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/49.format b/checks/49.format
index 0daa49a7..b2666d95 100644
--- a/checks/49.format
+++ b/checks/49.format
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2656: Origin of test
+dnl ../doc/m4.texinfo:2655: 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/50.incr
index 45ee7226..b3ab5ce3 100644
--- a/checks/50.incr
+++ b/checks/50.incr
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2726: Origin of test
+dnl ../doc/m4.texinfo:2725: Origin of test
incr(4)
dnl @result{}5
decr(7)
diff --git a/checks/50.len b/checks/50.len
deleted file mode 100644
index 37c7cf72..00000000
--- a/checks/50.len
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2693: Origin of test
-len()
-dnl @result{}0
-len(`abcdef')
-dnl @result{}6
diff --git a/checks/51.eval b/checks/51.eval
index dcf04759..a3d5083a 100644
--- a/checks/51.eval
+++ b/checks/51.eval
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2808: Origin of test
+dnl ../doc/m4.texinfo:2807: Origin of test
eval(-3 * 5)
dnl @result{}-15
eval(index(`Hello world', `llo') >= 0)
diff --git a/checks/51.index b/checks/51.index
deleted file mode 100644
index e540cdd8..00000000
--- a/checks/51.index
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2719: Origin of test
-index(`gnus, gnats, and armadillos', `nat')
-dnl @result{}7
-index(`gnus, gnats, and armadillos', `dag')
-dnl @result{}-1
diff --git a/checks/52.eval b/checks/52.eval
index b6a0da83..1d6e7189 100644
--- a/checks/52.eval
+++ b/checks/52.eval
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2839: Origin of test
+dnl ../doc/m4.texinfo:2838: Origin of test
eval(666, 10)
dnl @result{}666
eval(666, 11)
diff --git a/checks/52.regexp b/checks/52.regexp
deleted file mode 100644
index 27ad63d5..00000000
--- a/checks/52.regexp
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:2751: Origin of test
-regexp(`GNUs not Unix', `\<[a-z]\w+')
-dnl @result{}5
-regexp(`GNUs not Unix', `\<Q\w*')
-dnl @result{}-1
diff --git a/checks/53.esyscmd b/checks/53.esyscmd
index c92f7941..e91ae21c 100644
--- a/checks/53.esyscmd
+++ b/checks/53.esyscmd
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2924: Origin of test
+dnl ../doc/m4.texinfo:2923: Origin of test
define(`vice', `esyscmd(grep Vice ../COPYING)')
dnl @result{}
vice
diff --git a/checks/53.regexp b/checks/53.regexp
deleted file mode 100644
index b9263838..00000000
--- a/checks/53.regexp
+++ /dev/null
@@ -1,3 +0,0 @@
-dnl ../doc/m4.texinfo:2763: Origin of test
-regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
-dnl @result{}*** Unix *** nix ***
diff --git a/checks/54.substr b/checks/54.substr
deleted file mode 100644
index b2ad41ff..00000000
--- a/checks/54.substr
+++ /dev/null
@@ -1,5 +0,0 @@
-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)
-dnl @result{}gnats
diff --git a/checks/54.sysval b/checks/54.sysval
index bc9400db..3aa654b4 100644
--- a/checks/54.sysval
+++ b/checks/54.sysval
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:2955: Origin of test
+dnl ../doc/m4.texinfo:2954: Origin of test
syscmd(`false')
dnl @result{}
ifelse(sysval, 0, zero, non-zero)
diff --git a/checks/55.errprint b/checks/55.errprint
index ba292c22..c8c28001 100644
--- a/checks/55.errprint
+++ b/checks/55.errprint
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:3034: Origin of test
+dnl ../doc/m4.texinfo:3033: Origin of test
errprint(`Illegal arguments to forloop
')
dnl @error{}Illegal arguments to forloop
diff --git a/checks/55.translit b/checks/55.translit
deleted file mode 100644
index d0c1a522..00000000
--- a/checks/55.translit
+++ /dev/null
@@ -1,7 +0,0 @@
-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')
-dnl @result{}GNUS NOT UNIX
-translit(`GNUs not Unix', `A-Z', `z-a')
-dnl @result{}tmfs not fnix
diff --git a/checks/56.errprint b/checks/56.errprint
index a5be31ff..f1ed9b88 100644
--- a/checks/56.errprint
+++ b/checks/56.errprint
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:3059: Origin of test
+dnl ../doc/m4.texinfo:3058: Origin of test
errprint(`m4:'__file__:__line__: `Input error
')
dnl @error{}m4:56.errprint:2: Input error
diff --git a/checks/56.patsubst b/checks/56.patsubst
deleted file mode 100644
index 5da8e3c7..00000000
--- a/checks/56.patsubst
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:2881: Origin of test
-patsubst(`GNUs not Unix', `^', `OBS: ')
-dnl @result{}OBS: GNUs not Unix
-patsubst(`GNUs not Unix', `\<', `OBS: ')
-dnl @result{}OBS: GNUs OBS: not OBS: Unix
-patsubst(`GNUs not Unix', `\w*', `(\&)')
-dnl @result{}(GNUs)() (not)() (Unix)
-patsubst(`GNUs not Unix', `\w+', `(\&)')
-dnl @result{}(GNUs) (not) (Unix)
-patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-dnl @result{}GN not
diff --git a/checks/57.m4exit b/checks/57.m4exit
index 2cbb2d18..e69bd8a7 100644
--- a/checks/57.m4exit
+++ b/checks/57.m4exit
@@ -1,4 +1,4 @@
-dnl ../doc/m4.texinfo:3082: Origin of test
+dnl ../doc/m4.texinfo:3081: Origin of test
define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
')m4exit(1)')
dnl @result{}
diff --git a/checks/57.patsubst b/checks/57.patsubst
deleted file mode 100644
index 36f0f315..00000000
--- a/checks/57.patsubst
+++ /dev/null
@@ -1,9 +0,0 @@
-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',
- `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')dnl
-define(`capitalize',
- `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
-capitalize(`GNUs not Unix')
-dnl @result{}Gnus Not Unix
diff --git a/checks/58.format b/checks/58.format
deleted file mode 100644
index edeefd7e..00000000
--- a/checks/58.format
+++ /dev/null
@@ -1,5 +0,0 @@
-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))
-dnl @result{}The string "The brown fox jumped over the lazy dog" is 38 characters long
diff --git a/checks/59.incr b/checks/59.incr
deleted file mode 100644
index a6c4f6f2..00000000
--- a/checks/59.incr
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:3003: Origin of test
-incr(4)
-dnl @result{}5
-decr(7)
-dnl @result{}6
diff --git a/checks/60.eval b/checks/60.eval
deleted file mode 100644
index 89490b2e..00000000
--- a/checks/60.eval
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl ../doc/m4.texinfo:3097: Origin of test
-eval(-3 * 5)
-dnl @result{}-15
-eval(index(`Hello world', `llo') >= 0)
-dnl @result{}1
-define(`square', `eval(($1)**2)')
-dnl @result{}
-square(9)
-dnl @result{}81
-square(square(5)+1)
-dnl @result{}676
-define(`foo', `666')
-dnl @result{}
-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/61.eval b/checks/61.eval
deleted file mode 100644
index 64594c57..00000000
--- a/checks/61.eval
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl ../doc/m4.texinfo:3128: Origin of test
-eval(666, 10)
-dnl @result{}666
-eval(666, 11)
-dnl @result{}556
-eval(666, 6)
-dnl @result{}3030
-eval(666, 6, 10)
-dnl @result{}0000003030
-eval(-666, 6, 10)
-dnl @result{}-000003030
diff --git a/checks/62.esyscmd b/checks/62.esyscmd
deleted file mode 100644
index 27c3bda4..00000000
--- a/checks/62.esyscmd
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl ../doc/m4.texinfo:3213: Origin of test
-define(`vice', `esyscmd(grep Vice ../COPYING)')
-dnl @result{}
-vice
-dnl @result{} Ty Coon, President of Vice
-dnl @result{}
diff --git a/checks/63.sysval b/checks/63.sysval
deleted file mode 100644
index 1b7b110a..00000000
--- a/checks/63.sysval
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl ../doc/m4.texinfo:3244: Origin of test
-syscmd(`false')
-dnl @result{}
-ifelse(sysval, 0, zero, non-zero)
-dnl @result{}non-zero
-syscmd(`true')
-dnl @result{}
-sysval
-dnl @result{}0
diff --git a/checks/64.errprint b/checks/64.errprint
deleted file mode 100644
index b0cfbffd..00000000
--- a/checks/64.errprint
+++ /dev/null
@@ -1,5 +0,0 @@
-dnl ../doc/m4.texinfo:3324: Origin of test
-errprint(`Illegal arguments to forloop
-')
-dnl @error{}Illegal arguments to forloop
-dnl @result{}
diff --git a/checks/65.errprint b/checks/65.errprint
deleted file mode 100644
index 230093e8..00000000
--- a/checks/65.errprint
+++ /dev/null
@@ -1,5 +0,0 @@
-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/66.m4exit b/checks/66.m4exit
deleted file mode 100644
index eccef14b..00000000
--- a/checks/66.m4exit
+++ /dev/null
@@ -1,6 +0,0 @@
-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: 66.m4exit: 5: fatal error: This is a BAD one, buster
diff --git a/checks/Makefile.in b/checks/Makefile.in
index c1c4aaf8..4c9c9c49 100644
--- a/checks/Makefile.in
+++ b/checks/Makefile.in
@@ -1,76 +1,200 @@
-# Makefile for GNU m4 checks directory.
-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
-# 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.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# 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.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 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.
-
-PRODUCT = @PRODUCT@
-VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
-
-# Should be GNU awk, for the get-them script.
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DISTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLOCALE = @GLOCALE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NM = @NM@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+STACKOVF = @STACKOVF@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
-# Vern says that the first star is required around an Alpha make bug.
-CHECKS = *[0-9][0-9].*
-DISTFILES = Makefile.in get-them check-them stamp-checks incl.m4 foo
+EXTRA_DIST = check-them foo get-them incl.m4 stamp-checks $(CHECKS)
-all: stamp-checks
+CHECKS = ??.*
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = Makefile.am Makefile.in
-stamp-checks: get-them ../doc/m4.texinfo
- rm -f $(srcdir)/$(CHECKS)
- cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
- touch $(srcdir)/stamp-checks
-install:
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-uninstall:
+TAR = gtar
+GZIP = --best
+all: Makefile
-check: stamp-checks
- PATH=`pwd`/../src:$$PATH; export PATH; \
- cd $(srcdir) && ./check-them $(CHECKS)
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps checks/Makefile
-tags:
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-mostlyclean:
+tags: TAGS
+TAGS:
-clean: mostlyclean
-distclean: clean
- rm -f Makefile
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-realclean: distclean
- rm -f $(CHECKS) stamp-checks
+subdir = checks
-dist: $(DISTFILES)
- @echo "Copying distribution files"
+distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
- ln $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/checks 2> /dev/null \
- || cp -p $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/checks; \
- done
- @for file in $(srcdir)/$(CHECKS); do \
- ln $$file ../$(PRODUCT)-$(VERSION)/checks \
- || cp -p $$file ../$(PRODUCT)-$(VERSION)/checks; \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
done
+info:
+dvi:
+check: all
+ $(MAKE)
+installcheck:
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data:
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall:
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=checks/$@ CONFIG_HEADERS= ./config.status
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-generic
+
+clean: clean-generic mostlyclean
+
+distclean: distclean-generic clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: tags distdir info dvi installcheck install-exec install-data \
+install uninstall all installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
+
+
+all: stamp-checks
+
+stamp-checks: get-them ../doc/m4.texinfo
+ rm -f $(srcdir)/$(CHECKS)
+ cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
+ touch $(srcdir)/stamp-checks
+
+check: stamp-checks
+ PATH=`pwd`/../src:$$PATH; export PATH; \
+ cd $(srcdir) && ./check-them $(CHECKS)
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/config.h.in b/config.h.in
index c3e44e7e..0efd4cbd 100644
--- a/config.h.in
+++ b/config.h.in
@@ -26,12 +26,21 @@
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
/* Define if on MINIX. */
#undef _MINIX
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
@@ -48,9 +57,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
@@ -68,7 +77,7 @@
#undef HAVE_SIGCONTEXT
/* Define to the name of the distribution. */
-#undef PRODUCT
+#undef PACKAGE
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
@@ -89,12 +98,63 @@
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
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if stpcpy function is available. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if ANSI function prototypes are usable. */
+#undef PROTOTYPES
+
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
/* Define if you have the ecvt function. */
#undef HAVE_ECVT
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
/* Define if you have the mkstemp function. */
#undef HAVE_MKSTEMP
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
@@ -107,23 +167,56 @@
/* Define if you have the sigvec function. */
#undef HAVE_SIGVEC
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
+/* Define if you have the strtol function. */
+#undef HAVE_STRTOL
+
/* Define if you have the tmpfile function. */
#undef HAVE_TMPFILE
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
/* Define if you have the <siginfo.h> header file. */
#undef HAVE_SIGINFO_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+
+/* Define if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Define if you have the i library (-li). */
+#undef HAVE_LIBI
diff --git a/configure b/configure
index b8658a69..0725090a 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
-#!/bin/sh
+#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.1
-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Generated automatically using autoconf version 2.12
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@@ -12,10 +12,28 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
+ --enable-shared build shared libraries [default=yes]
+ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --enable-static build static libraries [default=yes]
+ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
--enable-changeword enable -W and changeword() builtin"
ac_help="$ac_help
- --with-dmalloc use dmalloc, as in dmalloc.tar.gz from
- @/ftp.antaire.com:antaire/src/dmalloc."
+ --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
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
+ --with-catgets use catgets functions if available"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -38,9 +56,24 @@ target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
+MFLAGS= MAKEFLAGS=
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
ac_prev=
for ac_option
@@ -62,9 +95,14 @@ do
case "$ac_option" in
- -build | --build | --buil | --bui | --bu | --b)
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
@@ -74,6 +112,12 @@ do
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
@@ -124,12 +168,29 @@ Configuration:
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
- --exec-prefix=PREFIX install architecture-dependent files in PREFIX
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
@@ -141,8 +202,10 @@ Features and packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
---enable and --with options recognized:$ac_help
EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
exit 0 ;;
-host | --host | --hos | --ho)
@@ -150,6 +213,44 @@ EOF
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
@@ -162,6 +263,15 @@ EOF
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
@@ -202,6 +312,23 @@ EOF
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
@@ -212,6 +339,13 @@ EOF
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
@@ -221,7 +355,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.1"
+ echo "configure generated by autoconf version 2.12"
exit 0 ;;
-with-* | --with-*)
@@ -267,7 +401,7 @@ EOF
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
- *)
+ *)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
@@ -284,19 +418,20 @@ if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
-trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
-# 0 unused; standard input
+# 0 standard input
# 1 file creation
# 2 errors and warnings
-# 3 unused; some systems may open it to /dev/tty
-# 4 checking for... messages and results
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
- exec 4>/dev/null
+ exec 6>/dev/null
else
- exec 4>&1
+ exec 6>&1
fi
exec 5>./config.log
@@ -322,11 +457,14 @@ do
done
# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
@@ -386,8 +524,9 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
-ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -403,11 +542,15 @@ fi
+
+
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
- # Double any \ or $.
- echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
rm -f conftestsed
fi
@@ -421,10 +564,163 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-PRODUCT=m4
-VERSION=1.4
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# 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:598: 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
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall installbsd scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+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:651: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+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:689: 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
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=m4
+
+VERSION=1.4c
+
+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; }
+fi
cat >> confdefs.h <<EOF
-#define PRODUCT "$PRODUCT"
+#define PACKAGE "$PACKAGE"
EOF
cat >> confdefs.h <<EOF
@@ -433,14 +729,111 @@ EOF
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:735: 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.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:748: 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.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:761: 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.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:774: 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.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:787: 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.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+
+# Extract the first word of "extract-msgs", so it can be a program name with args.
+set dummy extract-msgs; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:804: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_GLOCALE'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$GLOCALE"; then
+ ac_cv_prog_GLOCALE="$GLOCALE" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_GLOCALE="yes"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_GLOCALE" && ac_cv_prog_GLOCALE="no"
+fi
+fi
+GLOCALE="$ac_cv_prog_GLOCALE"
+if test -n "$GLOCALE"; then
+ echo "$ac_t""$GLOCALE" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
for ac_prog in mawk gawk nawk awk
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>&4
-if eval "test \"`echo '${'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:835: 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
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -458,9 +851,9 @@ fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&4
+ echo "$ac_t""$AWK" 1>&6
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
test -n "$AWK" && break
@@ -468,9 +861,10 @@ 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>&4
-if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:866: 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
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -484,80 +878,157 @@ else
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&4
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+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:895: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
+fi
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:943: 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.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+cat > conftest.$ac_ext <<EOF
+#line 953 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:957: \"$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
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+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:977: 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:982: 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
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:991: \"$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
fi
fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&4
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
if test $ac_cv_prog_gcc = yes; then
GCC=yes
- if test "${CFLAGS+set}" != set; then
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1006: 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
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_gcc_g=yes
+ ac_cv_prog_cc_g=yes
else
- ac_cv_prog_gcc_g=no
+ ac_cv_prog_cc_g=no
fi
rm -f conftest*
fi
- echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
- if test $ac_cv_prog_gcc_g = yes; then
- CFLAGS="-g -O"
- else
- CFLAGS="-O"
- fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
fi
else
GCC=
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -568,15 +1039,17 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# 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>&4
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:1044: 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>&4
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- case "$ac_dir" in
- ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall installbsd scoinst install; do
@@ -595,13 +1068,20 @@ else
;;
esac
done
- IFS="$ac_save_ifs"
- # As a last resort, use the slow shell script.
- test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
+ IFS="$ac_save_IFS"
+
fi
- INSTALL="$ac_cv_path_install"
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
fi
-echo "$ac_t""$INSTALL" 1>&4
+echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -609,10 +1089,11 @@ 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>&4
-set dummy ${MAKE-make}; ac_make=$2
-if eval "test \"`echo '${'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:1094: 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
else
cat > conftestmake <<\EOF
all:
@@ -628,18 +1109,92 @@ fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&4
+ echo "$ac_t""yes" 1>&6
SET_MAKE=
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
SET_MAKE="MAKE=${MAKE-make}"
fi
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_static=yes
+fi
+
+
+# Make sure we can run config.sub.
+if $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:1173: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`$ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`$ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
# 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>&4
-if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1196: 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
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -658,20 +1213,210 @@ fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&4
+ echo "$ac_t""$RANLIB" 1>&6
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1235: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | A-Za-z:\\*)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1253: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1256: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1292: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1308: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$NM" in
+/* | A-Za-z:\\*)
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1345: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 1381 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1413: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
@@ -679,31 +1424,37 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 683 "configure"
+#line 1428 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 697 "configure"
+#line 1445 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
@@ -712,13 +1463,16 @@ fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
fi
-CPP="$ac_cv_prog_CPP"
-echo "$ac_t""$CPP" 1>&4
+echo "$ac_t""$CPP" 1>&6
-echo $ac_n "checking for AIX""... $ac_c" 1>&4
+echo $ac_n "checking for AIX""... $ac_c" 1>&6
+echo "configure:1474: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 722 "configure"
+#line 1476 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -728,22 +1482,23 @@ EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
- echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
+ echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF
else
rm -rf conftest*
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
rm -f conftest*
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1498: 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
- echo "$ac_t""yes" 1>&4
+ echo "$ac_t""yes" 1>&6
ISC=yes # If later tests want to check for ISC.
cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
@@ -755,37 +1510,41 @@ EOF
CC="$CC -Xp"
fi
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
ISC=
fi
-ac_safe=`echo "minix/config.h" | tr './\055' '___'`
-echo $ac_n "checking for minix/config.h""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
+echo "configure:1520: 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 769 "configure"
+#line 1525 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1530: \"$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>&4
+ echo "$ac_t""yes" 1>&6
MINIX=yes
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
MINIX=
fi
@@ -804,76 +1563,256 @@ EOF
fi
-echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+
+
+
+echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
+echo "configure:1571: 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
- ac_cv_prog_cc_stdc=no
-ac_save_CFLAGS="$CFLAGS"
+ am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX -Aa -D_HPUX_SOURCE
-# SVR4 -Xc
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
- CFLAGS="$ac_save_CFLAGS $ac_arg"
+ CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 824 "configure"
+#line 1587 "configure"
#include "confdefs.h"
-#if !defined(__STDC__) || __STDC__ != 1
-choke me
-#endif
-
-int main() { return 0; }
-int t() {
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+
+int main() {
+
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_prog_cc_stdc="$ac_arg"; break
+ am_cv_prog_cc_stdc="$ac_arg"; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
fi
rm -f conftest*
-
done
-CFLAGS="$ac_save_CFLAGS"
+CC="$ac_save_CC"
fi
-echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&4
-case "x$ac_cv_prog_cc_stdc" in
+if test -z "$am_cv_prog_cc_stdc"; then
+ echo "$ac_t""none needed" 1>&6
+else
+ echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
+fi
+case "x$am_cv_prog_cc_stdc" in
x|xno) ;;
- *) CC="$CC $ac_cv_prog_cc_stdc" ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
-echo $ac_n "checking for function prototypes""... $ac_c" 1>&4
-if test "$ac_cv_prog_cc_stdc" != no; then
- echo "$ac_t""yes" 1>&4
+echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
+echo "configure:1649: checking for function prototypes" >&5
+if test "$am_cv_prog_cc_stdc" != no; then
+ echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define PROTOTYPES 1
EOF
U= ANSI2KNR=
else
- echo "$ac_t""no" 1>&4
- U=_ ANSI2KNR=ansi2knr
+ echo "$ac_t""no" 1>&6
+ 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:1662: 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 1667 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
fi
+rm -f conftest*
-echo $ac_n "checking for working const""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+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 1692 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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 1710 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
else
cat > conftest.$ac_ext <<EOF
-#line 873 "configure"
+#line 1731 "configure"
#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
-int main() { return 0; }
-int t() {
+EOF
+if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+ for ac_hdr in string.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1769: 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 1774 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1779: \"$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
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1808: 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 1813 "configure"
+#include "confdefs.h"
+
+int main() {
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x;
@@ -882,7 +1821,7 @@ char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
-static struct point const zero;
+static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in an arm
of an if-expression whose if-part is not a constant expression */
@@ -919,17 +1858,19 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_c_const=no
fi
rm -f conftest*
-
fi
-echo "$ac_t""$ac_cv_c_const" 1>&4
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
cat >> confdefs.h <<\EOF
#define const
@@ -938,86 +1879,69 @@ EOF
fi
-for ac_hdr in limits.h memory.h siginfo.h string.h unistd.h
+for ac_hdr in limits.h locale.h memory.h siginfo.h string.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1887: 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 950 "configure"
+#line 1892 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1897: \"$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>&4
- ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
done
-# If we cannot run a trivial program, we must be cross compiling.
-echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
-else
- if test "$cross_compiling" = yes; then
- ac_cv_cross=yes
-else
-cat > conftest.$ac_ext <<EOF
-#line 987 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-eval $ac_link
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
- ac_cv_c_cross=no
-else
- ac_cv_c_cross=yes
-fi
-fi
-rm -fr conftest*
-fi
-cross_compiling=$ac_cv_c_cross
-echo "$ac_t""$ac_cv_c_cross" 1>&4
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1924: 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 1008 "configure"
+#line 1929 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_cv_header_stdc=yes
else
echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_stdc=no
fi
@@ -1026,7 +1950,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 1030 "configure"
+#line 1954 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1044,7 +1968,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 1048 "configure"
+#line 1972 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1062,10 +1986,10 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
- ac_cv_header_stdc=no
+ :
else
-cat > conftest.$ac_ext <<EOF
-#line 1069 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 1993 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1076,17 +2000,22 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-eval $ac_link
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
+if { (eval echo configure:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
:
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
ac_cv_header_stdc=no
fi
-fi
rm -fr conftest*
fi
+
+fi
fi
-echo "$ac_t""$ac_cv_header_stdc" 1>&4
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
@@ -1094,54 +2023,63 @@ EOF
fi
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:2028: 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 1103 "configure"
+#line 2033 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
-extern void (*signal ()) ();
-int main() { return 0; }
-int t() {
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
int i;
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_type_signal=int
fi
rm -f conftest*
-
fi
-echo "$ac_t""$ac_cv_type_signal" 1>&4
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF
-echo $ac_n "checking for size_t""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2069: 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 1137 "configure"
+#line 2074 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
+#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "size_t" >/dev/null 2>&1; then
+ egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_size_t=yes
else
@@ -1151,7 +2089,7 @@ fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&4
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
cat >> confdefs.h <<\EOF
#define size_t unsigned
@@ -1162,19 +2100,23 @@ fi
for ac_func in mkstemp sigaction sigaltstack sigstack sigvec strerror tmpfile
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2105: 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 1171 "configure"
+#line 2110 "configure"
#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-char $ac_func();
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-int main() { return 0; }
-int t() {
+int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -1187,54 +2129,58 @@ $ac_func();
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-
fi
+
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
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>&4
-if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:2160: 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 1220 "configure"
+#line 2165 "configure"
#include "confdefs.h"
#include <alloca.h>
-int main() { return 0; }
-int t() {
+int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_alloca_h=no
fi
rm -f conftest*
-
fi
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
if test $ac_cv_header_alloca_h = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA_H 1
@@ -1242,12 +2188,13 @@ EOF
fi
-echo $ac_n "checking for alloca""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2193: 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 1251 "configure"
+#line 2198 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1266,30 +2213,31 @@ char *alloca ();
# endif
#endif
-int main() { return 0; }
-int t() {
+int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
- ac_cv_func_alloca=yes
+ ac_cv_func_alloca_works=yes
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_func_alloca=no
+ ac_cv_func_alloca_works=no
fi
rm -f conftest*
-
fi
-echo "$ac_t""$ac_cv_func_alloca" 1>&4
-if test $ac_cv_func_alloca = yes; then
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF
fi
-if test $ac_cv_func_alloca = no; then
+if test $ac_cv_func_alloca_works = no; then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
@@ -1300,12 +2248,13 @@ if test $ac_cv_func_alloca = no; then
EOF
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2253: 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 1309 "configure"
+#line 2258 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1325,154 +2274,75 @@ fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_os_cray" 1>&4
-if test $ac_cv_os_cray = yes; then
-echo $ac_n "checking for _getb67""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
-else
- cat > conftest.$ac_ext <<EOF
-#line 1336 "configure"
-#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
-/* Override any gcc2 internal prototype to avoid an error. */
-char _getb67();
-
-int main() { return 0; }
-int t() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub__getb67) || defined (__stub____getb67)
-choke me
-#else
-_getb67();
-#endif
-
-; return 0; }
-EOF
-if eval $ac_link; then
- rm -rf conftest*
- eval "ac_cv_func__getb67=yes"
-else
- rm -rf conftest*
- eval "ac_cv_func__getb67=no"
-fi
-rm -f conftest*
-
-fi
-if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- cat >> confdefs.h <<\EOF
-#define CRAY_STACKSEG_END _getb67
-EOF
-else
- echo "$ac_t""no" 1>&4
-echo $ac_n "checking for GETB67""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+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:2283: 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 1379 "configure"
+#line 2288 "configure"
#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-char GETB67();
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-int main() { return 0; }
-int t() {
+int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_GETB67) || defined (__stub___GETB67)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-GETB67();
+$ac_func();
#endif
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
- eval "ac_cv_func_GETB67=yes"
+ eval "ac_cv_func_$ac_func=yes"
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_func_GETB67=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-
-fi
-if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- cat >> confdefs.h <<\EOF
-#define CRAY_STACKSEG_END GETB67
-EOF
-
-else
- echo "$ac_t""no" 1>&4
-echo $ac_n "checking for getb67""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
-else
- cat > conftest.$ac_ext <<EOF
-#line 1422 "configure"
-#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
-/* Override any gcc2 internal prototype to avoid an error. */
-char getb67();
-
-int main() { return 0; }
-int t() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_getb67) || defined (__stub___getb67)
-choke me
-#else
-getb67();
-#endif
-
-; return 0; }
-EOF
-if eval $ac_link; then
- rm -rf conftest*
- eval "ac_cv_func_getb67=yes"
-else
- rm -rf conftest*
- eval "ac_cv_func_getb67=no"
fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- cat >> confdefs.h <<\EOF
-#define CRAY_STACKSEG_END getb67
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
EOF
+ break
else
- echo "$ac_t""no" 1>&4
-fi
-
-fi
-
+ echo "$ac_t""no" 1>&6
fi
+done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2338: 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
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
-cat > conftest.$ac_ext <<EOF
-#line 1476 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 2346 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1491,35 +2361,44 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-eval $ac_link
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
+if { (eval echo configure:2365: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
ac_cv_c_stack_direction=-1
fi
-fi
rm -fr conftest*
fi
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF
fi
-echo $ac_n "checking for vprintf""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for vprintf""... $ac_c" 1>&6
+echo "configure:2387: 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 1516 "configure"
+#line 2392 "configure"
#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char vprintf(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-char vprintf();
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char vprintf();
-int main() { return 0; }
-int t() {
+int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -1532,40 +2411,46 @@ vprintf();
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
-
fi
+
if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
- echo "$ac_t""yes" 1>&4
+ echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
if test "$ac_cv_func_vprintf" != yes; then
-echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
+echo "configure:2439: 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 1562 "configure"
+#line 2444 "configure"
#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-char _doprnt();
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _doprnt();
-int main() { return 0; }
-int t() {
+int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -1578,43 +2463,49 @@ _doprnt();
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
-
fi
+
if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
- echo "$ac_t""yes" 1>&4
+ echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
fi
for ac_func in strtol
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2494: 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 1611 "configure"
+#line 2499 "configure"
#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-char $ac_func();
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-int main() { return 0; }
-int t() {
+int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -1627,56 +2518,67 @@ $ac_func();
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-
fi
+
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- :
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.o"
fi
-
done
-echo $ac_n "checking ecvt declaration""... $ac_c" 1>&4
+
+echo $ac_n "checking ecvt declaration""... $ac_c" 1>&6
+echo "configure:2549: checking ecvt declaration" >&5
cat > conftest.$ac_ext <<EOF
-#line 1653 "configure"
+#line 2551 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "ecvt" >/dev/null 2>&1; then
rm -rf conftest*
- echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
+ echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define HAVE_EFGCVT 2
EOF
else
rm -rf conftest*
- echo "$ac_t""no" 1>&4; for ac_func in ecvt
+ echo "$ac_t""no" 1>&6; for ac_func in ecvt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2567: 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 1673 "configure"
+#line 2572 "configure"
#include "confdefs.h"
-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-char $ac_func();
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
-int main() { return 0; }
-int t() {
+int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -1689,25 +2591,27 @@ $ac_func();
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-
fi
+
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&4
- ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
done
@@ -1715,7 +2619,8 @@ fi
rm -f conftest*
-echo $ac_n "checking if stack overflow is detectable""... $ac_c" 1>&4
+echo $ac_n "checking if stack overflow is detectable""... $ac_c" 1>&6
+echo "configure:2624: 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
@@ -1725,13 +2630,12 @@ 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 1729 "configure"
+#line 2634 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <sys/resource.h>
#include <signal.h>
-int main() { return 0; }
-int t() {
+int main() {
struct rlimit r; int i; getrlimit (RLIMIT_STACK, &r)
#if (!defined(HAVE_SIGACTION) || !defined(SA_ONSTACK)) \
&& (!defined(HAVE_SIGVEC) || !defined(SV_ONSTACK))
@@ -1739,15 +2643,17 @@ choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
#endif
; return 0; }
EOF
-if eval $ac_link; then
+if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
use_stackovf=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
fi
rm -f conftest*
-
fi
fi
-echo "$ac_t""$use_stackovf" 1>&4
+echo "$ac_t""$use_stackovf" 1>&6
if test "$use_stackovf" = yes; then
cat >> confdefs.h <<\EOF
#define USE_STACKOVF 1
@@ -1756,7 +2662,7 @@ EOF
STACKOVF=stackovf.${U}o
cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 2666 "configure"
#include "confdefs.h"
#include <sys/resource.h>
EOF
@@ -1773,7 +2679,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 1777 "configure"
+#line 2683 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
@@ -1790,7 +2696,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 1794 "configure"
+#line 2700 "configure"
#include "confdefs.h"
#include <signal.h>
EOF
@@ -1806,30 +2712,52 @@ rm -f conftest*
fi
-echo $ac_n "checking if changeword is wanted""... $ac_c" 1>&4
+echo $ac_n "checking if changeword is wanted""... $ac_c" 1>&6
+echo "configure:2717: checking if changeword is wanted" >&5
# Check whether --enable-changeword or --disable-changeword was given.
-enableval="$enable_changeword"
-if test -n "$enableval"; then
+if test "${enable_changeword+set}" = set; then
+ enableval="$enable_changeword"
if test "$enableval" = yes; then
- echo "$ac_t""yes" 1>&4
+ echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define ENABLE_CHANGEWORD 1
EOF
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&4
+echo $ac_n "checking if extended and fractional arithmetic is wanted""... $ac_c" 1>&6
+echo "configure:2736: 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"
+ if test "$withval" = yes; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define WITH_GMP 1
+EOF
+
+ LIBS="$LIBS -lgmp"
+else
+ echo "$ac_t""no" 1>&6
+fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
+echo "configure:2756: checking if malloc debugging is wanted" >&5
# Check whether --with-dmalloc or --without-dmalloc was given.
-withval="$with_dmalloc"
-if test -n "$withval"; then
+if test "${with_dmalloc+set}" = set; then
+ withval="$with_dmalloc"
if test "$withval" = yes; then
- echo "$ac_t""yes" 1>&4
+ echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define WITH_DMALLOC 1
EOF
@@ -1837,17 +2765,1430 @@ EOF
LIBS="$LIBS -ldmalloc"
LDFLAGS="$LDFLAGS -g"
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
+fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2777: 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 2784 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2817: 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 2822 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+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:2853: 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 2858 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2863: \"$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
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2892: 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 2897 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2945: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2953 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:3093: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h values.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:3121: 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 3126 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3131: \"$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
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3161: 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 3166 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3218: 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
- echo "$ac_t""no" 1>&4
+ cat > conftest.$ac_ext <<EOF
+#line 3223 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
fi
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:3280: 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 3285 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:3292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:3313: 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"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3333: 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"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3352: 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 3357 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3362: \"$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 gettext in libc""... $ac_c" 1>&6
+echo "configure:3379: 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 3384 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+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:3407: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3415 "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
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3426: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+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:3442: 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
+ cat > conftest.$ac_ext <<EOF
+#line 3447 "configure"
+#include "confdefs.h"
+
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+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:3482: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3516: 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 3521 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+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:3571: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3603: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3635 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
+echo "configure:3666: 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"
+ nls_cv_use_catgets=$withval
+else
+ nls_cv_use_catgets=no
+fi
+
+ echo "$ac_t""$nls_cv_use_catgets" 1>&6
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ echo $ac_n "checking for main in -li""... $ac_c" 1>&6
+echo "configure:3679: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-li $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3687 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:3694: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-li $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for catgets""... $ac_c" 1>&6
+echo "configure:3722: 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 3727 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char catgets(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char catgets();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_catgets) || defined (__stub___catgets)
+choke me
+#else
+catgets();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_CATGETS 1
+EOF
+
+ INTLOBJS="\$(CATOBJS)"
+ # 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:3772: 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
+ case "$GENCAT" in
+ /*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GENCAT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
+ ;;
+esac
+fi
+GENCAT="$ac_cv_path_GENCAT"
+if test -n "$GENCAT"; then
+ echo "$ac_t""$GENCAT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$GENCAT" != "no"; then
+ # 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:3804: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test "$GMSGFMT" = "no"; then
+ # 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:3837: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ 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:3872: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ 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
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # 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:3930: 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
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3964: 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
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:3996: 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
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ 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
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+ 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
+
+ # 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
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:4086: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ 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
+
+
+ test -d intl || mkdir intl
+ 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:4114: 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 4119 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4124: \"$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
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ l=
+
+
+ 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
+
+ALL_LINGUAS=""
+
trap '' 1 2 15
-if test -w $cache_file; then
-echo "updating cache $cache_file"
-cat > $cache_file <<\EOF
+cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
@@ -1863,15 +4204,38 @@ cat > $cache_file <<\EOF
# --recheck option to rerun configure.
#
EOF
-# Ultrix sh set writes to stderr and can't be redirected directly.
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
- >> $cache_file
+ case `(ac_space=' '; set) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
else
-echo "not updating unwritable cache $cache_file"
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
fi
+rm -f confcache
-trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
@@ -1894,7 +4258,7 @@ DEFS=-DHAVE_CONFIG_H
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
-#!/bin/sh
+#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
@@ -1913,7 +4277,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1924,12 +4288,14 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr Makefile doc/Makefile lib/Makefile src/Makefile \
-checks/Makefile examples/Makefile config.h conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile intl/Makefile po/Makefile.in doc/Makefile lib/Makefile src/Makefile \
+checks/Makefile examples/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
@@ -1941,45 +4307,130 @@ s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
-s%@PRODUCT@%$PRODUCT%g
-s%@VERSION@%$VERSION%g
-s%@AWK@%$AWK%g
-s%@CC@%$CC%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
+s%@GLOCALE@%$GLOCALE%g
+s%@AWK@%$AWK%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
s%@RANLIB@%$RANLIB%g
+s%@LD@%$LD%g
+s%@NM@%$NM%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
s%@CPP@%$CPP%g
s%@U@%$U%g
s%@ANSI2KNR@%$ANSI2KNR%g
s%@ALLOCA@%$ALLOCA%g
s%@LIBOBJS@%$LIBOBJS%g
s%@STACKOVF@%$STACKOVF%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@GENCAT@%$GENCAT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
CEOF
EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile lib/Makefile src/Makefile \
+CONFIG_FILES=\${CONFIG_FILES-"Makefile intl/Makefile po/Makefile.in doc/Makefile lib/Makefile src/Makefile \
checks/Makefile examples/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile]", defaulting infile="outfile.in".
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
- # Adjust relative srcdir, etc. for subdirectories.
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
@@ -2000,6 +4451,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
+
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
@@ -2008,14 +4460,16 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# $configure_input" ;;
*) ac_comsub= ;;
esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
-rm -f conftest.subs
+rm -f conftest.s*
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
@@ -2036,11 +4490,17 @@ ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
-CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile]", defaulting infile="outfile.in".
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
@@ -2048,19 +4508,20 @@ for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
echo creating $ac_file
rm -f conftest.frag conftest.in conftest.out
- cp $ac_given_srcdir/$ac_file_in conftest.in
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
EOF
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
+# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
@@ -2076,8 +4537,6 @@ EOF
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
-# Maximum number of lines to put in a single here document.
-ac_max_here_lines=12
rm -f conftest.tail
while :
@@ -2108,16 +4567,75 @@ cat >> $CONFIG_STATUS <<\EOF
echo "$ac_file is unchanged"
rm -f conftest.h
else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+ac_sources="$nls_cv_header_libgt"
+ac_dests="$nls_cv_header_intl"
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+srcdir=$ac_given_srcdir
+while test -n "$ac_sources"; do
+ set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+ set $ac_sources; ac_source=$1; shift; ac_sources=$*
+
+ echo "linking $srcdir/$ac_source to $ac_dest"
+
+ if test ! -r $srcdir/$ac_source; then
+ { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+ fi
+ rm -f $ac_dest
+
+ # Make relative symlinks.
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+ # The dest file is in a subdirectory.
+ test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dest_dir_suffix.
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dest_dir_suffix= ac_dots=
+ fi
+
+ case "$srcdir" in
+ [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+ *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+ esac
-test -z "$CONFIG_HEADERS" || date > stamp-h
+ # Make a symlink if possible; otherwise try a hard link.
+ if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+ ln $srcdir/$ac_source $ac_dest; then :
+ else
+ { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+ fi
+done
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; \
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/configure.in b/configure.in
index 4db026fa..23a96713 100644
--- a/configure.in
+++ b/configure.in
@@ -5,29 +5,25 @@
undefine([changeword])
AC_INIT(src/m4.c)
-AC_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
-PRODUCT=m4
-VERSION=1.4
-AC_DEFINE_UNQUOTED(PRODUCT, "$PRODUCT")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
-AC_SUBST(PRODUCT)
-AC_SUBST(VERSION)
+AM_INIT_AUTOMAKE(m4,1.4c)
+AC_CHECK_PROG(GLOCALE, extract-msgs, yes, no)
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
-AC_PROG_RANLIB
+AM_PROG_LIBTOOL
AC_AIX
AC_ISC_POSIX
AC_MINIX
-fp_C_PROTOTYPES
+AM_C_PROTOTYPES
AC_C_CONST
-AC_CHECK_HEADERS(limits.h memory.h siginfo.h string.h unistd.h)
+AC_CHECK_HEADERS(limits.h locale.h memory.h siginfo.h string.h unistd.h)
AC_HEADER_STDC
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
@@ -81,8 +77,24 @@ else
AC_MSG_RESULT(no)
fi], [AC_MSG_RESULT(no)])
-fp_WITH_DMALLOC
+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)])
+
+AM_WITH_DMALLOC
+AM_GNU_GETTEXT
+ALL_LINGUAS=""
+AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
-AC_OUTPUT(Makefile doc/Makefile lib/Makefile src/Makefile \
+AC_OUTPUT(Makefile intl/Makefile po/Makefile.in doc/Makefile lib/Makefile src/Makefile \
checks/Makefile examples/Makefile,
-[test -z "$CONFIG_HEADERS" || date > stamp-h])
+[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; \
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
+
diff --git a/doc/Makefile.in b/doc/Makefile.in
index d0e15763..b55440f5 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,92 +1,333 @@
-# Makefile for GNU m4 documentation.
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
-# 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.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# 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.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 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.
-
-PRODUCT = @PRODUCT@
-VERSION = @VERSION@
SHELL = /bin/sh
+
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DISTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = makeinfo
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLOCALE = @GLOCALE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NM = @NM@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+STACKOVF = @STACKOVF@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
+
+info_TEXINFOS = m4.texinfo
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
TEXI2DVI = texi2dvi
+TEXINFO_TEX = $(srcdir)/texinfo.tex
+INFO_DEPS = m4.info
+DVIS = m4.dvi
+TEXINFOS = m4.texinfo
+DIST_COMMON = Makefile.am Makefile.in mdate-sh stamp-vti texinfo.tex \
+version.texi
-prefix = @prefix@
-infodir = $(prefix)/info
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP = --best
+all: Makefile $(INFO_DEPS)
.SUFFIXES:
+.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-DISTFILES = Makefile.in m4.texinfo texinfo.tex \
-stamp-vti version.texi m4.info m4.info-1 m4.info-2 m4.info-3
-all: m4.info
+version.texi: stamp-vti
+ cp $(srcdir)/stamp-vti $(srcdir)/version.texi
-info: m4.info
+stamp-vti: m4.texinfo $(top_srcdir)/configure.in
+ @echo "@set UPDATED `cd $(srcdir) \
+ && $(SHELL) ./mdate-sh m4.texinfo`" > vti.tmp
+ @echo "@set EDITION $(VERSION)" >> vti.tmp
+ @echo "@set VERSION $(VERSION)" >> vti.tmp
+ @cmp -s vti.tmp $(srcdir)/stamp-vti \
+ || (echo "Updating $(srcdir)/stamp-vti"; \
+ cp vti.tmp $(srcdir)/stamp-vti)
+ -@rm -f vti.tmp
-m4.info: m4.texinfo version.texi
- cd $(srcdir) && $(MAKEINFO) m4.texinfo
+mostlyclean-vti:
+ -rm -f vti.tmp
-dvi: m4.dvi
+clean-vti:
+distclean-vti:
+
+maintainer-clean-vti:
+ -rm -f stamp-vti version.texi
+
+m4.info: m4.texinfo version.texi
m4.dvi: m4.texinfo version.texi
- $(TEXI2DVI) $(srcdir)/m4.texinfo
-version.texi: stamp-vti
-stamp-vti: m4.texinfo ../configure.in
- echo "@set EDITION $(VERSION)" > version.tmp
- echo "@set UPDATED `date '+%B %Y'`" >> version.tmp
- echo "@set VERSION $(VERSION)" >> version.tmp
- if cmp -s version.tmp $(srcdir)/version.texi; then rm version.tmp; \
- else mv version.tmp $(srcdir)/version.texi; fi
- date > $(srcdir)/stamp-vti
-
-install: all
- $(srcdir)/../mkinstalldirs $(infodir)
- cd $(srcdir) && for file in m4.info*; do \
- $(INSTALL_DATA) $$file $(infodir)/$$file; \
+
+DVIPS = dvips
+
+.texi.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texi.dvi:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo.dvi:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.txi.dvi:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @for file in $(INFO_DEPS); do \
+ d=$(srcdir); \
+ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ for file in $(INFO_DEPS); do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+
+uninstall-info:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ ii=yes; \
+ else ii=; fi; \
+ for file in $(INFO_DEPS); do \
+ test -z "$ii" \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+ done
+ @$(NORMAL_UNINSTALL)
+ for file in $(INFO_DEPS); do \
+ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+ done
+
+dist-info: $(INFO_DEPS)
+ for base in $(INFO_DEPS); do \
+ d=$(srcdir); \
+ for file in `cd $$d && eval echo $$base*`; do \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
done
-uninstall:
- rm -f $(infodir)/m4.info*
+mostlyclean-aminfo:
+ -rm -f m4.aux m4.cp m4.cps m4.dvi m4.fn m4.fns m4.ky m4.kys m4.ps \
+ m4.log m4.pg m4.toc m4.tp m4.tps m4.vr m4.vrs m4.op m4.tr \
+ m4.cv m4.cn
-mostlyclean:
- rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
- rm -f *.tmp
+clean-aminfo:
+
+distclean-aminfo:
+
+maintainer-clean-aminfo:
+ for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+tags: TAGS
+TAGS:
-clean: mostlyclean
-distclean: clean
- rm -f Makefile
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-realclean: distclean
- rm -f stamp-vti version.texi m4.info*
+subdir = doc
-dist: $(DISTFILES)
- @echo "Copying distribution files"
+distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
- ln $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/doc 2> /dev/null \
- || cp -p $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/doc; \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
done
+ $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+info: $(INFO_DEPS)
+dvi: $(DVIS)
+check: all
+ $(MAKE)
+installcheck:
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data: install-info-am
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall: uninstall-info
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
+
+clean: clean-vti clean-aminfo clean-generic mostlyclean
+
+distclean: distclean-vti distclean-aminfo distclean-generic clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-vti maintainer-clean-aminfo \
+ maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
+install-info-am uninstall-info mostlyclean-aminfo distclean-aminfo \
+clean-aminfo maintainer-clean-aminfo tags distdir info dvi installcheck \
+install-exec install-data install uninstall all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=doc/$@ CONFIG_HEADERS= ./config.status
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/doc/helptoman.pl b/doc/helptoman.pl
deleted file mode 100644
index f0039978..00000000
--- a/doc/helptoman.pl
+++ /dev/null
@@ -1,249 +0,0 @@
-#!/usr/bin/perl -w
-
-# Generate a short man page from --help and --version output.
-# Copyright 1997, 98 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require 5.003;
-
-use strict;
-use Getopt::Long;
-use POSIX 'strftime';
-
-my $RCS_Id = '$Id$';
-my $this_program = 'help2man';
-my $this_version = '0.0';
-
-if ($RCS_Id =~ /\$Id:\s+(\S+)\s+(\S+)/)
-{
- $this_version = $2;
- ($this_program = $1) =~ s/(\.pl)?,v$//;
-}
-
-my $version_info = <<EOT;
-$this_program $this_version
-
-Copyright (C) 1997, 98 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-EOT
-
-my $help_info = <<EOT;
-`$this_program' generates a man page out of `--help' and `--version' output.
-
-Usage: $this_program [OPTION]... EXECUTABLE
-
- --name=STRING use `STRING' as the description for the NAME paragraph
- --help print this help, then exit
- --version print $this_program program version number, then exit
-
-EXECUTABLE should accept `--help' and `version' options.
-EOT
-
-my ($name, $opt_help, $opt_version);
-
-# Parse options.
-GetOptions (
- 'name=s' => \$name,
- help => \$opt_help,
- version => \$opt_version,
-) or die $help_info;
-
-print $help_info and exit if $opt_help;
-print $version_info and exit if $opt_version;
-
-die $help_info unless @ARGV == 1;
-
-# Turn off localisation of executable's ouput.
-@ENV{qw(LANGUAGE LANG LC_ALL)} = qw(C C C);
-
-# Grab help and version paragraphs from executable
-my @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
- or die "$this_program: can't get `--help' info from $ARGV[0]\n";
-
-my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
- or die "$this_program: can't get `--version' info from $ARGV[0]\n";
-
-my $date = strftime "%B %Y", localtime;
-my $program = $ARGV[0]; $program =~ s!.*/!!;
-my $package = $program;
-my $version;
-
-# The first line of the --version information is assumed to be in one
-# of the following formats:
-#
-# <version>
-# <program> <version>
-# GNU <program> <version>
-# <program> (GNU <package>) <version>
-# <program> - GNU <package> <version>
-#
-
-$_ = shift @version;
-
-if (/^(\S+)\s+\((GNU\s+[^)]+)\)\s+(.*)/ ||
- /^(\S+)\s+-\s*(GNU\s+\S+)\s+(.*)/)
-{
- $program = $1;
- $package = $2;
- $version = $3;
-}
-elsif (/^(GNU\s+)?(\S+)\s+(.*)/)
-{
- $program = $2;
- $package = $1 ? "$1$2" : $2;
- $version = $3;
-}
-else
-{
- $version = $_;
-}
-
-# Default description for NAME paragraph
-$name ||= "short documentation for $program $version";
-
-# Man pages traditionally have the page title in caps.
-my $PROGRAM = uc $program;
-
-# Header.
-print <<EOT;
-.\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
-.TH $PROGRAM 1 "$date" "$package $version" "GNU User's Manual"
-.SH NAME
-$program \\- $name
-EOT
-
-my $accumulate = 1;
-my @description = ();
-
-sub convert_option;
-
-# Output converted --help information.
-for (@help)
-{
- chomp;
-
- if (s/^Usage:\s+\S+\s+(.*)\n?//)
- {
- # Turn the usage clause into a synopsis.
- print ".SH SYNOPSIS\n.B $program\n";
-
- my $syn = $1;
- $syn =~ s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
- s/^/\\fI/ unless $syn =~ s/^\\fR//;
-
- print "$syn\\fR\n";
-
- # Dump any accumulated description text.
- $accumulate = 0;
- print ".SH DESCRITION\n";
- print @description;
-
- next unless $_;
- }
-
- # Accumulate text if the synopsis has not been produced yet.
- if ($accumulate)
- {
- push @description, ".PP\n" if @description;
- push @description, "$_\n";
- next;
- }
-
- # Catch bug report text.
- if (/^Report bugs /)
- {
- print ".SH BUGS\n$_\n";
- next;
- }
-
- # Special case for tar 1.12: --label=NAME\nPATTERN.
- s{(\n[ \t]*)(-V,[ \t]+--label=NAME.*)\n[ \t]+PATTERN[ \t]+}
- {$1$2$1\\&...=PATTERN };
-
- # Convert options.
- s/(\s)(-[][\w=-]+|\\&\S+)/$1.convert_option $2/ge;
-
- # Option subsections have second line indented.
- print qq(.SS "$1"\n) if s/^(\S.*)\n(\s)/$2/;
-
- # Lines indented more than about 10 spaces may be assumed to be
- # continuations of the previous line.
- s/\n {10,}/ /g;
-
- # Indented paragraph.
- if (/^\s/)
- {
- for (split /\n/)
- {
- s/^\s+//;
- s/([^,])\s+/$1\n/;
- print ".TP\n$_\n";
- }
- }
- # Anything else.
- else
- {
- print ".PP\n$_\n";
- }
-}
-
-# Refer to the real documentation.
-
-print <<EOT;
-.SH SEE ALSO
-The full documentation for
-.B $program
-is maintained as a Texinfo manual. If the
-.B info
-and
-.B $program
-programs are properly installed at your site, the command
-.IP
-.B info $program
-.PP
-should allow you to access the manual as an hypertext.
-EOT
-
-# Output converted --version information.
-for (@version)
-{
- chomp;
-
- if (/^Copyright\s+\(C/) { print ".SH COPYRIGHT\n" }
- elsif (/^Written\s+by/) { print ".SH AUTHOR\n" }
- else { print ".PP\n"; }
-
- print "$_\n";
-}
-
-exit;
-
-# Convert option dashes to \- to stop nroff from hyphenating 'em, and
-# embolden. Option arguments get italicised.
-sub convert_option
-{
- my $option = '\fB' . shift;
-
- $option =~ s/-/\\-/g;
- unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
- {
- $option =~ s/=(.)/\\fR=\\fI$1/;
- $option .= '\fR';
- }
-
- $option;
-}
diff --git a/doc/m4.1 b/doc/m4.1
deleted file mode 100644
index beb6a584..00000000
--- a/doc/m4.1
+++ /dev/null
@@ -1,121 +0,0 @@
-." DO NOT MODIFY THIS FILE! It was generated by helptoman 1.1.1.1.
-.TH M4 1 "October 1998" "GNU m4 1.4h" "GNU User's Manual"
-.SH NAME
-m4 \- short documentation for m4 1.4h
-.SH SYNOPSIS
-.B m4
-[\fIOPTION\fR]...\fI \fR[\fIFILE\fR]...\fI\fR
-.SH DESCRITION
-.PP
-Mandatory or optional arguments to long options are mandatory or optional
-for short options too.
-.SS "Operation modes:"
-.TP
-\fB\-\-help\fR
-display this help and exit
-.TP
-\fB\-\-version\fR
-output version information and exit
-.TP
-\fB\-e\fR, \fB\-\-interactive\fR
-unbuffer output, ignore interrupts
-.TP
-\fB\-E\fR, \fB\-\-fatal\-warnings\fR
-stop execution after first warning
-.TP
-\fB\-Q\fR, \fB\-\-quiet\fR, \fB\-\-silent\fR
-suppress some warnings for builtins
-.TP
-\fB\-P\fR, \fB\-\-prefix\-builtins\fR
-force a `m4_' prefix to all builtins
-.SS "Preprocessor features:"
-.TP
-\fB\-I\fR, \fB\-\-include\fR=\fIDIRECTORY\fR
-search this directory second for includes
-.TP
-\fB\-D\fR, \fB\-\-define=NAME\fR[=\fIVALUE\fR]
-enter NAME has having VALUE, or empty
-.TP
-\fB\-U\fR, \fB\-\-undefine\fR=\fINAME\fR
-delete builtin NAME
-.TP
-\fB\-s\fR, \fB\-\-synclines\fR
-generate `#line NO "FILE"' lines
-.SS "Limits control:"
-.TP
-\fB\-G\fR, \fB\-\-traditional\fR
-suppress all GNU extensions
-.TP
-\fB\-H\fR, \fB\-\-hashsize\fR=\fIPRIME\fR
-set symbol lookup hash table size
-.TP
-\fB\-L\fR, \fB\-\-nesting\-limit\fR=\fINUMBER\fR
-change artificial nesting limit
-.SS "Frozen state files:"
-.TP
-\fB\-F\fR, \fB\-\-freeze\-state\fR=\fIFILE\fR
-produce a frozen state on FILE at end
-.TP
-\fB\-R\fR, \fB\-\-reload\-state\fR=\fIFILE\fR
-reload a frozen state from FILE at start
-.SS "Debugging:"
-.TP
-\fB\-d\fR, \fB\-\-debug\fR=\fI[FLAGS]\fR
-set debug level (no FLAGS implies `aeq')
-.TP
-\fB\-t\fR, \fB\-\-trace\fR=\fINAME\fR
-trace NAME when it will be defined
-.TP
-\fB\-l\fR, \fB\-\-arglength\fR=\fINUM\fR
-restrict macro tracing size
-.TP
-\fB\-o\fR, \fB\-\-error\-output\fR=\fIFILE\fR
-redirect debug and trace output
-.SS "FLAGS is any of:"
-.TP
-t
-trace for all macro calls, not only traceon'ed
-.TP
-a
-show actual arguments
-.TP
-e
-show expansion
-.TP
-q
-quote values as necessary, with a or e flag
-.TP
-c
-show before collect, after collect and after call
-.TP
-x
-add a unique macro call id, useful with c flag
-.TP
-f
-say current input file name
-.TP
-l
-say current input line number
-.TP
-p
-show results of path searches
-.TP
-i
-show changes in input files
-.TP
-V
-shorthand for all of the above flags
-.PP
-If no FILE or if FILE is `-', standard input is read.
-.SH SEE ALSO
-The full documentation for
-.B m4
-is maintained as a Texinfo manual. If the
-.B info
-and
-.B m4
-programs are properly installed at your site, the command
-.IP
-.B info m4
-.PP
-should allow you to access the manual as an hypertext.
diff --git a/doc/m4.info b/doc/m4.info
index d3db9c3e..58a3b965 100644
--- a/doc/m4.info
+++ b/doc/m4.info
@@ -1,5 +1,5 @@
-This is Info file m4.info, produced by Makeinfo-1.55 from the input
-file m4.texinfo.
+This is Info file m4.info, produced by Makeinfo version 1.68 from the
+input file m4.texinfo.
START-INFO-DIR-ENTRY
* m4: (m4). A powerful macro processor.
@@ -26,87 +26,87 @@ translation approved by the Foundation.

Indirect:
-m4.info-1: 959
-m4.info-2: 50733
-m4.info-3: 97497
+m4.info-1: 967
+m4.info-2: 50741
+m4.info-3: 97535

Tag Table:
(Indirect)
-Node: Top959
-Node: Preliminaries6959
-Node: Intro7684
-Node: History9292
-Node: Invoking m410213
-Node: Bugs17007
-Node: Manual18275
-Node: Syntax19641
-Node: Names20228
-Node: Quoted strings20602
-Node: Other tokens21186
-Node: Comments21403
-Node: Macros22065
-Node: Invocation22558
-Node: Inhibiting Invocation23369
-Node: Macro Arguments26514
-Node: Quoting Arguments27778
-Node: Macro expansion28583
-Node: Definitions29246
-Node: Define30023
-Node: Arguments30834
-Node: Pseudo Arguments32315
-Node: Undefine34166
-Node: Defn34828
-Node: Pushdef35985
-Node: Indir37821
-Node: Builtin38583
-Node: Conditionals39027
-Node: Ifdef39734
-Node: Ifelse40503
-Node: Loops42269
-Node: Debugging45542
-Node: Dumpdef46121
-Node: Trace46969
-Node: Debug Levels48348
-Node: Debug Output50733
-Node: Input Control51253
-Node: Dnl51790
-Node: Changequote52916
-Node: Changecom54280
-Node: Changeword55564
-Node: M4wrap58767
-Node: File Inclusion59969
-Node: Include60285
-Node: Search Path62213
-Node: Diversions63000
-Node: Divert64237
-Node: Undivert65369
-Node: Divnum67304
-Node: Cleardiv67849
-Node: Text handling68885
-Node: Len69605
-Node: Index70003
-Node: Regexp70588
-Node: Substr71679
-Node: Translit72299
-Node: Patsubst73742
-Node: Format75833
-Node: Arithmetic77322
-Node: Incr77767
-Node: Eval78271
-Node: UNIX commands81270
-Node: Syscmd81741
-Node: Esyscmd82454
-Node: Sysval83400
-Node: Maketemp83807
-Node: Miscellaneous84864
-Node: Errprint85233
-Node: M4exit86224
-Node: Frozen files87010
-Node: Compatibility91906
-Node: Extensions92524
-Node: Incompatibilities94892
-Node: Other Incompat95334
-Node: Concept index97497
-Node: Macro index104371
+Node: Top967
+Node: Preliminaries6967
+Node: Intro7692
+Node: History9300
+Node: Invoking m410221
+Node: Bugs17015
+Node: Manual18283
+Node: Syntax19649
+Node: Names20236
+Node: Quoted strings20610
+Node: Other tokens21194
+Node: Comments21411
+Node: Macros22073
+Node: Invocation22566
+Node: Inhibiting Invocation23377
+Node: Macro Arguments26522
+Node: Quoting Arguments27786
+Node: Macro expansion28591
+Node: Definitions29254
+Node: Define30031
+Node: Arguments30842
+Node: Pseudo Arguments32323
+Node: Undefine34174
+Node: Defn34836
+Node: Pushdef35993
+Node: Indir37829
+Node: Builtin38591
+Node: Conditionals39035
+Node: Ifdef39742
+Node: Ifelse40511
+Node: Loops42277
+Node: Debugging45550
+Node: Dumpdef46129
+Node: Trace46977
+Node: Debug Levels48356
+Node: Debug Output50741
+Node: Input Control51261
+Node: Dnl51798
+Node: Changequote52924
+Node: Changecom54288
+Node: Changeword55572
+Node: M4wrap58781
+Node: File Inclusion59983
+Node: Include60299
+Node: Search Path62227
+Node: Diversions63014
+Node: Divert64251
+Node: Undivert65383
+Node: Divnum67318
+Node: Cleardiv67863
+Node: Text handling68899
+Node: Len69619
+Node: Index70017
+Node: Regexp70602
+Node: Substr71693
+Node: Translit72313
+Node: Patsubst73756
+Node: Format75847
+Node: Arithmetic77336
+Node: Incr77781
+Node: Eval78285
+Node: UNIX commands81284
+Node: Syscmd81755
+Node: Esyscmd82468
+Node: Sysval83414
+Node: Maketemp83821
+Node: Miscellaneous84878
+Node: Errprint85247
+Node: M4exit86238
+Node: Frozen files87024
+Node: Compatibility91944
+Node: Extensions92562
+Node: Incompatibilities94930
+Node: Other Incompat95372
+Node: Concept index97535
+Node: Macro index104540

End Tag Table
diff --git a/doc/m4.info-1 b/doc/m4.info-1
index d829eb0a..75d7e52c 100644
--- a/doc/m4.info-1
+++ b/doc/m4.info-1
@@ -1,5 +1,5 @@
-This is Info file m4.info, produced by Makeinfo-1.55 from the input
-file m4.texinfo.
+This is Info file m4.info, produced by Makeinfo version 1.68 from the
+input file m4.texinfo.
START-INFO-DIR-ENTRY
* m4: (m4). A powerful macro processor.
@@ -42,7 +42,7 @@ 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.4. It is now to be considered stable, future
+ This is release 1.4c. It is now to be considered stable, future
releases are only meant to fix bugs, increase speed, or improve
documentation. However...
@@ -85,7 +85,6 @@ Introduction and preliminaries
* Intro:: Introduction to `m4'
* History:: Historical references
-
* Invoking m4:: Invoking `m4'
* Bugs:: Problems and bugs
* Manual:: Using this manual
diff --git a/doc/m4.info-2 b/doc/m4.info-2
index aedf6a64..c67f1d2a 100644
--- a/doc/m4.info-2
+++ b/doc/m4.info-2
@@ -1,5 +1,5 @@
-This is Info file m4.info, produced by Makeinfo-1.55 from the input
-file m4.texinfo.
+This is Info file m4.info, produced by Makeinfo version 1.68 from the
+input file m4.texinfo.
START-INFO-DIR-ENTRY
* m4: (m4). A powerful macro processor.
@@ -255,8 +255,8 @@ Then, the `m4' version:
=>@a
In the TeX example, the first line defines a macro `a' to print the
-message `Hello'. The second line defines @ to be usable instead of \
-as an escape character. The third line defines \ to be a normal
+message `Hello'. The second line defines <@> to be usable instead of
+<\> as an escape character. The third line defines <\> to be a normal
printing character, not an escape. The fourth line invokes the macro
`a'. So, when TeX is run on this file, it displays the message `Hello'.
@@ -1293,32 +1293,32 @@ Search Path::.).
a frozen file one 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
+with a capital letter and ending with a newline (<NL>). Wherever a
directive is expected, the character `#' introduces a comment line,
empty lines are also ignored. In the following descriptions, LENGTHs
always refer to corresponding STRINGs. Numbers are always expressed in
decimal. The directives are:
-`V NUMBER NL'
+`V NUMBER <NL>'
Confirms the format of the file. NUMBER should be 1.
-`C LENGTH1 , LENGTH2 NL STRING1 STRING2 NL'
+`C LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
Uses STRING1 and STRING2 as the beginning comment and end comment
strings.
-`Q LENGTH1 , LENGTH2 NL STRING1 STRING2 NL'
+`Q LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
Uses STRING1 and STRING2 as the beginning quote and end quote
strings.
-`F LENGTH1 , LENGTH2 NL STRING1 STRING2 NL'
+`F LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
Defines, through `pushdef', a definition for STRING1 expanding to
the function whose builtin name is STRING2.
-`T LENGTH1 , LENGTH2 NL STRING1 STRING2 NL'
+`T LENGTH1 , LENGTH2 <NL> STRING1 STRING2 <NL>'
Defines, though `pushdef', a definition for STRING1 expanding to
the text given by STRING2.
-`D NUMBER, LENGTH NL STRING NL'
+`D NUMBER, LENGTH <NL> STRING <NL>'
Selects diversion NUMBER, making it current, then copy STRING in
the current diversion. NUMBER may be a negative number for a
non-existing diversion. To merely specify an active selection,
diff --git a/doc/m4.info-3 b/doc/m4.info-3
index c21385ea..bd0258a2 100644
--- a/doc/m4.info-3
+++ b/doc/m4.info-3
@@ -1,5 +1,5 @@
-This is Info file m4.info, produced by Makeinfo-1.55 from the input
-file m4.texinfo.
+This is Info file m4.info, produced by Makeinfo version 1.68 from the
+input file m4.texinfo.
START-INFO-DIR-ENTRY
* m4: (m4). A powerful macro processor.
@@ -32,139 +32,139 @@ Concept index
* Menu:
-* Arguments to macros: Arguments.
-* arguments to macros: Macro Arguments.
-* arguments to macros, special: Pseudo Arguments.
-* arguments, quoted macro: Quoting Arguments.
-* arithmetic: Arithmetic.
-* builtins, indirect call of: Builtin.
-* call of builtins, indirect: Builtin.
-* call of macros, indirect: Indir.
-* changing comment delimiters: Changecom.
-* changing the quote delimiters: Changequote.
-* characters, translating: Translit.
-* command line, filenames on the: Invoking m4.
+* arguments to macros: Macro Arguments.
+* Arguments to macros: Arguments.
+* arguments to macros, special: Pseudo Arguments.
+* arguments, quoted macro: Quoting Arguments.
+* arithmetic: Arithmetic.
+* builtins, indirect call of: Builtin.
+* call of builtins, indirect: Builtin.
+* call of macros, indirect: Indir.
+* changing comment delimiters: Changecom.
+* changing the quote delimiters: Changequote.
+* characters, translating: Translit.
+* command line, filenames on the: Invoking m4.
* command line, macro definitions on the: Invoking m4.
-* command line, options: Invoking m4.
-* commands, exit code from UNIX: Sysval.
-* commands, running UNIX: UNIX commands.
-* comment delimiters, changing: Changecom.
-* comments: Comments.
-* comments, copied to output: Changecom.
-* comparing strings: Ifelse.
-* compatibility: Compatibility.
-* conditionals: Ifdef.
-* controlling debugging output: Debug Levels.
-* counting loops: Loops.
-* debugging output, controlling: Debug Levels.
-* debugging output, saving: Debug Output.
-* decrement operator: Incr.
-* defining new macros: Definitions.
-* definitions, displaying macro: Dumpdef.
-* deleting macros: Undefine.
-* deleting whitespace in input: Dnl.
-* discarding diverted text: Cleardiv.
-* displaying macro definitions: Dumpdef.
-* diversion numbers: Divnum.
-* diverted text, discarding: Cleardiv.
-* diverting output to files: Divert.
-* dumping into frozen file: Frozen files.
-* error messages, printing: Errprint.
-* evaluation, of integer expressions: Eval.
-* executing UNIX commands: UNIX commands.
-* exit code from UNIX commands: Sysval.
-* exiting from m4: M4exit.
-* expansion of macros: Macro expansion.
-* expansion, tracing macro: Trace.
-* expressions, evaluation of integer: Eval.
-* extracting substrings: Substr.
-* fast loading of frozen files: Frozen files.
-* file inclusion: Undivert.
-* file inclusion: File Inclusion.
-* filenames, on the command line: Invoking m4.
-* files, diverting output to: Divert.
-* files, names of temporary: Maketemp.
-* forloops: Loops.
-* formatted output: Format.
-* frozen files for fast loading: Frozen files.
-* GNU extensions: Extensions.
-* GNU extensions: Frozen files.
-* GNU extensions: Esyscmd.
-* GNU extensions: Format.
-* GNU extensions: Patsubst.
-* GNU extensions: Regexp.
-* GNU extensions: Undivert.
-* GNU extensions: Search Path.
-* GNU extensions: Debug Output.
-* GNU extensions: Debug Levels.
-* GNU extensions: Builtin.
-* GNU extensions: Indir.
-* GNU extensions: Arguments.
-* included files, search path for: Search Path.
-* inclusion, of files: Undivert.
-* inclusion, of files: File Inclusion.
-* increment operator: Incr.
-* indirect call of builtins: Builtin.
-* indirect call of macros: Indir.
-* initialization, frozen states: Frozen files.
-* input tokens: Syntax.
-* input, saving: M4wrap.
-* integer arithmetic: Arithmetic.
-* integer expression evaluation: Eval.
-* length of strings: Len.
-* lexical structure of words: Changeword.
-* loops: Loops.
-* loops, counting: Loops.
+* command line, options: Invoking m4.
+* commands, exit code from UNIX: Sysval.
+* commands, running UNIX: UNIX commands.
+* comment delimiters, changing: Changecom.
+* comments: Comments.
+* comments, copied to output: Changecom.
+* comparing strings: Ifelse.
+* compatibility: Compatibility.
+* conditionals: Ifdef.
+* controlling debugging output: Debug Levels.
+* counting loops: Loops.
+* debugging output, controlling: Debug Levels.
+* debugging output, saving: Debug Output.
+* decrement operator: Incr.
+* defining new macros: Definitions.
+* definitions, displaying macro: Dumpdef.
+* deleting macros: Undefine.
+* deleting whitespace in input: Dnl.
+* discarding diverted text: Cleardiv.
+* displaying macro definitions: Dumpdef.
+* diversion numbers: Divnum.
+* diverted text, discarding: Cleardiv.
+* diverting output to files: Divert.
+* dumping into frozen file: Frozen files.
+* error messages, printing: Errprint.
+* evaluation, of integer expressions: Eval.
+* executing UNIX commands: UNIX commands.
+* exit code from UNIX commands: Sysval.
+* exiting from m4: M4exit.
+* expansion of macros: Macro expansion.
+* expansion, tracing macro: Trace.
+* expressions, evaluation of integer: Eval.
+* extracting substrings: Substr.
+* fast loading of frozen files: Frozen files.
+* file inclusion <1>: Undivert.
+* file inclusion: File Inclusion.
+* filenames, on the command line: Invoking m4.
+* files, diverting output to: Divert.
+* files, names of temporary: Maketemp.
+* forloops: Loops.
+* formatted output: Format.
+* frozen files for fast loading: Frozen files.
+* GNU extensions <1>: Undivert.
+* GNU extensions <2>: Indir.
+* GNU extensions <3>: Regexp.
+* GNU extensions <4>: Search Path.
+* GNU extensions <5>: Esyscmd.
+* GNU extensions <6>: Builtin.
+* GNU extensions <7>: Arguments.
+* GNU extensions <8>: Extensions.
+* GNU extensions <9>: Patsubst.
+* GNU extensions <10>: Format.
+* GNU extensions <11>: Frozen files.
+* GNU extensions <12>: Debug Output.
+* GNU extensions: Debug Levels.
+* included files, search path for: Search Path.
+* inclusion, of files <1>: File Inclusion.
+* inclusion, of files: Undivert.
+* increment operator: Incr.
+* indirect call of builtins: Builtin.
+* indirect call of macros: Indir.
+* initialization, frozen states: Frozen files.
+* input tokens: Syntax.
+* input, saving: M4wrap.
+* integer arithmetic: Arithmetic.
+* integer expression evaluation: Eval.
+* length of strings: Len.
+* lexical structure of words: Changeword.
+* loops: Loops.
+* loops, counting: Loops.
* macro definitions, on the command line: Invoking m4.
-* macro expansion, tracing: Trace.
-* macro invocation: Invocation.
-* macros, arguments to: Arguments.
-* macros, arguments to: Macro Arguments.
-* macros, displaying definitions: Dumpdef.
-* macros, expansion of: Macro expansion.
-* macros, how to define new: Definitions.
-* macros, how to delete: Undefine.
-* macros, how to rename: Defn.
-* macros, indirect call of: Indir.
-* macros, quoted arguments to: Quoting Arguments.
-* macros, recursive: Loops.
-* macros, special arguments to: Pseudo Arguments.
-* macros, temporary redefinition of: Pushdef.
-* messages, printing error: Errprint.
-* multibranches: Ifelse.
-* names: Names.
-* options, command line: Invoking m4.
-* output, diverting to files: Divert.
-* output, formatted: Format.
-* output, saving debugging: Debug Output.
-* pattern substitution: Patsubst.
-* printing error messages: Errprint.
-* quote delimiters, changing the: Changequote.
-* quoted macro arguments: Quoting Arguments.
-* quoted string: Quoted strings.
-* recursive macros: Loops.
-* redefinition of macros, temporary: Pushdef.
-* regular expressions: Patsubst.
-* regular expressions: Regexp.
-* reloading a frozen file: Frozen files.
-* renaming macros: Defn.
-* running UNIX commands: UNIX commands.
-* saving debugging output: Debug Output.
-* saving input: M4wrap.
-* search path for included files: Search Path.
-* special arguments to macros: Pseudo Arguments.
-* strings, length of: Len.
-* substitution by regular expression: Patsubst.
-* substrings, extracting: Substr.
-* temporary filenames: Maketemp.
-* temporary redefinition of macros: Pushdef.
-* tokens: Syntax.
-* tracing macro expansion: Trace.
-* translating characters: Translit.
-* undefining macros: Undefine.
-* UNIX commands, exit code from: Sysval.
-* UNIX commands, running: UNIX commands.
-* words, lexical structure of: Changeword.
+* macro expansion, tracing: Trace.
+* macro invocation: Invocation.
+* macros, arguments to <1>: Arguments.
+* macros, arguments to: Macro Arguments.
+* macros, displaying definitions: Dumpdef.
+* macros, expansion of: Macro expansion.
+* macros, how to define new: Definitions.
+* macros, how to delete: Undefine.
+* macros, how to rename: Defn.
+* macros, indirect call of: Indir.
+* macros, quoted arguments to: Quoting Arguments.
+* macros, recursive: Loops.
+* macros, special arguments to: Pseudo Arguments.
+* macros, temporary redefinition of: Pushdef.
+* messages, printing error: Errprint.
+* multibranches: Ifelse.
+* names: Names.
+* options, command line: Invoking m4.
+* output, diverting to files: Divert.
+* output, formatted: Format.
+* output, saving debugging: Debug Output.
+* pattern substitution: Patsubst.
+* printing error messages: Errprint.
+* quote delimiters, changing the: Changequote.
+* quoted macro arguments: Quoting Arguments.
+* quoted string: Quoted strings.
+* recursive macros: Loops.
+* redefinition of macros, temporary: Pushdef.
+* regular expressions <1>: Regexp.
+* regular expressions: Patsubst.
+* reloading a frozen file: Frozen files.
+* renaming macros: Defn.
+* running UNIX commands: UNIX commands.
+* saving debugging output: Debug Output.
+* saving input: M4wrap.
+* search path for included files: Search Path.
+* special arguments to macros: Pseudo Arguments.
+* strings, length of: Len.
+* substitution by regular expression: Patsubst.
+* substrings, extracting: Substr.
+* temporary filenames: Maketemp.
+* temporary redefinition of macros: Pushdef.
+* tokens: Syntax.
+* tracing macro expansion: Trace.
+* translating characters: Translit.
+* undefining macros: Undefine.
+* UNIX commands, exit code from: Sysval.
+* UNIX commands, running: UNIX commands.
+* words, lexical structure of: Changeword.

File: m4.info, Node: Macro index, Prev: Concept index, Up: Top
@@ -178,50 +178,50 @@ these characters removed in the index.
* Menu:
-* builtin: Builtin.
-* changecom: Changecom.
-* changequote: Changequote.
-* changeword: Changeword.
-* debugfile: Debug Output.
-* debugmode: Debug Levels.
-* decr: Incr.
-* define: Define.
-* defn: Defn.
-* divert: Divert.
-* divnum: Divnum.
-* dnl: Dnl.
-* dumpdef: Dumpdef.
-* errprint: Errprint.
-* esyscmd: Esyscmd.
-* eval: Eval.
-* file: Errprint.
-* format: Format.
-* gnu: Other Incompat.
-* ifdef: Ifdef.
-* ifelse: Ifelse.
-* include: Include.
-* incr: Incr.
-* index: Index.
-* indir: Indir.
-* len: Len.
-* line: Errprint.
-* m4exit: M4exit.
-* m4wrap: M4wrap.
-* maketemp: Maketemp.
-* patsubst: Patsubst.
-* popdef: Pushdef.
-* pushdef: Pushdef.
-* regexp: Regexp.
-* shift: Loops.
-* sinclude: Include.
-* substr: Substr.
-* syscmd: Syscmd.
-* sysval: Sysval.
-* traceoff: Trace.
-* traceon: Trace.
-* translit: Translit.
-* undefine: Undefine.
-* undivert: Undivert.
-* unix: Other Incompat.
+* builtin: Builtin.
+* changecom: Changecom.
+* changequote: Changequote.
+* changeword: Changeword.
+* debugfile: Debug Output.
+* debugmode: Debug Levels.
+* decr: Incr.
+* define: Define.
+* defn: Defn.
+* divert: Divert.
+* divnum: Divnum.
+* dnl: Dnl.
+* dumpdef: Dumpdef.
+* errprint: Errprint.
+* esyscmd: Esyscmd.
+* eval: Eval.
+* file: Errprint.
+* format: Format.
+* gnu: Other Incompat.
+* ifdef: Ifdef.
+* ifelse: Ifelse.
+* include: Include.
+* incr: Incr.
+* index: Index.
+* indir: Indir.
+* len: Len.
+* line: Errprint.
+* m4exit: M4exit.
+* m4wrap: M4wrap.
+* maketemp: Maketemp.
+* patsubst: Patsubst.
+* popdef: Pushdef.
+* pushdef: Pushdef.
+* regexp: Regexp.
+* shift: Loops.
+* sinclude: Include.
+* substr: Substr.
+* syscmd: Syscmd.
+* sysval: Sysval.
+* traceoff: Trace.
+* traceon: Trace.
+* translit: Translit.
+* undefine: Undefine.
+* undivert: Undivert.
+* unix: Other Incompat.
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 5d3f36bf..8184174a 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -139,7 +139,6 @@ Introduction and preliminaries
* Intro:: Introduction to @code{m4}
* History:: Historical references
-
* Invoking m4:: Invoking @code{m4}
* Bugs:: Problems and bugs
* Manual:: Using this manual
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 61e47e5d..49d6518e 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1 +1,3 @@
-Sat Nov 5 22:46:26 EST 1994
+@set UPDATED 6 October 1997
+@set EDITION 1.4c
+@set VERSION 1.4c
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 93bc18f6..3105f3b1 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -1,6 +1,8 @@
-%% TeX macros to handle texinfo files
+%% TeX macros to handle Texinfo files.
+%% $Id$
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
+% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
+% 94, 95, 96, 97 Free Software Foundation, Inc.
%This texinfo.tex file is free software; you can redistribute it and/or
%modify it under the terms of the GNU General Public License as
@@ -14,38 +16,50 @@
%You should have received a copy of the GNU General Public License
%along with this texinfo.tex file; see the file COPYING. If not, write
-%to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
-%USA.
+%to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+%Boston, MA 02111-1307, USA.
%In other words, you are welcome to use, share and improve this program.
%You are forbidden to forbid anyone else to use, share and improve
%what you give them. Help stamp out software-hoarding!
+
+% Send bug reports to bug-texinfo@prep.ai.mit.edu.
+% Please include a *precise* test case in each bug report.
+
+
+% Make it possible to create a .fmt file just by loading this file:
+% if the underlying format is not loaded, start by loading it now.
+% Added by gildea November 1993.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
\deftexinfoversion$Revision$
\message{Loading texinfo package [Version \texinfoversion]:}
-% Print the version number if in a .fmt file.
-\everyjob{\message{[Texinfo version \texinfoversion]}\message{}}
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}\message{}
+ \catcode`+=\active \catcode`\_=\active}
% Save some parts of plain tex whose names we will redefine.
-\let\ptextilde=\~
-\let\ptexlbrace=\{
-\let\ptexrbrace=\}
-\let\ptexdots=\dots
-\let\ptexdot=\.
-\let\ptexstar=\*
-\let\ptexend=\end
-\let\ptexbullet=\bullet
\let\ptexb=\b
+\let\ptexbullet=\bullet
\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv = \equiv
\let\ptexi=\i
+\let\ptexlbrace=\{
+\let\ptexrbrace=\}
+\let\ptexstar=\*
\let\ptext=\t
-\let\ptexl=\l
-\let\ptexL=\L
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
@@ -53,9 +67,12 @@
% since \penalty is valid in vertical mode, we'd end up putting the
% penalty on the vertical list instead of in the new paragraph.
{\catcode`@ = 11
- \gdef\tie{\leavevmode\penalty\@M\ }
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
}
-\let\~ = \tie % And make it available as @~.
+
\message{Basics,}
\chardef\other=12
@@ -86,10 +103,9 @@
\hyphenation{eshell}
% Margin to add to right of even pages, to left of odd pages.
-\newdimen \bindingoffset \bindingoffset=0pt
-\newdimen \normaloffset \normaloffset=\hoffset
+\newdimen \bindingoffset
+\newdimen \normaloffset
\newdimen\pagewidth \newdimen\pageheight
-\pagewidth=\hsize \pageheight=\vsize
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
@@ -110,7 +126,7 @@
\newdimen\cornerlong \newdimen\cornerthick
\newdimen \topandbottommargin
\newdimen \outerhsize \newdimen \outervsize
-\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
+\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
\outerhsize=7in
%\outervsize=9.5in
% Alternative @smallbook page size is 9.25in
@@ -119,16 +135,42 @@
%
%---------------------End change-----------------------
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox \newbox\footlinebox
+
% \onepageout takes a vbox as an argument. Note that \pagecontents
-% does insertions itself, but you have to call it yourself.
-\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
-\def\onepageout#1{\hoffset=\normaloffset
-\ifodd\pageno \advance\hoffset by \bindingoffset
-\else \advance\hoffset by -\bindingoffset\fi
-{\escapechar=`\\\relax % makes sure backslash is used in output files.
-\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
-{\let\hsize=\pagewidth \makefootline}}}%
-\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+ \hoffset=\normaloffset
+ \ifodd\pageno \advance\hoffset by \bindingoffset
+ \else \advance\hoffset by -\bindingoffset\fi
+ %
+ % Do this outside of the \shipout so @code etc. will be expanded in
+ % the headline as they should be, not taken literally (outputting ''code).
+ \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ {%
+ % Have to do this stuff outside the \shipout because we want it to
+ % take effect in \write's, yet the group defined by the \vbox ends
+ % before the \shipout runs.
+ %
+ \escapechar = `\\ % use backslash in output files.
+ \indexdummies % don't expand commands in the output.
+ \normalturnoffactive % \ in index entries must not stay \, e.g., if
+ % the page break happens to be in the middle of an example.
+ \shipout\vbox{%
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \unvbox\footlinebox
+ }%
+ }%
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
%%%% For @cropmarks command %%%%
@@ -140,8 +182,8 @@
%
\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
{\escapechar=`\\\relax % makes sure backslash is used in output files.
- \shipout
- \vbox to \outervsize{\hsize=\outerhsize
+ \shipout
+ \vbox to \outervsize{\hsize=\outerhsize
\vbox{\line{\ewtop\hfill\ewtop}}
\nointerlineskip
\line{\vbox{\moveleft\cornerthick\nstop}
@@ -149,28 +191,33 @@
\vbox{\moveright\cornerthick\nstop}}
\vskip \topandbottommargin
\centerline{\ifodd\pageno\hskip\bindingoffset\fi
- \vbox{
- {\let\hsize=\pagewidth \makeheadline}
- \pagebody{#1}
- {\let\hsize=\pagewidth \makefootline}}
- \ifodd\pageno\else\hskip\bindingoffset\fi}
- \vskip \topandbottommargin plus1fill minus1fill
+ \vbox{
+ {\let\hsize=\pagewidth \makeheadline}
+ \pagebody{#1}
+ {\let\hsize=\pagewidth \makefootline}}
+ \ifodd\pageno\else\hskip\bindingoffset\fi}
+ \vskip \topandbottommargin plus1fill minus1fill
\boxmaxdepth\cornerthick
\line{\vbox{\moveleft\cornerthick\nsbot}
\hfill
\vbox{\moveright\cornerthick\nsbot}}
\nointerlineskip
\vbox{\line{\ewbot\hfill\ewbot}}
- }}
+ }}
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi}
%
% Do @cropmarks to get crop marks
\def\cropmarks{\let\onepageout=\croppageout }
+\newinsert\margin \dimen\margin=\maxdimen
+
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
\dimen@=\dp#1 \unvbox#1
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
@@ -344,11 +391,43 @@
%\def\'{{'}}
% Used to generate quoted braces.
-
\def\mylbrace {{\tt \char '173}}
\def\myrbrace {{\tt \char '175}}
\let\{=\mylbrace
\let\}=\myrbrace
+\begingroup
+ % Definitions to produce actual \{ & \} command in an index.
+ \catcode`\{ = 12 \catcode`\} = 12
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\@ = 0 \catcode`\\ = 12
+ @gdef@lbracecmd[\{]%
+ @gdef@rbracecmd[\}]%
+@endgroup
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown
+% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ptexi
+ \else\ifx\temp\jmacro \j
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
% @: forces normal size whitespace following.
\def\:{\spacefactor=1000 }
@@ -515,17 +594,34 @@ where each line of input produces a line of output.}
\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
\leftline{\hskip\leftskip{\rm#1}}}}
+% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
+
+\def\inmargin#1{%
+\strut\vadjust{\nobreak\kern-\strutdepth
+ \vtop to \strutdepth{\baselineskip\strutdepth\vss
+ \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}}
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+
%\hbox{{\rm#1}}\hfil\break}}
% @include file insert text of that file as input.
-
-\def\include{\parsearg\includezzz}
-%Use \input\thisfile to avoid blank after \input, which may be an active
-%char (in which case the blank would become the \input argument).
-%The grouping keeps the value of \thisfile correct even when @include
-%is nested.
-\def\includezzz #1{\begingroup
-\def\thisfile{#1}\input\thisfile
+% Allow normal characters that we make active in the argument (a file name).
+\def\include{\begingroup
+ \catcode`\\=12
+ \catcode`~=12
+ \catcode`^=12
+ \catcode`_=12
+ \catcode`|=12
+ \catcode`<=12
+ \catcode`>=12
+ \catcode`+=12
+ \parsearg\includezzz}
+% Restore active chars for included file.
+\def\includezzz#1{\endgroup\begingroup
+ % Read the included file in a group so nested @include's work.
+ \def\thisfile{#1}%
+ \input\thisfile
\endgroup}
\def\thisfile{}
@@ -540,7 +636,7 @@ where each line of input produces a line of output.}
% @sp n outputs n lines of vertical space
\def\sp{\parsearg\spxxx}
-\def\spxxx #1{\par \vskip #1\baselineskip}
+\def\spxxx #1{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
@@ -553,6 +649,9 @@ where each line of input produces a line of output.}
\let\c=\comment
+% @paragraphindent is defined for the Info formatting commands only.
+\let\paragraphindent=\comment
+
% Prevent errors for section commands.
% Used in @ignore and in failing conditionals.
\def\ignoresections{%
@@ -587,6 +686,7 @@ where each line of input produces a line of output.}
% incorrectly.
%
\def\ignoremorecommands{%
+ \let\defcodeindex = \relax
\let\defcv = \relax
\let\deffn = \relax
\let\deffnx = \relax
@@ -610,6 +710,15 @@ where each line of input produces a line of output.}
\let\printindex = \relax
\let\pxref = \relax
\let\settitle = \relax
+ \let\setchapternewpage = \relax
+ \let\setchapterstyle = \relax
+ \let\everyheading = \relax
+ \let\evenheading = \relax
+ \let\oddheading = \relax
+ \let\everyfooting = \relax
+ \let\evenfooting = \relax
+ \let\oddfooting = \relax
+ \let\headings = \relax
\let\include = \relax
\let\lowersections = \relax
\let\down = \relax
@@ -618,7 +727,6 @@ where each line of input produces a line of output.}
\let\set = \relax
\let\clear = \relax
\let\item = \relax
- \let\message = \relax
}
% Ignore @ignore ... @end ignore.
@@ -633,6 +741,16 @@ where each line of input produces a line of output.}
\def\menu{\doignore{menu}}
\def\direntry{\doignore{direntry}}
+% Also ignore @macro ... @end macro. The user must run texi2dvi,
+% which runs makeinfo to do macro expansion. Ignore @unmacro, too.
+\def\macro{\doignore{macro}}
+\let\unmacro = \comment
+
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory = \comment
+
% Ignore text until a line `@end #1'.
%
\def\doignore#1{\begingroup
@@ -664,11 +782,12 @@ where each line of input produces a line of output.}
\immediate\write16{If you are running another version of TeX, relax.}
\immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
\immediate\write16{ Then upgrade your TeX installation if you can.}
+ \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
\immediate\write16{If you are stuck with version 3.0, run the}
\immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
\immediate\write16{ to use a workaround.}
\immediate\write16{}
- \warnedobstrue
+ \global\warnedobstrue
\fi
}
@@ -744,17 +863,24 @@ where each line of input produces a line of output.}
% Since we want to separate VAR from REST-OF-LINE (which might be
% empty), we can't just use \parsearg; we have to insert a space of our
% own to delimit the rest of the line, and then take it out again if we
-% didn't need it.
+% didn't need it. Make sure the catcode of space is correct to avoid
+% losing inside @example, for instance.
%
-\def\set{\parsearg\setxxx}
+\def\set{\begingroup\catcode` =10
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \parsearg\setxxx}
\def\setxxx#1{\setyyy#1 \endsetyyy}
\def\setyyy#1 #2\endsetyyy{%
\def\temp{#2}%
\ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
\else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
\fi
+ \endgroup
}
-\def\setzzz#1#2 \endsetzzz{\expandafter\xdef\csname SET#1\endcsname{#2}}
+% Can't use \xdef to pre-expand #2 and save some time, since \temp or
+% \next or other control sequences that we've defined might get us into
+% an infinite loop. Consider `@set foo @cite{bar}'.
+\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
% @clear VAR clears (i.e., unsets) the variable VAR.
%
@@ -763,10 +889,16 @@ where each line of input produces a line of output.}
% @value{foo} gets the text saved in variable foo.
%
-\def\value#1{\expandafter
- \ifx\csname SET#1\endcsname\relax
- {\{No value for ``#1''\}}
- \else \csname SET#1\endcsname \fi}
+\def\value{\begingroup
+ \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
+ \valuexxx}
+\def\valuexxx#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {\{No value for ``#1''\}}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+\endgroup}
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
@@ -866,6 +998,7 @@ where each line of input produces a line of output.}
\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
\global\let\lastnode=\relax}
+% @refill is a no-op.
\let\refill=\relax
% @setfilename is done at the beginning of every texinfo file.
@@ -880,11 +1013,24 @@ where each line of input produces a line of output.}
\comment % Ignore the actual filename.
}
+% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
-\def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
- node \samp{\ignorespaces#1{}}}
+% \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx}
+% \def\macroxxx#1#2 \end macro{%
+% \expandafter\gdef\macrotemp#1{#2}%
+% \endgroup}
+
+%\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx}
+%\def\linemacroxxx#1#2 \end linemacro{%
+%\let\parsearg=\relax
+%\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}%
+%\expandafter\xdef\macrotemp{\parsearg\macrotempx}%
+%\expandafter\gdef\macrotempx#1{#2}%
+%\endgroup}
+
+%\def\butfirst#1{}
+
\message{fonts,}
@@ -896,107 +1042,136 @@ where each line of input produces a line of output.}
\def\sf{\fam=\sffam \tensf}
\let\li = \sf % Sometimes we call it \li, not \sf.
+% We don't need math for this one.
+\def\ttsl{\tenttsl}
+
%% Try out Computer Modern fonts at \magstephalf
\let\mainmagstep=\magstephalf
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
-\def\fontprefix{cm}
-\def\setfont#1#2{\font#1=\fontprefix#2}
+% #3 is the font's design size, #4 is a scale factor
+\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
-% Enter `@setfontprefix dc' to use the dc fonts instead of the cm fonts.
-\def\setfontprefix{\parsearg\\setfontprefixzzz}
-\def\setfontprefixzzz#1{\gdef\fontprefix{#1}}
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx} %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
\ifx\bigger\relax
\let\mainmagstep=\magstep1
-\setfont\textrm{r12}
-\setfont\texttt{tt12}
+\setfont\textrm\rmshape{12}{1000}
+\setfont\texttt\ttshape{12}{1000}
\else
-\setfont\textrm{r10 scaled \mainmagstep}
-\setfont\texttt{tt10 scaled \mainmagstep}
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
\fi
% Instead of cmb10, you many want to use cmbx10.
% cmbx10 is a prettier font on its own, but cmb10
% looks better when embedded in a line with cmr10.
-\setfont\textbf{b10 scaled \mainmagstep}
-\setfont\textit{ti10 scaled \mainmagstep}
-\setfont\textsl{sl10 scaled \mainmagstep}
-\setfont\textsf{ss10 scaled \mainmagstep}
-\setfont\textsc{csc10 scaled \mainmagstep}
-\setfont\texti{mi10 scaled \mainmagstep}
-\setfont\textsy{sy10 scaled \mainmagstep}
+\setfont\textbf\bfshape{10}{\mainmagstep}
+\setfont\textit\itshape{10}{\mainmagstep}
+\setfont\textsl\slshape{10}{\mainmagstep}
+\setfont\textsf\sfshape{10}{\mainmagstep}
+\setfont\textsc\scshape{10}{\mainmagstep}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
% A few fonts for @defun, etc.
-\setfont\defbf{bx10 scaled \magstep1} %was 1314
-\setfont\deftt{tt10 scaled \magstep1}
+\setfont\defbf\bxshape{10}{\magstep1} %was 1314
+\setfont\deftt\ttshape{10}{\magstep1}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
-% Fonts for indices and small examples.
+% Fonts for indices and small examples (9pt).
% We actually use the slanted font rather than the italic,
% because texinfo normally uses the slanted fonts for that.
% Do not make many font distinctions in general in the index, since they
% aren't very useful.
-\setfont\ninett{tt9}
-\setfont\indrm{r9}
-\setfont\indit{sl9}
+\setfont\ninett\ttshape{9}{1000}
+\setfont\indrm\rmshape{9}{1000}
+\setfont\indit\slshape{9}{1000}
\let\indsl=\indit
\let\indtt=\ninett
+\let\indttsl=\ninett
\let\indsf=\indrm
\let\indbf=\indrm
-\let\indsc=\indrm
-\setfont\indi{mi9}
-\setfont\indsy{sy9}
-
-% Fonts for headings
-\setfont\chaprm{bx12 scaled \magstep2}
-\setfont\chapit{ti12 scaled \magstep2}
-\setfont\chapsl{sl12 scaled \magstep2}
-\setfont\chaptt{tt12 scaled \magstep2}
-\setfont\chapsf{ss12 scaled \magstep2}
+\setfont\indsc\scshape{10}{900}
+\font\indi=cmmi9
+\font\indsy=cmsy9
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\setfont\chaprm\rmbshape{12}{\magstep2}
+\setfont\chapit\itbshape{10}{\magstep3}
+\setfont\chapsl\slbshape{10}{\magstep3}
+\setfont\chaptt\ttbshape{12}{\magstep2}
+\setfont\chapttsl\ttslshape{10}{\magstep3}
+\setfont\chapsf\sfbshape{12}{\magstep2}
\let\chapbf=\chaprm
-\setfont\chapsc{csc10 scaled\magstep3}
-\setfont\chapi{mi12 scaled \magstep2}
-\setfont\chapsy{sy10 scaled \magstep3}
-
-\setfont\secrm{bx12 scaled \magstep1}
-\setfont\secit{ti12 scaled \magstep1}
-\setfont\secsl{sl12 scaled \magstep1}
-\setfont\sectt{tt12 scaled \magstep1}
-\setfont\secsf{ss12 scaled \magstep1}
-\setfont\secbf{bx12 scaled \magstep1}
-\setfont\secsc{csc10 scaled\magstep2}
-\setfont\seci{mi12 scaled \magstep1}
-\setfont\secsy{sy10 scaled \magstep2}
-
-% \setfont\ssecrm{bx10 scaled \magstep1} % This size an font looked bad.
-% \setfont\ssecit{cmti10 scaled \magstep1} % The letters were too crowded.
-% \setfont\ssecsl{sl10 scaled \magstep1}
-% \setfont\ssectt{tt10 scaled \magstep1}
-% \setfont\ssecsf{ss10 scaled \magstep1}
-
-%\setfont\ssecrm{b10 scaled 1315} % Note the use of cmb rather than cmbx.
-%\setfont\ssecit{ti10 scaled 1315} % Also, the size is a little larger than
-%\setfont\ssecsl{sl10 scaled 1315} % being scaled magstep1.
-%\setfont\ssectt{tt10 scaled 1315}
-%\setfont\ssecsf{ss10 scaled 1315}
+\setfont\chapsc\scbshape{10}{\magstep3}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+
+% Section fonts (14.4pt).
+\setfont\secrm\rmbshape{12}{\magstep1}
+\setfont\secit\itbshape{10}{\magstep2}
+\setfont\secsl\slbshape{10}{\magstep2}
+\setfont\sectt\ttbshape{12}{\magstep1}
+\setfont\secttsl\ttslshape{10}{\magstep2}
+\setfont\secsf\sfbshape{12}{\magstep1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+
+% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
+% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
+% \setfont\ssecsl\slshape{10}{\magstep1}
+% \setfont\ssectt\ttshape{10}{\magstep1}
+% \setfont\ssecsf\sfshape{10}{\magstep1}
+
+%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
+%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
+%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
+%\setfont\ssectt\ttshape{10}{1315}
+%\setfont\ssecsf\sfshape{10}{1315}
%\let\ssecbf=\ssecrm
-\setfont\ssecrm{bx12 scaled \magstephalf}
-\setfont\ssecit{ti12 scaled \magstephalf}
-\setfont\ssecsl{sl12 scaled \magstephalf}
-\setfont\ssectt{tt12 scaled \magstephalf}
-\setfont\ssecsf{ss12 scaled \magstephalf}
-\setfont\ssecbf{bx12 scaled \magstephalf}
-\setfont\ssecsc{csc10 scaled \magstep1}
-\setfont\sseci{mi12 scaled \magstephalf}
-\setfont\ssecsy{sy10 scaled \magstep1}
+% Subsection fonts (13.15pt).
+\setfont\ssecrm\rmbshape{12}{\magstephalf}
+\setfont\ssecit\itbshape{10}{1315}
+\setfont\ssecsl\slbshape{10}{1315}
+\setfont\ssectt\ttbshape{12}{\magstephalf}
+\setfont\ssecttsl\ttslshape{10}{\magstep1}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{\magstep1}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled \magstep1
% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
% but that is not a standard magnification.
% Fonts for title page:
-\setfont\titlerm{bx12 scaled \magstep3}
+\setfont\titlerm\rmbshape{12}{\magstep3}
\let\authorrm = \secrm
% In order for the font changes to affect most math symbols and letters,
@@ -1015,34 +1190,35 @@ where each line of input produces a line of output.}
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this so that font changes will continue to work
% in math mode, where it is the current \fam that is relevant in most
-% cases, not the current. Plain TeX does, for example,
-% \def\bf{\fam=\bffam \tenbf} By redefining \tenbf, we obviate the need
-% to redefine \bf itself.
+% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam
+% \tenbf}, for example. By redefining \tenbf, we obviate the need to
+% redefine \bf itself.
\def\textfonts{%
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
\resetmathfonts}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
- \resetmathfonts}
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
+ \resetmathfonts \setleading{19pt}}
\def\secfonts{%
\let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
\let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
- \resetmathfonts}
+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl
+ \resetmathfonts \setleading{16pt}}
\def\subsecfonts{%
\let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
- \resetmathfonts}
+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
\def\indexfonts{%
\let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
\let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
- \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy
- \resetmathfonts}
+ \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
+ \resetmathfonts \setleading{12pt}}
% Set up the default fonts, so we can use them for creating boxes.
%
@@ -1052,9 +1228,9 @@ where each line of input produces a line of output.}
\newcount\fontdepth \fontdepth=0
% Fonts for short table of contents.
-\setfont\shortcontrm{r12}
-\setfont\shortcontbf{bx12}
-\setfont\shortcontsl{sl12}
+\setfont\shortcontrm\rmshape{12}{1000}
+\setfont\shortcontbf\bxshape{12}{1000}
+\setfont\shortcontsl\slshape{12}{1000}
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
@@ -1081,16 +1257,26 @@ where each line of input produces a line of output.}
\def\restorehyphenation{\hyphenchar\font = `- }
\def\t#1{%
- {\tt \nohyphenation \rawbackslash \frenchspacing #1}%
+ {\tt \rawbackslash \frenchspacing #1}%
\null
}
-\let\ttfont = \t
-%\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}
+\let\ttfont=\t
\def\samp #1{`\tclose{#1}'\null}
-\def\key #1{{\tt \nohyphenation \uppercase{#1}}\null}
+\setfont\smallrm\rmshape{8}{1000}
+\font\smallsy=cmsy9
+\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
+ \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{%
+ \vbox{\hrule\kern-0.4pt
+ \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}%
+ \kern-0.4pt\hrule}%
+ \kern-.06em\raise0.4pt\hbox{$\rangle$}}}}
+% The old definition, with no lozenge:
+%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
\let\file=\samp
+\let\url=\samp % perhaps include a hypertex \special eventually
+\def\email#1{$\langle${\tt #1}$\rangle$}
% @code is a modification of @t,
% which makes spaces the same size as normal in the surrounding text.
@@ -1116,26 +1302,32 @@ where each line of input produces a line of output.}
}
% We *must* turn on hyphenation at `-' and `_' in \code.
-% Otherwise, it is too hard to avoid overful hboxes
+% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate an a dash.
+% and arrange explicitly to hyphenate at a dash.
% -- rms.
{
\catcode`\-=\active
\catcode`\_=\active
+\catcode`\|=\active
\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex}
% The following is used by \doprintindex to insure that long function names
% wrap around. It is necessary for - and _ to be active before the index is
% read from the file, as \entry parses the arguments long before \code is
% ever called. -- mycroft
-\global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder}
+% _ is always active; and it shouldn't be \let = to an _ that is a
+% subscript character anyway. Then, @cindex @samp{_} (for example)
+% fails. --karl
+\global\def\indexbreaks{%
+ \catcode`\-=\active \let-\realdash
+}
}
+
\def\realdash{-}
-\def\realunder{_}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{\normalunderscore\discretionary{}{}{}}
\def\codex #1{\tclose{#1}\endgroup}
@@ -1144,12 +1336,19 @@ where each line of input produces a line of output.}
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
-
+%
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else\tclose{\look}\fi
-\else\tclose{\look}\fi}
+\else{\tclose{\ttsl\look}}\fi
+\else{\tclose{\ttsl\look}}\fi}
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of
@@ -1159,12 +1358,19 @@ where each line of input produces a line of output.}
\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-\def\l#1{{\li #1}\null} %
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
-\def\r#1{{\rm #1}} % roman font
+\def\r#1{{\rm #1}} % roman font
% Use of \lowercase was suggested.
-\def\sc#1{{\smallcaps#1}} % smallcaps font
-\def\ii#1{{\it #1}} % italic font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @pounds{} is a sterling sign.
+\def\pounds{{\it\$}}
+
\message{page headings,}
@@ -1179,7 +1385,7 @@ where each line of input produces a line of output.}
\def\shorttitlepage{\parsearg\shorttitlepagezzz}
\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
+ \endgroup\page\hbox{}\page}
\def\titlepage{\begingroup \parindent=0pt \textfonts
\let\subtitlerm=\tenrm
@@ -1196,9 +1402,9 @@ where each line of input produces a line of output.}
% Now you can print the title using @title.
\def\title{\parsearg\titlezzz}%
\def\titlezzz##1{\leftline{\titlefont{##1}}
- % print a rule at the page bottom also.
- \finishedtitlepagefalse
- \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
% No rule at page bottom unless we print one at the top with @title.
\finishedtitlepagetrue
%
@@ -1216,7 +1422,7 @@ where each line of input produces a line of output.}
\let\oldpage = \page
\def\page{%
\iffinishedtitlepage\else
- \finishtitlepage
+ \finishtitlepage
\fi
\oldpage
\let\page = \oldpage
@@ -1304,14 +1510,15 @@ where each line of input produces a line of output.}
%
}% unbind the catcode of @.
-% @headings double turns headings on for double-sided printing.
-% @headings single turns headings on for single-sided printing.
-% @headings off turns them off.
-% @headings on same as @headings double, retained for compatibility.
-% @headings after turns on double-sided headings after this page.
-% @headings doubleafter turns on double-sided headings after this page.
+% @headings double turns headings on for double-sided printing.
+% @headings single turns headings on for single-sided printing.
+% @headings off turns them off.
+% @headings on same as @headings double, retained for compatibility.
+% @headings after turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
% @headings singleafter turns on single-sided headings after this page.
-% By default, they are off.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
\def\headings #1 {\csname HEADINGS#1\endcsname}
@@ -1325,22 +1532,24 @@ where each line of input produces a line of output.}
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
\def\HEADINGSdouble{
-%\pagealignmacro
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
}
+\let\contentsalignmacro = \chappager
+
% For single-sided printing, chapter title goes across top left of page,
% page number on top right.
\def\HEADINGSsingle{
-%\pagealignmacro
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
}
\def\HEADINGSon{\HEADINGSdouble}
@@ -1351,6 +1560,7 @@ where each line of input produces a line of output.}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
}
\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
@@ -1359,6 +1569,7 @@ where each line of input produces a line of output.}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
}
% Subroutines used in generating headings
@@ -1382,6 +1593,7 @@ July\or August\or September\or October\or November\or December\fi
\def\settitle{\parsearg\settitlezzz}
\def\settitlezzz #1{\gdef\thistitle{#1}}
+
\message{tables,}
% @tabs -- simple alignment
@@ -1414,7 +1626,7 @@ July\or August\or September\or October\or November\or December\fi
\newif\ifitemxneedsnegativevskip
-\def\itemxpar{\par\ifitemxneedsnegativevskip\vskip-\parskip\nobreak\fi}
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
\def\internalBitem{\smallbreak \parsearg\itemzzz}
\def\internalBitemx{\itemxpar \parsearg\itemzzz}
@@ -1521,7 +1733,7 @@ July\or August\or September\or October\or November\or December\fi
\def\tablez #1#2#3#4#5#6{%
\aboveenvbreak %
\begingroup %
-\def\Edescription{\Etable}% Neccessary kludge.
+\def\Edescription{\Etable}% Necessary kludge.
\let\itemindex=#1%
\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
\ifnum 0#4>0 \tableindent=#4\mil \fi %
@@ -1685,10 +1897,10 @@ July\or August\or September\or October\or November\or December\fi
\flushcr}
% @multitable macros
-% Amy Hendrickson, 8/18/94
+% Amy Hendrickson, 8/18/94, 3/6/96
%
-% @multitable ... @endmultitable will make as many columns as desired.
-% Contents of each column will wrap at width given in preamble. Width
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble. Width
% can be specified either with sample text given in a template line,
% or in percent of \hsize, the current width of text on page.
@@ -1696,121 +1908,146 @@ July\or August\or September\or October\or November\or December\fi
% To make preamble:
%
-% Either define widths of columns in terms of percent of \hsize:
-% @multitable @percentofhsize .2 .3 .5
+% Either define widths of columns in terms of percent of \hsize:
+% @multitable @columnfractions .25 .3 .45
% @item ...
%
-% Numbers following @percentofhsize are the percent of the total
+% Numbers following @columnfractions are the percent of the total
% current hsize to be used for each column. You may use as many
% columns as desired.
+
% Or use a template:
% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
% @item ...
% using the widest term desired in each column.
+%
+% For those who want to use more than one line's worth of words in
+% the preamble, break the line within one argument and it
+% will parse correctly, i.e.,
+%
+% @multitable {Column 1 template} {Column 2 template} {Column 3
+% template}
+% Not:
+% @multitable {Column 1 template} {Column 2 template}
+% {Column 3 template}
-
-% Each new table line starts with @item, each subsequent new column
+% Each new table line starts with @item, each subsequent new column
% starts with @tab. Empty columns may be produced by supplying @tab's
% with nothing between them for as many times as empty columns are needed,
% ie, @tab@tab@tab will produce two empty columns.
-% @item, @tab, @multicolumn or @endmulticolumn do not need to be on their
+% @item, @tab, @multitable or @end multitable do not need to be on their
% own lines, but it will not hurt if they are.
% Sample multitable:
% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
% @item first col stuff @tab second col stuff @tab third col
-% @item
-% first col stuff
-% @tab
-% second col stuff
-% @tab
-% third col
-% @item first col stuff @tab second col stuff
+% @item
+% first col stuff
+% @tab
+% second col stuff
+% @tab
+% third col
+% @item first col stuff @tab second col stuff
% @tab Many paragraphs of text may be used in any column.
-%
+%
% They will wrap at the width determined by the template.
% @item@tab@tab This will be in third column.
-% @endmultitable
+% @end multitable
% Default dimensions may be reset by user.
-% @intableparskip will set vertical space between paragraphs in table.
-% @intableparindent will set paragraph indent in table.
-% @spacebetweencols will set horizontal space to be left between columns.
-% @spacebetweenlines will set vertical space to be left between lines.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+% to baseline.
+% 0pt means it depends on current normal line spacing.
%%%%
-% Dimensions
+% Dimensions
-\newdimen\intableparskip
-\newdimen\intableparindent
-\newdimen\spacebetweencols
-\newdimen\spacebetweenlines
-\intableparskip=0pt
-\intableparindent=6pt
-\spacebetweencols=12pt
-\spacebetweenlines=12pt
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
%%%%
% Macros used to set up halign preamble:
\let\endsetuptable\relax
\def\xendsetuptable{\endsetuptable}
-\let\percentofhsize\relax
-\def\xpercentofhsize{\percentofhsize}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
\newif\ifsetpercent
+%% 2/1/96, to allow fractions to be given with more than one digit.
+\def\pickupwholefraction#1 {\global\advance\colcount by1 %
+\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
+\setuptable}
+
\newcount\colcount
\def\setuptable#1{\def\firstarg{#1}%
\ifx\firstarg\xendsetuptable\let\go\relax%
\else
- \ifx\firstarg\xpercentofhsize\global\setpercenttrue%
+ \ifx\firstarg\xcolumnfractions\global\setpercenttrue%
\else
\ifsetpercent
- \if#1.\else%
- \global\advance\colcount by1 %
- \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
- \fi
+ \let\go\pickupwholefraction % In this case arg of setuptable
+ % is the decimal point before the
+ % number given in percent of hsize.
+ % We don't need this so we don't use it.
\else
\global\advance\colcount by1
- \setbox0=\hbox{#1}%
+ \setbox0=\hbox{#1 }% Add a normal word space as a separator;
+ % typically that is always in the input, anyway.
\expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
\fi%
\fi%
- \let\go\setuptable%
+\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
\fi\go}
+
%%%%
% multitable syntax
-\def\tab{&}
+\def\tab{&\hskip1sp\relax} % 2/2/96
+ % tiny skip here makes sure this column space is
+ % maintained, even if it is never used.
+
%%%%
-% @multitable ... @endmultitable definitions:
+% @multitable ... @end multitable definitions:
+
+\def\multitable{\parsearg\dotable}
-\def\multitable#1\item{\bgroup
+\def\dotable#1{\bgroup
\let\item\cr
\tolerance=9500
\hbadness=9500
-\parskip=\intableparskip
-\parindent=\intableparindent
+\setmultitablespacing
+\parskip=\multitableparskip
+\parindent=\multitableparindent
\overfullrule=0pt
\global\colcount=0\relax%
\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
% To parse everything between @multitable and @item :
-\def\one{#1}\expandafter\setuptable\one\endsetuptable
+\setuptable#1 \endsetuptable
% Need to reset this to 0 after \setuptable.
-\global\colcount=0\relax%
+\global\colcount=0\relax%
%
% This preamble sets up a generic column definition, which will
% be used as many times as user calls for columns.
- % \vtop will set a single line and will also let text wrap and
+ % \vtop will set a single line and will also let text wrap and
% continue for many paragraphs if desired.
\halign\bgroup&\global\advance\colcount by 1\relax%
-\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
+\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
% In order to keep entries from bumping into each other
- % we will add a \leftskip of \spacebetweencols to all columns after
+ % we will add a \leftskip of \multitablecolspace to all columns after
% the first one.
- % If a template has been used, we will add \spacebetweencols
+ % If a template has been used, we will add \multitablecolspace
% to the width of each template entry.
% If user has set preamble in terms of percent of \hsize
% we will use that dimension as the width of the column, and
@@ -1822,20 +2059,58 @@ July\or August\or September\or October\or November\or December\fi
\ifsetpercent
\else
% If user has <not> set preamble in terms of percent of \hsize
- % we will advance \hsize by \spacebetweencols
- \advance\hsize by \spacebetweencols
+ % we will advance \hsize by \multitablecolspace
+ \advance\hsize by \multitablecolspace
\fi
- % In either case we will make \leftskip=\spacebetweencols:
-\leftskip=\spacebetweencols
+ % In either case we will make \leftskip=\multitablecolspace:
+\leftskip=\multitablecolspace
\fi
-\noindent##}\cr%
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively marking
+ % characters.
+ \noindent\ignorespaces##\unskip\multistrut}\cr
% \everycr will reset column counter, \colcount, at the end of
- % each line. Every column entry will cause \colcount to advance by one.
+ % each line. Every column entry will cause \colcount to advance by one.
% The table preamble
% looks at the current \colcount to find the correct column width.
-\global\everycr{\noalign{\nointerlineskip\vskip\spacebetweenlines
-\filbreak%% keeps underfull box messages off when table breaks over pages.
-\global\colcount=0\relax}}}
+\global\everycr{\noalign{%
+% \filbreak%% keeps underfull box messages off when table breaks over pages.
+% Maybe so, but it also creates really weird page breaks when the table
+% breaks over pages Wouldn't \vfil be better? Wait until the problem
+% manifests itself, so it can be fixed for real --karl.
+\global\colcount=0\relax}}
+}
+
+\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
+% If so, do nothing. If not, give it an appropriate dimension based on
+% current baselineskip.
+\ifdim\multitablelinespace=0pt
+%% strut to put in table in case some entry doesn't have descenders,
+%% to keep lines equally spaced
+\let\multistrut = \strut
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
+\else
+\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
+width0pt\relax} \fi
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi}
+
\message{indexing,}
% Index generation facilities
@@ -1849,14 +2124,14 @@ July\or August\or September\or October\or November\or December\fi
% It automatically defines \fooindex such that
% \fooindex ...rest of line... puts an entry in the index foo.
% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is foo.
+% the file that accumulates this index. The file's extension is foo.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
\def\newindex #1{
\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
-\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\doindex {#1}}
}
@@ -1868,8 +2143,8 @@ July\or August\or September\or October\or November\or December\fi
\def\newcodeindex #1{
\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
-\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\docodeindex {#1}}
}
@@ -1880,7 +2155,7 @@ July\or August\or September\or October\or November\or December\fi
\def\synindex #1 #2 {%
\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\doindex {#2}}%
}
@@ -1889,7 +2164,7 @@ July\or August\or September\or October\or November\or December\fi
\def\syncodeindex #1 #2 {%
\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
\noexpand\docodeindex {#2}}%
}
@@ -1937,24 +2212,31 @@ July\or August\or September\or October\or November\or December\fi
\def\L{\realbackslash L}%
\def\ss{\realbackslash ss}%
% Take care of texinfo commands likely to appear in an index entry.
+% (Must be a way to avoid doing expansion at all, and thus not have to
+% laboriously list every single command here.)
+\def\@{@}% will be @@ when we switch to @ as escape char.
+%\let\{ = \lbracecmd
+%\let\} = \rbracecmd
\def\_{{\realbackslash _}}%
\def\w{\realbackslash w }%
\def\bf{\realbackslash bf }%
-\def\rm{\realbackslash rm }%
+%\def\rm{\realbackslash rm }%
\def\sl{\realbackslash sl }%
\def\sf{\realbackslash sf}%
\def\tt{\realbackslash tt}%
\def\gtr{\realbackslash gtr}%
\def\less{\realbackslash less}%
\def\hat{\realbackslash hat}%
-\def\char{\realbackslash char}%
+%\def\char{\realbackslash char}%
\def\TeX{\realbackslash TeX}%
\def\dots{\realbackslash dots }%
\def\copyright{\realbackslash copyright }%
\def\tclose##1{\realbackslash tclose {##1}}%
\def\code##1{\realbackslash code {##1}}%
+\def\dotless##1{\realbackslash dotless {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
-\def\t##1{\realbackslash r {##1}}%
+\def\,##1{\realbackslash ,{##1}}%
+\def\t##1{\realbackslash t {##1}}%
\def\r##1{\realbackslash r {##1}}%
\def\i##1{\realbackslash i {##1}}%
\def\b##1{\realbackslash b {##1}}%
@@ -1965,8 +2247,15 @@ July\or August\or September\or October\or November\or December\fi
\def\kbd##1{\realbackslash kbd {##1}}%
\def\dfn##1{\realbackslash dfn {##1}}%
\def\emph##1{\realbackslash emph {##1}}%
+\unsepspaces
}
+% If an index command is used in an @example environment, any spaces
+% therein should become regular spaces in the raw index file, not the
+% expansion of \tie (\\leavevmode \penalty \@M \ ).
+{\obeyspaces
+ \gdef\unsepspaces{\obeyspaces\let =\space}}
+
% \indexnofonts no-ops all font-change commands.
% This is used when outputting the strings to sort the index by.
\def\indexdummyfont#1{#1}
@@ -1975,6 +2264,7 @@ July\or August\or September\or October\or November\or December\fi
\def\indexnofonts{%
% Just ignore accents.
+\let\,=\indexdummyfont
\let\"=\indexdummyfont
\let\`=\indexdummyfont
\let\'=\indexdummyfont
@@ -1987,6 +2277,7 @@ July\or August\or September\or October\or November\or December\fi
\let\u=\indexdummyfont
\let\v=\indexdummyfont
\let\H=\indexdummyfont
+\let\dotless=\indexdummyfont
% Take care of the plain tex special European modified letters.
\def\oe{oe}%
\def\ae{ae}%
@@ -2020,6 +2311,7 @@ July\or August\or September\or October\or November\or December\fi
\let\var=\indexdummyfont
\let\TeX=\indexdummytex
\let\dots=\indexdummydots
+\def\@{@}%
}
% To define \realbackslash, we must make \ not be an escape.
@@ -2031,26 +2323,41 @@ July\or August\or September\or October\or November\or December\fi
\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax %initialize!
+% workhorse for all \fooindexes
+% #1 is name of index, #2 is stuff to put there
\def\doind #1#2{%
-{\count10=\lastpenalty %
-{\indexdummies % Must do this here, since \bf, etc expand at this stage
-\escapechar=`\\%
-{\let\folio=0% Expand all macros now EXCEPT \folio
-\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
-% so it will be output as is; and it will print as backslash in the indx.
-%
-% Now process the index-string once, with all font commands turned off,
-% to get the string to sort the index by.
-{\indexnofonts
-\xdef\temp1{#2}%
-}%
-% Now produce the complete index entry. We process the index-string again,
-% this time with font commands expanded, to get what to print in the index.
-\edef\temp{%
-\write \csname#1indfile\endcsname{%
-\realbackslash entry {\temp1}{\folio}{#2}}}%
-\temp }%
-}\penalty\count10}}
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
+ \fi
+ {%
+ \count255=\lastpenalty
+ {%
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \escapechar=`\\
+ {%
+ \let\folio=0% We will expand all macros now EXCEPT \folio.
+ \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % First process the index-string with all font commands turned off
+ % to get the string to sort by.
+ {\indexnofonts \xdef\indexsorttmp{#2}}%
+ %
+ % Now produce the complete index entry, with both the sort key and the
+ % original text, including any font commands.
+ \toks0 = {#2}%
+ \edef\temp{%
+ \write\csname#1indfile\endcsname{%
+ \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
+ }%
+ \temp
+ }%
+ }%
+ \penalty\count255
+ }%
+}
\def\dosubind #1#2#3{%
{\count10=\lastpenalty %
@@ -2111,26 +2418,19 @@ July\or August\or September\or October\or November\or December\fi
\def\printindex{\parsearg\doprintindex}
-\def\doprintindex#1{%
- \tex
- \dobreak \chapheadingskip {10000}
- \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
- \catcode`\$=\other
- \catcode`\~=\other
- \indexbreaks
+\def\doprintindex#1{\begingroup
+ \dobreak \chapheadingskip{10000}%
%
- % The following don't help, since the chars were translated
- % when the raw index was written, and their fonts were discarded
- % due to \indexnofonts.
- %\catcode`\"=\active
- %\catcode`\^=\active
- %\catcode`\_=\active
- %\catcode`\|=\active
- %\catcode`\<=\active
- %\catcode`\>=\active
- % %
- \def\indexbackslash{\rawbackslashxx}
- \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt
+ \indexfonts \rm
+ \tolerance = 9500
+ \indexbreaks
+ \def\indexbackslash{\rawbackslashxx}%
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \catcode`\\ = 0
+ \catcode`\@ = 11
+ \escapechar = `\\
\begindoublecolumns
%
% See if the index file exists and is nonempty.
@@ -2141,7 +2441,7 @@ July\or August\or September\or October\or November\or December\fi
% index. The easiest way to prevent this problem is to make sure
% there is some text.
(Index is nonexistent)
- \else
+ \else
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
@@ -2155,8 +2455,7 @@ July\or August\or September\or October\or November\or December\fi
\fi
\closein 1
\enddoublecolumns
- \Etex
-}
+\endgroup}
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
@@ -2210,7 +2509,7 @@ July\or August\or September\or October\or November\or December\fi
%
% Insert the text of the index entry. TeX will do line-breaking on it.
#1%
- % The following is kluged to not output a line of dots in the index if
+ % The following is kludged to not output a line of dots in the index if
% there are no page numbers. The next person who breaks this will be
% cursed by a Unix daemon.
\def\tempa{{\rm }}%
@@ -2247,15 +2546,15 @@ July\or August\or September\or October\or November\or December\fi
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par
}}
-%% Define two-column mode, which is used in indexes.
-%% Adapted from the TeXbook, page 416.
-\catcode `\@=11
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
\newbox\partialpage
-
\newdimen\doublecolumnhsize
-\def\begindoublecolumns{\begingroup
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
\output = {\global\setbox\partialpage
=\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
@@ -2288,51 +2587,51 @@ July\or August\or September\or October\or November\or December\fi
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
\vsize = 2\vsize
- \doublecolumnpagegoal
}
-
-\def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage}
-
-\def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth
- \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage
- \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1}
- \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3}
- \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
- \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi
+\def\doublecolumnout{%
+ \splittopskip=\topskip \splitmaxdepth=\maxdepth
+ % Get the available space for the double columns -- the normal
+ % (undoubled) page height minus any material left over from the
+ % previous page.
+ \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
+ % box0 will be the left-hand column, box1 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255 \penalty\outputpenalty
}
-\def\doublecolumnpagegoal{%
- \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@
+\def\pagesofar{%
+ % The contents of the output page -- any previous material,
+ % followed by the two boxes we just split.
+ \unvbox\partialpage
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
}
-\def\pagesofar{\unvbox\partialpage %
- \hsize=\doublecolumnhsize % have to restore this since output routine
- \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
-\def\doublecolumnout{%
- \setbox5=\copy255
- {\vbadness=10000 \doublecolumnsplit}
- \ifvbox255
- \setbox0=\vtop to\dimen@{\unvbox0}
- \setbox2=\vtop to\dimen@{\unvbox2}
- \onepageout\pagesofar \unvbox255 \penalty\outputpenalty
- \else
- \setbox0=\vbox{\unvbox5}
- \ifvbox0
- \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
- \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth
- {\vbadness=10000
- \loop \global\setbox5=\copy0
- \setbox1=\vsplit5 to\dimen@
- \setbox3=\vsplit5 to\dimen@
- \ifvbox5 \global\advance\dimen@ by1pt \repeat
- \setbox0=\vbox to\dimen@{\unvbox1}
- \setbox2=\vbox to\dimen@{\unvbox3}
- \global\setbox\partialpage=\vbox{\pagesofar}
- \doublecolumnpagegoal
- }
- \fi
- \fi
+\def\enddoublecolumns{%
+ \output={\balancecolumns}\eject % split what we have
+ \endgroup
+ % Back to normal single-column typesetting, but take account of the
+ % fact that we just accumulated some stuff on the output page.
+ \pagegoal=\vsize
+}
+\def\balancecolumns{%
+ % Called on the last page of the double column material.
+ \setbox0=\vbox{\unvbox255}%
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {\vbadness=10000 \loop \global\setbox3=\copy0
+ \global\setbox1=\vsplit3 to\dimen@
+ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ \pagesofar
}
-
\catcode `\@=\other
+
+
\message{sectioning,}
% Define chapters, sections, etc.
@@ -2467,7 +2766,7 @@ July\or August\or September\or October\or November\or December\fi
\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
\def\chapterzzz #1{\seccheck{chapter}%
\secno=0 \subsecno=0 \subsubsecno=0
-\global\advance \chapno by 1 \message{Chapter \the\chapno}%
+\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
\chapmacro {#1}{\the\chapno}%
\gdef\thissection{#1}%
\gdef\thischaptername{#1}%
@@ -2504,6 +2803,10 @@ July\or August\or September\or October\or November\or December\fi
\global\let\subsubsection = \appendixsubsubsec
}}
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\def\centerchap{\parsearg\centerchapyyy}
+\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
+
\outer\def\top{\parsearg\unnumberedyyy}
\outer\def\unnumbered{\parsearg\unnumberedyyy}
\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
@@ -2548,7 +2851,7 @@ July\or August\or September\or October\or November\or December\fi
\penalty 10000 %
}}
-\outer\def\appenixsection{\parsearg\appendixsecyyy}
+\outer\def\appendixsection{\parsearg\appendixsecyyy}
\outer\def\appendixsec{\parsearg\appendixsecyyy}
\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
\def\appendixsectionzzz #1{\seccheck{appendixsection}%
@@ -2606,7 +2909,7 @@ July\or August\or September\or October\or November\or December\fi
\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
-\plainsecheading {#1}\gdef\thissection{#1}%
+\plainsubsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts%
\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
\escapechar=`\\%
@@ -2651,7 +2954,7 @@ July\or August\or September\or October\or November\or December\fi
\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
-\plainsecheading {#1}\gdef\thissection{#1}%
+\plainsubsubsecheading {#1}\gdef\thissection{#1}%
{\chapternofonts%
\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
\escapechar=`\\%
@@ -2689,10 +2992,10 @@ July\or August\or September\or October\or November\or December\fi
% NOTE on use of \vbox for chapter headings, section headings, and
% such:
-% 1) We use \vbox rather than the earlier \line to permit
-% overlong headings to fold.
-% 2) \hyphenpenalty is set to 10000 because hyphenation in a
-% heading is obnoxious; this forbids it.
+% 1) We use \vbox rather than the earlier \line to permit
+% overlong headings to fold.
+% 2) \hyphenpenalty is set to 10000 because hyphenation in a
+% heading is obnoxious; this forbids it.
% 3) Likewise, headings look best if no \parindent is used, and
% if justification is not attempted. Hence \raggedright.
@@ -2710,11 +3013,10 @@ July\or August\or September\or October\or November\or December\fi
\parindent=0pt\raggedright
\rm #1\hfill}}\bigskip \par\penalty 200}
-\def\heading{\parsearg\secheadingi}
-
-\def\subheading{\parsearg\subsecheadingi}
-
-\def\subsubheading{\parsearg\subsubsecheadingi}
+% @heading, @subheading, @subsubheading.
+\def\heading{\parsearg\plainsecheading}
+\def\subheading{\parsearg\plainsubsecheading}
+\def\subsubheading{\parsearg\plainsubsubsecheading}
% These macros generate a chapter, section, etc. heading only
% (including whitespace, linebreaking, etc. around it),
@@ -2728,7 +3030,7 @@ July\or August\or September\or October\or November\or December\fi
%%% Define plain chapter starts, and page on/off switching for it
% Parameter controlling skip before chapter headings (if needed)
-\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
+\newskip\chapheadingskip
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
@@ -2737,15 +3039,18 @@ July\or August\or September\or October\or November\or December\fi
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
\def\CHAPPAGoff{
+\global\let\contentsalignmacro = \chappager
\global\let\pchapsepmacro=\chapbreak
\global\let\pagealignmacro=\chappager}
\def\CHAPPAGon{
+\global\let\contentsalignmacro = \chappager
\global\let\pchapsepmacro=\chappager
\global\let\pagealignmacro=\chappager
\global\def\HEADINGSon{\HEADINGSsingle}}
\def\CHAPPAGodd{
+\global\let\contentsalignmacro = \chapoddpage
\global\let\pchapsepmacro=\chapoddpage
\global\let\pagealignmacro=\chapoddpage
\global\def\HEADINGSon{\HEADINGSdouble}}
@@ -2754,25 +3059,39 @@ July\or August\or September\or October\or November\or December\fi
\def\CHAPFplain{
\global\let\chapmacro=\chfplain
-\global\let\unnumbchapmacro=\unnchfplain}
+\global\let\unnumbchapmacro=\unnchfplain
+\global\let\centerchapmacro=\centerchfplain}
-\def\chfplain #1#2{%
+% Plain chapter opening.
+% #1 is the text, #2 the chapter number or empty if unnumbered.
+\def\chfplain#1#2{%
\pchapsepmacro
{%
- \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #2\enspace #1}%
+ \chapfonts \rm
+ \def\chapnum{#2}%
+ \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent = \wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
}%
- \bigskip
- \penalty5000
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
}
-\def\unnchfplain #1{%
-\pchapsepmacro %
-{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\penalty 10000 %
-}
+% Plain opening for unnumbered.
+\def\unnchfplain#1{\chfplain{#1}{}}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerchfplain#1{{%
+ \def\centerparametersmaybe{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+ }%
+ \chfplain{#1}{}%
+}}
+
\CHAPFplain % The default
\def\unnchfopen #1{%
@@ -2786,73 +3105,81 @@ July\or August\or September\or October\or November\or December\fi
\par\penalty 5000 %
}
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt
+ \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 %
+}
+
\def\CHAPFopen{
\global\let\chapmacro=\chfopen
-\global\let\unnumbchapmacro=\unnchfopen}
+\global\let\unnumbchapmacro=\unnchfopen
+\global\let\centerchapmacro=\centerchfopen}
-% Parameter controlling skip before section headings.
-\newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt
+% Section titles.
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
+\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}}
+\def\plainsecheading#1{\sectionheading{sec}{}{#1}}
+
+% Subsection titles.
+\newskip \subsecheadingskip
\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
+\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}}
+\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}}
-\newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt
-\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
+% Subsubsection titles.
+\let\subsubsecheadingskip = \subsecheadingskip
+\let\subsubsecheadingbreak = \subsecheadingbreak
+\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
+\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
-% @paragraphindent is defined for the Info formatting commands only.
-\let\paragraphindent=\comment
-% Section fonts are the base font at magstep2, which produces
-% a size a bit more than 14 points in the default situation.
-
-\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
-\def\plainsecheading #1{\secheadingi {#1}}
-\def\secheadingi #1{{\advance \secheadingskip by \parskip %
-\secheadingbreak}%
-{\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
-\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
-
-
-% Subsection fonts are the base font at magstep1,
-% which produces a size of 12 points.
-
-\def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}}
-\def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip %
-\subsecheadingbreak}%
-{\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
-\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
-
-\def\subsubsecfonts{\subsecfonts} % Maybe this should change:
- % Perhaps make sssec fonts scaled
- % magstep half
-\def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}}
-\def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip %
-\subsecheadingbreak}%
-{\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
-\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
+% Print any size section title.
+%
+% #1 is the section type (sec/subsec/subsubsec), #2 is the section
+% number (maybe empty), #3 the text.
+\def\sectionheading#1#2#3{%
+ {%
+ \expandafter\advance\csname #1headingskip\endcsname by \parskip
+ \csname #1headingbreak\endcsname
+ }%
+ {%
+ % Switch to the right set of fonts.
+ \csname #1fonts\endcsname \rm
+ %
+ % Only insert the separating space if we have a section number.
+ \def\secnum{#2}%
+ \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
+ %
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \hangindent = \wd0 % zero if no section number
+ \unhbox0 #3}%
+ }%
+ \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
+}
\message{toc printing,}
-
% Finish up the main text and prepare to read what we've written
% to \contentsfile.
\newskip\contentsrightmargin \contentsrightmargin=1in
\def\startcontents#1{%
- \pagealignmacro
+ % If @setchapternewpage on, and @headings double, the contents should
+ % start on an odd page, unlike chapters. Thus, we maintain
+ % \contentsalignmacro in parallel with \pagealignmacro.
+ % From: Torbjorn Granlund <tege@matematik.su.se>
+ \contentsalignmacro
\immediate\closeout \contentsfile
\ifnum \pageno>0
- \pageno = -1 % Request roman numbered pages.
+ \pageno = -1 % Request roman numbered pages.
\fi
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
\unnumbchapmacro{#1}\def\thischapter{}%
- \begingroup % Set up to handle contents files properly.
+ \begingroup % Set up to handle contents files properly.
\catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
\raggedbottom % Worry more about breakpoints than the bottom.
@@ -2878,6 +3205,7 @@ July\or August\or September\or October\or November\or December\fi
\secfonts
\let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
\rm
+ \hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
\def\secentry ##1##2##3##4{}
\def\unnumbsecentry ##1##2{}
@@ -2921,7 +3249,7 @@ July\or August\or September\or October\or November\or December\fi
% This space should be plenty, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% (This space doesn't include the extra space that gets added after
- % the label; that gets put in in \shortchapentry above.)
+ % the label; that gets put in by \shortchapentry above.)
\advance\dimen0 by 1.1em
\hbox to \dimen0{#1\hfil}%
}
@@ -2942,22 +3270,21 @@ July\or August\or September\or October\or November\or December\fi
\dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
-
% This parameter controls the indentation of the various levels.
\newdimen\tocindent \tocindent = 3pc
% Now for the actual typesetting. In all these, #1 is the text and #2 is the
% page number.
%
-% If the toc has to be broken over pages, we would want to be at chapters
+% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
\def\dochapentry#1#2{%
- \penalty-300 \vskip\baselineskip
+ \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
\chapentryfonts
\tocentry{#1}{\dopageno{#2}}%
\endgroup
- \nobreak\vskip .25\baselineskip
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
}
\def\dosecentry#1#2{\begingroup
@@ -2980,9 +3307,10 @@ July\or August\or September\or October\or November\or December\fi
% can't do that in the \entry macro, since index entries might consist
% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
%
+% \turnoffactive is for the sake of @" used for umlauts.
\def\tocentry#1#2{\begingroup
- \hyphenpenalty = 10000
- \entry{#1}{#2}%
+ \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
+ \entry{\turnoffactive #1}{\turnoffactive #2}%
\endgroup}
% Space between chapter (or whatever) number and the title.
@@ -3006,8 +3334,6 @@ July\or August\or September\or October\or November\or December\fi
\newbox\pushcharbox \newbox\bullbox
\newbox\equivbox \newbox\errorbox
-\let\ptexequiv = \equiv
-
%{\tentt
%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
@@ -3018,12 +3344,11 @@ July\or August\or September\or October\or November\or December\fi
% depth .1ex\hfil}
%}
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
\def\point{$\star$}
-
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-
\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
% Adapted from the TeXbook's \boxit.
@@ -3055,7 +3380,7 @@ July\or August\or September\or October\or November\or December\fi
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
\catcode `\%=14
-\catcode 43=12
+\catcode 43=12 % plus
\catcode`\"=12
\catcode`\==12
\catcode`\|=12
@@ -3063,16 +3388,17 @@ July\or August\or September\or October\or November\or December\fi
\catcode`\>=12
\escapechar=`\\
%
-\let\~=\ptextilde
+\let\,=\ptexcomma
\let\{=\ptexlbrace
\let\}=\ptexrbrace
\let\.=\ptexdot
\let\*=\ptexstar
\let\dots=\ptexdots
+\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}
+\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}
\def\@{@}%
\let\bullet=\ptexbullet
-\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
-\let\L=\ptexL
+\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
%
\let\Etex=\endgroup}
@@ -3131,50 +3457,50 @@ July\or August\or September\or October\or November\or December\fi
\def\cbl{{\circle\char'012\hskip -6pt}}
\def\cbr{{\hskip 6pt\circle\char'011}}
\def\carttop{\hbox to \cartouter{\hskip\lskip
- \ctl\leaders\hrule height\circthick\hfil\ctr
- \hskip\rskip}}
+ \ctl\leaders\hrule height\circthick\hfil\ctr
+ \hskip\rskip}}
\def\cartbot{\hbox to \cartouter{\hskip\lskip
- \cbl\leaders\hrule height\circthick\hfil\cbr
- \hskip\rskip}}
+ \cbl\leaders\hrule height\circthick\hfil\cbr
+ \hskip\rskip}}
%
\newskip\lskip\newskip\rskip
\long\def\cartouche{%
\begingroup
- \lskip=\leftskip \rskip=\rightskip
- \leftskip=0pt\rightskip=0pt %we want these *outside*.
- \cartinner=\hsize \advance\cartinner by-\lskip
- \advance\cartinner by-\rskip
- \cartouter=\hsize
- \advance\cartouter by 18pt % allow for 3pt kerns on either
-% side, and for 6pt waste from
-% each corner char
- \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
- % Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing=\comment
- \vbox\bgroup
- \baselineskip=0pt\parskip=0pt\lineskip=0pt
- \carttop
- \hbox\bgroup
- \hskip\lskip
- \vrule\kern3pt
- \vbox\bgroup
- \hsize=\cartinner
- \kern3pt
- \begingroup
- \baselineskip=\normbskip
- \lineskip=\normlskip
- \parskip=\normpskip
- \vskip -\parskip
+ \lskip=\leftskip \rskip=\rightskip
+ \leftskip=0pt\rightskip=0pt %we want these *outside*.
+ \cartinner=\hsize \advance\cartinner by-\lskip
+ \advance\cartinner by-\rskip
+ \cartouter=\hsize
+ \advance\cartouter by 18pt % allow for 3pt kerns on either
+% side, and for 6pt waste from
+% each corner char
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing=\comment
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \hsize=\cartinner
+ \kern3pt
+ \begingroup
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
\def\Ecartouche{%
- \endgroup
- \kern3pt
- \egroup
- \kern3pt\vrule
- \hskip\rskip
- \egroup
- \cartbot
- \egroup
+ \endgroup
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
\endgroup
}}
@@ -3237,8 +3563,7 @@ July\or August\or September\or October\or November\or December\fi
\let\Esmalllisp = \nonfillfinish
\let\Esmallexample = \nonfillfinish
%
- % Smaller interline space and fonts for small examples.
- \setleading{10pt}%
+ % Smaller fonts for small examples.
\indexfonts \tt
\rawbackslash % make \ output the \ character from the current font (tt)
\gobble
@@ -3327,6 +3652,9 @@ July\or August\or September\or October\or November\or December\fi
\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+% This is used to turn on special parens
+% but make & act ordinary (given that it's active).
+\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
% Definitions of (, ) and & used in args for functions.
% This is the definition of ( outside of all parentheses.
@@ -3441,7 +3769,7 @@ July\or August\or September\or October\or November\or December\fi
% This is used for \def{tp,vr}parsebody. It could probably be used for
% some of the others, too, with some judicious conditionals.
-%
+%
\def\parsebodycommon#1#2#3{%
\begingroup\inENV %
\medbreak %
@@ -3475,17 +3803,16 @@ July\or August\or September\or October\or November\or December\fi
}
% Fine, but then we have to eventually remove the \empty *and* the
-% braces (if any). That's what this does, putting the result in \tptemp.
-%
-\def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}%
+% braces (if any). That's what this does.
+%
+\def\removeemptybraces\empty#1\relax{#1}
% After \spacesplit has done its work, this is called -- #1 is the final
% thing to call, #2 the type name (which starts with \empty), and #3
% (which might be empty) the arguments.
-%
+%
\def\parsetpheaderline#1#2#3{%
- \removeemptybraces#2\relax
- #1{\tptemp}{#3}%
+ #1{\removeemptybraces#2\relax}{#3}%
}%
\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
@@ -3535,7 +3862,8 @@ July\or August\or September\or October\or November\or December\fi
\def\deftypefunargs #1{%
% Expand, preventing hyphenation at `-' chars.
% Note that groups don't affect changes in \hyphenchar.
-\functionparens
+% Use \boldbraxnoamp, not \functionparens, so that & is not special.
+\boldbraxnoamp
\tclose{#1}% avoid \code because of side effects on active chars
\interlinepenalty=10000
\advance\rightskip by 0pt plus 1fil
@@ -3718,19 +4046,21 @@ July\or August\or September\or October\or November\or December\fi
\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
-% #1 is the data type. #2 is the name.
+% #1 is the data type. #2 is the name, perhaps followed by text that
+% is actually part of the data type, which should not be put into the index.
\def\deftypevarheader #1#2{%
-\doind {vr}{\code{#2}}% Make entry in variables index
+\dovarind#2 \relax% Make entry in variables index
\begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}%
\interlinepenalty=10000
\endgraf\penalty 10000\vskip -\parskip\penalty 10000
\endgroup}
+\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
% @deftypevr {Global Flag} int enable
\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
-\def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}%
+\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
\interlinepenalty=10000
\endgraf\penalty 10000\vskip -\parskip\penalty 10000
@@ -3762,6 +4092,7 @@ July\or August\or September\or October\or November\or December\fi
\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
+
\message{cross reference,}
% Define cross-reference macros
\newwrite \auxfile
@@ -3769,6 +4100,11 @@ July\or August\or September\or October\or November\or December\fi
\newif\ifhavexrefs % True if xref values are known.
\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+% @inforef is simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
% \setref{foo} defines a cross-reference point named foo.
\def\setref#1{%
@@ -3802,7 +4138,10 @@ July\or August\or September\or October\or November\or December\fi
\setbox0=\hbox{\printednodename}%
\ifdim \wd0 = 0pt
% No printed node name was explicitly given.
- \ifx\SETxref-automatic-section-title\relax %
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+ % Use the node name inside the square brackets.
+ \def\printednodename{\ignorespaces #1}%
+ \else
% Use the actual chapter/section title appear inside
% the square brackets. Use the real section title if we have it.
\ifdim \wd1>0pt%
@@ -3811,16 +4150,12 @@ July\or August\or September\or October\or November\or December\fi
\else
\ifhavexrefs
% We know the real title if we have the xref values.
- \def\printednodename{\refx{#1-title}}%
+ \def\printednodename{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
\def\printednodename{\ignorespaces #1}%
\fi%
\fi
- \def\printednodename{#1-title}%
- \else
- % Use the node name inside the square brackets.
- \def\printednodename{\ignorespaces #1}%
\fi
\fi
%
@@ -3848,7 +4183,7 @@ July\or August\or September\or October\or November\or December\fi
% Use \turnoffactive so that punctuation chars such as underscore
% work in node names.
-\def\dosetq #1#2{{\let\folio=0 \turnoffactive%
+\def\dosetq #1#2{{\let\folio=0 \turnoffactive
\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
\next}}
@@ -3917,83 +4252,101 @@ July\or August\or September\or October\or November\or December\fi
#2% Output the suffix in any case.
}
-% Read the last existing aux file, if any. No error if none exists.
-
% This is the macro invoked by entries in the aux file.
-\def\xrdef #1#2{
-{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
+\def\xrdef #1#2{{%
+ \catcode`\'=\other
+ \expandafter\gdef\csname X#1\endcsname{#2}%
+}}
-\def\readauxfile{%
-\begingroup
-\catcode `\^^@=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\^^C=\other
-\catcode `\^^D=\other
-\catcode `\^^E=\other
-\catcode `\^^F=\other
-\catcode `\^^G=\other
-\catcode `\^^H=\other
-\catcode `\ =\other
-\catcode `\^^L=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode `\=\other
-\catcode 26=\other
-\catcode `\^^[=\other
-\catcode `\^^\=\other
-\catcode `\^^]=\other
-\catcode `\^^^=\other
-\catcode `\^^_=\other
-\catcode `\@=\other
-\catcode `\^=\other
-\catcode `\~=\other
-\catcode `\[=\other
-\catcode `\]=\other
-\catcode`\"=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode `\$=\other
-\catcode `\#=\other
-\catcode `\&=\other
-% `\+ does not work, so use 43.
-\catcode 43=\other
-% Make the characters 128-255 be printing characters
-{%
- \count 1=128
- \def\loop{%
- \catcode\count 1=\other
- \advance\count 1 by 1
- \ifnum \count 1<256 \loop \fi
+% Read the last existing aux file, if any. No error if none exists.
+\def\readauxfile{\begingroup
+ \catcode`\^^@=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\ =\other
+ \catcode`\^^L=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode`\=\other
+ \catcode26=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ % It was suggested to define this as 7, which would allow ^^e4 etc.
+ % in xref tags, i.e., node names. But since ^^e4 notation isn't
+ % supported in the main text, it doesn't seem desirable. Furthermore,
+ % that is not enough: for node names that actually contain a ^
+ % character, we would end up writing a line like this: 'xrdef {'hat
+ % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+ % argument, and \hat is not an expandable control sequence. It could
+ % all be worked out, but why? Either we support ^^ or we don't.
+ %
+ % The other change necessary for this was to define \auxhat:
+ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+ % and then to call \auxhat in \setq.
+ %
+ \catcode`\~=\other
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ % `\+ does not work, so use 43.
+ \catcode43=\other
+ % Make the characters 128-255 be printing characters
+ {%
+ \count 1=128
+ \def\loop{%
+ \catcode\count 1=\other
+ \advance\count 1 by 1
+ \ifnum \count 1<256 \loop \fi
+ }%
}%
-}%
-% the aux file uses ' as the escape.
-% Turn off \ as an escape so we do not lose on
-% entries which were dumped with control sequences in their names.
-% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
-% Reference to such entries still does not work the way one would wish,
-% but at least they do not bomb out when the aux file is read in.
-\catcode `\{=1 \catcode `\}=2
-\catcode `\%=\other
-\catcode `\'=0
-\catcode `\\=\other
-\openin 1 \jobname.aux
-\ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue
-\global\warnedobstrue
-\fi
-% Open the new aux file. Tex will close it automatically at exit.
-\openout \auxfile=\jobname.aux
+ % The aux file uses ' as the escape (for now).
+ % Turn off \ as an escape so we do not lose on
+ % entries which were dumped with control sequences in their names.
+ % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+ % Reference to such entries still does not work the way one would wish,
+ % but at least they do not bomb out when the aux file is read in.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\%=\other
+ \catcode`\'=0
+ \catcode`\\=\other
+ %
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \closein 1
+ \input \jobname.aux
+ \global\havexrefstrue
+ \global\warnedobstrue
+ \fi
+ % Open the new aux file. TeX will close it automatically at exit.
+ \openout\auxfile=\jobname.aux
\endgroup}
@@ -4004,7 +4357,8 @@ July\or August\or September\or October\or November\or December\fi
% The trailing space in the following definition for supereject is
% vital for proper filling; pages come out unaligned when you do a
% pagealignmacro call if that space before the closing brace is
-% removed.
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
% @footnotestyle is meaningful for info output only..
@@ -4033,7 +4387,11 @@ July\or August\or September\or October\or November\or December\fi
% Don't bother with the trickery in plain.tex to not require the
% footnote text as a parameter. Our footnotes don't need to be so general.
%
-\long\gdef\footnotezzz#1{\insert\footins{%
+% Oh yes, they do; otherwise, @ifset and anything else that uses
+% \parseargline fail inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\long\gdef\footnotezzz{\insert\footins\bgroup
% We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment.
% So reset some parameters.
@@ -4055,8 +4413,13 @@ July\or August\or September\or October\or November\or December\fi
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
- #1\strut}%
+ \futurelet\next\fo@t
}
+\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
+ \else\let\next\f@t\fi \next}
+\def\f@@t{\bgroup\aftergroup\@foot\let\next}
+\def\f@t#1{#1\@foot}
+\def\@foot{\strut\egroup}
}%end \catcode `\@=11
@@ -4129,13 +4492,18 @@ July\or August\or September\or October\or November\or December\fi
% Set some numeric style parameters, for 8.5 x 11 format.
-%\hsize = 6.5in
+\hsize = 6in
+\hoffset = .25in
\newdimen\defaultparindent \defaultparindent = 15pt
\parindent = \defaultparindent
-\parskip 18pt plus 1pt
-\setleading{15pt}
+\parskip 3pt plus 2pt minus 1pt
+\setleading{13.2pt}
\advance\topskip by 1.2cm
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
% Prevent underfull vbox error messages.
\vbadness=10000
@@ -4158,30 +4526,28 @@ July\or August\or September\or October\or November\or December\fi
% Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25)
\def\smallbook{
-
-% These values for secheadingskip and subsecheadingskip are
-% experiments. RJC 7 Aug 1992
-\global\secheadingskip = 17pt plus 6pt minus 3pt
-\global\subsecheadingskip = 14pt plus 6pt minus 3pt
-
-\global\lispnarrowing = 0.3in
-\setleading{12pt}
-\advance\topskip by -1cm
-\global\parskip 3pt plus 1pt
-\global\hsize = 5in
-\global\vsize=7.5in
-\global\tolerance=700
-\global\hfuzz=1pt
-\global\contentsrightmargin=0pt
-\global\deftypemargin=0pt
-\global\defbodyindent=.5cm
-
-\global\pagewidth=\hsize
-\global\pageheight=\vsize
-
-\global\let\smalllisp=\smalllispx
-\global\let\smallexample=\smalllispx
-\global\def\Esmallexample{\Esmalllisp}
+ \global\chapheadingskip = 15pt plus 4pt minus 2pt
+ \global\secheadingskip = 12pt plus 3pt minus 2pt
+ \global\subsecheadingskip = 9pt plus 2pt minus 2pt
+ %
+ \global\lispnarrowing = 0.3in
+ \setleading{12pt}
+ \advance\topskip by -1cm
+ \global\parskip 2pt plus 1pt
+ \global\hsize = 5in
+ \global\vsize=7.5in
+ \global\tolerance=700
+ \global\hfuzz=1pt
+ \global\contentsrightmargin=0pt
+ \global\deftypemargin=0pt
+ \global\defbodyindent=.5cm
+ %
+ \global\pagewidth=\hsize
+ \global\pageheight=\vsize
+ %
+ \global\let\smalllisp=\smalllispx
+ \global\let\smallexample=\smalllispx
+ \global\def\Esmallexample{\Esmalllisp}
}
% Use @afourpaper to print on European A4 paper.
@@ -4204,12 +4570,19 @@ July\or August\or September\or October\or November\or December\fi
\global\pageheight=\vsize
}
+\bindingoffset=0pt
+\normaloffset=\hoffset
+\pagewidth=\hsize
+\pageheight=\vsize
+
% Allow control of the text dimensions. Parameters in order: textheight;
-% textwidth; \voffset; \hoffset (!); binding offset. All require a dimension;
+% textwidth; voffset; hoffset; binding offset; topskip.
+% All require a dimension;
% header is additional; added length extends the bottom of the page.
-\def\changepagesizes#1#2#3#4#5
-{\global\vsize= #1
+\def\changepagesizes#1#2#3#4#5#6{
+ \global\vsize= #1
+ \global\topskip= #6
\advance\vsize by \topskip
\global\voffset= #3
\global\hsize= #2
@@ -4222,9 +4595,20 @@ July\or August\or September\or October\or November\or December\fi
\global\normaloffset= #4
\global\bindingoffset= #5}
-% This layout is compatible with Latex on A4 paper.
-
-\def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}}
+% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
+% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
+\def\afourlatex
+ {\global\tolerance=700
+ \global\hfuzz=1pt
+ \setleading{12pt}
+ \global\parskip 15pt plus 1pt
+ \advance\baselineskip by 1.6pt
+ \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}
+ }
+
+% Use @afourwide to print on European A4 paper in wide format.
+\def\afourwide{\afourpaper
+\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}}
% Define macros to output various characters with catcode for normal text.
\catcode`\"=\other
@@ -4272,14 +4656,7 @@ July\or August\or September\or October\or November\or December\fi
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
% Subroutine for the previous macro.
-\def\_{\lvvmode \kern.06em \vbox{\hrule width.3em height.1ex}}
-
-% \lvvmode is equivalent in function to \leavevmode.
-% Using \leavevmode runs into trouble when written out to
-% an index file due to the expansion of \leavevmode into ``\unhbox
-% \voidb@x'' ---which looks to TeX like ``\unhbox \voidb\x'' due to our
-% magic tricks with @.
-\def\lvvmode{\vbox to 0pt{}}
+\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
\catcode`\|=\active
\def|{{\tt \char '174}}
@@ -4298,6 +4675,15 @@ July\or August\or September\or October\or November\or December\fi
{\catcode`\==\active
\global\def={{\tt \char 61}}}
+\catcode`+=\active
+\catcode`\_=\active
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
\catcode`\@=0
% \rawbackslashxx output one backslash character in current font
@@ -4340,6 +4726,10 @@ July\or August\or September\or October\or November\or December\fi
@let>=@normalgreater
@let+=@normalplus}
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
@@ -4350,8 +4740,11 @@ July\or August\or September\or October\or November\or December\fi
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
% the first `\{ in the file would cause an error. This macro tries to fix
% that, assuming it is called before the first `\' could plausibly occur.
+% Also back turn on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
%
-@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi}
+@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active @catcode`@_=@active}
%% These look ok in all fonts, so just make them not special. The @rm below
%% makes sure that the current font starts out as the newly loaded cmr10
diff --git a/doc/version.texi b/doc/version.texi
index b55168ee..49d6518e 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,3 +1,3 @@
-@set EDITION 1.4
-@set UPDATED November 1994
-@set VERSION 1.4
+@set UPDATED 6 October 1997
+@set EDITION 1.4c
+@set VERSION 1.4c
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 47e6fe16..919914a1 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,60 +1,191 @@
-# Makefile for GNU m4 examples.
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
-# 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.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# 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.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 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.
-
-PRODUCT = @PRODUCT@
-VERSION = @VERSION@
SHELL = /bin/sh
+
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DISTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLOCALE = @GLOCALE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NM = @NM@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+STACKOVF = @STACKOVF@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
-.SUFFIXES:
-
-DISTFILES = Makefile.in capitalize.m4 comments.m4 ddivert.m4 \
+EXTRA_DIST = 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
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = Makefile.am Makefile.in
-all:
-install:
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-uninstall:
+TAR = gtar
+GZIP = --best
+all: Makefile
-mostlyclean:
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
-clean: mostlyclean
-distclean: clean
- rm -f Makefile
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-realclean: distclean
+subdir = examples
-dist: $(DISTFILES)
- @echo "Copying distribution files"
+distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
- ln $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/examples 2> /dev/null \
- || cp -p $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/examples; \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
done
+info:
+dvi:
+check: all
+ $(MAKE)
+installcheck:
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data:
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall:
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-generic
+
+clean: clean-generic mostlyclean
+
+distclean: distclean-generic clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: tags distdir info dvi installcheck install-exec install-data \
+install uninstall all installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=examples/$@ CONFIG_HEADERS= ./config.status
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/examples/WWW/Makefile b/examples/WWW/Makefile
deleted file mode 100644
index f143493e..00000000
--- a/examples/WWW/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-M4 = m4
-M4OPTS = -Im4lib
-
-VPATH = .:m4lib
-
-all: *.htm
-
-%.htm: %.m4
- @$(M4) $(M4OPTS) $< >new.htm && \
- if cmp -s new.htm $@; then \
- rm new.htm; \
- echo "$@ has not changed"; \
- else \
- echo "$@ updated"; \
- mv new.htm $@; \
- fi
-
-*.htm: m4lib/*.m4
diff --git a/examples/WWW/_footer.htm b/examples/WWW/_footer.htm
deleted file mode 100644
index 8fbbce61..00000000
--- a/examples/WWW/_footer.htm
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/_header.htm b/examples/WWW/_header.htm
deleted file mode 100644
index 643223d6..00000000
--- a/examples/WWW/_header.htm
+++ /dev/null
@@ -1,234 +0,0 @@
-<!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Development site</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4o">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=middle colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Discussion Forum</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-
-
-
-
-
-
-
-
-<TABLE >
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>General info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/whatis.htm">What is m4</A><BR>
-<A HREF="/rene/gnu/features.htm">Features</A><BR>
-<A HREF="/rene/gnu/uses.htm">Uses of m4</A></B></FONT>
-
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/man/m4_toc.html">Manual</A></B></FONT>
-
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/readme.htm">README</A><BR>
-<A HREF="/rene/gnu/todo.htm">TODO</A><BR>
-<A HREF="/rene/gnu/news.htm">NEWS</A><BR>
-<A HREF="/rene/gnu/changelog.htm">ChangeLog</A><BR>
-<A HREF="/rene/gnu/thanks.htm">Contributors</A><BR>
-<A HREF="/rene/gnu/m4/">Browse it</A></B></FONT>
-
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/modules.htm">Modules</A><BR>
-<A HREF="/rene/gnu/visions.htm">Visions</A></B></FONT>
-
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Feedback</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/lists.htm">Mailing-lists</A><BR>
-<A HREF="/rene/gnu/feedback.htm">Feedback</A><BR>
-
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/download.htm">Download</A><BR>
-<A HREF="/rene/gnu/bugs.htm">Known bugs</A></B></FONT>
-
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-<P>
-
-<FONT size=-1><B><A HREF="/rene/gnu/thissite.htm">This site</A></B></FONT>
-
-</P>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-
diff --git a/examples/WWW/bugs.htm b/examples/WWW/bugs.htm
deleted file mode 100644
index 207fcc31..00000000
--- a/examples/WWW/bugs.htm
+++ /dev/null
@@ -1,284 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Known bugs in GNU m4 \__m4_version__</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4n">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Known bugs in GNU m4 1.4n</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-
-
-
-
-
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A><BR>
-<A HREF="features.htm">Features</A><BR>
-<A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A><BR>
-<A HREF="todo.htm">TODO</A><BR>
-<A HREF="news.htm">NEWS</A><BR>
-<A HREF="changelog.htm">ChangeLog</A><BR>
-<A HREF="thanks.htm">Contributors</A><BR>
-<A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A><BR>
-<A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A><BR>
-<A HREF="feedback.htm">Feedback</A><BR>
-<A HREF="download.htm">Download</A><BR>
-<A HREF="bugs.htm">Known bugs</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD height=5>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<H2>Known bugs in GNU m4</H2>
-
-
-
-
-
-
-<UL>
-
-
-<LI> <A HREF="#undivert">undivert(0) might read from standard output.</A>
-
-
-
-
-<LI> <A HREF="#sigaltstack">failure if sigaltstack or sigstack returns ENOSYS.</A>
-
-
-
-
-
-</UL>
-
-
-<P>
-See also the <A HREF="todo.htm">TODO</A> file.
-</P>
-
-
-
-<HR align=center width=50%><A NAME="undivert">
-<H2>undivert(0) might read from standard output</H2>
-</A><P>
-If calling <TT>undivert(0)</TT> when diverting to a non-zero diversion
-will cause m4 to read from standard output in an attempt to bring back
-diversion 0, which is not possible.
-</P>
-
-
-<P>
-Fixed in version 1.4n
-</P>
-
-
-
-<HR align=center width=50%><A NAME="sigaltstack">
-<H2>failure if sigaltstack or sigstack returns ENOSYS</H2>
-</A><P>
-If stack overflow detection is configured but the system doesn't
-support sigaltstack(2) or sigstack(2), m4 fails when the system call
-returns ENOSYS. It should silently revert to default behaviour.
-</P>
-
-
-<P>
-A <A
-HREF="mailto:m4-feedback@seindal.dk?subject=GNU m4: failure if sigaltstack or sigstack returns ENOSYS"
->volunteer</A> is badly needed for this, as I have no way of testing
-this myself.
-</P>
-
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/changelog.htm b/examples/WWW/changelog.htm
deleted file mode 100644
index 56713edc..00000000
--- a/examples/WWW/changelog.htm
+++ /dev/null
@@ -1,2248 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - ChangeLog</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>ChangeLog</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<PRE>1998-11-18 Rene' Seindal &lt;rene@seindal.dk&gt;
-
- * src/input.c (set_word_regexp): Fixed a bug, where word_regexp
- could be changed when compiling a illegal regexp, causing later
- use of the regexp to dump core.
-
- * src/module.c (module_load): Changed error message to conform to
- standards.
-
- * src/m4.c (usage): Added message about reporting bugs.
-
- * doc/m4.texinfo (Changeword): Corrected a wrong example.
- (Changeword): Added note about the type of regexps used.
-
- * ltconfig, ltmain.sh: New files from Libtool 1.2.
-
- * configure.in: Added calls to AM_ENABLE_SHARED, AM_DISABLE_STATIC
- and AM_PROG_LIBTOOL.
-
- * acm4/modules.m4 (AM_WITH_MODULES): Redone completely to work
- with libtool.
-
- * modules/Makefile.am: Changed completely to compile modules using
- libtool. The modules are compiled as shared libraries, and are
- renamed when installed.
-
- * src/m4.h, src/module.c, acm4/modules.m4, acconfig.h: Renamed
- USE_SHL_LOAD to HAVE_SHL_LOAD
-
- * src/builtin.c (shipout_string): Now tests for a NULL string.
-
- * src/module.c: New level of indirection around non-portable
- functions to load shared objects. Intended to encapsulate the non
- portable parts better and to reduce the number of #ifdefs in the
- code.
-
- * Makefile.am (DIST_SUBDIRS): Instead of EXTRA_DIST for added
- directory modules/ to the distribution.
-
-1998-11-15 Rene' Seindal &lt;rene@seindal.dk&gt;
-
- * Prerelease 1.4l.
-
- * modules/stdlib.c: New module `stdlib' defining some standard
- functions: getcwd, getlogin, getpid, getppid, getuid, getpwnam,
- getpwuid, hostname, rand, srand, getenv, setenv, unsetenv, uname.
-
- * src/builtin.c (shipout_string): New convenience function for
- builtins and modules.
-
- * src/module.c (module_load): Tentative support for
- shl_load/shl_findsym, but I cannot test it. Copied from MetaHTML.
-
- * Makefile.am (SUBDIRS): Directory modules added if configured.
-
- * modules/Makefile.am: Now correctly compiles and installs
- modules in pkglibexecdir.
-
- * src/m4.h: WITH_MODULES defined iff HAVE_DLOPEN or USE_SHL_LOAD.
- These two are now initialised by autoconf macros.
-
- * src/path.c (module_env_init): MODULE_PATH is always on the
- search path.
-
- * src/Makefile.am: Now generated pathconf.h which defined the
- default MODULE_PATH.
-
- * configure.in (pkglibexecdir): Added defintion of pkglibexecdir,
- where modules are installed.
-
- * acm4/modules.m4: Enhanced with code from MetaHTML, contributed
- by Brian J. Fox &lt;bfox@datawave.net&gt;. This change allow modules to
- build and install automatically, and it is prepared for other
- interfacec than dlopen().
-
- * src/builtin.c (predefined_tab): Added __m4_version__ for the
- current version of GNU m4. It is a GNU extension.
-
-1998-11-14 Rene' Seindal &lt;rene@seindal.dk&gt;
-
- * tests/Makefile.am (GENERATED_TESTS): Added new
- generated-tests/changesy.8.test
-
- * doc/m4.texinfo (Changesyntax): Documentation for escape
- syntax class.
-
- * src/macro.c (expand_token): Check for escaped macro call before
- symbol table lookup.
-
- * src/builtin.c (m4_changesyntax): Added `@' flag to define escape
- characters
-
- * src/input.c: New static variable use_macro_escape, which is TRUE
- iff some character has code SYNTAX_ESCAPE
- (input_init): Added initialisation of use_macro_escape.
- (check_use_macro_escape): New function to synchronise
- use_macro_escape with the syntax table.
- (set_quotes): Added call to check_use_macro_escape()
- (set_comment): Do.
- (set_syntax): Do.
- (next_token): Added new case for IS_ESCAPE.
-
- * src/m4.h (SYNTAX_ESCAPE): Defined as simple syntax category.
-
-1998-10-13 René Seindal &lt;rene@seindal.dk&gt;
-
- * Prerelease 1.4k.
-
- * tests/Makefile.am (GENERATED_TESTS): Renamed gentest to
- generated-tests.
-
- * tests/Makefile.am (OTHER_TESTS, OTHER_FILES): Added manually
- maintained tests in tests/other-tests. These currently tests for
- 8-bit transparency, multiple precision arithmetic and sync-line
- output. Test for stackoverflow detection does not work.
-
- * examples/Makefile.am (TESTS): Added tests for all example files.
-
- * examples/mktests.sh: New file. Help program for creating test
- files.
-
- * tests/mkconfig.sh: New file to generate tests/config.m4 and
- tests/config.sh. This is for tests of configure selectable
- features. Picks up all set WITH_ and ENABLE_ veriables from
- config.h
-
- * src/path.c (path_search): Added argument 'char **expanded_name'
- to return the expanded name.
-
- * src/m4.h: Added 2nd argument to declaration of path_search().
-
- * src/m4.c (main): Added 2nd argument to path_search().
-
- * src/freeze.c (reload_frozen_state): Do.
-
- * src/builtin.c (m4_undivert): Do.
- (include): Do.
-
-1998-10-11 René Seindal &lt;rene@seindal.dk&gt;
-
- * acm4/Makefile.am (ACINCLUDES_M4): Added gmp.m4 and modules.m4
-
- * acm4/modules.m4: New file. Defines AM_WITH_MODULES.
-
- * acm4/gmp.m4: New file. Defines AM_WITH_GMP.
-
- * configure.in: Introduced AM_WITH_MODULES and AM_WITH_GMP.
-
- * AUTHORS, ChangeLog: Changed all dates to ISO 8601.
-
- * intl/: Updated to GNU gettext 0.10.35.
-
- * doc/m4.texinfo (Format): Documented that format is blind.
-
- * src/builtin.c (builtin_tab): Builtin format marked as blind.
-
-1998-10-07 René Seindal &lt;rene@seindal.dk&gt;
-
- * Prerelease 1.4j.
-
- * tests/Makefile.am (GENERATED_TESTS): Changed .m4 extension to
- .test, as the files are no longer just m4 input.
-
- * tests/get-them (FILE): Changed .m4 extension to .test.
-
- * src/m4.h (token_type): New token type TOKEN_SPACE introduced.
- Otherwise quoted strings with leading whitespace first in a macro
- argument would be eliminated.
-
- * src/macro.c (expand_token): Handles new token type TOKEN_SPACE.
- (expand_argument): Do.
-
- * src/input.c (next_token): SPACE and NUM/OTHER characters are only
- grouped together iff both quote and comment strings are single
- character. Otherwise they might include a comment/quote leader.
- (next_token): Returns new token type TOKEN_SPACE.
-
- * src/builtin.c (push_builtin_table): New function to push a
- builtin_table on the stack without installing its contents.
- (find_builtin_by_name): Added call to push_builtin_table() if
- reading frozen files. Otherwise the builtins named in the frozen
- files could not be found.
- (install_builtin_table): Changed to use push_builtin_table()
-
-1998-10-04 René Seindal &lt;rene@seindal.dk&gt;
-
- * Prerelease 1.4i.
-
- * configure.in (ALL_LINGUAS): Added Polish pl.po
-
-1998-10-03 René Seindal &lt;rene@seindal.dk&gt;
-
- * Many files: Incorporated changes to implement dynamic modules.
- Detailed comments in src/modules.c and modules/README
-
- * src/module.c: New file, implements the OS dependant parts of
- dynamic module loading.
-
- * src/Makefile.am (m4_SOURCES): Added module.c
-
- * src/builtin.h: New file, declares some functions from builtin.c
- that are of use for other modules (shipout_int, numeric_arg,
- skip_space, bad_argc), and the macros ARG() and DECLARE().
-
- * src/builtin.c (install_builtin_table): New function. Each
- module brings in a builtin_table, which is pushed on a stack.
- (struct builtin_table): New struct for list of builtin_tables.
- (m4_loadmodule): New function to implement builtin "loadmodule".
- (shipout_int): No longer static, to be used by modules.
- (numeric_arg): do.
- (skip_space): do.
- (bad_argc): do.
- (builtin_init): changed to call install_builtin_table()
- (find_builtin_by_name): Now searches all builtin_tables
- (find_builtin_by_addr): do.
-
- * src/path.c: Reorganised to allow for two search paths, one for
- include files and one for modules.
-
- * src/m4.h: Added declarations for new functions in module.c and
- in path.c.
-
- * src/m4.c (main): Added call to module_init().
-
- * modules: New directory with a few demo modules.
-
- * Makefile.am (EXTRA_DIST): Added modules/* since modules/ is not
- in SUBDIRS.
-
- * configure.in: Added modules/Makefile to AC_OUTPUT.
-
- * configure.in: Added code to implement --with-modules. Tests for
- &lt;dlfcn.h&gt; and -ldl.
-
- * acconfig.h: Added WITH_MODULES
-
-1998-10-02 René Seindal &lt;rene@seindal.dk&gt;
-
- * examples/Makefile.am (pkgdata_DATA): Removed special target for
- check and variables TESTS. These tests are now run from the
- tests/ directory.
-
- * tests/Makefile.am (OTHER_TESTS): Added tests from the example/
- directory. The files stay there but the tests are run from the
- tests/ directory.
-
- * tests/Makefile.am (EXTRA_DIST): Added run-test.
-
- * tests/run-test: New file. Run a test manually
-
- * tests/Makefile.am, tests/get_them: Moved automatically generated
- tests (from the manual) to sub directory tests/gentest/. The
- tests/ directory had gotten a bit messy.
-
-1998-09-06 Erick Branderhorst &lt;Erick.Branderhorst@asml.nl&gt;
-
- * examples/{comments,ddivert,debug,iso8859,reverse,sysv-args,\
- wrap}.test: Added a few testcases.
-
-1998-08-21 Erick Branderhorst &lt;Erick.Branderhorst@asml.nl&gt;
-
- * Prerelease 1.4h.
-
- * lib/Makefile.am (noinst_HEADERS): regex.h added
-
- * configure.in (jm_WITH_REGEX, jm_PREREQ_ERROR):
- acm4/{error,regex}.m4 (from fileutils-3.16u.tar.gz).
-
- * acm4/Makefile.am: created providing rules to create
- $(top_srcdir)/acinclude.m4 to be used by aclocal.
-
- * tests/defs (LANGUAGE, LC_ALL, LANG): force them to be
- `C'. Reported by Ulrich Drepper.
-
- * Makefile.am (SUBDIRS): Removed checks directory
- * configure.in (AC_OUTPUT): Removed checks/Makefile
-
- * doc/m4.texinfo (Patsubst,example): @comment added to preserve
- the space when m4.texinfo is edited and whitespace.el is active.
- (Defn,example): idem.
-
-1998-08-20 Erick Branderhorst &lt;Erick.Branderhorst@asml.nl&gt;
-
- * doc/m4.texinfo (Esyscmd): grep ../Makefile instead of
- ../COPYING. ../Makefile is a file which is certainly present when
- test is executed in testSubDir. One can't be sure that the COPYING
- file is in .. or ../.. in all situations, the ../Makefile is
- always there.
-
- * doc/m4.texinfo (Include): adjusted expected test output
- according to new tests, i.e. the input will always come from the
- file `in' created by the test.
-
- * tests/Makefile.am: Added three lines at the top to get
- esyscmd.1.test working.
-
- * tests/get-them: modified to generate clearer tests who will need
- less maintenance when new test examples are created in
- `doc/m4.texinfo'. All tests are small (nearly stand-alone, they
- need the generic file `defs') shell scripts creating `in', `ok',
- `out' and when apropriate `okerr' and `err' in the directory
- `testSubDir' when executed. The compare of `ok' and `out'
- (and of `okerr' and `err') will be the exit status of the test.
- `out' must match `ok' (and `okerr' must match `err') for the test
- to be succesful.
-
- * tests/[a-b]\{1,8\}.[0-9]+.test: This namespace is reserved for
- the tests generated by tests/get-them getting it input normally
- from doc/m4.texinfo. The namespace tests/[a-b]+[0-9]+.test (no `.'
- (dot) before the numeric part) is reserved for all other (hand
- written) tests. The `+' means one or more times.
-
-1998-08-12 Erick Branderhorst &lt;Erick.Branderhorst@asml.nl&gt;
-
- * doc/Makefile.am (EXTRA_DIST): helptoman.pl and $(MANS) to
- supported short man page to refer to info documentation
- * helptoman.pl: added
- * configure.in: AC_PATH_PROG(PERL,perl)
- * Makefile.am (SUBDIRS): doc after src
-
- * libitized with libit 0.5 from
- ftp://ftp.iro.umontreal.ca/pub/contrib/pinard/maintenance/libit.
-
- * configure.in (AC_REPLACE_FUNCS): added xmalloc xstrdup
- * lib/Makefile.am (libm4_a_SOURCES): removed automakely supported
- replacement functions, (libm4_a_LIBADD): @LIBOBJS@
- * configure.in (AM_WITH_REGEX), acconfig.h (WITH_REGEX): added
- lib/rx.{c,h}: added
- * configure.in (AC_CHECK_FUNC): getopt_long
-
- * src/m4.c (usage): Report bugs to m4-bugs@gnu.org.
-
- * TODO: added entry about dependencies
-
-1998-08-10 René Seindal &lt;rene@seindal.dk&gt;
-
- * 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 René Seindal &lt;rene@seindal.dk&gt;
-
- * 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 René Seindal &lt;rene@seindal.dk&gt;
-
- * 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 &lt;mike@clove.com&gt;
-
-1998-08-06 René Seindal &lt;rene@seindal.dk&gt;
-
- * gettext.m4: corrected AM_WITH_NLS to handle use of installed
- -lintl.
-
-1998-08-03 René Seindal &lt;rene@seindal.dk&gt;
-
- * Prerelease 1.4e
-
- * src/m4.h: Added ifdef ENABLE_NLS around include of &lt;libintl.h&gt;
- and _ macro. M4 now builds with --disable-nls.
-
- * 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.
-
-1998-05-22 Erick Branderhorst &lt;Erick.Branderhorst@asml.nl&gt;
-
- * Prerelease 1.4d.
-
- * src/m4.c: #include &lt;signal.h&gt; not &lt;sys/signal.h&gt;.
-
- * src/Makefile.am: CFLAGS = -Wall @CFLAGS@.
-
- * checks/Makefile.am: explicit list tests in CHECKS.
-
- * configure.in, {,src,doc,lib,examples,checks}/Makefile.am,
- src/{ansi2knr.{1,c}} doc/{m4.texinfo,mdate-sh}, missing,
- mkinstalldirs, install-sh: Added automake (1.3) support.
-
- * lib/{alloca.c,error.{c,h},get{date.h,opt.{c,h},opt1.c},
- obstack.{c,h},regex.{c,h},strtol.c,xmalloc.c,xstrdup.c}:
- Used libitize (0.4) to update.
-
- * configure.in, ABOUT-NLS, intl/*, po/*: Added gettextize
- (0.10.25) support. Removed LOCALE, fr.msg, m4.cod and adjusted
- README accordingly.
-
- * src/stackovf.c: #ifdef USE_STACKOVF ... #endif to (de-)activate
- stack overflow functionality.
-
-1994-12-03 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Prerelease 1.4.1.
-
- * Makefile.in (realclean-local): Delete stamp-h.in.
-
- * configure.in, {,src,lib}/Makefile.in, src/m4.h, src/m4.c:
- Localize, adapting from how it is done in sharutils.
-
- * fr.tt: New file, for French.
-
- * configure.in, {,*/}Makefile.in, acconfig.h, src/m4.c,
- src/freeze.c: Rename PRODUCT to PACKAGE.
-
-1994-11-26 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Check for &lt;libintl.h&gt; and &lt;locale.h&gt;.
- * src/m4.h, src/builtin.c, src/debug.c, src/eval.c, src/macro.c,
- src/stackovf.c: Rename _ to __P.
- * src/m4.h: Declare _ as a macro returning its argument, or else,
- include &lt;libintl.h&gt; and declare _ as gettext.
- * src/m4.c: Possibly include &lt;locale.h&gt; and call setlocale.
- * src/m4.c, src/builtin.c, src/debug.c, src/eval.c, src/freeze.c,
- src/input.c, src/macro.c, src/output.c, src/path.c,
- src/stackovf.c, src/symtab.c: Use _ macro over all localizable
- strings.
-
-1994-11-07 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * doc/Makefile.in (stamp-vti): Use new -r option to date.
-
- * configure.in: Put --with-gmp in place, in prevision for John
- Gerard's work.
- * acconfig.h: Document WITH_GMP.
-
-1994-11-05 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Release 1.4.
-
- * doc/Makefile.in (realclean): Also remove stamp-vti.
- Reported by Eric Backus.
-
-1994-11-02 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * src/freeze.c (produce_frozen_state): If the frozen file cannot
- be opened, return immediately after producing the error message.
- Reported by Andreas Schwab.
-
- * configure.in: Check for const only after having found possible
- ANSIfying compiler flags, this is of no use to check it before.
- Reported by Alexander Lehmann.
-
-1994-11-01 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * src/macro.c (collect_arguments): Cast obstack arguments to
- (voidstar), so avoiding compiler warnings.
- Reported by Joseph E. Sacco.
-
- * src/freeze.c (produce_frozen_state): Cast printed lengths to
- (int) so they correspond to %d format items.
- Reported by Joseph E. Sacco.
-
- * src/m4.c (main): Cast the argument to xfree to (voidstar).
- * src/symtab.c (free_symbol): Idem.
- Reported by Karl Vogel.
-
-1994-10-31 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (DISTFILES): Distribute BACKLOG.
-
- * configure.in: Define PRODUCT and VERSION.
- * acconfig.h: Document PRODUCT and VERSION.
- * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
- constant string m4 and variable or parameter named version.
-
-1994-10-30 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
- __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
- defines __STDC__ to 0, for indicating it is *not* ANSI!
- Reported by Kaveh R. Ghazi.
-
- * configure.in: Added obsolescent tests for AIX and Minix.
-
- * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
- which texclean does not exist anymore.
- Reported by Eric Backus, Jim Meyering, John David Anglin and
- Joseph E. Sacco.
-
-1994-10-29 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
- Reported by John David Anglin.
-
- * src/ansi2knr.c: New version, sent by Peter Deutsch.
- * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
- ANSI2KNR, depending on the fact the compiler is ANSI or not.
- * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
- Remove the sed filter after ansi2knr for debug.c. Use $O instead
- of $U, put underline in extensions rather than in basenames. Use
- implicit rules, now that regularity makes this possible.
- Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
- of ansi2knr whenever it is needed.
- * configure.in: Adjusted for correct STACKOVF substitution.
- * src/debug.c (trace_format): When not __STDC__, use (...) as a
- parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
- Reported by David MacKenzie.
-
- * Makefile.in: Remove binprefix. Use transform_name instead.
- Reported by David MacKenzie.
-
- * doc/Makefile.in: Create version.texi, use it, clean it.
- Reported by Jim Meyering.
-
-1994-10-28 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (all, install, uninstall): Depend on Makefile.
-
- * Makefile.in: For actions invoking $(MAKE) from within compound
- sh statements, exit non-zero if the sub-make fails. Otherwise,
- the top-level make may exit successfully when it should fail.
- Reported by Jim Kingdon.
-
- * {,/*}Makefile.in: Use && after all cd, in case they fail.
-
- * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
- (dist): Use PRODUCT and VERSION instead of tricks on .fname.
- * configure.in: Substitute PRODUCT and VERSION.
-
- * {,*/}Makefile.in (dist): Always try a hard link before a copy.
-
-1994-10-27 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (mostlyclean-local): Do not remove *~.
- * */Makefile.in (mostlyclean): Idem.
- Reported by Robert E. Brown and Richard Stallman.
-
-1994-10-09 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * src/m4.h: Get rid of CONFIG_BROKETS.
-
-1994-10-02 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Use AC_ARG_PROGRAM.
- * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
- Reported by David MacKenzie.
-
-1994-10-01 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Do not add -O to CFLAGS for GNU C, now that
- configure does it automatically.
- Reported by Jim Meyering.
-
-1994-09-23 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * src/stackovf.c: Declare the handler_t typedef earlier in the
- code, use it for stackovf_handler.
- (setup_stackovf_trap): Use RETSIGTYPE instead of void while
- casting sigsegv_handler.
- Reported by Robert Bernstein.
-
- * src/m4.c (main): Initialize program_name to argv[0] without
- basename'ing it.
- Reported by Karl Berry.
-
-1994-09-18 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
- Reported by Karl Berry.
-
-1994-09-14 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * lib/Makefile.in (mostlyclean): Added.
- (TAGS): Make in $(srcdir).
-
- * configure.in: Use `choke me' in test, like everywhere!
-
- * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
- unreacheable and useless.
-
- * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
-
- * lib/Makefile.in (DISTFILES): Distribute TAGS.
- (distclean): Do not remove TAGS.
- (realclean): Remove it.
- * Makefile.in: Make TAGS in lib also, not just in src.
- Reported by Karl Berry.
-
- * Makefile.in (distclean, realclean): Instead of recursively
- calling $(MAKE) for the -local part, allow parallel execution of
- -recursive and -local, only delay the removal of config.status,
- which is repeated in both goals.
-
-1994-09-13 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Release 1.3.
-
- * Makefile.in: Group all *clean-recursive goals in one, using sed
- to remove `-recursive' while calling make recursively. Also, use
- a subshell for each recursive $(MAKE).
- Reported by Jim Meyering.
-
- * src/m4.h (memcpy): Define with bcopy for BSD systems.
- Reported by Kaveh R. Ghazi.
-
- * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
- 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
- specify it.
-
- * configure.in: Use date instead of touch for stamp-h.
- * Makefile.in (stamp-h.in): Idem.
-
- * Makefile.in (distclean, realclean): Force serial execution of
- both goals, in case parallel makes are being used.
- Reported by Jim Meyering.
-
- * src/Makefile.in (DISTFILES): Distribute TAGS.
- (distclean): Do not remove TAGS.
- (realclean): Remove it.
- Reported by Karl Berry.
-
-1994-09-10 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
- to old names, for following Autoconf.
-
-1994-09-08 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
- ./install.sh will not be correctly referred to in sub-Makefiles.
- Reported by John David Anglin.
-
- * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
- Reported by Eric Backus.
-
- * Makefile.in, checks/Makefile.in, doc/Makefile.in,
- examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
- config.status into remaking this directory's Makefile only.
- * Makefile.in (stamp-h): Do not check nor touch stamp-h.
- * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
- Reported by Jim Meyering.
-
-1994-09-06 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Correct stack overflow detection logic, taking
- care of systems having only incomplete implementations (like for
- Pyramid 9820 OSx 5.0d).
- Reported by Kaveh R. Ghazi.
-
- * src/Makefile.in (TAGS): Remote -t from etags call.
-
-1994-09-02 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * lib/Makefile.in (install): Depend on all.
-
-1994-08-31 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * examples/Makefile.in (mostlyclean): Do not depend on texclean.
- Reported by Jim Meyering and John David Anglin.
-
- * Makefile.in (distclean-local): Delete config.log.
- Reported by Jim Meyering.
-
- Solidify frozen files with respect to -P:
- * src/m4.c: Have -P set prefix_all_buitins variable instead of
- calling a function by that name. Declare the variable.
- * src/m4.h: Adjust declaration for prefix_all_buitins.
- * src/builtin.c (builtin_init): Merge in functionality from
- previous prefix_all_buitins function, while making entries in the
- symbol table, but not modifying the builtin description itself.
-
- * src/freeze.c (reload_frozen_state): Add a useless `break;',
- because *many* compilers do not accept an empty `default:'.
- Reported by Akiko Matsushita, Eric Backus, John David Anglin,
- Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
-
- * configure.in: Use AC_TYPE_SIGNAL.
- * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
- Reported by Robert Bernstein.
-
- * checks/Makefile.in (check): Modify PATH so check-them will find
- m4 in the src directory.
- * Makefile.in (check): Don't.
- Reported by Akiko Matsushita and Jim Meyering.
-
- * src/output.c (make_room_for, output_character_helper): New
- functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
- a per buffer MAXIMUM_BUFFER_SIZE.
-
- * src/output.c (output_text): New function, for optimizing the
- output of strings of characters. Use it.
-
-1994-08-30 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * doc, src: New directories reorganizing the distribution.
- * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
- files.
- * Makefile.in: Adjusted.
- * configure.in: Configure new Makefiles.
-
- * m4.h: Declare STRING typedef. Use it for comment and quote
- strings, adjusting all references. (This is the rudiments of a
- beginning for the eventual withdrawal of NUL terminated strings.)
- * output.c (shipout_text): Accept a length parameter, and use it.
- All callers adjusted.
-
-1994-08-29 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Include &lt;unistd.h&gt; if it exists.
- * stackovf.c: Don't.
-
- Clean up for current_diversion variable:
- * output.c: Move current_diversion from builtin.c.
- * m4.h: Declare current_diversion so builtin.c can access it.
- * output.c (output_init, make_diversion): Initialize or update
- current_diversion.
- * builtin.c (builtin_init, m4_divert): Leave current_diversion
- alone.
-
- Remove limit on number of diversions:
- * output.c: Replace ndiversion by diversions, declare it.
- (output_init): Allocate only diversion 0.
- (make_diversion): Allocate new diversions as needed.
- * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
- * m4.c: Still accept -N, but do nothing with it.
- Reported by David MacKenzie.
-
- Freeze diversions:
- * output.c (freeze_diversions): New function.
- * m4.h: Declare freeze_diversions.
- * freeze.c: Document frozen file format, revise it, call
- freeze_diversions to add diversions to frozen format, and code to
- reload them properly.
- * m4.c: Do not undivert automatically at end when status being
- frozen. Do not call builtin_init when reloading frozen state.
-
- Speed up diversion processing:
- * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
- COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
- structure and variables, cached variables out of output_diversion,
- reallocate_diversion_for and OUTPUT_CHARACTER.
- (shipout_text, make_diversion, insert_diversion): Adapted to new
- structures.
- (insert_file): Use better buffering.
- Reported by David MacKenzie.
-
-1994-08-28 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
- dist works from another build directory.
-
-1994-08-27 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * symtab.c (hack_all_symbols): Use hash_table_size instead of
- constant HASHMAX, for -H option to work better.
-
- * builtin.c (DECLARE): Simplify by using _ ().
-
- * freeze.c: New file.
- * Makefile.in: Compile it, distribute it.
- * m4.c: Recognize, document and process --freeze-state (-F) and
- --reload-state (-R) options. Pass a true flag to builtin_init
- only if no reloading some state.
- * builtin.c (define_builtin): Remove static specifier.
- (find_builtin_by_name): Remove static specifier.
- (builtin_init): Accept and obey a flag argument.
- * m4.h: Add declarations for freeze.c, changes for builtin.c.
-
-1994-08-24 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
- specifier.
-
- * configure.in: Implement --with-dmalloc.
- * acconfig.h: Document WITH_DMALLOC.
- * m4.h: Add code for when WITH_DMALLOC.
-
-1994-08-15 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c (long_options): Use "error-output", the dash was missing.
- Reported by Akiko Matsushita.
-
-1994-08-12 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Include &lt;sys/types.h&gt;.
- * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
- * m4.h: Declare len_lquote and len_rquote as size_t, not int.
- int.
- * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
- as size_t, not int.
- * builtin.c (dump_args): Declare len as size_t, not int.
-
- * debug.c: Prototype the forward declaration of debug_set_file.
-
- * builtin.c (m4_undivert): Replace div by file, for avoiding the
- shadowing of this variable.
- * output.c (insert_diversion): Idem.
-
- * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
- (input_init): Duplicate default quote and comment strings.
- (set_quotes): Free previous quote strings in all cases. Duplicate
- even default quote strings.
- (set_comment): Free previous comment strings in all cases.
- Duplicate even default comment strings.
-
- * configure.in: Updated for Autoconf 2.0.
- * Makefile.in (distclean-local): Also delete config.cache.
-
- * m4.c (usage): Reorganize the --help output by topic. Include a
- description for debugging flags.
-
-1994-07-29 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: If sigaction is available and SA_ONSTACK defined,
- use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
- defined, use sigvec. Else don't compile stackovf.c.
- * stackovf.c (setup_stackovf_trap): Idem.
- Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
- and Simon Leinen.
-
-1994-07-21 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c (usage): Replace printf par fputs.
-
-1994-07-18 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Release 1.2
-
-1994-07-17 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Check for sigaction and sigvec. Add a new delayed
- check for RLIMIT_STACK, combine in the checking for getrlimit.
- All those things are not universally available.
- * stackovf.c: Split setting up the trap handler and catching
- signals, for better taking care of various configure outcomes.
- * examples/stackovf.sh: Correct a typo.
- Reported by Eric Backus, Jim Avera and Jim Meyering.
-
-1994-07-16 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * ansi2knr.c: New version sent by its author, Peter Deutsch.
-
-1994-07-15 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in: Modify so parallel make will not try making
- lib/libm4.a twice simultaneously.
- Reported by Jim Meyering.
-
-1994-07-14 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
- error message, for when no code possibility exists. Even if this
- line is completely #ifdef'ed out, it brings a syntax error.
- Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
-
- * Makefile.in (install): Have install depend on all too, for lib
- to be remade as needed.
-
- * examples/stackovf.sh: Try ksh, bsh and bash for shells
- providing ulimit, instead of using only ksh.
- Reported by Jim Avera and Joseph E. Sacco.
-
-1994-07-12 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (check): Have it depend on all instead of m4. In
- this way, a change in lib will be detected and processed.
-
- * builtin.c (numeric_arg): Use strtol and verify the conversion,
- instead of using sscanf which stops as soon as there is a
- non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
- and divert(1xyzzy) were all accepted without any warning or error
- messages.
- * m4.h: Declare strtol as long if not including stdlib.h.
- * configure.in: Check for limits.h, and replace strtol if missing.
- * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
- * lib/strtol.c: New file, from elsewhere.
- Reported by Andreas Schwab.
-
-1994-07-07 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * macro.c (expand_macro): Cast value to (boolean) prior to
- assigning it to traced.
- Reported by Tom McConnell.
-
- * Makefile.in (m4): Always make all in lib first.
- Reported by Jim Meyering.
-
-1994-07-06 Jim Avera &lt;jima@netcom.com&gt;
-
- * stackovf.c: Isolated OS-dependent sections; Improved portability,
- adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
- handlers), and a default error message if the fault address is not
- available (when neither siginfo.h nor BSD sigcontext are supported).
- * configure.in: Changes for stackovf.h: Check for sigcontext,
- sigaction, sigstack, and define rlim_t as int if necessary.
- * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
- * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
- * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
-
-1994-07-05 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Use AC_SET_MAKE.
- * Makefile.in: Use @SET_MAKE@.
- Reported by Jim Meyering.
-
- * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
- Reported by Ian Taylor.
-
-1994-07-02 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
- because siginfo.h is unrelated to standard headers, and siginfo.h
- is already checked for.
- Reported by Joseph E. Sacco.
-
- * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
- PROTOTYPES.
- * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
- AC_PROTOTYPES.
-
-1994-06-29 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * builtin.c (substitute): Use \& to represent this part of the
- string which was matched by the whole regexp, instead of
- representing the whole string. Any usage of \0 issues a warning
- and acts like \&, it will disappear in some subsequent release.
-
-1994-06-27 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c: Complete prototype for forwarded declaration of usage.
-
- * input.c (init_macro_token): Correct own reference in error
- message. Previous name get_macro_func was referred to instead.
- (next_char): Correct own reference in error message. Previous
- name advance_input was referred to instead.
-
- * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
- * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
- and_term, not_term, logical_not_term, cmp_term, shift_term,
- add_term, mult_term, exp_term, unary_term, simple_term): Add
- prototype to forwarded declarations. Declare parameter v1 as
- eval_t * instead of int *. Same for local variable v2 in dyadic
- functions. Same for result in exp_term.
- * builtin.c (m4_eval): Declare value as eval_t instead of int.
- (ntoa): Declare value as eval_t instead of int. Declare uvalue as
- unsigned_eval_t instead of unsigned int. Change casts accordingly.
- (shipout_int): Cast first argument of ntoa to eval_t.
- Reported by Thorsten Ohl.
-
- * macro.c: Complete the prototypes of forwarded expand_macro and
- expand_token.
- Reported by Thorsten Ohl.
-
- * m4.h: Define voidstar as void * or char * depending on __STDC__.
- The Ultrix 3.1 compiler cannot do much with void pointers.
-
- * builtin.c (dumpdef_cmp): Replace void * by voidstar.
- * m4.c (xfree): Replace void * by voidstar.
- Reported by Tom McConnell.
-
- * ansi2knr.1: New, from elsewhere.
- * Makefile.in (DISTFILES): Distribute ansi2knr.1
-
- * Makefile.in (stamp-h.in): Avoid running ./config.status if
- stamp-h does not exist yet. This avoids running it a second time
- just after the initial ./configure.
- Reported by David MacKenzie and Tom McConnell.
-
- * m4.h: Replace the enum debug_info declaration with a series of
- #define's. The Ultrix 3.1 compiler would otherwise need casting
- (int) to most references, when used in expressions.
- Reported by Tom McConnell.
-
-1994-06-25 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
- following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
- calls the compiler. Previously, FP_PROTOTYPES was only calling
- the preprocessor; by not being subject to CFLAGS, this was
- discouraging those flags asking for ANSI compilation.
- * acconfig.h: Document HAVE_PROTOTYPES.
- * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
- * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
- Reported by Eric Backus.
-
- * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
- from the environment. Default CFLAGS to -g if not set.
- * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
- * lib/Makefile.in: Have CFLAGS substituted from configure.
- Reported by Eric Backus and Tom McConnell.
-
- * configure.in: m4_undefine changeword before using AC_ENABLE.
-
- * m4.h: Declare prototypes for error (for ANSI compilers only),
- prefix_all_builtins and reference_error.
- Reported by Tom McConnell.
-
- * input.c (set_word_regexp): Do not try to initialize the array
- test from a string, this does not work with non-ANSI compilers.
- Reported by Eric Backus.
-
- * Makefile.in (dist): Clean examples/ before saving it.
- (distclean-local): Also remove stamp-h.
- Reported by Eric Backus.
-
- * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
- non ANSI compilers.
- Reported by Tom McConnell.
-
- * checks/Makefile.in (clean): Depends on mostlyclean.
- (mostlyclean): New goal.
-
-1994-06-24 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (DISTFILES): Distribute install.sh.
- * install.sh: New file, copied from elsewhere.
- Reported by Assar Westerlund and Kaveh R. Ghazi.
-
-1994-06-23 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
- * acconfig.h: Explain ENABLE_CHANGEWORD.
-
- [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
- from code provided by Pete Chown]
- * m4.h: Add original_text field to u_t variant of union u.
- Declare TOKEN_DATA_FUNC macro.
- * builtin.c: Declare changeword.
- (m4_changeword): New function.
- * input.c: Include "regex.h", define variables with word regexps.
- (input_init): Initialize the word regexp.
- (set_word_regexp): New.
- (next_token): Declare local variables, use the previous code if
- default_word_regexp is true. Else, match using a new code. Save
- the original text.
- * macro.c (expand_token): Ship out original text if not a macro
- name.
- Reported by Krste Asanovic and Pete Chown.
-
- [These modifs all depend upon ENABLE_CHANGEWORD]
- * m4.h: Declare external user_word_regexp.
- * m4.c: Declare user_word_regexp, and initialize it from
- --word-regexp or -W, or NULL if not specified.
- * input.c: Use user_word_regexp if specified, instead of
- DEFAULT_WORD_REGEXP.
-
- * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
- agree with it.
-
- * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
- * checks/Makefile.in: Empty the suffix list.
- Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
-
- * m4.c: Declare nesting_limit and initialize it to 250.
- Implement -LNUMBER or --nesting-limit=NUMBER to change its
- value.
- * m4.h: Declare nesting_limit as external.
- * macro.c (expand_macro): Stop execution whenever nesting limit
- is exceeded.
- Reported by Bengt Mertensson.
-
- * eval.c (evaluate): Diagnose excess characters in eval input.
- Things like `eval(08)' used to return 0 with no diagnostic.
-
- * m4.h: Capitalize first letter of all macro arguments in
- definitions.
-
- * m4.c: Declare warning_status, initialize it to 0. Add new
- option -E, or --fatal-warnings, which sets warning_status to
- EXIT_FAILURE instead.
- * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
- EXIT_FAILURE if not otherwise done by header files.
- * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
- * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
- eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
- argument of all M4ERROR calls.
- Reported by Noah Friedman.
-
- * examples/incl-test.m4: Renamed from incl_test.m4.
- * examples/include.m4: Include incl-test.m4 instead of
- incl_test.m4.
- * examples/multiquotes.m4: Renamed from multi-quotes.m.
-
-1994-06-22 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Avoid USE_STACKOVF if &lt;siginfo.h&gt; not found. Note
- that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
- also tested it on a Sun Sparc workstation running SunOS 4.x.
-
- * format.c (format): When not HAVE_EFGCVT, m4 was failing the
- 49.format check, abusing a `union values' argument with sprintf
- without selecting the proper field. Now, save the formatting type
- first, delaying the fetch of the corresponding argument.
- Reported by Joseph E. Sacco and Tom Quinn.
-
- * format.c (format): Remove const from char *fmt declaration when
- not HAVE_EFGCVT, because a NUL may be forced into it.
-
- * m4.h: Declare atof() when not STDC_HEADERS.
- Reported by Joseph E. Sacco.
-
- * Regenerate configure using Autoconf 1.11, this corrects a
- problem about an incorrect cpp seting on NeXT 3.1.
- Reported by Alexander Lehmann.
-
-1994-06-05 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h (_): Change argument from `x' to `Args'.
-
-1994-04-22 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Rename Args() to _().
- * m4.h: Remove extern specifier from all function declarations.
-
-1994-04-22 Jim Avera &lt;jima@netcom.com&gt;
-
- * stackovf.c: New file implementing stack-overflow detection.
- * configure.in: Check for getrlimit, sigaction. If all of
- standard headers, getrlimit and sigaction, define USE_STACKOVF and
- substitute ${U}stackovf.o for STACKOVF.
- * acconfig.h: Declare USE_STACKOVF.
- * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
- * m4.h: Declare setup_stackovf_trap().
- * m4.c: Call setup_stackovf_trap().
- * tests/stackovf_test.sh: New file.
-
-1994-04-13 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * checks/Makefile.in: Rename .all-stamp to stamp-checks.
-
- * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
-
-1994-01-30 &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Remove definition of volatile, not used anymore.
- Reported by Jim Meyering and Joseph E. Sacco.
-
- * m4.h: Consistently use `do { ... } while (0)' in macros, instead
- of `if ... else /* nothing */' for if macros.
- Reported by Jim Meyering.
-
- * builtin.c (m4_regexp): Reorganize the code for avoiding a
- warning from gcc about `repl' possibly used before defined.
- Reported by Jim Meyering.
-
- * m4.h: Avoid a pre-ANSI &lt;memory.h&gt; together with &lt;string.h&gt;.
- Reported by Jim Meyering.
-
-1994-01-25 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Move the conditional definition of volatile after the
- inclusion of system files, because they may define it first.
-
-1994-01-04 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
- get around a problem with Alpha make seeing a syntax error, there.
- Reported by Vern Paxson.
-
-1994-01-03 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
- Reported by Richard Stallman.
-
-1993-12-25 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
- instead of AC_HAVE_FUNCS.
- Reported by Noah Friedman.
-
-1993-12-01 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c: Initialize show_help and show_version to zero.
-
- * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
- Use them in exit() and usage() calls.
-
-1993-11-27 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
- syserr() macro. Delete errref, add reference_error and M4ERROR.
- * m4.c: Replace errref, which was returning an input reference
- string, with reference_error, which prints it on standard error.
- * builtin.c, output.c: Use errno as second parameter to error,
- instead of using syserr() with %s.
- * *.c: Use M4ERROR instead of error: no more errref() with %s.
- Doing so, the program name appears after the input reference
- instead of before, which eases M-x next-error processing.
-
-1993-11-24 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * checks/get-them: Escape braces with backslashes in patterns,
- because HPUX-9.01 awk needs this.
- Reported by Jim Meyering.
-
-1993-11-22 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * builtin.c: Declare "FILE *popen ();".
-
- * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
- macros, replace error_message_prefix() declaration by errref()'s.
- Declare xrealloc, for use in errref().
- * m4.c: Delete error_message_prefix() function, add errref().
- * *.c: Use error() systematically in place of all error macros,
- now that error() flushes stdout first. Make needed adjustments.
-
- * m4.h: Remove const in sys_errlist[] declaration, it creates
- conflicts on SGI and Alpha.
- Reported by Kaveh R. Ghazi.
-
-1993-11-20 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c: Include &lt;getopt.h&gt; instead of "getopt.h".
-
- * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
- * acconfig.h: New, for documenting HAVE_EFGCVT.
- * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
- use them wherever appropriate. Also use -I. for compilations.
- * lib/Makefile.in: Use -I.. for compilations.
- * *.c: Include &lt;config.h&gt; or "config.h".
-
- * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
- * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
-
-1993-11-17 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * builtin.c (m4_eval): Cast strlen to (int) before comparing.
-
- * input.c (input_init): Initialize quote and comment strings
- explicitely instead of calling set_quotes and set_comment: by
- doing so, we ensure we do not free uninitialized variables.
-
- * checks/check-them: Reverse arguments to both diff, so the
- expected is on the left and the obtained on the right.
-
- * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
- macros. Delete declarations for m4error, warning, fatal and
- internal_error, add declaration for error_message_prefix.
- * m4.c: Delete m4error, warning, fatal and internal_error
- routines, add error_message_prefix routine.
- * *.c: Replace m4error routine calls with MESSAGE* macro calls,
- warning with WARNING*, fatal with FATAL* and internal_error with
- INTERNAL_ERROR*.
- * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
- this is not needed anymore.
-
- * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
- DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
- and debug_message, add declaration for debug_message_prefix.
- * debug.c: Remove static specifier for FILE *debug declaration.
- Delete debug_print and debug_message routines, add
- debug_message_prefix routine.
- * builtin.c, debug.c: Replace debug_print routine calls with
- DEBUG_PRINT* macro calls.
- * input.c, path.c: Replace debug_message routine calls with
- DEBUG_MESSAGE* macro calls.
-
- * m4.h: Remove inclusion of &lt;varargs.h&gt;.
- * debug.c: Include &lt;stdarg.h&gt; or &lt;varargs.h&gt;.
- (trace_format): Use stdarg instead of varargs if __STDC__.
-
- * configure.in: Remove checks for vfprintf and _doprnt. These
- implementations use varargs tricks which are not portable enough.
- * lib/vfprintf.c: Deleted.
- * lib/_doprnt.c: Deleted.
- * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
- Reported by Joel Sherrill.
-
- * path.c (add_include_directory): Use xstrdup.
-
- * builtin.c (find_builtin_by_name): Declare static.
-
- * *.[ch]: Add const to a few "char *" declarations.
-
- * configure.in: Remove commented tests for fileno() and fstat().
- * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
-
- * debug.c (debug_flush_files): New.
- * m4.h: Declares it.
- * builtin.c (m4_syscmd, m4_esyscmd): Use it.
- Reported by Nicolas Pioch.
-
-1993-11-12 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
- Reported by Joel Sherrill.
-
- * builtin.c (prefix_all_builtins): Instead of the table size, use
- the null entry at end for stopping the loop. It was overwritten.
- Reported by Andreas Schwab and Jim Meyering.
-
- * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
- Reported by Kaveh R. Ghazi.
-
- * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
- Reported by Karl Vogel.
-
-1993-11-09 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Do not define volatile if already defined.
- Reported by René Seindal.
-
- * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
-
- Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
- Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
-
-1993-11-08 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Define strchr and strrchr in terms of index and rindex,
- instead of the other way around.
- * builtin.c, m4.c, path.c: Use strchr instead of index.
-
- * input.c (next_char): Remove a "break;" after a "return ...;".
- Reported by Tom McConnell.
-
-1993-11-08 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Release 1.1
-
- * configure.in: Do not copy check files in the build hierarchy.
- * checks/check-them: Identify the m4 version being checked. For
- finding m4, look in $PATH instead of in the parent directory.
- * Makefile.in (check): Prepend `pwd` to $PATH before checking.
- * checks/Makefile.in (.all-stamp): Always create check files in
- the source hierarchy, not anymore in the build hierarchy.
- (check): cd to the source hierarchy before performing checks.
- Do not copy nor clean COPYING anymore, take it from `..'.
- Reported by Tom McConnell.
-
- * Makefile.in (Makefile): Use $(SHELL).
- (config.status): Use $(SHELL). Use "config.status --recheck"
- instead of "configure --no-create", which is obsolete.
- Reported by Tom McConnell.
-
-1993-11-05 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c (usage): Use "%s" instead of "m4" in format string.
- Reported by Jim Meyering.
-
- * Makefile.in: Distribute mkinstalldirs.
- Reported by Pierre Gaumond.
- Reported by Jim Meyering.
- Reported by Tom McConnell.
- Reported by Andreas Gustafsson.
-
- * checks/check-them: Renamed from checks/check_them.
- * checks/get-them: Renamed from checks/get_them.
- * checks/.all-stamp: Renamed from checks/.all_stamp.
- * checks/Makefile.in: Changed accordingly.
- Reported by Jim Meyering.
-
-1993-11-04 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * lib/Makefile.in (dist): Correct permissions on files.
-
- * output.c: Declare tmpfile, some systems don't.
-
-1993-11-03 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * checks/Makefile.in (dist): Correct permissions on files.
-
- * Makefile.in (dist): Ensure recursive linking for subdirectory
- `examples', also set read/write permissions on all its files.
-
- * mkinstalldirs: New, from elsewhere.
- * Makefile.in: Use it.
-
- * debug.c: Synchronize debug messages and regular output when
- the debug file and stdout are redirected to the same file.
- * configure.in: Add (commented) checks for fileno and fstat.
- Reported by Jim Avera.
-
- * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
- etc., arguments, then ignore the superfluous one. m4 used to
- diagnose missing arguments and return the empty string.
- Reported by Nick S. Kanakakorn.
-
-1993-11-02 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c (main): At end of all input, ensure all undiverted text
- goes to the main output stream.
- Reported by Andreas Gustafsson.
-
- * m4.c (main): exit (0), instead of return 0.
-
- * m4.c: Implement -P and --prefix-builtins.
- * builtin.c: Delete const specifier on builtin_tab.
- (prefix_all_builtins): New.
- Reported by Noah Friedman.
- Reported by Scott Bartram.
-
- * c-boxes.el: New, from elsewhere.
- * Makefile.in: Distribute it.
-
- * m4.h: Do not define bcopy if &lt;string.h&gt; defines it.
- Reported by Stephen Perkins.
-
- * builtin.c (define_macro): Allow a missing second argument, in
- which case it is implied empty. Affects define and pushdef.
- Reported by Eric Allman.
-
-1993-11-01 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
- struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
- * builtin.c: Initialize all the blindness fields in builtin_tab.
- (define_builtin): Copy the blindness of a builtin into its symbol.
- * macro.c (expand_token): Avoid processing a blind builtin if the
- next character is not an opening parenthesis.
- Reported by David MacKenzie.
- Reported by Noah Friedman.
-
- * configure.in: Ensure an exit status of 0 on completion.
- Reported by Vivek P. Singhal.
-
- * eval.c (eval_lex): Admit both lower and upper case letters for
- bases greater than 10. Only lower case letters were accepted.
-
- * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
- Reported by Krste Asanovic.
-
- * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
- * eval.c (logical_not_term): New name for not_term.
- * eval.c (xor_term): New, between or_term and and_term.
- * eval.c (not_term): New, between and_term and logical_not_term.
- * eval.c (shift_term): New, between cmp_term and add_term.
- Reported by Krste Asanovic: ~, ^, &lt;&lt;, &gt;&gt;.
- Reported by Ben A. Mesander: ** vs ^.
-
- * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
- * m4.h: Delete xrealloc.c.
- * lib/xmalloc.c: New, from elsewhere.
- * lib/xstrdup.c: New, from elsewhere.
- * lib/Makefile.in: Distribute and compile them.
-
- * m4.c: Change progname to program_name.
- * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
- * lib/error.c: New, from elsewhere.
- * lib/Makefile.in: Distribute and compile error.c.
- * configure.in: Check AC_VPRINTF and for strerror.
- * m4.c: Delete cmd_error. Use error instead.
- * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
-
- * m4.h: Delete #define const, let Autoconf takes care of this.
-
- * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
- Merge parse_args into main. Declare argv to be `char *const *',
- then remove superfluous casts.
-
- * m4.c: Rename --no-gnu-extensions to --traditional.
- Reported by Ben A. Mesander.
-
- * m4.c (usage): Add a status parameter. Supply one in various
- calls. Add --help processing. Remove -V for --version.
-
- * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
-
- * lib/Makefile.in: Have an AR=ar declaration.
- Reported by Eric Backus.
- Reported by Bjorn R. Bjornsson.
- Reported by Tom Tromey.
- Reported by Kristine Lund.
- Reported by Marion Hakanson.
-
-1993-10-30 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
- Reported by Noah Friedman.
-
-1993-10-25 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in: Remove MDEFINES and cleanup.
-
-1993-06-09 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
- Create a gzip file.
-
-1993-02-06 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
- ensure 777 mode for directories, so older tar's will restore file
- modes properly.
-
-1993-01-17 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
- so the installer can override automatically configured choices.
- Reported by Karl Berry.
-
-1993-01-15 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
- previous version was not working properly on m68k-hp-bsd4.3.
- Reported by Roland McGrath.
-
- * lib/_doprnt.c: Stolen from Oleo distribution.
- * configure.in: Check for _doprnt.c if vfprintf.c selected.
- * lib/Makefile.in: Distribute _doprnt.c.
- Do not distribute regex.[ch].old anymore.
-
-1993-01-01 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
- Richard wants it there.
-
-1992-12-27 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in: Add DEFS to MDEFINES.
- * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
- (libm4.a): Remove the library before creating it.
- (distclean): Remove tags and TAGS too.
-
-1992-12-23 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (dvi, m4.dvi): New goals.
-
- * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
- macro.c, output.c, path.c, symtab.c: Change Copyright from
- 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
-
- * examples/divert.m4: Deleted, this bug has been corrected.
-
- * Makefile.in (texclean, mostlyclean): New goals.
-
- * Makefile.in (clean): Remove clutter from ansi2knr.
- Reported by Pierre Gaumond.
-
-1992-12-20 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
- might well use CFLAGS is s/he needs it.
-
- * Makefile.in: Allow installation of info files from a separate
- build directory.
- Reported by Jason Merrill.
- Reported by David MacKenzie.
- Reported by Skip Montanaro.
- Reported by Erez Zadok.
- Reported by Assar Westerlund.
-
-1992-12-19 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Release 1.0.3
- This is still a beta release for the future GNU m4 version 1.1.
-
- * lib/alloca.c: New, from elsewhere.
- * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
-
- * m4.h: Do not define index/rindex if already defined. If
- FALSE/TRUE are already defined, do not redefine them, but merely
- define boolean typedef to int.
-
- * Makefile.in: Use $(DEFS) while compiling ansi2knr.
- * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
- because some C compilers do not like connectives with #ifdef.
- * m4.h: Define `volatile' only if __GNUC__, instead of once for
- __GNUC__ and once for __STDC__.
- * lib/regex.h: Leave const alone, AC_CONST will take care of it.
-
- * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
- Makefile dependencies. Without it, make keeps destroying and
- remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
-
- * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
- to diversion/DIVERSION, this was a spelling error.
-
- * m4.c: Declare version[], remove #include "version.h".
- * version.h: Deleted.
- * Makefile.in: Remove references to version.h.
-
- * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
- production, by using a simpler and more robust algorithm. This
- solves the problem of synclines sometimes written in the middle of
- an output line. Delete sync_line() and output_lines variable.
- * m4.h: Remove sync_line prototype and output_lines declaration.
- * input.c (next_char), output.c (shipout_text): Remove references
- to output_lines.
- * input.c (push_file, pop_file): Merely put the value -1 in
- output_current_line instead of calling sync_line, for delaying a
- single `#line NUM FILE' before next output line. Do not test
- for sync_output, because this is unnecessary clutter.
- * output.c (make_divertion, insert_divertion): Idem.
- * input.c: Rename must_advance_line to start_of_input_line, for
- consistency.
-
- * debug.c (trace_header): Select a new debug line format, which
- better complies with GNU standards for formatting error messages.
- With option `-dfl', M-x next-error might be used on the output.
- * m4.c (vmesg): Adjust format of error output to GNU standards.
- * m4.texinfo: Adjust examples for `make check' to work.
-
- * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
- case for enum debug_info constants, which were all lower case.
-
- * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
- re_search_2.
- * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
- collected patches. I tried a few times using newer regex.[ch], it
- mysteriously stopped aborting with this one. Insecure feeling...
- * lib/Makefile.in: Distribute regex.[ch].old, just in case!
-
-1992-12-18 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.c: Change `--no-warnings' to `--silent'.
- Reported by David MacKenzie.
-
- * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
- leave it off for now. See comment in m4.c for justification.
- Reported by David MacKenzie.
-
- * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
- * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
-
- * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
-
- * Makefile.in: Ensure recursive cleaning is done before local
- cleaning for all clean goals.
-
- * builtin.c (ntoa): Ensure the value is always interpreted as a
- signed quantity, whatever the radix is.
-
-1992-11-18 Jim Meyering &lt;meyering@idefix&gt;
-
- * builtin.c, format.c, input.c: Split long lines.
- * m4.c: Use typedef macro_definition instead of struct
- macro_definition.
- * symtab.c: Use typedef symbol instead of struct symbol.
-
-1992-11-17 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * *.[ch]: Remove all trailing whitespace, in code and comments.
-
- * configure.in: Find some awk.
- * Makefile.in: Add $(AWK) to MDEFINES.
- * checks/Makefile.in: Transmit $(AWK) to get_them.
- * checks/get_them: Use $AWK instead of gawk. Add a close in the
- awk script when switching files, because without this, mawk runs
- out of file descriptors.
-
-1992-11-16 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (realclean): Delete m4.info*.
- Reported by Jim Meyering.
-
- * Makefile.in: Adjust and link with checks/Makefile.
- * checks/Makefile.in: New.
- * configure.in: Output checks/Makefile.
-
- * checks/get_them: Have the dnl header of each test more
- recognizable by next-error, also use a better message.
-
-1992-11-16 Jim Meyering &lt;meyering@idefix&gt;
-
- * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
- And use that only if __GNUC__ since we're using it's GCC-specific
- semantics that tell the compiler the associated function doesn't
- return.
-
- * builtin.c (substitute): Don't use character as an array index.
- (dumpdef_cmp): Make formal arguments `const void *' to avoid
- warnings with gcc -W -Wall on systems with qsort prototype.
- (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
- from gcc -W -Wall.
-
- * eval.c (most functions): Add parentheses to assignments used
- as truth values go avoid warnings from gcc -Wall.
-
- * input.c, m4.c, output.c, path.c, symtab.c: Declare static
- any functions that don't need external scope.
-
- * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
- (many functions and arrays): Declare `const'.
-
-1992-11-15 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * *.[ch]: Rename nil to NULL, using the declaration from &lt;stdio.h&gt;,
- removing the declaration from m4.h. Also rename false to FALSE
- and true to TRUE.
-
- * lib/Makefile.in (Makefile): New goal.
-
- * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
- so heavily loaded. It gets more easily overridable, calling make.
- Reported by Jim Meyering.
-
- * Makefile.in (dist): Get .fname from the current directory name,
- instead of from version.h. I need updating many files manually,
- when the version changes, version.h is just one of them.
-
-1992-11-14 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Remove the tag `boolean' on the enum introducing typedef
- `boolean'. This tag conflicts with &lt;sys/types.h&gt; on SVR4.
- Reported by Tom McConnell.
-
-1992-11-13 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
- 39.cleardiv, which were describing missing or spurious newlines.
- Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
- do not depend on machine word size, `/bin/false' implementation,
- or `wc' output format. `make check' is more dependable, now.
-
- * checks/check_them: Summarize the failed tests by listing their
- name, at end. If none, issue `All checks successful'. Output
- `Checking' instead of `Input file:'.
-
- * checks/get_them, checks/check_them: Reindented.
-
- * Makefile.in (dist): chmod a+r before making the tar file.
-
-1992-11-12 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
-
- * input.c (next_token): Reinitialize token_buttom just after using
- it as a watermark with obstack_free. Or else, a future token, big
- enough for triggering reallocation of the obstack chunk, could
- void the initialized value of token_buttom, later causing panic in
- obstack_free. Rename token_buttom to token_bottom everywhere.
-
- * m4.h: Before declaring errno, first include &lt;errno.h&gt; and
- ensure that it does not define errno.
- Reported by Richard Stallman.
-
-1992-11-11 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * builtin.c: Define and use DECLARE macro for builtins.
-
- * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
- argument, this is a common idiom for introducing long comments.
-
- * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
- arguments. The last argument was silently ignored.
-
- * m4.c (cmd_error): Add a missing semicolon before va_end().
-
-1992-11-10 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in: Now handle protoized sources. Define and use U.
- Compile and use ansi2knr with old compilers. Update DISTFILES.
- Add `aclocal.m4' to `configure' dependencies.
- * ansi2knr.c: New, from Ghostscript distribution.
- * configure.in: Define U through FP_PROTOTYPES for old compilers.
- Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
- * aclocal.m4: New, provide FP_PROTOTYPES.
- * m4.h: Conditionnaly protoized through Args, save for varags.
- * builtin.c: Protoized. Then:
- Include &lt;sys/types.h&gt; if size_t is not defined, before "regex.h".
- (m4_ifelse): Fetch built-in name properly for diagnostic.
- (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
- (m4_regexp): Add const to `msg' declaration.
- (m4_patsubst): Add const to `msg' declaration.
- * debug.c: Protoized, save for varargs.
- * eval.c: Protoized.
- * format.c: Protoized.
- * input.c: Protoized.
- * m4.c: Protoized, save for varargs. Then:
- (xfree): Accept void * instead of char *.
- (xmalloc): Return void * instead of char *.
- (xrealloc): Accept and return void * instead of char *.
- * macro.c: Protoized.
- * output.c: Protoized.
- * path.c: Protoized. Then cast some (char *) over xmalloc's.
- * symtab.c: Protoized.
-
-1992-11-06 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.texinfo: Remove directory from diagnostics in 30.include,
- 51.eval, 56.errprint and 57.m4exit tests.
-
- * m4.h: Remove declarations for int or void system functions, they
- cause more conflicting trouble than they make good.
-
- * configure.in: Avoid configuration header file. Add some tests.
- * m4.h: Remove #include "config.h".
- * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
- Then, rewritten for better compliance with GNU standards.
-
-1992-11-05 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
- because of a misplaced #endif.
-
- * Many *.[hc] files: Correct intra-line spacing here and there,
- according to GNU indent 1.6 advice.
-
- * configure.in: New, using Autoconf 1.2.
- * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
- * Delete old configure.in, configure, etc/configure.in,
- etc/configure, lib/configure.in, lib/configure and config/*.
- Reported by Jason Merrill.
-
- * symtab.c (hash): Change (char) NULL to '\0'.
- Reported by Jason Merrill.
-
- * Delete .vers, etc/newdist.sh, etc/newvers.sh and
- etc/nextvers.sh. Release numbers will be edited `by hand'.
- * version.h: De-automatize, force value in.
-
- * m4.c: Changes in order to use a newer getopt.h.
- Reported by David MacKenzie.
-
- * checks/: New name for examples/.
- * checks/get_them: New location for etc/get_examples.
- * checks/check_them: New location for etc/check_examples.
- * Makefile.in, checks/get_them, checks/check_them: Adjust.
- * lib/vfprintf.c: New location for etc/vfprintf.c.
- * Delete empty etc/.
- * examples/: New name for test/.
-
-1992-03-10 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * Makefile.in (check): Add m4 as dependency.
-
- * m4.c: Accept --no-warnings instead of --no_warnings, and
- --no-gnu-extensions instead of --no_gnu_extensions. Make the
- usage message more informative.
- Reported by David MacKenzie.
-
-1992-03-09 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * etc/check_examples: New name for check_examples.sh.
- * etc/get_examples: New name for get_examples.sh.
- * Makefile.in, etc/Makefile.in: Use new names.
-
- * Makefile.in: Transmit $(CC) while making in lib.
-
- * Many *.[hc] files: GNU indent'ed, with further fine tuning of
- code disposition by hand.
-
-1992-03-08 François Pinard &lt;pinard@iro.umontreal.ca&gt;
-
- * m4.h: Delete definitions for abort() and exit().
- Reported by Richard Stallman.
-
- * config/hmake-unicos, config/s-unicos.h: New files.
- Reported by Hal Peterson.
-
- * eval.c (exp_term): Have N^0 return 1.
- Reported by Michael Fetterman.
-
- * eval.c, input.c, m4.h: Remove last comma in enums.
- Reported by Mike Lijewski.
-
- * Transfer of maintenance duties from René to François.
-
-1991-10-24 René Seindal &lt;seindal@diku.dk&gt;
-
- * Release 1.0. Many thanks to those, who provided me with bug
- reports and feedback.
-
- * Uses GNU configure, taken from the gdb distribution.
-
- * Uses GNU getopt(), with long option names.
-
- * The -Q/+quiet option is added, which suppresses warnings about
- missing or superflous arguments to built-in macros.
-
- * Added default options via the M4OPTS environment variable.
-
- * The built-in format can now be configured to use sprintf as
- the formatting engine, for systems without [efg]cvt(3).
-
- * GNU library code is moved to the ./lib subdirectory; other
- utility files are now in ./etc.
-
- * Several minor bugs have been fixed.
-
-1991-07-26 René Seindal &lt;seindal@diku.dk&gt;
-
- * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
- Francois Pinard and Roland H. Pesch for providing me with reports.
-
- * The builtins incr and decr are now implemented without use of
- eval.
-
- * The builtin indir is added, to allow for indirect macro calls
- (allows use of "illegal" macro names).
-
- * The debugging and tracing facilities has been enhanced
- considerably. See the manual for details.
-
- * The -tMACRO option is added, marks MACRO for tracing as soon
- as it is defined.
-
- * Builtins are traced after renaming iff they were before.
-
- * Named files can now be undiverted.
-
- * The -Nnum option can be used to increase the number of
- divertions available.
-
- * Calling changecom without arguments now disables all comment
- handling.
-
- * The function m4_patsubst() is now consistently declared
- static.
-
- * A bug in dnl is fixed.
-
- * A bug in the multi-character quoting code is fixed.
-
- * Several typos in the manual has been corrected. More probably
- persist.
-
- * The m4.info file is now installed along with the program.
-
-1990-11-15 René Seindal &lt;seindal@diku.dk&gt;
-
- * Updated and enhanced version. Release 0.75, manual 0.07.
-
- * Implemented search path for include files (-I option and
- M4PATH envronment variable).
-
- * Implemented builtin "format" for printf-like formatting.
-
- * Implemented builtin "regexp" for searching for regular
- expressions.
-
- * Implemented builtin "patsubst" for substitution with regular
- expressions.
-
- * Implemented builtin "esyscmd", which expands to a shell
- commands output.
-
- * Implemented "__file__" and "__line__" for use in error
- messages.
-
- * Implemented character ranges in "translit".
-
- * Implemented control over debugging output.
-
- * Implemented multi-character quotes.
-
- * Implemented multi-character comment delimiters.
-
- * Changed predefined macro "gnu" to "__gnu__".
-
- * Changed predefined macro "unix" to "__unix__", when the -G
- option is not used. With -G, "unix" is still defined.
-
- * Changed "shift", "$@" and "$*" to not insert spaces afters
- commas.
-
- * Added program name to error messages.
-
- * Fixed two missing null bytes bugs.
-
-1990-01-22 René Seindal &lt;seindal@diku.dk&gt;
-
- * Initial beta release. Release 0.50, manual 0.05.
-
-</PRE>
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/download.htm b/examples/WWW/download.htm
deleted file mode 100644
index 9b714f32..00000000
--- a/examples/WWW/download.htm
+++ /dev/null
@@ -1,302 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Download</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Download</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<P>
-In the download area there are usually several version
-present. Please take only the latest.
-</P>
-
-
-<P>
-The files are name <TT>m4-1.4<I>X</I>.tar.gz</TT> where X is a letter.
-</P>
-
-
-<P>
-<A HREF="ftp://ftp.seindal.dk/pub/rene/gnu/">Download latest
-development version</A>.
-</P>
-
-
-<P>
-<A HREF="ftp://ftp.seindal.dk/pub/rene/gnu/m4-1.4.tar.gz">Download
-latest stable version</A>.
-</P>
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/features.htm b/examples/WWW/features.htm
deleted file mode 100644
index ce8f1895..00000000
--- a/examples/WWW/features.htm
+++ /dev/null
@@ -1,380 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - New feaures since version 1.4</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>New feaures since version 1.4</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<P>
-Please look at the <A HREF="news.htm">NEWS</A> and the <A HREF="changelog.htm">ChangeLog</A> for all the gory details.
-</P>
-
-
-<DL>
-<DT><B>GNU m4 uses GNU Automake and GNU Autoconf for configuration.</B></DT>
-
-<DD>
-<P>
-This has been long overdue and now hit is done thanks to Erick
-Branderhorst.
-</P>
-
-</DD>
-
-
-<DT><B>GNU m4 uses GNU gettext for internationalisation.</B></DT>
-
-<DD>
-<P>
-GNU m4 now speaks several languages. Translations for
-german french italian japanese dutch polish romenian and swedish
-have been made.
-</P>
-
-</DD>
-
-
-<DT><B>Support for multiple precision arithmetic in eval.</B></DT>
-
-<DD>
-<P>
-If appropriately configured GNU m4 can now do multiple precision
-arithmetic in the build in macro 'eval'. If not configured GNU m4
-will use the largest integer available for its calculations.
-</P>
-
-</DD>
-
-
-<DT><B>An input syntax table to change how input is parsed.</B></DT>
-
-<DD>
-<P>
-A new build in macro 'changesyntax' allows finer control over how input
-characters are parsed into input tokens.&nbsp; It is no possible to have
-several one character quote strings or comment delimiters to change the
-format of macro calls to use active characters like in TeX and probably
-most useful to change what input characters are treated as letters when
-looking for macro calls.
-</P>
-
-
-<P>
-See the <A HREF="man/m4_7.html#SEC41">manual section</A> for more details.
-</P>
-
-</DD>
-
-
-<DT><B>Support for loadable modules.</B></DT>
-
-<DD>
-<P>
-GNU m4 now has rudimentary support for dynamic loading of
-compiled modules at runtime. A module can define any number of new build
-in macros which will be indistinguishable from the standard set of
-build in macros. Modules can also override existing build in macros.
-</P>
-
-
-<P>
-Module support for GNU m4 still needs some work.
-</P>
-
-
-<P>
-See the <A HREF="modules.htm">separate README file for modules</A>
-</P>
-
-
-</DD>
-
-
-<DT><B>Better control of sync-lines generation.</B></DT>
-
-<DD>
-<P>
-The new build in macro 'syncoutput' allows better control of the
-generation of sync-lines.&nbsp; They can no be turned on or off at
-will.
-</P>
-
-</DD>
-
-
-
-</DL>
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/feedback.htm b/examples/WWW/feedback.htm
deleted file mode 100644
index f6a991d1..00000000
--- a/examples/WWW/feedback.htm
+++ /dev/null
@@ -1,297 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Feedback</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Feedback</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<P>
-Bug reports should be sent to <A HREF="mailto:bug-m4@gnu.org">bug-m4@gnu.org</A>.
-</P>
-
-
-<P>
-Generel discussion about GNU m4 should take place on
-<A HREF="mailto:m4-forum@seindal.dk">m4-forum</A>.
-</P>
-
-
-<P>
-Informal comments about this site and GNU m4 can be sent to
-<A HREF="mailto:m4-feedback@seindal.dk">m4-feedback</A>.
-</P>
-
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/index.htm b/examples/WWW/index.htm
deleted file mode 100644
index 8e739aef..00000000
--- a/examples/WWW/index.htm
+++ /dev/null
@@ -1,319 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Development site</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Development site</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<H2>Current development version is 1.4l.</H2>
-
-
-<P>
-Development versions contain new features and experiments that might
-or might not make it into the next official release. The current
-development version contains among other things (browse the
-<A HREF="features.htm">new features</A> for more detail):
-</P>
-
-
-<UL>
-
- <LI> Uses GNU Automake and GNU Autoconf for configuration.
-
- <LI> Uses GNU gettext for internationalisation.
-
- <LI> Support for multiple precision arithmetic in eval.
-
- <LI> An input syntax table to change how input is parsed.
-
- <LI> Support for loadable modules.
-
- <LI> Better control of sync-lines generation.
-
- <LI> Various bug-fixes.
-
-</UL>
-
-
-<P>
-A new release is expected ready for December 1998.
-</P>
-
-
-<P>
-GNU <TT>m4</TT> 1.4 is from october 1994 and can be considered stable.
-</P>
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/lists.htm b/examples/WWW/lists.htm
deleted file mode 100644
index afa2b9be..00000000
--- a/examples/WWW/lists.htm
+++ /dev/null
@@ -1,320 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Mailing lists</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Mailing lists</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-
-<H3>There are two mailing lists for GNU m4</H3>
-
-
-<DL>
-<DT><B><A HREF="mailto:m4-forum@seindal.dk">m4-forum@seindal.dk</A></B></DT>
-
-<DD>
-<P>
-This list is intended for discussions between people interested
-and/or participating in the further development of m4.
-</P>
-
-</DD>
-
-
-<DT><B>m4-announce@seindal.dk</B></DT>
-
-<DD>
-<P>
-Announcements regarding GNU m4 will posted here.
-</P>
-
-<P>
-The volume will certainly be very low.
-</P>
-
-</DD>
-
-
-
-</DL>
-
-
-<P>
-Currently these lists are maintained manually. Send a message to <A HREF="mailto:rene@seindal.dk">rene@seindal.dk</A>
-saying whether you want to subscribe or unsubscribe to any of these
-lists.
-</P>
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/m4lib/bugs.m4 b/examples/WWW/m4lib/bugs.m4
deleted file mode 100644
index f3204317..00000000
--- a/examples/WWW/m4lib/bugs.m4
+++ /dev/null
@@ -1,52 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Known bugs in GNU m4 \__m4_version__])
-
-\divert(1)
-\h2([Known bugs in GNU m4])
-
-\define([fixed], [\p([Fixed in version 1.4$1])])
-
-\define([notme], [\p([A <A
-HREF="mailto:m4-feedback@seindal.dk?subject=GNU m4: \defn([_item])"
->volunteer</A> is badly needed for this, as I have no way of testing
-this myself.])])
-
-\ul([
-
-\item([undivert], [undivert(0) might read from standard output],
-
-[\p([If calling \tt(undivert(0)) when diverting to a non-zero diversion
-will cause m4 to read from standard output in an attempt to bring back
-diversion 0, which is not possible.])
-
-\fixed(n)
-
-])
-
-\item([sigaltstack], [failure if sigaltstack or sigstack returns ENOSYS],
-
-[\p([If stack overflow detection is configured but the system doesn't
-support sigaltstack(2) or sigstack(2), m4 fails when the system call
-returns ENOSYS. It should silently revert to default behaviour.])
-
-\notme
-])
-
-])
-
-\p([See also the \link(todo.htm, TODO) file.])
-
-\print_items
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
-
-
-\item([], [],
-
-[\p([])
-
-])
diff --git a/examples/WWW/m4lib/changelog.m4 b/examples/WWW/m4lib/changelog.m4
deleted file mode 100644
index cdcab269..00000000
--- a/examples/WWW/m4lib/changelog.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([ChangeLog])
-
-\divert(1)
-
-<PRE>\dnl
-\changesyntax([A<>])\dnl
-\changequote(,)\dnl
-\include(m4/ChangeLog)
-\changequote([,])\dnl
-\changesyntax([O<>])\dnl
-</PRE>
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/download.m4 b/examples/WWW/m4lib/download.m4
deleted file mode 100644
index a26eedfb..00000000
--- a/examples/WWW/m4lib/download.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Download])
-
-\divert(1)
-
-\p(In the download area there are usually several version
-present. Please take only the latest.)
-
-\p(The files are name \tt(m4-1.4\i(X).tar.gz) where X is a letter.)
-
-\p(\link([ftp://ftp.seindal.dk/pub/rene/gnu/], [Download latest
-development version]).)
-
-\p(\link([ftp://ftp.seindal.dk/pub/rene/gnu/m4-1.4.tar.gz],[Download
-latest stable version]).)
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/features.m4 b/examples/WWW/m4lib/features.m4
deleted file mode 100644
index 67bb8b2a..00000000
--- a/examples/WWW/m4lib/features.m4
+++ /dev/null
@@ -1,62 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([New feaures since version 1.4])
-
-\divert(1)
-
-\p(Please look at the \link(news.htm, NEWS) and the \link(changelog.htm,
-ChangeLog) for all the gory details.)
-
-\dl(
-\dt(\b(GNU m4 uses GNU Automake and GNU Autoconf for configuration.))
-
-\dd(\p(This has been long overdue, and now hit is done thanks to Erick
-Branderhorst.))
-
-\dt(\b(GNU m4 uses GNU gettext for internationalisation.))
-
-\dd(\p(GNU m4 now speaks several languages. Translations for
-german, french, italian, japanese, dutch, polish, romenian and swedish
-have been made.))
-
-\dt(\b(Support for multiple precision arithmetic in eval.))
-
-\dd(\p(If appropriately configured, GNU m4 can now do multiple precision
-arithmetic in the build in macro 'eval'. If not configured, GNU m4
-will use the largest integer available for its calculations.))
-
-\dt(\b(An input syntax table to change how input is parsed.))
-
-\dd(\p(A new build in macro 'changesyntax' allows finer control over how input
-characters are parsed into input tokens.&nbsp; It is no possible to have
-several one character quote strings or comment delimiters, to change the
-format of macro calls, to use active characters like in TeX, and probably
-most useful, to change what input characters are treated as letters when
-looking for macro calls.)
-
-\p(See the \link(man/m4_7.html#SEC41, manual section) for more details.))
-
-\dt(\b(Support for loadable modules.))
-
-\dd(\p(GNU m4 now has rudimentary support for dynamic loading of
-compiled modules at runtime. A module can define any number of new build
-in macros, which will be indistinguishable from the standard set of
-build in macros. Modules can also override existing build in macros.)
-
-\p(Module support for GNU m4 still needs some work.)
-
-\p(See the \link(modules.htm, separate README file for modules))
-)
-
-\dt(\b(Better control of sync-lines generation.))
-
-\dd(\p(The new build in macro 'syncoutput' allows better control of the
-generation of sync-lines.&nbsp; They can no be turned on or off at
-will.))
-
-)
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/feedback.m4 b/examples/WWW/m4lib/feedback.m4
deleted file mode 100644
index f61d63e5..00000000
--- a/examples/WWW/m4lib/feedback.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Feedback])
-
-\divert(1)
-
-\p(Bug reports should be sent to \link(mailto:bug-m4@gnu.org,
-bug-m4@gnu.org).)
-
-\p(Generel discussion about GNU m4 should take place on
-\link(mailto:m4-forum@seindal.dk, m4-forum).)
-
-\p(Informal comments about this site and GNU m4 can be sent to
-\link(mailto:m4-feedback@seindal.dk, m4-feedback).)
-
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/html.m4 b/examples/WWW/m4lib/html.m4
deleted file mode 100644
index 50330af2..00000000
--- a/examples/WWW/m4lib/html.m4
+++ /dev/null
@@ -1,119 +0,0 @@
-\define([n], [
-])
-
-\define([concat], [\ifelse($#, 0, ,
- $#, 1, [$1],
- [$1 \concat(\shift($@))])])
-
-\define([toupper], [\translit([$*], [a-z], [A-Z])])
-
-\define([container],
-[\pushdef([_tag], \toupper([$1]))\dnl
-\ifelse($#, 1, [<\_tag></[\_tag]>],
- $#, 2, [<\_tag>$2</\_tag>],
- $#, 3, [<\_tag $2>$3</\_tag>],
- [<\_tag $2>\concat(\shift(\shift($@)))</\_tag>])\dnl
-\popdef([_tag])\dnl
-])
-
-\define([large_container],
-[\pushdef([_tag], \toupper([$1]))\dnl
-\ifelse($#, 1, [<\_tag></\_tag>\n],
- $#, 2, [<\_tag>\n[]$2\n</\_tag>\n],
- $#, 3, [<\_tag $2>\n[]$3\n</\_tag>\n],
- [<\_tag $2>\n\concat(\shift(\shift($@)))\n</\_tag>\n])\dnl
-\popdef([_tag])\dnl
-])
-
-\define([large_simple_container],
-[\pushdef([_tag], \toupper([$1]))\dnl
-<\_tag>\n\concat(\shift($@))\n</\_tag>\n\dnl
-\popdef([_tag])\dnl
-])
-
-\define([simple_container],
-[\pushdef([_tag], \toupper([$1]))\dnl
-<\_tag>\concat(\shift($@))</\_tag>\dnl
-\popdef([_tag])\dnl
-])
-
-\define([simple_tag],
-[\pushdef([_tag], \toupper([$1]))\dnl
-\ifelse([$2], [], [<\_tag>], [<\_tag $2>])\dnl
-\popdef([_tag])\dnl
-])
-
-\define([doctype], [\simple_tag([$0], $@)])
-
-\define([html], [\large_simple_container([$0], $@)])
-\define([head], [\large_simple_container([$0], $@)])
-\define([title], [\simple_container([$0], $@)])
-
-\define([meta], [\n<META NAME="[$1]" CONTENT="[$2]">])
-\define([http_equiv], [\n<META HTTP-EQUIV="[$1]" CONTENT="[$2]">])
-
-\define([body], [\large_container([$0], $@)])
-
-\define([center], [\large_simple_container([$0], $@)])
-\define([right], [\large_simple_container([$0], $@)])
-\define([left], [\large_simple_container([$0], $@)])
-\define([div], [\large_container([$0], $@)])
-
-\define([b], [\simple_container([$0], $@)])
-\define([i], [\simple_container([$0], $@)])
-\define([tt], [\simple_container([$0], $@)])
-
-\define([table], [\large_container([$0], $@)])
-\define([tr], [\large_container([$0], $@)])
-\define([td], [\large_container([$0], $@)])
-\define([th], [\large_container([$0], $@)])
-
-\define([link], [<A HREF="$1">\shift($@)</A>])
-\define([target], [<A NAME="$1">\shift($@)</A>])
-
-\define([font], [\n\container([$0], $@)\n])
-
-\define([h1], [\n\container([$0], $@)\n])
-\define([h2], [\n\container([$0], $@)\n])
-\define([h3], [\n\container([$0], $@)\n])
-\define([h4], [\n\container([$0], $@)\n])
-\define([h5], [\n\container([$0], $@)\n])
-\define([h6], [\n\container([$0], $@)\n])
-
-\define([p], [\large_simple_container([$0], $@)])
-
-
-\define([ul], [\large_container([$0], $@)])
-\define([ol], [\large_container([$0], $@)])
-
-\define([li], [\simple_tag([$0], $@)])
-
-\define([dl], [\large_simple_container([$0], $@)])
-\define([dt], [\simple_container([$0], $@)])
-\define([dd], [\large_simple_container([$0], $@)])
-
-\define([br], [\simple_tag([$0], $@)])
-\define([hline], [\simple_tag([$0], $@)])
-
-\define([pre], [\simple_container([$0], $@)])
-
-
-
-\define([set_title], [\define([_TITLE], [$*])])
-\set_title(_TITLE)
-
-\define([set_author], [\define([_AUTHOR], [$*])])
-\set_author()
-
-\define([set_generator], [\define([_GENERATOR], [$*])])
-\set_generator([GNU m4 \__m4_version__])
-
-\define([set_keywords], [\define([_KEYWORDS], [$*])])
-\set_keywords()
-
-\define([set_body], [\define([_BODY], [$*])])
-\set_body()
-
-\define([meta_if_set],
- [\ifelse(\defn([_$1]), [], [], \meta([$1], \defn([_$1])))]\dnl
-)
diff --git a/examples/WWW/m4lib/index.m4 b/examples/WWW/m4lib/index.m4
deleted file mode 100644
index 043faa35..00000000
--- a/examples/WWW/m4lib/index.m4
+++ /dev/null
@@ -1,36 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Development site])
-
-\divert(1)
-\h2([Current development version is \__m4_version__.])
-
-\p([Development versions contain new features and experiments that might
-or might not make it into the next official release. The current
-development version contains among other things (browse the
-\link([features.htm], [new features]) for more detail):])
-
-\ul([
- \li Uses GNU Automake and GNU Autoconf for configuration.
-
- \li Uses GNU gettext for internationalisation.
-
- \li Support for multiple precision arithmetic in eval.
-
- \li An input syntax table to change how input is parsed.
-
- \li Support for loadable modules.
-
- \li Better control of sync-lines generation.
-
- \li Various bug-fixes.
-])
-
-\p([A new release is expected ready for December 1998.])
-
-\p([GNU \tt(m4) 1.4 is from october 1994 and can be considered stable.])
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/layout.m4 b/examples/WWW/m4lib/layout.m4
deleted file mode 100644
index 6feb08ec..00000000
--- a/examples/WWW/m4lib/layout.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-\divert(-1);
-The semicolons are just to get GNU Emacs C mode to indent properly.
-
-\define([C_TEXT], [text="#000000"]);
-\define([C_LINK], [link="#0000EF"]);
-\define([C_ALINK], [vlink="#51188E"]);
-\define([C_VLINK], [alink="#FF0000"]);
-\define([C_BG1], [bgcolor="#FFCC99"]);
-\define([C_BG2], [bgcolor="#FF9900"]);
-\define([C_BG3], [bgcolor="#CC6600"]);
-
-\define([DO_HEADER],
- [\head([\title([GNU m4 - \defn([_TITLE])])],
- [\meta_if_set([AUTHOR])],
- [\meta_if_set([GENERATOR])],
- [\meta_if_set([KEYWORDS])],
- )]);
-
-\define([DO_BODY],
- [\body([\C_TEXT \C_BG1 \C_LINK \C_VLINK \C_ALINK],
- [\table([cellpadding=5 width="100%"],
- [\tr([align=left valign=bottom],
- [\td([align=center valign=center colspan="3" width="100%" \C_BG2],
- [\h1([GNU m4])],
- [\h2(\defn([_TITLE]))],
- )],
- )],
- [\tr([],
- [\td([align=left valign=top width="15%" \C_BG2],
- [\include([menu.m4])],
- )],
- [\td([align=left valign=top width="90%"],
- [$*],
- )],
- )],
- )],
- )]
- );
-
-\define([DO_LAYOUT],
- [\doctype([HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"])
-\html([\DO_HEADER], [\DO_BODY([$*])])]
- );
-
-\define([<], [&lt;]);
-\define([>], [&gt;]);
-
-\define([showlink], [\link($1, $1)]);
-\define([mailto], [\link(mailto:$1, $1)]);
-
diff --git a/examples/WWW/m4lib/lists.m4 b/examples/WWW/m4lib/lists.m4
deleted file mode 100644
index cc710eba..00000000
--- a/examples/WWW/m4lib/lists.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Mailing lists])
-
-\define([me], \link([mailto:rene@seindal.dk], [rene@seindal.dk]))
-
-\divert(1)
-
-\h3(There are two mailing lists for GNU m4)
-
-\dl(
-
-\dt(\b(\link(mailto:m4-forum@seindal.dk, m4-forum@seindal.dk)))
-
-\dd(\p(This list is intended for discussions between people interested
-and/or participating in the further development of m4.))
-
-\dt(\b(m4-announce@seindal.dk))
-
-\dd(\p(Announcements regarding GNU m4 will posted here.)
-\p(The volume will certainly be very low.))
-
-)
-
-\p(Currently these lists are maintained manually. Send a message to \me
-saying whether you want to subscribe or unsubscribe to any of these
-lists.)
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/menu.m4 b/examples/WWW/m4lib/menu.m4
deleted file mode 100644
index 1a770b63..00000000
--- a/examples/WWW/m4lib/menu.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-\pushdef([header], [\tr([\td([\C_BG3], [\p([\b([$1])])])])])
-\pushdef([row], [\tr([\td([\font([size=-1], [\p([\b([\link([$1], [$2])])])])])])])
-
-\table([align=left valign=top columns=1],
- [\header([Generel info])],
- [\row([whatis.htm], [What is m4])],
- [\row([features.htm], [Features])],
- [\row([uses.htm], [Uses of m4])],
-
- [\header([Documentation])],
- [\row([man/m4_toc.html], [Manual])],
-
- [\header([Source files])],
- [\row([readme.htm], [README])],
- [\row([todo.htm], [TODO])],
- [\row([news.htm], [NEWS])],
- [\row([changelog.htm], [ChangeLog])],
- [\row([thanks.htm], [Contributors])],
- [\row([m4/], [Browse it])],
-
- [\header([The Future])],
- [\row([modules.htm], [Modules])],
- [\row([visions.htm], [Visions])],
-
- [\header([Development])],
- [\row([lists.htm], [Mailing-lists])],
- [\row([feedback.htm], [Feedback])],
- [\row([download.htm], [Download])],
-
- [\header([Examples])],
- [\row([thissite.htm], [This site])],
- )
-
-\popdef([header])
-\popdef([row])
diff --git a/examples/WWW/m4lib/modules.m4 b/examples/WWW/m4lib/modules.m4
deleted file mode 100644
index b9c148f1..00000000
--- a/examples/WWW/m4lib/modules.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Modules])
-
-\divert(1)
-
-<PRE>\dnl
-\changesyntax([A<>])\dnl
-\changequote(,)\dnl
-\include(m4/modules/README)
-\changequote([,])\dnl
-\changesyntax([O<>])\dnl
-</PRE>
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/news.m4 b/examples/WWW/m4lib/news.m4
deleted file mode 100644
index e5da0d89..00000000
--- a/examples/WWW/m4lib/news.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([NEWS - History of user-visible changes])
-
-\divert(1)
-
-<PRE>\dnl
-\changesyntax([A<>])\dnl
-\changequote(,)\dnl
-\include(m4/NEWS)
-\changequote([,])\dnl
-\changesyntax([O<>])\dnl
-</PRE>
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/readme.m4 b/examples/WWW/m4lib/readme.m4
deleted file mode 100644
index 1612c7d1..00000000
--- a/examples/WWW/m4lib/readme.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([README])
-
-\divert(1)
-
-<PRE>\dnl
-\changesyntax([A<>])\dnl
-\changequote(,)\dnl
-\include(m4/README)
-\changequote([,])\dnl
-\changesyntax([O<>])\dnl
-</PRE>
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/setup.m4 b/examples/WWW/m4lib/setup.m4
deleted file mode 100644
index 310b65f8..00000000
--- a/examples/WWW/m4lib/setup.m4
+++ /dev/null
@@ -1,7 +0,0 @@
-divert(-1)
-changequote([,])
-changecom([<!--], [-->])
-changesyntax([@\])
-
-\include([html.m4])
-\include([layout.m4])
diff --git a/examples/WWW/m4lib/test.m4 b/examples/WWW/m4lib/test.m4
deleted file mode 100644
index 9fdef40b..00000000
--- a/examples/WWW/m4lib/test.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-include(`_setup.m4')
-\include([_html.m4])
-\include([_layout.m4])
-
-\set_title([Development site])
-
-\divert
-
-\DO_BODY([BODY])
diff --git a/examples/WWW/m4lib/thanks.m4 b/examples/WWW/m4lib/thanks.m4
deleted file mode 100644
index 61928d07..00000000
--- a/examples/WWW/m4lib/thanks.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([People who have contributed to m4])
-
-\divert(1)
-
-<PRE>\dnl
-\changesyntax([A<>])\dnl
-\changequote(,)\dnl
-\include(m4/THANKS)
-\changequote([,])\dnl
-\changesyntax([O<>])\dnl
-</PRE>
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/thissite.m4 b/examples/WWW/m4lib/thissite.m4
deleted file mode 100644
index 0d4d772b..00000000
--- a/examples/WWW/m4lib/thissite.m4
+++ /dev/null
@@ -1,39 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([This site])
-
-\divert(1)
-
-\p(This GNU m4 site is maintained by René Seindal,
-(\mailto(rene@seindal)).)
-
-\p(All files are generated using GNU m4 \__m4_version__. You can view
-the \link(m4lib/, source files). They are very simple. They use some
-features from Gnu m4 1.4l)
-
-\p(The basic M4 definitions of quotes, comments, escapes are in
-\showlink(m4lib/setup.m4). This is first included by all files to
-configure the enviroment correctly for the other files. To avoid have
-macros called by accident, an escape character is defined with
-changesyntax. \i(This is a new feature in m4 1.4l).)
-
-\p(Some fairly general macros to generate various HTML construct are
-found in \showlink(m4lib/html.m4). There are macros for simple tags,
-containers with and with attributes, links and a few utility macros.)
-
-\p(The visual aspects of the pages are in \showlink(m4lib/layout.m4).
-The macros herein generate the complete HTML structure for the pages.
-There are macros for making the header and the body of the document.)
-
-\p(The page body is passed to the layout definitions as an argument. As
-the text can be large, it is first diverted and the text passed to the
-layout macros is simply a call to undivert. That way a very large text
-can be passed around with very little cost. This page is made with
-\link(m4lib/thissite.m4, these definitions).)
-
-\p(There is a single file for each HTML file.)
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/tmpl.m4 b/examples/WWW/m4lib/tmpl.m4
deleted file mode 100644
index 8262d293..00000000
--- a/examples/WWW/m4lib/tmpl.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([])
-
-\divert(1)
-\h2([])
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/todo.m4 b/examples/WWW/m4lib/todo.m4
deleted file mode 100644
index 7a22c151..00000000
--- a/examples/WWW/m4lib/todo.m4
+++ /dev/null
@@ -1,18 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([TODO - Things still to be done])
-
-\divert(1)
-
-<PRE>\dnl
-\changesyntax([A<>])\dnl
-\changequote(,)\dnl
-\include(m4/TODO)
-\changequote([,])\dnl
-\changesyntax([O<>])\dnl
-</PRE>
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/uses.m4 b/examples/WWW/m4lib/uses.m4
deleted file mode 100644
index 75f7b6ae..00000000
--- a/examples/WWW/m4lib/uses.m4
+++ /dev/null
@@ -1,36 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([Current uses of m4])
-
-\divert(1)
-
-\p(The MTA sendmail uses \tt(m4) for generating configuration files.)
-
-\p(\link(http://www.gnu.org/software/autoconf/autoconf.html, GNU
-Autoconf) uses \tt(m4) to generate "configure" scripts, that are used
-for configuring \link(http://www.gnu.org/, GNU) software for a
-particular platform.)
-
-\p(Htm4l is a set of macros for generating HTML. Html4 is written by
-Terry Jones (terry@cliffs.ucsd.edu). See
-\showlink(http://cliffs.ucsd.edu/terry/htm4l/htm4l/main.html) for
-details. )
-
-\p(Various programs uses m4 to preprocess configuration files, for
-example the X11 window manager fvwm.)
-
-\p( There is an \link(http://www.ssc.com/lg/issue22/using_m4.html,
-article in the Linux Gazette) about writing HTML with GNU m4 written by
-\link(mailto:bhepple@bit.net.au, Bob Hepple) . More recent versions
-are kept at \link(http://www.bit.net.au/~bhepple, Bob's home site).
-The macros are used to maintain a large commercial site at
-\showlink(http://www.finder.com.au).)
-
-
-\p(\link(thissite.htm, These files are created with GNU m4 \__m4_version__).)
-
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/visions.m4 b/examples/WWW/m4lib/visions.m4
deleted file mode 100644
index c904976d..00000000
--- a/examples/WWW/m4lib/visions.m4
+++ /dev/null
@@ -1,28 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([The Road Ahead])
-
-\divert(1)
-\h2([Possible features for future versions])
-
-
-\ul(
-
-\li \p(Guile can be used as an extension language so complicated macros can be
-written in Scheme while still maintaining the m4 interface.)
-
-\li\p(A kind of super-quotes can be added, quotes that aren't stripped
-when read, as are normal quotes. These quotes should be stripped when
-output. In that way text can be super-quote and consequently passed
-untouched to the output. It is a bit like comments, but there the
-quotes are removed before output.)
-
-)
-
-\p(See also the \link(todo.htm, TODO) file.)
-
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/m4lib/whatis.m4 b/examples/WWW/m4lib/whatis.m4
deleted file mode 100644
index 506269a2..00000000
--- a/examples/WWW/m4lib/whatis.m4
+++ /dev/null
@@ -1,43 +0,0 @@
-include(`setup.m4')
-
-\set_author([René Seindal])
-\set_title([What is GNU m4])
-
-\divert(1)
-
-\p([GNU \tt(m4) is an implementation of the traditional Unix macro
-processor. It is mostly SVR4 compatible, although it has some extensions
-(for example, handling more than 9 positional parameters to macros). GNU
-\tt(m4) also has built-in functions for including files, running shell
-commands, doing arithmetic, etc.])
-
-\p([GNU \tt(m4) is a macro processor, in the sense that it copies its
-input to the output, expanding macros as it goes. Macros are either
-builtin or user-defined, and can take any number of arguments. Besides
-just doing macro expansion, m4 has builtin functions for including named
-files, running UNIX commands, doing integer arithmetic, manipulating
-text in various ways, recursion, etc... m4 can be used either as a
-front-end to a compiler, or as a macro processor in its own right.])
-
-\p([The m4 macro processor is widely available on all UNIXes. Usually,
-only a small percentage of users are aware of its existence. However,
-those who do often become commited users. The growing popularity of GNU
-Autoconf, which prerequires GNU m4 for generating the `configure'
-scripts, is an incentive for many to install it, while these people will
-not themselves program in m4. GNU m4 is mostly compatible with the
-System V, Release 3 version, except for some minor differences.])
-
-\p([Some people found m4 to be fairly addictive. They first use m4 for
-simple problems, then take bigger and bigger challenges, learning how to
-write complex m4 sets of macros along the way. Once really addicted,
-users pursue writing of sophisticated m4 applications even to solve
-simple problems, devoting more time debugging their m4 scripts than
-doing real work. Beware that m4 may be dangerous for the health of
-compulsive programmers.])
-
-\p([Autoconf needs GNU m4 for generating `configure' scripts, but not for
-running them.])
-
-\divert(0)\dnl
-\DO_LAYOUT([\undivert(1)])
-\divert(-1)
diff --git a/examples/WWW/modules.htm b/examples/WWW/modules.htm
deleted file mode 100644
index ee668972..00000000
--- a/examples/WWW/modules.htm
+++ /dev/null
@@ -1,347 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Modules</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Modules</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<PRE>This directory contains demonstration modules for GNU m4.
-
-Nothing in this directory is built by default.
-
-Dynamic modules is a experimental feature of GNU m4. Currently it has
-only been certified to work under Linux 2.0.
-
-Dynamic modules are only available if GNU m4 was configured with
---with-modules and if the dlopen(3) interface is available in the
-operating system.
-
-Implementation details are in ../src/module.c
-
-A module is a compiled shared object, i.e., modules are written in C and
-then compiled. The compiled file can then be loaded into a running m4
-process by calling the builtin "loadmodule". This will give GNU m4
-access to any system feature with a C interface.
-
-Modules are searched for in M4MODPATH, if set, and in a module directory
-defined at configure time, default /usr/local/libexec/m4.
-
-A module extends GNU m4 by defining new builtins, It can define builtins
-with the same names as existing builtins, which will then be
-unavailable. A module cannot redefine internal functions of GNU m4,
-such as the input parser or argument handling.
-
-The infrastructure for writing and compiling modules is still a bit
-wanting.
-
-Each module should include the two header files ../src/m4.h and
-../src/builtin.h. These will include &lt;ctype.h&gt;, &lt;stdio.h&gt;,
-../lib/obstack.h and ../config.h.
-
-Each module *must* define the symbol "m4_macro_table" as a pointer to a
-table of "struct builtin" (defined in m4.h). The table ends with an
-entry with name == NULL. The builtins described in the table will be
-defined by GNU m4 as were they normal builtins.
-
-If a module defines the symbol "m4_init_module", it is supposed to be a
-function with a prototype of "void m4_init_module(struct obstack *obs)",
-and it will be called as soon as the module is loaded. Any non-finished
-object left on the obstack will be the expansion of the call of the
-builtin "loadmodule". The obstack pointer might be NULL (in the future).
-
-If a module defines the symbol "m4_finish_module", it is supposed to be
-a function with a prototype of "void m4_finish_module(void)", and it
-will be called just before GNU m4 exits. This will allow a module to
-clean up before exit. There is no way of communicating information to
-the user, as GNU m4 exits immeidately afterwards.
-
-No other symbols will be used by GNU m4. Other external symbols within
-the module are private and will not be accessible to GNU m4 or to other
-modules.
-
-Modules are allowed to call external functions already defined within
-the GNU m4 sources. Some of these have prototypes in builtin.h.
-
-
-A complete, though silly, example is found in test.c. A more
-interesting example is in time.c.
-
-To try the demos, compile with `make' and run them with the commands as:
-
- M4MODPATH=`pwd` ../src/m4 time.m4
-
-
-</PRE>
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/news.htm b/examples/WWW/news.htm
deleted file mode 100644
index ed4f374f..00000000
--- a/examples/WWW/news.htm
+++ /dev/null
@@ -1,551 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - NEWS - History of user-visible changes</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>NEWS - History of user-visible changes</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<PRE>GNU m4 NEWS - History of user-visible changes. -*-indented-text-*-
-Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
-
-Version beta 1.4m - November 1998, by Rene' Seindal
-
-* Using libtool for compiling modules and for linking main app.
-
-* Reorganised the dynamic module code to encapsulate system dependencies
- better. The code for HPUX shl_load() still needs testing and debugging.
- A dld interface is also missing. Any volunteers?
-
-* The files from the GNU m4 web-site is now in examples/WWW as a more
- complete example of what GNU m4 can do.
-
-Version beta 1.4l - November 1998, by Rene' Seindal
-
-* GNU m4 now has an escape syntax category. If a character is marked as
- an escape, words are only recognised as macros if preceded by an escape
- character. It is a bit like -P, but dynamic: it can be turned on and
- off. The GNU m4 web-site on http://www.seindal.dk/rene/gnu/ is
- maintained with this feature - the m4 source is available on the site.
-
-* The module interface is improved, thanks to "Brian J. Fox"
- &lt;bfox@datawave.net&gt;, who have contributed some code from Meta-HTML. The
- modules now build automatically and installs properly, by default in
- /usr/local/libexec/m4. There is a preliminary, untested support for
- shl_load().
-
-* There is now a __m4_version__ macro that expands to the current version
- number.
-
-Version beta 1.4k - November 1998, by Erick Branderhorst and 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.
-
-* New experimental feature: dynamically loadable modules. New builtin
- `loadmodules' loads shared libraries, that can define new builtin
- macros, ie, new macros can be written in C. Depends on the dlopen()
- interface, and is currently only tested on Linux. Enabled at configure
- time with `--with-modules'. Documentation is in src/module.c and
- module/README.
-
-* Implement a GNU message catalog for French (Franc,ois Pinard).
-
-* Filenames found through path searches are now correctly reflected in
- error and debug messages and through the `__file__' macro.
-
-Bugs fixed
-
-* 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
-
-* Diversions are created as needed. Option `-N' is still accepted, but
-otherwise ignored. Users should use only negative diversion numbers,
-instead of high positive numbers, for diverting to nowhere.
-
-* Diversions should also work faster. No temporary files will be needed
-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
-
-* In patsubst(STRING, REGEXP, REPLACEMENT), \& in REPLACEMENT has been
-changed to represent this part of STRING matched by the whole REGEXP,
-instead of the whole STRING as before. \0 does the same, but emits a
-diagnostic saying it will disappear in some subsequent release.
-
-* eval(EXPR) emits a diagnostic if EXPR has suffixed crumb. The same for
-other numeric conversions in incr(), decr(), divert(), etc.
-
-* `--fatal-warnings' (-E) stops execution at first warning.
-
-* `--nesting-limit=LEVEL' (-L LEVEL) sets a limit to macro nesting.
-It is initially fixed at 250.
-
-* `--word-regexp=REGEXP' (-W REGEXP) modifies macro name syntax, like
-does the new `changeword(REGEXP)' macro. This feature is experimental,
-tell me your opinions about it. You do need --enable-changeword at
-configure time to get these things. Do *not* depend on them yet.
-
-* Trace output format is scannable by GNU Emacs' next-error function.
-
-* Stack overflow is detected and diagnosed on some capable systems.
-
-* Various bugs have been corrected, m4 should be more portable. See the
-ChangeLog for details.
-
-
-Version 1.1 - November 1993, by Franc,ois Pinard
-
-Changes which might affect existing GNU m4 scripts:
-
-* Option `-V' has been removed, use `--version' instead. `--version'
-writes on standard output instead of standard error, and inhibits any
-script execution.
-
-* `--no-gnu-extensions' has been renamed `--traditional'.
-
-* In `eval', `^' used to indicate exponentiation, use `**' instead.
-
-* The automatic undiversion which takes place at end of all input is
-forced into the main output stream.
-
-Changes which are unlikely to affect existing scripts:
-
-* `--help' prints an usage summary on standard output. Script execution
-is then inhibited.
-
-* `--prefix-builtins' (-P) prefixes all builtin macros by `m4_'.
-
-* Most builtin macros for which arguments are mandatory, called without
-any arguments, are no more recognized as builtin macros: they are
-consequently copied verbatim to the output stream.
-
-* `define' and `pushdef' are usable with only one argument, they give
-this argument an empty definition.
-
-* `eval' new operators for binary representation handling: `^' for
-exclusive-or, `~' for the bitwise negation, `&lt;&lt;' and `&gt;&gt;' for shifts.
-
-* `eval' recognizes the notation 0bDIGITS for binary numbers and the
-notation 0rRADIX:DIGITS for numbers in any radix from 1 to 36.
-
-Version 1.0.3 - December 1992, by Franc,ois Pinard
-
-Changes for the user:
-
-* `dnl' outputs a diagnostic if immediately followed by `('. Usually,
-`dnl' is followed by newline or whitespace.
-
-* `ifelse' accepts without complaining the common idiom of having only
-one argument. This is useful for introducing long comments.
-
-* `eval' always expresses values as signed, whatever the radix.
-
-* M4OPTS environment variable is no longer obeyed.
-
-* `--no-warnings' option is renamed `--silent'.
-
-* Debug lines use a new format more compatible with GNU standards.
-
-* Various bugs have been corrected. See the ChangeLog for details.
-
-Changes for the installer:
-
-* GNU m4 now uses an Autoconf-generated configure script, and should be
-more easily portable in many ways. (Cray is not supported yet).
-
-* `make check' has been made more portable, expect no errors.
-
-Changes for the programmer:
-
-* Sources have been fully reindented to comply with GNU standards, and
-cleaned up in many ways.
-
-* Sources have been protoized. Non-ANSI compilers are automatically
-detected, then sources are unprotoized on the fly before compilation.
-
-* GNU m4 uses newer versions of obstack, regex, getopt, etc.
-
-Version 1.0 - October 1991, by Rene' Seindal
-
-* Uses GNU configure, taken from the gdb distribution.
-
-* Uses GNU getopt(), with long option names.
-
-* The -Q/+quiet option is added, which suppresses warnings about missing
-or superflous arguments to built-in macros.
-
-* Added default options via the M4OPTS environment variable.
-
-* Several minor bugs have been fixed.
-
-Version 0.99 - July 1991, by Rene' Seindal
-
-* The builtins `incr' and `decr' are now implemented without use of
-`eval'.
-
-* The builtin `indir' is added, to allow for indirect macro calls
-(allows use of "illegal" macro names).
-
-* The debugging and tracing facilities has been enhanced considerably.
-See the manual for details.
-
-* The -tMACRO option is added, marks MACRO for tracing as soon as it
-is defined.
-
-* Builtins are traced after renaming iff they were before.
-
-* Named files can now be undiverted.
-
-* The -Nnum option can be used to increase the number of divertions
-available.
-
-* Calling changecom without arguments now disables all comment handling.
-
-* A bug in `dnl' is fixed.
-
-* A bug in the multi-character quoting code is fixed.
-
-* Several typos in the manual has been corrected. More probably persist.
-
-Version 0.75 - November 1990, by Rene' Seindal
-
-* Implemented search path for include files (-I option and M4PATH
-environment variable).
-
-* Implemented builtin `format' for printf-like formatting.
-
-* Implemented builtin `regexp' for searching for regular expressions.
-
-* Implemented builtin `patsubst' for substitution with regular
-expressions.
-
-* Implemented builtin `esyscmd', which expands to a shell commands output.
-
-* Implemented `__file__' and `__line__' for use in error messages.
-
-* Implemented character ranges in `translit'.
-
-* Implemented control over debugging output.
-
-* Implemented multi-character quotes.
-
-* Implemented multi-character comment delimiters.
-
-* Changed predefined macro `gnu' to `__gnu__'.
-
-* Changed predefined macro `unix' to `__unix__', when the -G option is
-not used. With -G, `unix' is still defined.
-
-* Added program name to error messages.
-
-* Fixed two missing null bytes bugs.
-
-Version 0.50 - January 1990, by Rene' Seindal
-
-* Initial beta release.
-
-Local Variables:
-fill-column: 75
-End:
-
-</PRE>
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/readme.htm b/examples/WWW/readme.htm
deleted file mode 100644
index 09d483e7..00000000
--- a/examples/WWW/readme.htm
+++ /dev/null
@@ -1,329 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - README</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>README</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<PRE>GNU `m4' is an implementation of the traditional Unix macro
-processor. It is mostly SVR4 compatible, although it has some
-extensions (for example, handling more than 9 positional parameters
-to macros). `m4' also has built-in functions for including files,
-running shell commands, doing arithmetic, etc. Autoconf needs GNU
-`m4' for generating `configure' scripts, but not for running them.
-
-GNU `m4' has been originally written by René Seindal, from Denmark.
-
-If GNU `m4' is meant to serve GNU `autoconf', beware that `m4'
-should be fully installed *prior to* configuring `autoconf' itself.
-
-In the subdirectories `tests' and `examples' you will find various m4
-files, ranging from trivial test files to rather advanced macros. If
-you intend to use m4 seriously, you might find useful material down
-there.
-
-See file `COPYING' for copying conditions.
-See file `INSTALL' for compilation and installation instructions.
-See file `ABOUT-NLS' for how to customize this program to your language.
-See file `NEWS' for a list of major changes in the current release.
-See file `THANKS' for a list of contributors.
-
-By using `./configure --with-gmp, you get multiple precision integral
-and rational arithmetic in eval. The implementation depends on the GNU
-gmp v2 library.
-
-By using `./configure --with-modules, you get the possibility of using
-dynamic modules. The implementation depends on dlopen(3) interface.
-See file `modules/README' for a more detailed description.
-
-By using `./configure --enable-changeword', you get an experimental
-feature which allows for changing the syntax of what is a "word" in
-`m4'. THIS WILL PROBABLY GO AWAY, so don't count on it. Some of the
-same things can be achieved with `changesyntax' at a much better speed.
-
-By using `./configure --with-dmalloc', GNU m4 is linked with Gray
-Watson's dmalloc package. It is a debugging option for finding memory
-management problems. Gray Watson's dmalloc package is available at
-ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz.
-
-Send bug reports, comments or ideas to `bug-m4@gnu.org'. 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 describe a solution, from which the problem might be uneasy to
-infer. Don't forget all relevant information about your operating
-system, compiler, libraries, ...
-
-</PRE>
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/thanks.htm b/examples/WWW/thanks.htm
deleted file mode 100644
index 78470a16..00000000
--- a/examples/WWW/thanks.htm
+++ /dev/null
@@ -1,377 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - People who have contributed to m4</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>People who have contributed to m4</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<PRE>GNU m4 THANKS file
-
-GNU m4 has originally been written by Rene' Seindal. Many people
-further contributed to GNU m4 by reporting problems, suggesting
-various improvements or submitting actual code. Here is a list of
-these people. Help me keep it complete and exempt of errors.
-
-
-
-Akiko Matsushita matusita@sra.co.jp
-Alan Magnuson awm@osc.edu
-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 Athan athan@morgan.com
-Andrew Bettison andrewb@zip.com.au
-Assar Westerlund assar@nada.kth.se
-Ben A. Mesander ben@piglet.cr.usgs.gov
-Ben Elliston bje@cygnus.com
-Bengt Mertensson bengt@mathematik.uni-bremen.de
-Bernhard Daeubler daeb@physik.uni-ulm.de
-Bill Bumgarner bbum@thoughtport.com
-Bjorn R. Bjornsson brb@falcon.is
-Brendan Kehoe brendan@cygnus.com
-Brian J. Fox bfox@datawave.net
-Brian D. Carlstrom bdc@clark.lcs.mit.edu
-David J. MacKenzie djm@uunet.uu.net
-Erez Zadok ezk@cs.columbia.edu
-Eric Allman eric@cs.berkeley.edu
-Eric Backus ericb@lsid.hp.com
-Eric Fischer enf1@ellis.uchicago.edu
-Erick Branderhorst Erick.Branderhorst@asml.nl
-François Pinard pinard@iro.umontreal.ca
-Gary Affonso Gary_Affonso@iqinc.com
-Geoff Russell grussell@guest.adelaide.edu.au
-Greg McGary gkm@cstone.net
-Hal Peterson hrp@pecan.cray.com
-Hoang Uong hoang@ornews.intel.com
-Hongjiu Lu hjl@nynexst.com
-Ian Taylor ian@cygnus.com
-Jan Djarv Jan.Djarv@sa.erisoft.se
-Jason Merrill jason@jarthur.claremont.edu
-Jim Avera jima@netcom.com
-Jim Kingdom kingdon@cygnus.com
-Jim Meyering meyering@na-net.ornl.gov
-Joel Sherrill jsherril@uahcs2.cs.uah.edu
-John David Anglin dave@hiauly1.hia.nrc.ca
-John Gerard Malecki johnm@artisan.com
-Joseph E. Sacco jsacco@ssl.com
-Joshua R. Poulson jrp@plaza.ds.adp.com
-Karl Berry karl@cs.umb.edu
-Karl Vogel vogelke@c-17igp.wpafb.af.mil
-Kaveh R. Ghazi ghazi@noc.rutgers.edu
-Keith Bostic bostic@abyssinian.sleepycat.com
-Kristine Lund lund@lpnaxp.in2p3.fr
-Krste Asanovic krste@icsi.berkeley.edu
-Marcus Daniels marcus@ee.pdx.edu
-Marion Hakanson hakanson@cse.ogi.edu
-Mark Seiden mis@seiden.com
-Massimo Dal Zotto dz@cs.unitn.it
-Matthias Rabe rabe@mathematik.uni-bielefeld.de
-Michael Fetterman mafetter@ichips.intel.com
-Michael L. Welcome welcome@bigbird.llnl.gov
-Mike Andrews kramer@fragile.termfrost.org
-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
-Noah Friedman friedman@gnu.org
-Pete Chown pete.chown@dale.dircon.co.uk
-Pierre Gaumond gaumondp@ere.umontreal.ca
-Pierre Mathieu mathieu@geod.emr.ca
-Rafael Corvalan rafael@club-internet.fr
-René Seindal rene@seindal.dk
-Richard Ling richard@research.canon.oz.au
-Richard Stallman rms@gnu.org
-Robert Bernstein rocky@panix.com
-Roland H. Pesch roland@wrs.com
-Roland McGrath roland@gnu.org
-Scott Bartram deneb!scottb
-Simon Leinen simon@lia.di.epfl.ch
-Skip Montanaro skip@automatrix.com
-Stephen Perkins perkins@cps.msu.edu
-Steve Williamson willy@uinpla.npl.uiuc.edu
-Terry Jones terry@cliffs.ucsd.edu
-Thorsten Ohl ohl@physics.harvard.edu
-Tom McConnell tmcconne@sedona.intel.com
-Tom Quinn trq@dionysos.thphys.ox.ac.uk
-Tom Tromey tromey@cns.caltech.edu
-Ulrich Drepper drepper@gnu.org
-Vern Paxson vern@ee.lbl.gov
-Vic Abell abe@cc.purdue.edu
-Vivek P. Singhal singhal@cs.utexas.edu
-Walter Wong wcw+@cmu.edu
-
-</PRE>
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/thissite.htm b/examples/WWW/thissite.htm
deleted file mode 100644
index 03e2a01a..00000000
--- a/examples/WWW/thissite.htm
+++ /dev/null
@@ -1,327 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - This site</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>This site</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<P>
-This GNU m4 site is maintained by René Seindal (<A HREF="mailto:rene@seindal">rene@seindal</A>).
-</P>
-
-
-<P>
-All files are generated using GNU m4 1.4l. You can view
-the <A HREF="m4lib/">source files</A>. They are very simple. They use some
-features from Gnu m4 1.4l
-</P>
-
-
-<P>
-The basic M4 definitions of quotes comments escapes are in
-<A HREF="m4lib/setup.m4">m4lib/setup.m4</A>. This is first included by all files to
-configure the enviroment correctly for the other files. To avoid have
-macros called by accident an escape character is defined with
-changesyntax. <I>This is a new feature in m4 1.4l</I>.
-</P>
-
-
-<P>
-Some fairly general macros to generate various HTML construct are
-found in <A HREF="m4lib/html.m4">m4lib/html.m4</A>. There are macros for simple tags containers with and with attributes links and a few utility macros.
-</P>
-
-
-<P>
-The visual aspects of the pages are in <A HREF="m4lib/layout.m4">m4lib/layout.m4</A>.
-The macros herein generate the complete HTML structure for the pages.
-There are macros for making the header and the body of the document.
-</P>
-
-
-<P>
-The page body is passed to the layout definitions as an argument. As
-the text can be large it is first diverted and the text passed to the
-layout macros is simply a call to undivert. That way a very large text
-can be passed around with very little cost. This page is made with
-<A HREF="m4lib/thissite.m4">these definitions</A>.
-</P>
-
-
-<P>
-There is a single file for each HTML file.
-</P>
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/todo.htm b/examples/WWW/todo.htm
deleted file mode 100644
index 9c5100f1..00000000
--- a/examples/WWW/todo.htm
+++ /dev/null
@@ -1,388 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - TODO - Things still to be done</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>TODO - Things still to be done</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<PRE>* TODO file for GNU m4 -*- indented-text -*-
-
-Tell the maintainers at &lt;bug-m4@gnu.org&gt; if you feel like volunteering
-for any of these ideas or if you have others to add.
-
-
-* Features or problems
-
- + GMP eval() should be enables if the library is present, maybe by
- providing two different versions of eval(). That way users can
- choose whether to use gmp on an individual basis.
-
- + There should be a way ot have m4 discard comments instead of
- outputting them.
-
- + Implement discarding comment delimiters with the syntax table.
-
- + The module system is still rudimentary (see below)
-
- + Changes in the syntax_table are not saved to frozen files.
-
- + Information about loaded modules is not saved to frozen files.
-
- + m4wrap.1.test fail on Solaris 2.6 using egcs 1.1a compiler (Erick B).
-
- + The $ used in user defined macros cannot be changed through
- changesyntax. It should be handled as a modifier.
-
- + Make show include dependencies like gcc so targets are updated
- when their (included) input files are updated (Erick B).
-
- + The test case `other-tests/stackovf.test' does not work.
-
- + Sort out all the weird forms of interaction between changesyntax,
- changecom and changequote. What happens if you install a quote with
- changequote and removes it with changesyntax and vice versa.
-
- + Add support for wide character sets.
-
-
-* Optimization and clean up
-
- + Have NULs go really undisturbed through GNU m4
- GNU m4 is lousy regarding NULs in streams (this would require
- maintaining the string lengths, and avoiding strlen, strcpy,
- etc.).
-
-
-* Module specific issues
-
- + Support for other DL interfaces besides dlopen, such as dld and
- hpux is still missing.
-
- + Modules should be loadable from the command line with something like
- `-M module.so' o `--load-module=module.so'. M4 should abort if it
- fails.
-
- + Some way of linking a module statically is needed, for systems
- without support for dynamic loading.
-
-
-
-Below is the old 1.4 TODO list, several years old. Only a few points
-have been kept. Some things are fixed, many others just seem
-dated. Write me if I have been to harsh. (René Seindal)
-
-------------------------------------------------------------------------
-Tell &lt;pinard@iro.umontreal.ca&gt; if you feel like volunteering for any
-of these ideas, listed more or less in decreasing order of priority.
-Some TODO items are implicit from received email. See file BACKLOG.
-
-.* Features or problems
-. + Update documentation from accumulated mail about it
-. + Changeword without arguments should restore default behavior
-. + Study synclines at the very beginning of each diverted sequence
-. + Make eval work on bignums - the 32 bits limit is artificial
- From Krste Asanovic &lt;krste@icsi.berkeley.edu&gt;, 1993-03-20
-. + Make show include dependencies like gcc so targets are updated
- when their (included) input files are updated (Erick B).
-. + Ask FSF to create m4-bugs@gnu.org for bug reports (Erick B).
-. + m4wrap.1.test fail on Solaris 2.6 using egcs 1.1a compiler (Erick B).
-
-.* Optimization and clean up
-. + Check for memory leaks and uninitialized reads
- From Vern Paxson &lt;vern@horse.ee.lbl.gov&gt; on 1993-12-06
-. + Simplify format/ecvt code, together with HAVE_EFGCVT
-. + Finalize the stdarg vs varargs thing
-. + Profile GNU m4 and speed it up
- From David J. MacKenzie &lt;djm@eng.umd.edu&gt;, 1993-01-20
-
- GNU m4 should be sped up by a factor of three for competing
- with other versions (I think that the lexer is not agressive
- enough and too often return single characters; obstacks might
- be a little abused, too).
-. + Have NULs go really undisturbed through GNU m4
- See `dumpdef' and debugging section, which abuses %s
- From Thorsten Ohl &lt;ohl@chico.harvard.edu&gt;, 1992-12-21
-
- path.c (add_include_directory): Why the '\0' terminator?
-
- GNU m4 is lousy regarding NULs in streams (this would require
- maintaining the string lengths, and avoiding strlen, strcpy,
- etc.).
-. + Clean up the obstack.[ch] code
-. + Use rx.[ch] instead of regex.[ch]
- From Hal Peterson &lt;hrp@ironwood.cray.com&gt;, 1994-04-22
-
-</PRE>
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/uses.htm b/examples/WWW/uses.htm
deleted file mode 100644
index 9988dacf..00000000
--- a/examples/WWW/uses.htm
+++ /dev/null
@@ -1,322 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - Current uses of m4</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>Current uses of m4</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<P>
-The MTA sendmail uses <TT>m4</TT> for generating configuration files.
-</P>
-
-
-<P>
-<A HREF="http://www.gnu.org/software/autoconf/autoconf.html">GNU
-Autoconf</A> uses <TT>m4</TT> to generate "configure" scripts that are used
-for configuring <A HREF="http://www.gnu.org/">GNU</A> software for a
-particular platform.
-</P>
-
-
-<P>
-Htm4l is a set of macros for generating HTML. Html4 is written by
-Terry Jones (terry@cliffs.ucsd.edu). See
-<A HREF="http://cliffs.ucsd.edu/terry/htm4l/htm4l/main.html">http://cliffs.ucsd.edu/terry/htm4l/htm4l/main.html</A> for
-details.
-</P>
-
-
-<P>
-Various programs uses m4 to preprocess configuration files for
-example the X11 window manager fvwm.
-</P>
-
-
-<P>
-There is an <A HREF="http://www.ssc.com/lg/issue22/using_m4.html">article in the Linux Gazette</A> about writing HTML with GNU m4 written by
-<A HREF="mailto:bhepple@bit.net.au">Bob Hepple</A> . More recent versions
-are kept at <A HREF="http://www.bit.net.au/~bhepple">Bob's home site</A>.
-The macros are used to maintain a large commercial site at
-<A HREF="http://www.finder.com.au">http://www.finder.com.au</A>.
-</P>
-
-
-
-<P>
-<A HREF="thissite.htm">These files are created with GNU m4 1.4l</A>.
-</P>
-
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/visions.htm b/examples/WWW/visions.htm
deleted file mode 100644
index eceec6f7..00000000
--- a/examples/WWW/visions.htm
+++ /dev/null
@@ -1,309 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - The Road Ahead</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>The Road Ahead</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<H2>Possible features for future versions</H2>
-
-
-
-<UL>
-<LI> <P>
-Guile can be used as an extension language so complicated macros can be
-written in Scheme while still maintaining the m4 interface.
-</P>
-
-
-<LI><P>
-A kind of super-quotes can be added quotes that aren't stripped
-when read as are normal quotes. These quotes should be stripped when
-output. In that way text can be super-quote and consequently passed
-untouched to the output. It is a bit like comments but there the
-quotes are removed before output.
-</P>
-
-
-
-</UL>
-
-
-<P>
-See also the <A HREF="todo.htm">TODO</A> file.
-</P>
-
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/WWW/whatis.htm b/examples/WWW/whatis.htm
deleted file mode 100644
index 3f793cd0..00000000
--- a/examples/WWW/whatis.htm
+++ /dev/null
@@ -1,327 +0,0 @@
-<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU m4 - What is GNU m4</TITLE>
-<META NAME="AUTHOR" CONTENT="René Seindal">
-<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
-</HEAD>
- <BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
-<TABLE cellpadding=5 width="100%">
-<TR align=left valign=bottom>
-<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
-
-<H1>GNU m4</H1>
-
-<H2>What is GNU m4</H2>
-
-</TD>
-
-</TR>
- <TR >
-<TD align=left valign=top width="15%" bgcolor="#FF9900">
-
-
-
-<TABLE align=left valign=top columns=1>
-<TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Generel info</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="whatis.htm">What is m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="features.htm">Features</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="uses.htm">Uses of m4</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Documentation</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="man/m4_toc.html">Manual</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Source files</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="readme.htm">README</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="todo.htm">TODO</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="news.htm">NEWS</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="changelog.htm">ChangeLog</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thanks.htm">Contributors</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="m4/">Browse it</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>The Future</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="modules.htm">Modules</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="visions.htm">Visions</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Development</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="lists.htm">Mailing-lists</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="feedback.htm">Feedback</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="download.htm">Download</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
- <TR>
-<TD bgcolor="#CC6600">
-<P>
-<B>Examples</B>
-</P>
-
-</TD>
-
-</TR>
- <TR>
-<TD>
-
-<FONT size=-1><P>
-<B><A HREF="thissite.htm">This site</A></B>
-</P>
-</FONT>
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-
-
-
-
-</TD>
- <TD align=left valign=top width="90%">
-
-
-<P>
-GNU <TT>m4</TT> is an implementation of the traditional Unix macro
-processor. It is mostly SVR4 compatible, although it has some extensions
-(for example, handling more than 9 positional parameters to macros). GNU
-<TT>m4</TT> also has built-in functions for including files, running shell
-commands, doing arithmetic, etc.
-</P>
-
-
-<P>
-GNU <TT>m4</TT> is a macro processor, in the sense that it copies its
-input to the output, expanding macros as it goes. Macros are either
-builtin or user-defined, and can take any number of arguments. Besides
-just doing macro expansion, m4 has builtin functions for including named
-files, running UNIX commands, doing integer arithmetic, manipulating
-text in various ways, recursion, etc... m4 can be used either as a
-front-end to a compiler, or as a macro processor in its own right.
-</P>
-
-
-<P>
-The m4 macro processor is widely available on all UNIXes. Usually,
-only a small percentage of users are aware of its existence. However,
-those who do often become commited users. The growing popularity of GNU
-Autoconf, which prerequires GNU m4 for generating the `configure'
-scripts, is an incentive for many to install it, while these people will
-not themselves program in m4. GNU m4 is mostly compatible with the
-System V, Release 3 version, except for some minor differences.
-</P>
-
-
-<P>
-Some people found m4 to be fairly addictive. They first use m4 for
-simple problems, then take bigger and bigger challenges, learning how to
-write complex m4 sets of macros along the way. Once really addicted,
-users pursue writing of sophisticated m4 applications even to solve
-simple problems, devoting more time debugging their m4 scripts than
-doing real work. Beware that m4 may be dangerous for the health of
-compulsive programmers.
-</P>
-
-
-<P>
-Autoconf needs GNU m4 for generating `configure' scripts, but not for
-running them.
-</P>
-
-
-
-</TD>
-
-</TR>
-
-</TABLE>
-
-</BODY>
-
-
-</HTML>
-
-
diff --git a/examples/capitalize.test b/examples/capitalize.test
deleted file mode 100755
index 5b80f5c0..00000000
--- a/examples/capitalize.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# capitalize.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/capitalize.m4 >in
-
-cat <<\EOF >ok
-
-
-CONVERT TO UPPER CASE
-convert to lower case
-
-
-This Sentence Should Be Capitalized
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/comments.test b/examples/comments.test
deleted file mode 100755
index 63161dc2..00000000
--- a/examples/comments.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# comments.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(comments.m4)dnl
-EOF
-
-cat <<\EOF >ok
-# An ordinary comment
-
-# A comment in a macro
-Macro foo expansion
-
-
-# A *** Macro comment expansion *** in a macro
-Macro foo expansion
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
diff --git a/examples/ddivert.test b/examples/ddivert.test
deleted file mode 100755
index 5db82e90..00000000
--- a/examples/ddivert.test
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# ddivert.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(ddivert.m4)dnl
-EOF
-
-cat <<\EOF >ok
-Text diverted a first time.
-Text diverted a second time.
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
diff --git a/examples/debug.test b/examples/debug.test
deleted file mode 100755
index 0260641e..00000000
--- a/examples/debug.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# debug.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(debug.m4)dnl
-EOF
-
-cat <<\EOF >ok
-
-
-
-2 1 0 Liftoff
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- countdown ...
-m4trace: -1- countdown(`2') -> ???
-m4trace: -1- countdown(...) -> `2 ifelse(eval(2 > 0), 1, `countdown(decr(2))', `Liftoff')'
-m4trace: -1- countdown ...
-m4trace: -1- countdown(`1') -> ???
-m4trace: -1- countdown(...) -> `1 ifelse(eval(1 > 0), 1, `countdown(decr(1))', `Liftoff')'
-m4trace: -1- countdown ...
-m4trace: -1- countdown(`0') -> ???
-m4trace: -1- countdown(...) -> `0 ifelse(eval(0 > 0), 1, `countdown(decr(0))', `Liftoff')'
-EOF
-
-M4PATH=$srcdir $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/defs b/examples/defs
deleted file mode 100644
index cf97e3b3..00000000
--- a/examples/defs
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- ksh -*-
-# Defines for GNU m4 testing environment.
-# Erick Branderhorst <Erick.Branderhorst@asml.nl>
-
-# Ensure $srcdir set correctly.
-test -f ${srcdir}/defs || {
- echo "defs: installation error" 1>&2
- exit 1
-}
-
-# If srcdir is relative, we need to modify it.
-case "$srcdir" in
- /*)
- ;;
-
- *)
- srcdir="../$srcdir"
- ;;
-esac
-
-rm -rf testSubDir > /dev/null 2>&1
-mkdir testSubDir
-cd testSubDir
-
-# Build appropriate environment in test directory. Eg create
-# configure.in, touch all necessary files, etc.
-
-# nothing yet
-
-# See how redirections should work. User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
- exec > /dev/null 2>&1
-}
-
-# User can set MAKE to choose which make to use. Must use GNU make.
-test -z "$MAKE" && MAKE=make
-
-echo "=== Running test $0"
-
-# See how GNU m4 should be run. No options as default.
-test -z "$M4" && M4=../../src/m4
-
-# See how cmp should be run.
-test -z "$CMP" && CMP=cmp
-
-# Setting nls related vars. Override them in the test when needed.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
diff --git a/examples/esyscmd.test b/examples/esyscmd.test
deleted file mode 100755
index 47602094..00000000
--- a/examples/esyscmd.test
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# esyscmd.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/esyscmd.m4 >in
-
-cat <<\EOF >ok
-# Cannot use real hostname program because test would fail
-hostname = >>www.gnu.org
-<<
-hostname = >>www<<
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/exp.test b/examples/exp.test
deleted file mode 100755
index 443e98c7..00000000
--- a/examples/exp.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# exp.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/exp.m4 >in
-
-cat <<\EOF >ok
-7
-6
-5
-4
-3
-2
-1
-0
-Done
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/foreach.test b/examples/foreach.test
deleted file mode 100755
index 969e1638..00000000
--- a/examples/foreach.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# foreach.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/foreach.m4 >in
-
-cat <<\EOF >ok
-
-Word was: foo
-Word was: bar
-Word was: foobar
-
-# Something more complex, from Pierre Gaumond <gaumondp@ere.umontreal.ca>.
-case "$1" in
- a)
- vara=" -a";;
- b)
- varb=" -b";;
- c)
- varc=" -c";;
-esac
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/forloop.test b/examples/forloop.test
deleted file mode 100755
index f2a41e7d..00000000
--- a/examples/forloop.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# forloop.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/forloop.m4 >in
-
-cat <<\EOF >ok
-
-2**1 = 2
-2**2 = 4
-2**3 = 8
-2**4 = 16
-2**5 = 32
-2**6 = 64
-2**7 = 128
-2**8 = 256
-2**9 = 512
-2**10 = 1024
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/fstab.test b/examples/fstab.test
deleted file mode 100755
index 89fd2c6b..00000000
--- a/examples/fstab.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# fstab.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/fstab.m4 >in
-
-cat <<\EOF >ok
-
-
-
-freja:/home/gevn /home/gevn nfs rw,soft,bg,grpid 0 0
-freja:/home/freja /home/freja nfs rw,soft,grpid 0 0
-rimfaxe:/home/rimfaxe /home/rimfaxe nfs rw,soft,bg 0 0
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/hanoi.test b/examples/hanoi.test
deleted file mode 100755
index 6080d5f6..00000000
--- a/examples/hanoi.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# hanoi.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/hanoi.m4 >in
-
-cat <<\EOF >ok
-
-Move one disk from source to destination.
-Move one disk from source to auxilliary.
-Move one disk from destination to auxilliary.
-Move one disk from source to destination.
-Move one disk from auxilliary to source.
-Move one disk from auxilliary to destination.
-Move one disk from source to destination.
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/include.test b/examples/include.test
deleted file mode 100755
index 5d0b1100..00000000
--- a/examples/include.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# include.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/include.m4 >in
-
-cat <<\EOF >ok
-Beginning.
-
-Intermidiate
-include test file.
-
-
-After
-
-very late
-EOF
-
-cat <<\EOF >okerr
-in:2: m4: Cannot open NOFILE: No such file or directory
-in:6: m4: Cannot open NOFILE: No such file or directory
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/indir.test b/examples/indir.test
deleted file mode 100755
index e243f97c..00000000
--- a/examples/indir.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# indir.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/indir.m4 >in
-
-cat <<\EOF >ok
-
-
-# indir(`%%$$##', nonsens, nonsens)
->>>%%$$##<<< cnt 2
-
-# indir(`indir', `%%$$##', nonsens)
->>>%%$$##<<< cnt 1
-
-# indir(`indir', `indir', `indir', `indir', `%%$$##')
->>>%%$$##<<< cnt 0
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/iso8859.m4 b/examples/iso8859.m4
deleted file mode 100644
index 4ac1d196..00000000
--- a/examples/iso8859.m4
+++ /dev/null
Binary files differ
diff --git a/examples/iso8859.test b/examples/iso8859.test
deleted file mode 100755
index 3cca92e1..00000000
--- a/examples/iso8859.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# iso8859.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(iso8859.m4)dnl
-EOF
-
-cat <<\EOF >ok
-# Texting quotes
-DEFINE
-CHANGEQUOTE(«,»)
-0 TEST # TEST
-1 test # test
-2 «test» # «test»
-3 ««test»» # ««test»»
-CHANGEQUOTE(«««,»»»)
-0 TEST # TEST
-1 «TEST» # «TEST»
-2 ««TEST»» # ««TEST»»
-3 test # test
-# Test use of all iso8859 characters except NUL ` '
-Length of string is: 253
-Comparing strings: MATCH
-# NUL does not pass through
-This will be seen.
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
diff --git a/examples/misc.test b/examples/misc.test
deleted file mode 100755
index 59ea58ad..00000000
--- a/examples/misc.test
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# misc.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/misc.m4 >in
-
-cat <<\EOF >ok
-
-127.0.0.1
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/mktests.sh b/examples/mktests.sh
deleted file mode 100644
index 1546b568..00000000
--- a/examples/mktests.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-: ${M4:=../../src/m4}
-
-test $# -eq 1 || exit 1
-FILE=`basename $1 .m4`
-
-
-test -r $FILE.m4 || exit 1
-
-if head -1 $FILE.m4 | fgrep -w 'dnl noauto' >/dev/null; then
- echo "$FILE.test cannot be generated" 1>&2
- exit 1
-fi
-
-test -d testSubDir || mkdir testSubDir
-
-cat "$FILE.m4" > testSubDir/in
-(cd testSubDir; $M4 -I.. -d "in" >out 2>err)
-
-(
-
-cat <<EOFEOF
-#!/bin/sh
-
-# $FILE.test is part of the GNU m4 testsuite
-
-. \${srcdir}/defs
-
-cat \${srcdir}/$FILE.m4 >in
-EOFEOF
-
-echo
-echo 'cat <<\EOF >ok'
-cat testSubDir/out
-echo EOF
-
-if [ -s testSubDir/err ]; then
- echo
- echo 'cat <<\EOF >okerr'
- sed -e "s, $M4:, m4:," testSubDir/err
- echo EOF
-fi
-
-echo
-echo 'M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err'
-echo 'sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err'
-
-if [ -s testSubDir/err ]; then
- echo '$CMP -s out ok && $CMP -s err okerr'
-else
- echo '$CMP -s out ok'
-fi
-) >$FILE.test.new
-
-if cmp -s $FILE.test.new $FILE.test; then
- echo "$FILE.test unchanged" 1>&2
- rm -f $FILE.test.new
-else
- echo "creating $FILE.test" 1>&2
- mv $FILE.test.new $FILE.test
- chmod +x $FILE.test
-fi
-
-rm -f testSubDir/out testSubDir/err
diff --git a/examples/multiquotes.test b/examples/multiquotes.test
deleted file mode 100755
index 81bd10d1..00000000
--- a/examples/multiquotes.test
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-# multiquotes.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/multiquotes.m4 >in
-
-cat <<\EOF >ok
-
-``traceon''
-foo
-``FOO''
-
-BAR
-foo bar
-``FOO'' BAR
-*>*>*<*<
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- changequote(`[', `]')
-m4trace: -1- dnl
-m4trace: -1- changequote([``], [''])
-m4trace: -1- dnl
-m4trace: -1- define(``foo'', ````FOO'''')
-m4trace: -1- dnl
-foo: ````FOO''''
-m4trace: -1- dumpdef(``foo'')
-m4trace: -1- dnl
-m4trace: -1- changequote(``!'', ``!'')
-m4trace: -1- dnl
-foo: !``FOO''!
-m4trace: -1- dumpdef(!foo!)
-m4trace: -1- dnl
-m4trace: -1- define(!bar!, !BAR!)
-m4trace: -1- changequote(!>*>*>*>*>!, !<*<*<*<*<!)
-m4trace: -1- dnl
-bar: >*>*>*>*>BAR<*<*<*<*<
-foo: >*>*>*>*>``FOO''<*<*<*<*<
-m4trace: -1- dumpdef(>*>*>*>*>foo<*<*<*<*<, >*>*>*>*>bar<*<*<*<*<)
-m4trace: -1- dnl
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/patsubst.test b/examples/patsubst.test
deleted file mode 100755
index c31c4c5d..00000000
--- a/examples/patsubst.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# patsubst.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/patsubst.m4 >in
-
-cat <<\EOF >ok
-# traceon(`patsubst')
-OBS: GNUs not Unix
-OBS: GNUs OBS: not OBS: Unix
-G=NUs n=ot U=nix
-(GNUs)() (not)() (Unix)
-(GNUs) (not) (Unix)
-
-GNUs not Unix
-EOF
-
-cat <<\EOF >okerr
-in:4: m4: WARNING: \0 will disappear, use \& instead in replacements
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/pushpop.test b/examples/pushpop.test
deleted file mode 100755
index 038aca15..00000000
--- a/examples/pushpop.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# pushpop.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/pushpop.m4 >in
-
-cat <<\EOF >ok
-EOF
-
-cat <<\EOF >okerr
-hej: `def 1.'
-hej: `def 2.'
-hej: `def 3.'
-hej: `def 4.'
-hej: `def 3.'
-hej: `def 2.'
-hej: `def 1.'
-in:18: m4: Undefined name hej
-in:20: m4: Undefined name hej
-in:23: m4: Undefined name mac2
-in:25: m4: Undefined name mac2
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/regexp.test b/examples/regexp.test
deleted file mode 100755
index 4cf21990..00000000
--- a/examples/regexp.test
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# regexp.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/regexp.m4 >in
-
-cat <<\EOF >ok
->>hej med dig<<
->>hej<<
->>hej med dig<<
->>med<<
->>med dig<< >>ed dig<<
-
-0
-0
-0
-4
-4
-EOF
-
-cat <<\EOF >okerr
-in:2: m4: WARNING: \0 will disappear, use \& instead in replacements
-m4trace: -1- regexp(`hej med dig', `.*', `>>\0<<') -> `>>hej med dig<<'
-m4trace: -1- regexp(`hej med dig', `\w*', `>>\0<<') -> `>>hej<<'
-m4trace: -1- regexp(`hej med dig', `.+', `>>\0<<') -> `>>hej med dig<<'
-m4trace: -1- regexp(`hej med dig', `m\w+', `>>\0<<') -> `>>med<<'
-m4trace: -1- regexp(`hej med dig', `m\(.*\)', `>>\0<< >>\1<<') -> `>>med dig<< >>ed dig<<'
-m4trace: -1- regexp(`hej med dig', `.*') -> `0'
-m4trace: -1- regexp(`hej med dig', `\w*') -> `0'
-m4trace: -1- regexp(`hej med dig', `.+') -> `0'
-m4trace: -1- regexp(`hej med dig', `m\w+') -> `4'
-m4trace: -1- regexp(`hej med dig', `m\(.*\)') -> `4'
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/reverse.test b/examples/reverse.test
deleted file mode 100755
index 63b4cefa..00000000
--- a/examples/reverse.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# reverse.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(reverse.m4)dnl
-EOF
-
-cat <<\EOF >ok
-
-`' =>
-`hej' => hej
-`hej, med, dig' => dig, med, hej
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
diff --git a/examples/sysv-args.test b/examples/sysv-args.test
deleted file mode 100755
index ceb68c9a..00000000
--- a/examples/sysv-args.test
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-# sysv-args.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(sysv-args.m4)dnl
-EOF
-
-cat <<\EOF >ok
-
-
-0
-1
-6
-
-
-hej med dig
-hej med dig en gang igen
-an awful lot of argument at least more that ten silly arguments
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- nargs
-m4trace: -1- nargs
-m4trace: -1- nargs
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-m4trace: -1- concat
-EOF
-
-M4PATH=$srcdir $M4 in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/trace.test b/examples/trace.test
deleted file mode 100755
index 47008f60..00000000
--- a/examples/trace.test
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-
-# trace.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/trace.m4 >in
-
-cat <<\EOF >ok
-
-# Debugmode t
-
-Move one disk from source to auxilliary.
-Move one disk from source to destination.
-Move one disk from auxilliary to destination.
-
-
-# Debugmode taeq
-
-Move one disk from source to auxilliary.
-Move one disk from source to destination.
-Move one disk from auxilliary to destination.
-
-
-# Debugmode OFF
-
-Move one disk from source to auxilliary.
-Move one disk from source to destination.
-Move one disk from auxilliary to destination.
-
-
-# Debugmode ae
-
-
-Move one disk from source to auxilliary.
-Move one disk from source to destination.
-Move one disk from auxilliary to destination.
-
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- hanoi
-m4trace: -1- _hanoi
-m4trace: -2- eval
-m4trace: -1- ifelse
-m4trace: -2- decr
-m4trace: -1- _hanoi
-m4trace: -2- eval
-m4trace: -1- ifelse
-m4trace: -1- move
-m4trace: -1- move
-m4trace: -2- decr
-m4trace: -1- _hanoi
-m4trace: -2- eval
-m4trace: -1- ifelse
-m4trace: -1- move
-
-m4trace: -1- hanoi(`2') -> `_hanoi(`2', source, destination, auxilliary)'
-m4trace: -1- _hanoi(`2', `source', `destination', `auxilliary') -> `ifelse(eval(`2'<=1), 1, `move(source, destination)',
-`_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)')'
-m4trace: -2- eval(`2<=1') -> `0'
-m4trace: -1- ifelse(`0', `1', `move(source, destination)', `_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)') -> `_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)'
-m4trace: -2- decr(`2') -> `1'
-m4trace: -1- _hanoi(`1', `source', `auxilliary', `destination') -> `ifelse(eval(`1'<=1), 1, `move(source, auxilliary)',
-`_hanoi(decr(1), source, destination, auxilliary)move(source, auxilliary)_hanoi(decr(1), destination, auxilliary, source)')'
-m4trace: -2- eval(`1<=1') -> `1'
-m4trace: -1- ifelse(`1', `1', `move(source, auxilliary)', `_hanoi(decr(1), source, destination, auxilliary)move(source, auxilliary)_hanoi(decr(1), destination, auxilliary, source)') -> `move(source, auxilliary)'
-m4trace: -1- move(`source', `auxilliary') -> `Move one disk from `source' to `auxilliary'.
-'
-m4trace: -1- move(`source', `destination') -> `Move one disk from `source' to `destination'.
-'
-m4trace: -2- decr(`2') -> `1'
-m4trace: -1- _hanoi(`1', `auxilliary', `destination', `source') -> `ifelse(eval(`1'<=1), 1, `move(auxilliary, destination)',
-`_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)')'
-m4trace: -2- eval(`1<=1') -> `1'
-m4trace: -1- ifelse(`1', `1', `move(auxilliary, destination)', `_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)') -> `move(auxilliary, destination)'
-m4trace: -1- move(`auxilliary', `destination') -> `Move one disk from `auxilliary' to `destination'.
-'
-m4trace: -1- debugmode
-m4trace: -1- _hanoi(2, source, destination, auxilliary) -> ifelse(eval(`2'<=1), 1, `move(source, destination)',
-`_hanoi(decr(2), source, auxilliary, destination)move(source, destination)_hanoi(decr(2), auxilliary, destination, source)')
-m4trace: -1- _hanoi(1, source, auxilliary, destination) -> ifelse(eval(`1'<=1), 1, `move(source, auxilliary)',
-`_hanoi(decr(1), source, destination, auxilliary)move(source, auxilliary)_hanoi(decr(1), destination, auxilliary, source)')
-m4trace: -1- move(source, auxilliary) -> Move one disk from `source' to `auxilliary'.
-
-m4trace: -1- move(source, destination) -> Move one disk from `source' to `destination'.
-
-m4trace: -1- _hanoi(1, auxilliary, destination, source) -> ifelse(eval(`1'<=1), 1, `move(auxilliary, destination)',
-`_hanoi(decr(1), auxilliary, source, destination)move(auxilliary, destination)_hanoi(decr(1), source, destination, auxilliary)')
-m4trace: -1- move(auxilliary, destination) -> Move one disk from `auxilliary' to `destination'.
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/examples/translit.test b/examples/translit.test
deleted file mode 100755
index 92acfb62..00000000
--- a/examples/translit.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# translit.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/translit.m4 >in
-
-cat <<\EOF >ok
-# traceon(`translit')dnl
-GNU U
-GNUS NOT UNIX
-gnus not unix
-s not nix
-z
--ZY
-tmfs not fnix
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/undivert.test b/examples/undivert.test
deleted file mode 100755
index 6814a732..00000000
--- a/examples/undivert.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# undivert.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/undivert.m4 >in
-
-cat <<\EOF >ok
-
-# undiverted file.
-This is to be undiverted soon.
-
-# included file.
-This is to be UNDIVERTED soon.
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/examples/wrap.test b/examples/wrap.test
deleted file mode 100755
index a6bba3c2..00000000
--- a/examples/wrap.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# wrap.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(wrap.m4)dnl
-EOF
-
-cat <<\EOF >ok
-
-No. 33: The End.
-Wrapper no. 2
-Wrapper no. 1
-Wrapper no. 3
-Wrapper no. 4
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
diff --git a/gettext.m4 b/gettext.m4
deleted file mode 100644
index 969d0922..00000000
--- a/gettext.m4
+++ /dev/null
@@ -1,384 +0,0 @@
-# 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/install-sh b/install-sh
index ab74c882..ebc66913 100755
--- a/install-sh
+++ b/install-sh
@@ -1,15 +1,27 @@
-#!/bin/sh
+#! /bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5.
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
# set DOITPROG to echo to test this script
@@ -29,7 +41,7 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-tranformbasename=""
+transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 82ea2ed7..e32f0b95 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,92 +1,313 @@
-# Makefile for GNU m4 library.
-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
-# 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.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# 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.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 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.
-
-PRODUCT = @PRODUCT@
-VERSION = @VERSION@
SHELL = /bin/sh
+
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
-AR = ar
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DISTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLOCALE = @GLOCALE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NM = @NM@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
RANLIB = @RANLIB@
+STACKOVF = @STACKOVF@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
+
+noinst_LIBRARIES = libm4.a
+
+libm4_a_SOURCES = getopt.h obstack.h regex.h regex.c getopt.c \
+ getopt1.c error.c obstack.c xmalloc.c \
+ xstrdup.c alloca.c strtol.c
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+noinst_HEADERS = getopt.h error.h getdate.h
+
+libm4_a_LIBADD =
+libm4_a_DEPENDENCIES = # $(libfu_a_LIBADD)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libm4_a_OBJECTS = regex.o getopt.o getopt1.o error.o obstack.o \
+xmalloc.o xstrdup.o alloca.o strtol.o
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = COPYING.LIB Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP = --best
+SOURCES = $(libm4_a_SOURCES)
+OBJECTS = $(libm4_a_OBJECTS)
+
+all: Makefile $(LIBRARIES) $(HEADERS)
.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps lib/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
.c.o:
- $(COMPILE) $<
+ $(COMPILE) -c $<
-INCLUDES = -I.. -I$(srcdir)
+.s.o:
+ $(COMPILE) -c $<
-HEADERS = getopt.h obstack.h regex.h
-SOURCES = regex.c getopt.c getopt1.c error.c obstack.c xmalloc.c \
-xstrdup.c alloca.c strtol.c
-OBJECTS = regex.o getopt.o getopt1.o error.o obstack.o xmalloc.o \
-xstrdup.o @ALLOCA@ @LIBOBJS@
+.S.o:
+ $(COMPILE) -c $<
-DISTFILES = COPYING.LIB Makefile.in $(HEADERS) $(SOURCES) \
-TAGS
+mostlyclean-compile:
+ -rm -f *.o core *.core
-all: libm4.a
+clean-compile:
-libm4.a: $(OBJECTS)
- rm -f libm4.a
- $(AR) cru libm4.a $(OBJECTS)
- $(RANLIB) libm4.a
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-$(OBJECTS): ../config.h
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-install: all
+mostlyclean-libtool:
+ -rm -f *.lo
-uninstall:
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libm4.a: $(libm4_a_OBJECTS) $(libm4_a_DEPENDENCIES)
+ -rm -f libm4.a
+ $(AR) cru libm4.a $(libm4_a_OBJECTS) $(libm4_a_LIBADD)
+ $(RANLIB) libm4.a
tags: TAGS
-TAGS: $(HEADERS) $(SOURCES)
- cd $(srcdir) && etags $(HEADERS) $(SOURCES)
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
-mostlyclean:
- rm -f *.o
+distclean-tags:
+ -rm -f TAGS ID
-clean: mostlyclean
- rm -f libm4.a
+maintainer-clean-tags:
-distclean: clean
- rm -f Makefile
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-realclean: distclean
- rm -f TAGS
+subdir = lib
-dist: $(DISTFILES)
- @echo "Copying distribution files"
+distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
- ln $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/lib 2> /dev/null \
- || cp -p $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/lib; \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
done
+alloca.o: alloca.c ../config.h
+error.o: error.c ../config.h error.h
+getopt.o: getopt.c ../config.h getopt.h
+getopt1.o: getopt1.c ../config.h getopt.h
+obstack.o: obstack.c obstack.h ../config.h
+regex.o: regex.c ../config.h regex.h
+strtol.o: strtol.c ../config.h
+xmalloc.o: xmalloc.c ../config.h error.h
+xstrdup.o: xstrdup.c ../config.h
+
+info:
+dvi:
+check: all
+ $(MAKE)
+installcheck:
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data:
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall:
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
+
+clean: clean-noinstLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean
+
+distclean: distclean-noinstLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-noinstLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
+installcheck install-exec install-data install uninstall all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=lib/$@ CONFIG_HEADERS= ./config.status
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/lib/alloca.c b/lib/alloca.c
index 7020f32c..c1699c42 100644
--- a/lib/alloca.c
+++ b/lib/alloca.c
@@ -25,6 +25,13 @@
#include <config.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
#ifdef emacs
#include "blockinput.h"
#endif
@@ -66,7 +73,9 @@ typedef void *pointer;
typedef char *pointer;
#endif
+#ifndef NULL
#define NULL 0
+#endif
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc, because
@@ -74,7 +83,7 @@ typedef char *pointer;
hand, the utilities in lib-src need alloca to call malloc; some of
them are very simple, and don't have an xmalloc routine.
- Non-Emacs programs expect this to call use xmalloc.
+ Non-Emacs programs expect this to call xmalloc.
Callers below should use malloc. */
@@ -171,7 +180,7 @@ alloca (size)
#endif
/* Reclaim garbage, defined as all alloca'd storage that
- was allocated from deeper in the stack than currently. */
+ was allocated from deeper in the stack than currently. */
{
register header *hp; /* Traverses linked list. */
@@ -209,6 +218,9 @@ alloca (size)
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
+ if (new == 0)
+ abort();
+
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;
@@ -338,7 +350,7 @@ struct stk_trailer
#ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
- I doubt that "lint" will like this much. */
+ I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
diff --git a/lib/error.c b/lib/error.c
index 19c2ba88..e5f1daba 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -1,5 +1,5 @@
/* error.c -- error handler for noninteractive utilities
- Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96 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
@@ -12,18 +12,18 @@
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. */
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#include <stdio.h>
-#if HAVE_VPRINTF || HAVE_DOPRNT
+#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
# if __STDC__
# include <stdarg.h>
# define VA_START(args, lastarg) va_start(args, lastarg)
@@ -36,25 +36,49 @@
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
#endif
-#if STDC_HEADERS
+#if STDC_HEADERS || _LIBC
# include <stdlib.h>
# include <string.h>
#else
void exit ();
#endif
+#ifndef _
+# define _(String) String
+#endif
+
+/* Get prototypes for the functions defined here. */
+#include <error.h>
+
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
-void (*error_print_progname) () = NULL;
+void (*error_print_progname) (
+#if __STDC__ - 0
+ void
+#endif
+ );
+
+/* This variable is incremented each time `error' is called. */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this. */
+
+# define program_name program_invocation_name
+# include <errno.h>
+
+#else /* not _LIBC */
/* The calling program should define program_name and set it to the
name of the executing program. */
extern char *program_name;
-#if HAVE_STRERROR
+# if HAVE_STRERROR
+# ifndef strerror /* On some systems, strerror is a macro */
char *strerror ();
-#else
+# endif
+# else
static char *
private_strerror (errnum)
int errnum;
@@ -64,10 +88,12 @@ private_strerror (errnum)
if (errnum > 0 && errnum <= sys_nerr)
return sys_errlist[errnum];
- return "Unknown system error";
+ return _("Unknown system error");
}
-#define strerror private_strerror
-#endif
+# define strerror private_strerror
+# endif /* HAVE_STRERROR */
+
+#endif /* not _LIBC */
/* Print the program name and error message MESSAGE, which is a printf-style
format string with optional args.
@@ -100,7 +126,75 @@ error (status, errnum, message, va_alist)
#ifdef VA_START
VA_START (args, message);
-# if HAVE_VPRINTF
+# if HAVE_VPRINTF || _LIBC
+ vfprintf (stderr, message, args);
+# else
+ _doprnt (message, args, stderr);
+# endif
+ va_end (args);
+#else
+ fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+#endif
+
+ ++error_message_count;
+ if (errnum)
+ fprintf (stderr, ": %s", strerror (errnum));
+ putc ('\n', stderr);
+ fflush (stderr);
+ if (status)
+ exit (status);
+}
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+int error_one_per_line;
+
+void
+#if defined(VA_START) && __STDC__
+error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message, ...)
+#else
+error_at_line (status, errnum, file_name, line_number, message, va_alist)
+ int status;
+ int errnum;
+ const char *file_name;
+ unsigned int line_number;
+ char *message;
+ va_dcl
+#endif
+{
+#ifdef VA_START
+ va_list args;
+#endif
+
+ if (error_one_per_line)
+ {
+ static const char *old_file_name;
+ static unsigned int old_line_number;
+
+ if (old_line_number == line_number &&
+ (file_name == old_file_name || !strcmp (old_file_name, file_name)))
+ /* Simply return and print nothing. */
+ return;
+
+ old_file_name = file_name;
+ old_line_number = line_number;
+ }
+
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+ fflush (stdout);
+ fprintf (stderr, "%s:", program_name);
+ }
+
+ if (file_name != NULL)
+ fprintf (stderr, "%s:%d: ", file_name, line_number);
+
+#ifdef VA_START
+ VA_START (args, message);
+# if HAVE_VPRINTF || _LIBC
vfprintf (stderr, message, args);
# else
_doprnt (message, args, stderr);
@@ -110,6 +204,7 @@ error (status, errnum, message, va_alist)
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
#endif
+ ++error_message_count;
if (errnum)
fprintf (stderr, ": %s", strerror (errnum));
putc ('\n', stderr);
diff --git a/lib/getopt.c b/lib/getopt.c
index 43c0a6a9..80e8bdae 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -3,22 +3,26 @@
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
before changing it!
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94
- Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
+ 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 file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in /gd/gnu/lib.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
@@ -48,7 +52,15 @@
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
/* This needs to come after some library #include
@@ -57,8 +69,33 @@
/* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
#include <stdlib.h>
+#include <unistd.h>
#endif /* GNU C library. */
+#ifdef VMS
+#include <unixlib.h>
+#if HAVE_STRING_H - 0
+#include <string.h>
+#endif
+#endif
+
+#if defined (WIN32) && !defined (__CYGWIN32__)
+/* It's not Unix, really. See? Capital letters. */
+#include <windows.h>
+#define getpid() GetCurrentProcessId()
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+ When compiling libc, the _ macro is predefined. */
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+#else
+# define _(msgid) (msgid)
+#endif
+#endif
+
/* This version of `getopt' appears to the caller like standard Unix `getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
@@ -89,14 +126,20 @@ char *optarg = NULL;
On entry to `getopt', zero means this is the first call; initialize.
- When `getopt' returns EOF, this is the index of the first of the
+ When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
-/* XXX 1003.2 says this must be 1 before any call. */
-int optind = 0;
+/* 1003.2 says this must be 1 before any call. */
+int optind = 1;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+ causes problems with re-calling getopt as programs generally don't
+ know that. */
+
+int __getopt_initialized = 0;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
@@ -145,7 +188,7 @@ int optopt = '?';
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return EOF with `optind' != ARGC. */
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
static enum
{
@@ -206,6 +249,31 @@ extern int strlen (const char *);
static int first_nonopt;
static int last_nonopt;
+#ifdef _LIBC
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+static const char *nonoption_flags;
+static int nonoption_flags_len;
+
+static int original_argc;
+static char *const *original_argv;
+
+/* Make sure the environment variable bash 2.0 puts in the environment
+ is valid for the getopt call we must make sure that the ARGV passed
+ to getopt is that one passed to the process. */
+static void store_args (int argc, char *const *argv) __attribute__ ((unused));
+static void
+store_args (int argc, char *const *argv)
+{
+ /* XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+ original_argc = argc;
+ original_argv = argv;
+}
+text_set_element (__libc_subinit, store_args);
+#endif
+
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
which contains all the non-options that have been skipped so far.
@@ -215,6 +283,10 @@ static int last_nonopt;
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
+#if defined (__STDC__) && __STDC__
+static void exchange (char **);
+#endif
+
static void
exchange (argv)
char **argv;
@@ -273,8 +345,13 @@ exchange (argv)
/* Initialize the internal data when the first call is made. */
+#if defined (__STDC__) && __STDC__
+static const char *_getopt_initialize (int, char *const *, const char *);
+#endif
static const char *
-_getopt_initialize (optstring)
+_getopt_initialize (argc, argv, optstring)
+ int argc;
+ char *const *argv;
const char *optstring;
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
@@ -304,6 +381,26 @@ _getopt_initialize (optstring)
else
ordering = PERMUTE;
+#ifdef _LIBC
+ if (posixly_correct == NULL
+ && argc == original_argc && argv == original_argv)
+ {
+ /* Bash 2.0 puts a special variable in the environment for each
+ command it runs, specifying which ARGV elements are the results of
+ file name wildcard expansion and therefore should not be
+ considered as options. */
+ char var[100];
+ sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ());
+ nonoption_flags = getenv (var);
+ if (nonoption_flags == NULL)
+ nonoption_flags_len = 0;
+ else
+ nonoption_flags_len = strlen (nonoption_flags);
+ }
+ else
+ nonoption_flags_len = 0;
+#endif
+
return optstring;
}
@@ -320,7 +417,7 @@ _getopt_initialize (optstring)
updating `optind' and `nextchar' so that the next call to `getopt' can
resume the scan with the following option character or ARGV-element.
- If there are no more option characters, `getopt' returns `EOF'.
+ If there are no more option characters, `getopt' returns -1.
Then `optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
@@ -374,13 +471,36 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
{
optarg = NULL;
- if (optind == 0)
- optstring = _getopt_initialize (optstring);
+ if (!__getopt_initialized || optind == 0)
+ {
+ optstring = _getopt_initialize (argc, argv, optstring);
+ optind = 1; /* Don't scan ARGV[0], the program name. */
+ __getopt_initialized = 1;
+ }
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#ifdef _LIBC
+#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && nonoption_flags[optind] == '1'))
+#else
+#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
if (nextchar == NULL || *nextchar == '\0')
{
/* Advance to the next ARGV-element. */
+ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+ moved back by the user (who may also have changed the arguments). */
+ if (last_nonopt > optind)
+ last_nonopt = optind;
+ if (first_nonopt > optind)
+ first_nonopt = optind;
+
if (ordering == PERMUTE)
{
/* If we have just processed some options following some non-options,
@@ -394,8 +514,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
/* Skip any additional non-options
and extend the range of non-options previously skipped. */
- while (optind < argc
- && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
+ while (optind < argc && NONOPTION_P)
optind++;
last_nonopt = optind;
}
@@ -427,16 +546,16 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
that we previously skipped, so the caller will digest them. */
if (first_nonopt != last_nonopt)
optind = first_nonopt;
- return EOF;
+ return -1;
}
/* If we have come to a non-option and did not permute it,
either stop the scan or describe it to the caller and pass it by. */
- if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
+ if (NONOPTION_P)
{
if (ordering == REQUIRE_ORDER)
- return EOF;
+ return -1;
optarg = argv[optind++];
return 1;
}
@@ -472,7 +591,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
- int indfound;
+ int indfound = -1;
int option_index;
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
@@ -483,7 +602,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, nextchar, nameend - nextchar))
{
- if (nameend - nextchar == strlen (p->name))
+ if ((unsigned int) (nameend - nextchar)
+ == (unsigned int) strlen (p->name))
{
/* Exact match found. */
pfound = p;
@@ -505,10 +625,11 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (ambig && !exact)
{
if (opterr)
- fprintf (stderr, "%s: option `%s' is ambiguous\n",
+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
argv[0], argv[optind]);
nextchar += strlen (nextchar);
optind++;
+ optopt = 0;
return '?';
}
@@ -525,19 +646,20 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else
{
if (opterr)
- {
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- "%s: option `--%s' doesn't allow an argument\n",
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- "%s: option `%c%s' doesn't allow an argument\n",
- argv[0], argv[optind - 1][0], pfound->name);
- }
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ _("%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ _("%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+
nextchar += strlen (nextchar);
+
+ optopt = pfound->val;
return '?';
}
}
@@ -548,9 +670,11 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else
{
if (opterr)
- fprintf (stderr, "%s: option `%s' requires an argument\n",
- argv[0], argv[optind - 1]);
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
nextchar += strlen (nextchar);
+ optopt = pfound->val;
return optstring[0] == ':' ? ':' : '?';
}
}
@@ -576,15 +700,16 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
{
if (argv[optind][1] == '-')
/* --option */
- fprintf (stderr, "%s: unrecognized option `--%s'\n",
+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
argv[0], nextchar);
else
/* +option or -option */
- fprintf (stderr, "%s: unrecognized option `%c%s'\n",
+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
argv[0], argv[optind][0], nextchar);
}
nextchar = (char *) "";
optind++;
+ optopt = 0;
return '?';
}
}
@@ -605,13 +730,139 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
{
if (posixly_correct)
/* 1003.2 specifies the format of this message. */
- fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
+ fprintf (stderr, _("%s: illegal option -- %c\n"),
+ argv[0], c);
else
- fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c);
+ fprintf (stderr, _("%s: invalid option -- %c\n"),
+ argv[0], c);
}
optopt = c;
return '?';
}
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+
+ nextchar += strlen (nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
if (temp[1] == ':')
{
if (temp[2] == ':')
@@ -641,8 +892,9 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (opterr)
{
/* 1003.2 specifies the format of this message. */
- fprintf (stderr, "%s: option requires an argument -- %c\n",
- argv[0], c);
+ fprintf (stderr,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
}
optopt = c;
if (optstring[0] == ':')
@@ -673,7 +925,7 @@ getopt (argc, argv, optstring)
0);
}
-#endif /* _LIBC or not __GNU_LIBRARY__. */
+#endif /* Not ELIDE_CODE. */
#ifdef TEST
@@ -693,7 +945,7 @@ main (argc, argv)
int this_option_optind = optind ? optind : 1;
c = getopt (argc, argv, "abc:d:0123456789");
- if (c == EOF)
+ if (c == -1)
break;
switch (c)
diff --git a/lib/getopt.h b/lib/getopt.h
index 4ac33b71..7dad11b7 100644
--- a/lib/getopt.h
+++ b/lib/getopt.h
@@ -1,19 +1,23 @@
/* Declarations for getopt.
- Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1989,90,91,92,93,94,96,97 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 file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in /gd/gnu/lib.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _GETOPT_H
#define _GETOPT_H 1
@@ -36,7 +40,7 @@ extern char *optarg;
On entry to `getopt', zero means this is the first call; initialize.
- When `getopt' returns EOF, this is the index of the first of the
+ When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
diff --git a/lib/getopt1.c b/lib/getopt1.c
index 4580211c..8347bb13 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,20 +1,23 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994
- Free Software Foundation, Inc.
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97 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 file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in /gd/gnu/lib.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -40,15 +43,21 @@
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#include <stdlib.h>
-#else
-char *getenv ();
#endif
#ifndef NULL
@@ -83,7 +92,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
}
-#endif /* _LIBC or not __GNU_LIBRARY__. */
+#endif /* Not ELIDE_CODE. */
#ifdef TEST
@@ -114,7 +123,7 @@ main (argc, argv)
c = getopt_long (argc, argv, "abc:d:0123456789",
long_options, &option_index);
- if (c == EOF)
+ if (c == -1)
break;
switch (c)
diff --git a/lib/m4error.c b/lib/m4error.c
deleted file mode 100644
index 5a0d7bdd..00000000
--- a/lib/m4error.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/* Error handler for noninteractive utilities
- Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-
-#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
-# if __STDC__
-# include <stdarg.h>
-# define VA_START(args, lastarg) va_start(args, lastarg)
-# else
-# include <varargs.h>
-# define VA_START(args, lastarg) va_start(args)
-# endif
-#else
-# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
-# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
-#endif
-
-#if STDC_HEADERS || _LIBC
-# include <stdlib.h>
-# include <string.h>
-#else
-void exit ();
-#endif
-
-#ifndef _
-# define _(String) String
-#endif
-
-/* Get prototypes for the functions defined here. */
-#include <m4error.h>
-
-#ifdef DLL_EXPORT
-# define M4_GLOBAL_DATA __declspec(dllexport)
-#else
-# define M4_GLOBAL_DATA
-#endif
-
-/* If NULL, error will flush stdout, then print on stderr the program
- name, a colon and a space. Otherwise, error will call this
- function without parameters instead. */
-M4_GLOBAL_DATA void (*error_print_progname) (
-#if __STDC__ - 0
- void
-#endif
- );
-
-/* This variable is incremented each time `error' is called. */
-M4_GLOBAL_DATA unsigned int error_message_count;
-
-#ifdef _LIBC
-/* In the GNU C library, there is a predefined variable for this. */
-
-# define program_name program_invocation_name
-# include <errno.h>
-
-/* In GNU libc we want do not want to use the common name `error' directly.
- Instead make it a weak alias. */
-# define error __error
-# define error_at_line __error_at_line
-
-# ifdef USE_IN_LIBIO
-# include <libio/iolibio.h>
-# define fflush(s) _IO_fflush (s)
-# endif
-
-#else /* not _LIBC */
-
-/* The calling program should define program_name and set it to the
- name of the executing program. */
-M4_GLOBAL_DATA char *program_name;
-
-# ifdef HAVE_STRERROR_R
-# define __strerror_r strerror_r
-# else
-# if HAVE_STRERROR
-# ifndef strerror /* On some systems, strerror is a macro */
-char *strerror ();
-# endif
-# else
-static char *
-private_strerror (errnum)
- int errnum;
-{
- extern char *sys_errlist[];
- extern int sys_nerr;
-
- if (errnum > 0 && errnum <= sys_nerr)
- return _(sys_errlist[errnum]);
- return _("Unknown system error");
-}
-# define strerror private_strerror
-# endif /* HAVE_STRERROR */
-# endif /* HAVE_STRERROR_R */
-#endif /* not _LIBC */
-
-/* Print the program name and error message MESSAGE, which is a printf-style
- format string with optional args.
- If ERRNUM is nonzero, print its corresponding system error message.
- Exit with status STATUS if it is nonzero. */
-/* VARARGS */
-
-void
-#if defined VA_START && __STDC__
-error (int status, int errnum, const char *message, ...)
-#else
-error (status, errnum, message, va_alist)
- int status;
- int errnum;
- char *message;
- va_dcl
-#endif
-{
-#ifdef VA_START
- va_list args;
-#endif
-
- if (error_print_progname)
- (*error_print_progname) ();
- else
- {
- fflush (stdout);
- fprintf (stderr, "%s: ", program_name);
- }
-
-#ifdef VA_START
- VA_START (args, message);
-# if HAVE_VPRINTF || _LIBC
- vfprintf (stderr, message, args);
-# else
- _doprnt (message, args, stderr);
-# endif
- va_end (args);
-#else
- fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
-
- ++error_message_count;
- if (errnum)
- {
-#if defined HAVE_STRERROR_R || defined _LIBC
- char errbuf[1024];
- fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
-#else
- fprintf (stderr, ": %s", strerror (errnum));
-#endif
- }
- putc ('\n', stderr);
- fflush (stderr);
- if (status)
- exit (status);
-}
-
-/* Sometimes we want to have at most one error per line. This
- variable controls whether this mode is selected or not. */
-int error_one_per_line;
-
-void
-#if defined VA_START && __STDC__
-error_at_line (int status, int errnum, const char *file_name,
- unsigned int line_number, const char *message, ...)
-#else
-error_at_line (status, errnum, file_name, line_number, message, va_alist)
- int status;
- int errnum;
- const char *file_name;
- unsigned int line_number;
- char *message;
- va_dcl
-#endif
-{
-#ifdef VA_START
- va_list args;
-#endif
-
- if (error_one_per_line)
- {
- static const char *old_file_name;
- static unsigned int old_line_number;
-
- if (old_line_number == line_number &&
- (file_name == old_file_name || !strcmp (old_file_name, file_name)))
- /* Simply return and print nothing. */
- return;
-
- old_file_name = file_name;
- old_line_number = line_number;
- }
-
- if (error_print_progname)
- (*error_print_progname) ();
- else
- {
- fflush (stdout);
- fprintf (stderr, "%s:", program_name);
- }
-
- if (file_name != NULL)
- fprintf (stderr, "%s:%d: ", file_name, line_number);
-
-#ifdef VA_START
- VA_START (args, message);
-# if HAVE_VPRINTF || _LIBC
- vfprintf (stderr, message, args);
-# else
- _doprnt (message, args, stderr);
-# endif
- va_end (args);
-#else
- fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-#endif
-
- ++error_message_count;
- if (errnum)
- {
-#if defined HAVE_STRERROR_R || defined _LIBC
- char errbuf[1024];
- fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
-#else
- fprintf (stderr, ": %s", strerror (errnum));
-#endif
- }
- putc ('\n', stderr);
- fflush (stderr);
- if (status)
- exit (status);
-}
-
-#ifdef _LIBC
-/* Make the weak alias. */
-# undef error
-# undef error_at_line
-weak_alias (__error, error)
-weak_alias (__error_at_line, error_at_line)
-#endif
diff --git a/lib/m4error.h b/lib/m4error.h
deleted file mode 100644
index 066ffec4..00000000
--- a/lib/m4error.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Declaration for error-reporting function
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef M4ERROR_H
-#define M4ERROR_H 1
-
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. */
-#ifndef M4_SCOPE
-# ifdef _WIN32
- /* Incase we are linking a dll with this library, the
- LIBM4_DLL_IMPORT takes precedence over a generic DLL_EXPORT
- when defining the SCOPE variable for M4. */
-# ifdef LIBM4_DLL_IMPORT /* define if linking with this dll */
-# define M4_SCOPE extern __declspec(dllimport)
-# else
-# ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define M4_SCOPE __declspec(dllexport)
-# endif /* DLL_EXPORT */
-# endif /* LIBM4_DLL_IMPORT */
-# endif /* M4_SCOPE */
-# ifndef M4_SCOPE /* static linking or !_WIN32 */
-# define M4_SCOPE extern
-# endif
-#endif
-
-
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
-# define __attribute__(Spec) /* empty */
-# endif
-/* The __-protected variants of `format' and `printf' attributes
- are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-# define __format__ format
-# define __printf__ printf
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined (__STDC__) && __STDC__
-
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
- if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
-
-extern void error (int status, int errnum, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
-
-extern void error_at_line (int status, int errnum, const char *fname,
- unsigned int lineno, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 5, 6)));
-
-/* If NULL, error will flush stdout, then print on stderr the program
- name, a colon and a space. Otherwise, error will call this
- function without parameters instead. */
-M4_SCOPE void (*error_print_progname) (void);
-
-#else
-void error ();
-void error_at_line ();
-M4_SCOPE void (*error_print_progname) ();
-#endif
-
-/* This variable is incremented each time `error' is called. */
-M4_SCOPE unsigned int error_message_count;
-
-/* Sometimes we want to have at most one error per line. This
- variable controls whether this mode is selected or not. */
-M4_SCOPE int error_one_per_line;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* m4error.h */
diff --git a/lib/m4module.c b/lib/m4module.c
deleted file mode 100644
index b22d8b85..00000000
--- a/lib/m4module.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 1989, 90, 91, 92, 93, 94, 98 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.
-*/
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-
-#define COMPILING_M4
-#include "m4module.h"
-#include "m4private.h"
-
-#ifdef DLL_EXPORT
-# define M4_GLOBAL_DATA __declspec(dllexport)
-#else
-# define M4_GLOBAL_DATA
-#endif
-
-/* The name this program was run with. */
-M4_GLOBAL_DATA const char *program_name;
-
-/* Operate interactively (-e). */
-M4_GLOBAL_DATA int interactive = 0;
-
-/* Enable sync output for /lib/cpp (-s). */
-M4_GLOBAL_DATA int sync_output = 0;
-
-/* Debug (-d[flags]). */
-M4_GLOBAL_DATA int debug_level = 0;
-
-/* Hash table size (should be a prime) (-Hsize). */
-M4_GLOBAL_DATA int hash_table_size = HASHMAX;
-
-/* Disable GNU extensions (-G). */
-M4_GLOBAL_DATA int no_gnu_extensions = 0;
-
-/* Prefix all builtin functions by `m4_'. */
-M4_GLOBAL_DATA int prefix_all_builtins = 0;
-
-/* Max length of arguments in trace output (-lsize). */
-M4_GLOBAL_DATA int max_debug_argument_length = 0;
-
-/* Suppress warnings about missing arguments. */
-M4_GLOBAL_DATA int suppress_warnings = 0;
-
-/* If not zero, then value of exit status for warning diagnostics. */
-M4_GLOBAL_DATA int warning_status = 0;
-
-/* Artificial limit for expansion_level in macro.c. */
-M4_GLOBAL_DATA int nesting_limit = 250;
-
-/* User provided regexp for describing m4 words. */
-M4_GLOBAL_DATA const char *user_word_regexp = NULL;
-
-/* If nonzero, comments are discarded in the token parser. */
-M4_GLOBAL_DATA int discard_comments = 0;
-
-/* input syntax table. */
-M4_GLOBAL_DATA unsigned short syntax_table[256];
-
-/* Quote chars. */
-M4_GLOBAL_DATA STRING rquote;
-M4_GLOBAL_DATA STRING lquote;
-
-/* Comment chars. */
-M4_GLOBAL_DATA STRING bcomm;
-M4_GLOBAL_DATA STRING ecomm;
-
-
-/*------------------------------------------------------------------------.
-| Addressable function versions of the macros defined in m4private.h. |
-| Since they are functions the caller does not need access to the |
-| internal data structure, so they are safe to export for use in |
-| external modules. |
-`------------------------------------------------------------------------*/
-token_data_type
-m4_token_data_type (token_data *name)
-{
- return TOKEN_DATA_TYPE(name);
-}
-
-char *
-m4_token_data_text (token_data *name)
-{
- return TOKEN_DATA_TEXT(name);
-}
-
-char *
-m4_token_data_orig_text (token_data *name)
-{
-#ifdef ENABLE_CHANGEWORD
- return TOKEN_DATA_ORIG_TEXT(name);
-#else
- return NULL;
-#endif
-}
-
-builtin_func *
-m4_token_data_func (token_data *name)
-{
- return TOKEN_DATA_FUNC(name);
-}
-
-boolean
-m4_token_data_func_traced (token_data *name)
-{
- return TOKEN_DATA_FUNC_TRACED(name);
-}
-
-
-/*------------------------------------------------------------------------.
-| Give friendly warnings if a builtin macro is passed an inappropriate |
-| number of arguments. NAME is macro name for messages, ARGC is actual |
-| number of arguments, MIN is the minimum number of acceptable arguments, |
-| negative if not applicable, MAX is the maximum number, negative if not |
-| applicable. |
-`------------------------------------------------------------------------*/
-
-boolean
-m4_bad_argc (token_data *name, int argc, int min, int max)
-{
- boolean isbad = FALSE;
-
- if (min > 0 && argc < min)
- {
- if (!suppress_warnings)
- M4ERROR ((warning_status, 0,
- _("Warning: Too few arguments to built-in `%s'"),
- TOKEN_DATA_TEXT (name)));
- isbad = TRUE;
- }
- else if (max > 0 && argc > max && !suppress_warnings)
- M4ERROR ((warning_status, 0,
- _("Warning: Excess arguments to built-in `%s' ignored"),
- TOKEN_DATA_TEXT (name)));
-
- return isbad;
-}
-
-const char *
-m4_skip_space (const char *arg)
-{
- while (IS_SPACE(*arg))
- arg++;
- return arg;
-}
-
-/*--------------------------------------------------------------------------.
-| The function m4_numeric_arg () converts ARG to an int pointed to by |
-| VALUEP. If the conversion fails, print error message for macro MACRO. |
-| Return TRUE iff conversion succeeds. |
-`--------------------------------------------------------------------------*/
-boolean
-m4_numeric_arg (token_data *macro, const char *arg, int *valuep)
-{
- char *endp;
-
- if (*arg == 0 || (*valuep = strtol (m4_skip_space(arg), &endp, 10),
- *m4_skip_space(endp) != 0))
- {
- M4ERROR ((warning_status, 0,
- _("Non-numeric argument to built-in `%s'"),
- TOKEN_DATA_TEXT (macro)));
- return FALSE;
- }
- return TRUE;
-}
-
-/*----------------------------------------------------------------------.
-| Format an int VAL, and stuff it into an obstack OBS. Used for macros |
-| expanding to numbers. |
-`----------------------------------------------------------------------*/
-
-void
-m4_shipout_int (struct obstack *obs, int val)
-{
- char buf[128];
-
- sprintf(buf, "%d", val);
- obstack_grow (obs, buf, strlen (buf));
-}
-
-void
-m4_shipout_string (struct obstack *obs, const char *s, int len, boolean quoted)
-{
- if (s == NULL)
- s = "";
-
- if (len == 0)
- len = strlen(s);
-
- if (quoted)
- obstack_grow (obs, lquote.string, lquote.length);
- obstack_grow (obs, s, len);
- if (quoted)
- obstack_grow (obs, rquote.string, rquote.length);
-}
-
diff --git a/lib/m4module.h b/lib/m4module.h
deleted file mode 100644
index 74da7200..00000000
--- a/lib/m4module.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/* 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.
-*/
-
-#ifndef M4MODULE_H
-#define M4MODULE_H
-
-#include <sys/types.h>
-#include <m4error.h>
-#include <m4obstack.h>
-
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#define _(Text) gettext ((Text))
-#else
-#define _(Text) (Text)
-#endif
-
-#ifndef M4_PARAMS
-# ifdef __STDC__
-# define M4_PARAMS(Args) Args
-# else
-# define M4_PARAMS(Args) ()
-# endif
-#endif
-
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. */
-#ifndef M4_SCOPE
-# ifdef _WIN32
- /* Incase we are linking a dll with this library, the
- LIBM4_DLL_IMPORT takes precedence over a generic DLL_EXPORT
- when defining the SCOPE variable for M4. */
-# ifdef LIBM4_DLL_IMPORT /* define if linking with this dll */
-# define M4_SCOPE extern __declspec(dllimport)
-# else
-# ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define M4_SCOPE __declspec(dllexport)
-# endif /* DLL_EXPORT */
-# endif /* LIBM4_DLL_IMPORT */
-# endif /* M4_SCOPE */
-# ifndef M4_SCOPE /* static linking or !_WIN32 */
-# define M4_SCOPE extern
-# endif
-#endif
-
-#if __STDC__
-# define voidstar void *
-#else
-# define voidstar char *
-#endif
-
-/* If FALSE is defined, we presume TRUE is defined too. In this case,
- merely typedef boolean as being int. Or else, define these all. */
-#ifndef FALSE
-/* Do not use `enum boolean': this tag is used in SVR4 <sys/types.h>. */
-typedef enum { FALSE = 0, TRUE = 1 } boolean;
-#else
-typedef int boolean;
-#endif
-
-
-/* Syntax table definitions. */
-/* Please read the comment at the top of input.c for details */
-M4_SCOPE 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)
-#define SYNTAX_ESCAPE (0x0008)
-
-/* 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_ESCAPE(ch) ((syntax_table[(int)(ch)]&SYNTAX_VALUE) == SYNTAX_ESCAPE)
-#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)
-
-
-/* Various declarations. */
-
-struct string
- {
- unsigned char *string; /* characters of the string */
- size_t length; /* length of the string */
- };
-typedef struct string STRING;
-
-/* Memory allocation. */
-voidstar xmalloc M4_PARAMS((unsigned int));
-voidstar xrealloc M4_PARAMS((voidstar, unsigned int));
-void xfree M4_PARAMS((voidstar));
-char *xstrdup M4_PARAMS((const char *));
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free xfree
-
-/* Other library routines. */
-void error M4_PARAMS((int , int, const char *, ...));
-
-
-typedef void builtin_func ();
-
-typedef struct {
- const char *name;
- boolean gnu_extension;
- boolean groks_macro_args;
- boolean blind_if_no_args;
- builtin_func *func;
-} builtin;
-
-/* Various different token types. */
-typedef enum {
- TOKEN_EOF, /* end of file */
- TOKEN_NONE, /* discardable token */
- TOKEN_STRING, /* a quoted string */
- TOKEN_SPACE, /* whitespace */
- TOKEN_WORD, /* an identifier */
- TOKEN_SIMPLE, /* a single character */
- TOKEN_MACDEF /* a macros definition (see "defn") */
-} token_type;
-
-/* The data for a token, a macro argument, and a macro definition. */
-typedef enum {
- TOKEN_VOID,
- TOKEN_TEXT,
- TOKEN_FUNC
-} token_data_type;
-
-typedef void module_init_t M4_PARAMS((struct obstack *));
-typedef void module_finish_t M4_PARAMS((void));
-
-#ifdef COMPILING_M4
-typedef struct token_data token_data;
-#else
-typedef voidstar token_data;
-#endif
-
-token_data_type m4_token_data_type M4_PARAMS((token_data *));
-char *m4_token_data_text M4_PARAMS((token_data *));
-char *m4_token_data_orig_text M4_PARAMS((token_data *));
-builtin_func *m4_token_data_func M4_PARAMS((token_data *));
-boolean m4_token_data_func_traced M4_PARAMS((token_data *));
-
-#define M4ARG(i) (argc > (i) ? m4_token_data_text (argv[i]) : "")
-
-#define M4BUILTIN(name) \
- static void name M4_PARAMS((struct obstack *, int, token_data **))
-
-/* Error handling. */
-#define M4ERROR(Arglist) (error Arglist)
-
-#define HASHMAX 509 /* default, overridden by -Hsize */
-
-/* The name this program was run with. */
-M4_SCOPE const char *program_name;
-
-/* Option flags (defined in m4module.c; set in m4.c). */
-M4_SCOPE int interactive; /* -e */
-M4_SCOPE int sync_output; /* -s */
-M4_SCOPE int debug_level; /* -d */
-M4_SCOPE int hash_table_size; /* -H */
-M4_SCOPE int no_gnu_extensions; /* -G */
-M4_SCOPE int prefix_all_builtins; /* -P */
-M4_SCOPE int max_debug_argument_length; /* -l */
-M4_SCOPE int suppress_warnings; /* -Q */
-M4_SCOPE int warning_status; /* -E */
-M4_SCOPE int nesting_limit; /* -L */
-M4_SCOPE int discard_comments; /* -c */
-M4_SCOPE const char *user_word_regexp; /* -W */
-
-/* left and right quote, begin and end comment */
-M4_SCOPE STRING lquote;
-M4_SCOPE STRING rquote;
-
-M4_SCOPE STRING bcomm;
-M4_SCOPE STRING ecomm;
-
-#define DEF_LQUOTE "`"
-#define DEF_RQUOTE "\'"
-#define DEF_BCOMM "#"
-#define DEF_ECOMM "\n"
-
-boolean m4_bad_argc M4_PARAMS((token_data *, int, int, int));
-const char *m4_skip_space M4_PARAMS((const char *));
-boolean m4_numeric_arg M4_PARAMS((token_data *, const char *, int *));
-void m4_shipout_int M4_PARAMS((struct obstack *, int));
-void m4_shipout_string M4_PARAMS((struct obstack*, const char*, int, boolean));
-
-#endif /* M4MODULE_H */
diff --git a/lib/m4obstack.c b/lib/m4obstack.c
deleted file mode 100644
index 022b949f..00000000
--- a/lib/m4obstack.c
+++ /dev/null
@@ -1,598 +0,0 @@
-/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988-1994,96,97,98,99 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "m4obstack.h"
-
-/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
- incremented whenever callers compiled using an old obstack.h can no
- longer properly call the functions in this obstack.c. */
-#define OBSTACK_INTERFACE_VERSION 1
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself, and the installed library
- supports the same library interface we do. This code is part of the GNU
- C Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object
- files, it is simpler to just do this in the source for each such file. */
-
-#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
-#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
-#include <gnu-versions.h>
-#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-
-#ifndef ELIDE_CODE
-
-
-#if defined (__STDC__) && __STDC__
-#define POINTER void *
-#else
-#define POINTER char *
-#endif
-
-/* Determine default alignment. */
-struct fooalign {char x; double d;};
-#define DEFAULT_ALIGNMENT \
- ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
-/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
- But in fact it might be less smart and round addresses to as much as
- DEFAULT_ROUNDING. So we prepare for it to do that. */
-union fooround {long x; double d;};
-#define DEFAULT_ROUNDING (sizeof (union fooround))
-
-/* When we copy a long block of data, this is the unit to do it with.
- On some machines, copying successive ints does not work;
- in such a case, redefine COPYING_UNIT to `long' (if that works)
- or `char' as a last resort. */
-#ifndef COPYING_UNIT
-#define COPYING_UNIT int
-#endif
-
-
-/* The functions allocating more room by calling `obstack_chunk_alloc'
- jump to the handler pointed to by `obstack_alloc_failed_handler'.
- This can be set to a user defined function which should either
- abort gracefully or use longjump - but shouldn't return. This
- variable by default points to the internal function
- `print_and_abort'. */
-#if defined (__STDC__) && __STDC__
-static void print_and_abort (void);
-void (*obstack_alloc_failed_handler) (void) = print_and_abort;
-#else
-static void print_and_abort ();
-void (*obstack_alloc_failed_handler) () = print_and_abort;
-#endif
-
-/* Exit value used when `print_and_abort' is used. */
-#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif
-int obstack_exit_failure = EXIT_FAILURE;
-
-/* The non-GNU-C macros copy the obstack into this global variable
- to avoid multiple evaluation. */
-
-struct obstack *_obstack;
-
-/* Define a macro that either calls functions with the traditional malloc/free
- calling interface, or calls functions with the mmalloc/mfree interface
- (that adds an extra first argument), based on the state of use_extra_arg.
- For free, do not use ?:, since some compilers, like the MIPS compilers,
- do not allow (expr) ? void : void. */
-
-#if defined (__STDC__) && __STDC__
-#define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
-
-#define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
- } while (0)
-#else
-#define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
-
-#define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) ()) (h)->freefun) ((old_chunk)); \
- } while (0)
-#endif
-
-
-/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
- Objects start on multiples of ALIGNMENT (0 means use default).
- CHUNKFUN is the function to use to allocate chunks,
- and FREEFUN the function to free them.
-
- Return nonzero if successful, calls obstack_alloc_failed_handler if
- allocation fails. */
-
-int
-_obstack_begin (h, size, alignment, chunkfun, freefun)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (long);
- void (*freefun) (void *);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
-{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = (int) DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
-#if defined (__STDC__) && __STDC__
- h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->use_extra_arg = 0;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = chunk->contents;
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
-}
-
-int
-_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (POINTER, long);
- void (*freefun) (POINTER, POINTER);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
- POINTER arg;
-{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = (int) DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
-#if defined(__STDC__) && __STDC__
- h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
- h->extra_arg = arg;
- h->use_extra_arg = 1;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = chunk->contents;
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
-}
-
-/* Allocate a new current chunk for the obstack *H
- on the assumption that LENGTH bytes need to be added
- to the current object, or a new object of length LENGTH allocated.
- Copies any partial object from the end of the old chunk
- to the beginning of the new one. */
-
-void
-_obstack_newchunk (h, length)
- struct obstack *h;
- int length;
-{
- register struct _obstack_chunk *old_chunk = h->chunk;
- register struct _obstack_chunk *new_chunk;
- register long new_size;
- register long obj_size = h->next_free - h->object_base;
- register long i;
- long already;
-
- /* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + 100;
- if (new_size < h->chunk_size)
- new_size = h->chunk_size;
-
- /* Allocate and initialize the new chunk. */
- new_chunk = CALL_CHUNKFUN (h, new_size);
- if (!new_chunk)
- (*obstack_alloc_failed_handler) ();
- h->chunk = new_chunk;
- new_chunk->prev = old_chunk;
- new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
-
- /* Move the existing object to the new chunk.
- Word at a time is fast and is safe if the object
- is sufficiently aligned. */
- if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
- {
- for (i = obj_size / sizeof (COPYING_UNIT) - 1;
- i >= 0; i--)
- ((COPYING_UNIT *)new_chunk->contents)[i]
- = ((COPYING_UNIT *)h->object_base)[i];
- /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
- but that can cross a page boundary on a machine
- which does not do strict alignment for COPYING_UNITS. */
- already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
- }
- else
- already = 0;
- /* Copy remaining bytes one by one. */
- for (i = already; i < obj_size; i++)
- new_chunk->contents[i] = h->object_base[i];
-
- /* If the object just copied was the only data in OLD_CHUNK,
- free that chunk and remove it from the chain.
- But not if that chunk might contain an empty object. */
- if (h->object_base == old_chunk->contents && ! h->maybe_empty_object)
- {
- new_chunk->prev = old_chunk->prev;
- CALL_FREEFUN (h, old_chunk);
- }
-
- h->object_base = new_chunk->contents;
- h->next_free = h->object_base + obj_size;
- /* The new chunk certainly contains no empty object yet. */
- h->maybe_empty_object = 0;
-}
-
-/* Return nonzero if object OBJ has been allocated from obstack H.
- This is here for debugging.
- If you use it in a program, you are probably losing. */
-
-#if defined (__STDC__) && __STDC__
-/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
- obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, POINTER obj);
-#endif
-
-int
-_obstack_allocated_p (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = (h)->chunk;
- /* We use >= rather than > since the object cannot be exactly at
- the beginning of the chunk but might be an empty object exactly
- at the end of an adjacent chunk. */
- while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
- {
- plp = lp->prev;
- lp = plp;
- }
- return lp != 0;
-}
-
-/* Free objects in obstack H, including OBJ and everything allocate
- more recently than OBJ. If OBJ is zero, free everything in H. */
-
-#undef obstack_free
-
-/* This function has two names with identical definitions.
- This is the first one, called from non-ANSI code. */
-
-void
-_obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *) (obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
-
-/* This function is used from ANSI code. */
-
-void
-obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *) (obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
-
-int
-_obstack_memory_used (h)
- struct obstack *h;
-{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
-
- for (lp = h->chunk; lp != 0; lp = lp->prev)
- {
- nbytes += lp->limit - (char *) lp;
- }
- return nbytes;
-}
-
-/* Define the error handler. */
-#ifndef _
-# ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# ifndef _
-# define _(Str) gettext (Str)
-# endif
-# else
-# define _(Str) (Str)
-# endif
-#endif
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <libio/iolibio.h>
-# define fputs(s, f) _IO_fputs (s, f)
-#endif
-
-static void
-print_and_abort ()
-{
- fputs (_("memory exhausted"), stderr);
- fputc ('\n', stderr);
- exit (obstack_exit_failure);
-}
-
-#if 0
-/* These are now turned off because the applications do not use it
- and it uses bcopy via obstack_grow, which causes trouble on sysV. */
-
-/* Now define the functional versions of the obstack macros.
- Define them to simply use the corresponding macros to do the job. */
-
-#if defined (__STDC__) && __STDC__
-/* These function definitions do not work with non-ANSI preprocessors;
- they won't pass through the macro names in parentheses. */
-
-/* The function names appear in parentheses in order to prevent
- the macro-definitions of the names from being expanded there. */
-
-POINTER (obstack_base) (obstack)
- struct obstack *obstack;
-{
- return obstack_base (obstack);
-}
-
-POINTER (obstack_next_free) (obstack)
- struct obstack *obstack;
-{
- return obstack_next_free (obstack);
-}
-
-int (obstack_object_size) (obstack)
- struct obstack *obstack;
-{
- return obstack_object_size (obstack);
-}
-
-int (obstack_room) (obstack)
- struct obstack *obstack;
-{
- return obstack_room (obstack);
-}
-
-int (obstack_make_room) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- return obstack_make_room (obstack, length);
-}
-
-void (obstack_grow) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- obstack_grow (obstack, pointer, length);
-}
-
-void (obstack_grow0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- obstack_grow0 (obstack, pointer, length);
-}
-
-void (obstack_1grow) (obstack, character)
- struct obstack *obstack;
- int character;
-{
- obstack_1grow (obstack, character);
-}
-
-void (obstack_blank) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- obstack_blank (obstack, length);
-}
-
-void (obstack_1grow_fast) (obstack, character)
- struct obstack *obstack;
- int character;
-{
- obstack_1grow_fast (obstack, character);
-}
-
-void (obstack_blank_fast) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- obstack_blank_fast (obstack, length);
-}
-
-POINTER (obstack_finish) (obstack)
- struct obstack *obstack;
-{
- return obstack_finish (obstack);
-}
-
-POINTER (obstack_alloc) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- return obstack_alloc (obstack, length);
-}
-
-POINTER (obstack_copy) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- return obstack_copy (obstack, pointer, length);
-}
-
-POINTER (obstack_copy0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- return obstack_copy0 (obstack, pointer, length);
-}
-
-#endif /* __STDC__ */
-
-#endif /* 0 */
-
-#endif /* !ELIDE_CODE */
diff --git a/lib/m4obstack.h b/lib/m4obstack.h
deleted file mode 100644
index 4d49ce02..00000000
--- a/lib/m4obstack.h
+++ /dev/null
@@ -1,593 +0,0 @@
-/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Summary:
-
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a `struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
- We allocate large chunks.
- We carve out one object at a time from the current chunk.
- Once carved, an object never moves.
- We are free to append data of any size to the currently
- growing object.
- Exactly one object is growing in an obstack at any one time.
- You can run one obstack per control block.
- You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
- back to a previous state. (You may remove objects much
- as you would with a stack.)
-*/
-
-
-/* Don't do the contents of this file more than once. */
-
-#ifndef _OBSTACK_H
-#define _OBSTACK_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* We use subtraction of (char *) 0 instead of casting to int
- because on word-addressable machines a simple cast to int
- may ignore the byte-within-word field of the pointer. */
-
-#ifndef __PTR_TO_INT
-# define __PTR_TO_INT(P) ((P) - (char *) 0)
-#endif
-
-#ifndef __INT_TO_PTR
-# define __INT_TO_PTR(P) ((P) + (char *) 0)
-#endif
-
-/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
- available, include it and use ptrdiff_t. In traditional C, long is
- the best that we can do. */
-
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
-#else
-# ifdef HAVE_STDDEF_H
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
-# else
-# define PTR_INT_TYPE long
-# endif
-#endif
-
-#if defined _LIBC || defined HAVE_STRING_H
-# include <string.h>
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-#else
-# ifdef memcpy
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-# else
-# define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
-# endif
-#endif
-
-struct _obstack_chunk /* Lives at front of each chunk. */
-{
- char *limit; /* 1 past end of this chunk */
- struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
-};
-
-struct obstack /* control current object in current chunk */
-{
- long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- PTR_INT_TYPE temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
-#if defined __STDC__ && __STDC__
- /* These prototypes vary based on `use_extra_arg', and we use
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
- void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#else
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#endif
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
-};
-
-/* Declare the external functions we use; they are in obstack.c. */
-
-#if defined __STDC__ && __STDC__
-extern void _obstack_newchunk (struct obstack *, int);
-extern void _obstack_free (struct obstack *, void *);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
- void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
-#else
-extern void _obstack_newchunk ();
-extern void _obstack_free ();
-extern int _obstack_begin ();
-extern int _obstack_begin_1 ();
-extern int _obstack_memory_used ();
-#endif
-
-#if defined __STDC__ && __STDC__
-
-/* Do the function-declarations after the structs
- but before defining the macros. */
-
-void obstack_init (struct obstack *obstack);
-
-void * obstack_alloc (struct obstack *obstack, int size);
-
-void * obstack_copy (struct obstack *obstack, void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
-
-void obstack_free (struct obstack *obstack, void *block);
-
-void obstack_blank (struct obstack *obstack, int size);
-
-void obstack_grow (struct obstack *obstack, void *data, int size);
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
-
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-
-void * obstack_finish (struct obstack *obstack);
-
-int obstack_object_size (struct obstack *obstack);
-
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
-
-#endif /* __STDC__ */
-
-/* Non-ANSI C cannot really support alternative functions for these macros,
- so we do not declare them. */
-
-/* Error handler called when `obstack_chunk_alloc' failed to allocate
- more memory. This can be set to a user defined function which
- should either abort gracefully or use longjump - but shouldn't
- return. The default action is to print a message and abort. */
-#if defined __STDC__ && __STDC__
-extern void (*obstack_alloc_failed_handler) (void);
-#else
-extern void (*obstack_alloc_failed_handler) ();
-#endif
-
-/* Exit value used when `print_and_abort' is used. */
-extern int obstack_exit_failure;
-
-/* Pointer to beginning of object being allocated or to be allocated next.
- Note that this might not be the final address of the object
- because a new chunk might be needed to hold the final size. */
-
-#define obstack_base(h) ((h)->object_base)
-
-/* Size for allocating ordinary chunks. */
-
-#define obstack_chunk_size(h) ((h)->chunk_size)
-
-/* Pointer to next byte not yet allocated in current chunk. */
-
-#define obstack_next_free(h) ((h)->next_free)
-
-/* Mask specifying low bits that should be clear in address of an object. */
-
-#define obstack_alignment_mask(h) ((h)->alignment_mask)
-
-/* To prevent prototype warnings provide complete argument list in
- standard C version. */
-#if defined __STDC__ && __STDC__
-
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-
-#else
-
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)()) (newfreefun))
-
-#endif
-
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
-
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
-#define obstack_memory_used(h) _obstack_memory_used (h)
-
-#if defined __GNUC__ && defined __STDC__ && __STDC__
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
-# define __extension__
-# endif
-
-/* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
-
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- _obstack_memcpy (__o->next_free, (char *) (where), __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- _obstack_memcpy (__o->next_free, (char *) (where), __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- *(__o->next_free)++ = (datum); \
- (void) 0; })
-
-/* These assume that the obstack alignment is good enough for pointers or ints,
- and that the data added so far to the current object
- shares that much alignment. */
-
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- *((void **)__o->next_free)++ = ((void *)datum); \
- (void) 0; })
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- *((int *)__o->next_free)++ = ((int)datum); \
- (void) 0; })
-
-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *value; \
- value = (void *) __o1->object_base; \
- if (__o1->next_free == value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- & ~ (__o1->alignment_mask)); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *)__obj; \
- else (obstack_free) (__o, __obj); })
-
-#else /* not __GNUC__ or not __STDC__ */
-
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
-
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
-
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
-
-/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
- so that we can avoid having void expressions
- in the arms of the conditional expression.
- Casting the third operand to void was tried before,
- but some compilers won't accept it. */
-
-# define obstack_make_room(h,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
- (h)->next_free += (h)->temp)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
- (h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- (*((h)->next_free)++ = (datum)))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
-
-# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-
-# define obstack_blank(h,length) \
-( (h)->temp = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->next_free += (h)->temp))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp = __PTR_TO_INT ((h)->object_base), \
- (h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- __INT_TO_PTR ((h)->temp))
-
-# if defined __STDC__ && __STDC__
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-# else
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-# endif
-
-#endif /* not __GNUC__ or not __STDC__ */
-
-#ifdef __cplusplus
-} /* C++ */
-#endif
-
-#endif /* obstack.h */
diff --git a/lib/m4private.h b/lib/m4private.h
deleted file mode 100644
index 03542d79..00000000
--- a/lib/m4private.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 1989, 90, 91, 92, 93, 94, 98 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.
-*/
-
-struct token_data {
- token_data_type type;
- union {
- struct {
- char *text;
-#ifdef ENABLE_CHANGEWORD
- char *original_text;
-#endif
- } u_t;
- struct {
- builtin_func *func;
- boolean traced;
- } u_f;
- } u;
-};
-
-#define TOKEN_DATA_TYPE(Td) ((Td)->type)
-#define TOKEN_DATA_TEXT(Td) ((Td)->u.u_t.text)
-#ifdef ENABLE_CHANGEWORD
-# define TOKEN_DATA_ORIG_TEXT(Td) ((Td)->u.u_t.original_text)
-#endif
-#define TOKEN_DATA_FUNC(Td) ((Td)->u.u_f.func)
-#define TOKEN_DATA_FUNC_TRACED(Td) ((Td)->u.u_f.traced)
-
-/* Redefine the exported function using macro to this faster
- macro based version for internal use by the m4 code. */
-#undef M4ARG
-#define M4ARG(i) (argc > (i) ? TOKEN_DATA_TEXT (argv[i]) : "")
-
-struct symbol
-{
- struct symbol *next;
- boolean traced;
- boolean shadowed;
- boolean macro_args;
- boolean blind_no_args;
-
- char *name;
- token_data data;
-};
-
-#define SYMBOL_NEXT(S) ((S)->next)
-#define SYMBOL_TRACED(S) ((S)->traced)
-#define SYMBOL_SHADOWED(S) ((S)->shadowed)
-#define SYMBOL_MACRO_ARGS(S) ((S)->macro_args)
-#define SYMBOL_BLIND_NO_ARGS(S) ((S)->blind_no_args)
-#define SYMBOL_NAME(S) ((S)->name)
-#define SYMBOL_TYPE(S) (TOKEN_DATA_TYPE (&(S)->data))
-#define SYMBOL_TEXT(S) (TOKEN_DATA_TEXT (&(S)->data))
-#define SYMBOL_FUNC(S) (TOKEN_DATA_FUNC (&(S)->data))
diff --git a/lib/m4regex.c b/lib/m4regex.c
deleted file mode 100644
index 36f7faca..00000000
--- a/lib/m4regex.c
+++ /dev/null
@@ -1,5880 +0,0 @@
-/* Extended regular expression matching and search library,
- version 0.12.
- (Implements POSIX draft P1003.2/D11.2, except for some of the
- internationalization features.)
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* AIX requires this to be the first thing in the file. */
-#if defined _AIX && !defined REGEX_MALLOC
- #pragma alloca
-#endif
-
-#undef _GNU_SOURCE
-#define _GNU_SOURCE
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifndef PARAMS
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif /* GCC. */
-#endif /* Not PARAMS. */
-
-#if defined STDC_HEADERS && !defined emacs
-# include <stddef.h>
-#else
-/* We need this for `regex.h', and perhaps for the Emacs include files. */
-# include <sys/types.h>
-#endif
-
-#define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
-
-/* For platform which support the ISO C amendement 1 functionality we
- support user defined character classes. */
-#if defined _LIBC || WIDE_CHAR_SUPPORT
-/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-# include <wchar.h>
-# include <wctype.h>
-#endif
-
-#ifdef _LIBC
-/* We have to keep the namespace clean. */
-# define regfree(preg) __regfree (preg)
-# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
-# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
-# define regerror(errcode, preg, errbuf, errbuf_size) \
- __regerror(errcode, preg, errbuf, errbuf_size)
-# define re_set_registers(bu, re, nu, st, en) \
- __re_set_registers (bu, re, nu, st, en)
-# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
- __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
-# define re_match(bufp, string, size, pos, regs) \
- __re_match (bufp, string, size, pos, regs)
-# define re_search(bufp, string, size, startpos, range, regs) \
- __re_search (bufp, string, size, startpos, range, regs)
-# define re_compile_pattern(pattern, length, bufp) \
- __re_compile_pattern (pattern, length, bufp)
-# define re_set_syntax(syntax) __re_set_syntax (syntax)
-# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
- __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
-# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
-
-#define btowc __btowc
-#endif
-
-/* This is for other GNU distributions with internationalized messages. */
-#if HAVE_LIBINTL_H || defined _LIBC
-# include <libintl.h>
-#else
-# define gettext(msgid) (msgid)
-#endif
-
-#ifndef gettext_noop
-/* This define is so xgettext can find the internationalizable
- strings. */
-# define gettext_noop(String) String
-#endif
-
-/* The `emacs' switch turns on certain matching commands
- that make sense only in Emacs. */
-#ifdef emacs
-
-# include "lisp.h"
-# include "buffer.h"
-# include "syntax.h"
-
-#else /* not emacs */
-
-/* If we are not linking with Emacs proper,
- we can't use the relocating allocator
- even if config.h says that we can. */
-# undef REL_ALLOC
-
-# if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-# else
-char *malloc ();
-char *realloc ();
-# endif
-
-/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
- If nothing else has been done, use the method below. */
-# ifdef INHIBIT_STRING_HEADER
-# if !(defined HAVE_BZERO && defined HAVE_BCOPY)
-# if !defined bzero && !defined bcopy
-# undef INHIBIT_STRING_HEADER
-# endif
-# endif
-# endif
-
-/* This is the normal way of making sure we have a bcopy and a bzero.
- This is used in most programs--a few other programs avoid this
- by defining INHIBIT_STRING_HEADER. */
-# ifndef INHIBIT_STRING_HEADER
-# if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
-# include <string.h>
-# ifndef bzero
-# ifndef _LIBC
-# define bzero(s, n) (memset (s, '\0', n), (s))
-# else
-# define bzero(s, n) __bzero (s, n)
-# endif
-# endif
-# else
-# include <strings.h>
-# ifndef memcmp
-# define memcmp(s1, s2, n) bcmp (s1, s2, n)
-# endif
-# ifndef memcpy
-# define memcpy(d, s, n) (bcopy (s, d, n), (d))
-# endif
-# endif
-# endif
-
-/* Define the syntax stuff for \<, \>, etc. */
-
-/* This must be nonzero for the wordchar and notwordchar pattern
- commands in re_match_2. */
-# ifndef Sword
-# define Sword 1
-# endif
-
-# ifdef SWITCH_ENUM_BUG
-# define SWITCH_ENUM_CAST(x) ((int)(x))
-# else
-# define SWITCH_ENUM_CAST(x) (x)
-# endif
-
-/* How many characters in the character set. */
-# define CHAR_SET_SIZE 256
-
-# ifdef SYNTAX_TABLE
-
-extern char *re_syntax_table;
-
-# else /* not SYNTAX_TABLE */
-
-static char re_syntax_table[CHAR_SET_SIZE];
-
-static void
-init_syntax_once ()
-{
- register int c;
- static int done;
-
- if (done)
- return;
-
- bzero (re_syntax_table, sizeof re_syntax_table);
-
- for (c = 'a'; c <= 'z'; c++)
- re_syntax_table[c] = Sword;
-
- for (c = 'A'; c <= 'Z'; c++)
- re_syntax_table[c] = Sword;
-
- for (c = '0'; c <= '9'; c++)
- re_syntax_table[c] = Sword;
-
- re_syntax_table['_'] = Sword;
-
- done = 1;
-}
-
-# endif /* not SYNTAX_TABLE */
-
-# define SYNTAX(c) re_syntax_table[c]
-
-#endif /* not emacs */
-
-/* Get the interface, including the syntax bits. */
-#include <m4regex.h>
-
-/* isalpha etc. are used for the character classes. */
-#include <ctype.h>
-
-/* Jim Meyering writes:
-
- "... Some ctype macros are valid only for character codes that
- isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
- using /bin/cc or gcc but without giving an ansi option). So, all
- ctype uses should be through macros like ISPRINT... If
- STDC_HEADERS is defined, then autoconf has verified that the ctype
- macros don't need to be guarded with references to isascii. ...
- Defining isascii to 1 should let any compiler worth its salt
- eliminate the && through constant folding."
- Solaris defines some of these symbols so we must undefine them first. */
-
-#undef ISASCII
-#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
-# define ISASCII(c) 1
-#else
-# define ISASCII(c) isascii(c)
-#endif
-
-#ifdef isblank
-# define ISBLANK(c) (ISASCII (c) && isblank (c))
-#else
-# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-#endif
-#ifdef isgraph
-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
-#else
-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
-#endif
-
-#undef ISPRINT
-#define ISPRINT(c) (ISASCII (c) && isprint (c))
-#define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-#define ISALNUM(c) (ISASCII (c) && isalnum (c))
-#define ISALPHA(c) (ISASCII (c) && isalpha (c))
-#define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-#define ISLOWER(c) (ISASCII (c) && islower (c))
-#define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-#define ISSPACE(c) (ISASCII (c) && isspace (c))
-#define ISUPPER(c) (ISASCII (c) && isupper (c))
-#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
-
-#ifdef _tolower
-# define TOLOWER(c) _tolower(c)
-#else
-# define TOLOWER(c) tolower(c)
-#endif
-
-#ifndef NULL
-# define NULL (void *)0
-#endif
-
-/* We remove any previous definition of `SIGN_EXTEND_CHAR',
- since ours (we hope) works properly with all combinations of
- machines, compilers, `char' and `unsigned char' argument types.
- (Per Bothner suggested the basic approach.) */
-#undef SIGN_EXTEND_CHAR
-#if __STDC__
-# define SIGN_EXTEND_CHAR(c) ((signed char) (c))
-#else /* not __STDC__ */
-/* As in Harbison and Steele. */
-# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
-#endif
-
-/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
- use `alloca' instead of `malloc'. This is because using malloc in
- re_search* or re_match* could cause memory leaks when C-g is used in
- Emacs; also, malloc is slower and causes storage fragmentation. On
- the other hand, malloc is more portable, and easier to debug.
-
- Because we sometimes use alloca, some routines have to be macros,
- not functions -- `alloca'-allocated space disappears at the end of the
- function it is called in. */
-
-#ifdef REGEX_MALLOC
-
-# define REGEX_ALLOCATE malloc
-# define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
-# define REGEX_FREE free
-
-#else /* not REGEX_MALLOC */
-
-/* Emacs already defines alloca, sometimes. */
-# ifndef alloca
-
-/* Make alloca work the best possible way. */
-# ifdef __GNUC__
-# define alloca __builtin_alloca
-# else /* not __GNUC__ */
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# endif /* HAVE_ALLOCA_H */
-# endif /* not __GNUC__ */
-
-# endif /* not alloca */
-
-# define REGEX_ALLOCATE alloca
-
-/* Assumes a `char *destination' variable. */
-# define REGEX_REALLOCATE(source, osize, nsize) \
- (destination = (char *) alloca (nsize), \
- memcpy (destination, source, osize))
-
-/* No need to do anything to free, after alloca. */
-# define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */
-
-#endif /* not REGEX_MALLOC */
-
-/* Define how to allocate the failure stack. */
-
-#if defined REL_ALLOC && defined REGEX_MALLOC
-
-# define REGEX_ALLOCATE_STACK(size) \
- r_alloc (&failure_stack_ptr, (size))
-# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
- r_re_alloc (&failure_stack_ptr, (nsize))
-# define REGEX_FREE_STACK(ptr) \
- r_alloc_free (&failure_stack_ptr)
-
-#else /* not using relocating allocator */
-
-# ifdef REGEX_MALLOC
-
-# define REGEX_ALLOCATE_STACK malloc
-# define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
-# define REGEX_FREE_STACK free
-
-# else /* not REGEX_MALLOC */
-
-# define REGEX_ALLOCATE_STACK alloca
-
-# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
- REGEX_REALLOCATE (source, osize, nsize)
-/* No need to explicitly free anything. */
-# define REGEX_FREE_STACK(arg)
-
-# endif /* not REGEX_MALLOC */
-#endif /* not using relocating allocator */
-
-
-/* True if `size1' is non-NULL and PTR is pointing anywhere inside
- `string1' or just past its end. This works if PTR is NULL, which is
- a good thing. */
-#define FIRST_STRING_P(ptr) \
- (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
-
-/* (Re)Allocate N items of type T using malloc, or fail. */
-#define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
-#define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
-#define RETALLOC_IF(addr, n, t) \
- if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
-#define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
-
-#define BYTEWIDTH 8 /* In bits. */
-
-#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
-
-#undef MAX
-#undef MIN
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
-typedef char boolean;
-#define false 0
-#define true 1
-
-static int re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int pos,
- struct re_registers *regs,
- int stop));
-
-/* These are the command codes that appear in compiled regular
- expressions. Some opcodes are followed by argument bytes. A
- command code can specify any interpretation whatsoever for its
- arguments. Zero bytes may appear in the compiled regular expression. */
-
-typedef enum
-{
- no_op = 0,
-
- /* Succeed right away--no more backtracking. */
- succeed,
-
- /* Followed by one byte giving n, then by n literal bytes. */
- exactn,
-
- /* Matches any (more or less) character. */
- anychar,
-
- /* Matches any one char belonging to specified set. First
- following byte is number of bitmap bytes. Then come bytes
- for a bitmap saying which chars are in. Bits in each byte
- are ordered low-bit-first. A character is in the set if its
- bit is 1. A character too large to have a bit in the map is
- automatically not in the set. */
- charset,
-
- /* Same parameters as charset, but match any character that is
- not one of those specified. */
- charset_not,
-
- /* Start remembering the text that is matched, for storing in a
- register. Followed by one byte with the register number, in
- the range 0 to one less than the pattern buffer's re_nsub
- field. Then followed by one byte with the number of groups
- inner to this one. (This last has to be part of the
- start_memory only because we need it in the on_failure_jump
- of re_match_2.) */
- start_memory,
-
- /* Stop remembering the text that is matched and store it in a
- memory register. Followed by one byte with the register
- number, in the range 0 to one less than `re_nsub' in the
- pattern buffer, and one byte with the number of inner groups,
- just like `start_memory'. (We need the number of inner
- groups here because we don't have any easy way of finding the
- corresponding start_memory when we're at a stop_memory.) */
- stop_memory,
-
- /* Match a duplicate of something remembered. Followed by one
- byte containing the register number. */
- duplicate,
-
- /* Fail unless at beginning of line. */
- begline,
-
- /* Fail unless at end of line. */
- endline,
-
- /* Succeeds if at beginning of buffer (if emacs) or at beginning
- of string to be matched (if not). */
- begbuf,
-
- /* Analogously, for end of buffer/string. */
- endbuf,
-
- /* Followed by two byte relative address to which to jump. */
- jump,
-
- /* Same as jump, but marks the end of an alternative. */
- jump_past_alt,
-
- /* Followed by two-byte relative address of place to resume at
- in case of failure. */
- on_failure_jump,
-
- /* Like on_failure_jump, but pushes a placeholder instead of the
- current string position when executed. */
- on_failure_keep_string_jump,
-
- /* Throw away latest failure point and then jump to following
- two-byte relative address. */
- pop_failure_jump,
-
- /* Change to pop_failure_jump if know won't have to backtrack to
- match; otherwise change to jump. This is used to jump
- back to the beginning of a repeat. If what follows this jump
- clearly won't match what the repeat does, such that we can be
- sure that there is no use backtracking out of repetitions
- already matched, then we change it to a pop_failure_jump.
- Followed by two-byte address. */
- maybe_pop_jump,
-
- /* Jump to following two-byte address, and push a dummy failure
- point. This failure point will be thrown away if an attempt
- is made to use it for a failure. A `+' construct makes this
- before the first repeat. Also used as an intermediary kind
- of jump when compiling an alternative. */
- dummy_failure_jump,
-
- /* Push a dummy failure point and continue. Used at the end of
- alternatives. */
- push_dummy_failure,
-
- /* Followed by two-byte relative address and two-byte number n.
- After matching N times, jump to the address upon failure. */
- succeed_n,
-
- /* Followed by two-byte relative address, and two-byte number n.
- Jump to the address N times, then fail. */
- jump_n,
-
- /* Set the following two-byte relative address to the
- subsequent two-byte number. The address *includes* the two
- bytes of number. */
- set_number_at,
-
- wordchar, /* Matches any word-constituent character. */
- notwordchar, /* Matches any char that is not a word-constituent. */
-
- wordbeg, /* Succeeds if at word beginning. */
- wordend, /* Succeeds if at word end. */
-
- wordbound, /* Succeeds if at a word boundary. */
- notwordbound /* Succeeds if not at a word boundary. */
-
-#ifdef emacs
- ,before_dot, /* Succeeds if before point. */
- at_dot, /* Succeeds if at point. */
- after_dot, /* Succeeds if after point. */
-
- /* Matches any character whose syntax is specified. Followed by
- a byte which contains a syntax code, e.g., Sword. */
- syntaxspec,
-
- /* Matches any character whose syntax is not that specified. */
- notsyntaxspec
-#endif /* emacs */
-} re_opcode_t;
-
-/* Common operations on the compiled pattern. */
-
-/* Store NUMBER in two contiguous bytes starting at DESTINATION. */
-
-#define STORE_NUMBER(destination, number) \
- do { \
- (destination)[0] = (number) & 0377; \
- (destination)[1] = (number) >> 8; \
- } while (0)
-
-/* Same as STORE_NUMBER, except increment DESTINATION to
- the byte after where the number is stored. Therefore, DESTINATION
- must be an lvalue. */
-
-#define STORE_NUMBER_AND_INCR(destination, number) \
- do { \
- STORE_NUMBER (destination, number); \
- (destination) += 2; \
- } while (0)
-
-/* Put into DESTINATION a number stored in two contiguous bytes starting
- at SOURCE. */
-
-#define EXTRACT_NUMBER(destination, source) \
- do { \
- (destination) = *(source) & 0377; \
- (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
- } while (0)
-
-#ifdef DEBUG
-static void extract_number _RE_ARGS ((int *dest, unsigned char *source));
-static void
-extract_number (dest, source)
- int *dest;
- unsigned char *source;
-{
- int temp = SIGN_EXTEND_CHAR (*(source + 1));
- *dest = *source & 0377;
- *dest += temp << 8;
-}
-
-# ifndef EXTRACT_MACROS /* To debug the macros. */
-# undef EXTRACT_NUMBER
-# define EXTRACT_NUMBER(dest, src) extract_number (&dest, src)
-# endif /* not EXTRACT_MACROS */
-
-#endif /* DEBUG */
-
-/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
- SOURCE must be an lvalue. */
-
-#define EXTRACT_NUMBER_AND_INCR(destination, source) \
- do { \
- EXTRACT_NUMBER (destination, source); \
- (source) += 2; \
- } while (0)
-
-#ifdef DEBUG
-static void extract_number_and_incr _RE_ARGS ((int *destination,
- unsigned char **source));
-static void
-extract_number_and_incr (destination, source)
- int *destination;
- unsigned char **source;
-{
- extract_number (destination, *source);
- *source += 2;
-}
-
-# ifndef EXTRACT_MACROS
-# undef EXTRACT_NUMBER_AND_INCR
-# define EXTRACT_NUMBER_AND_INCR(dest, src) \
- extract_number_and_incr (&dest, &src)
-# endif /* not EXTRACT_MACROS */
-
-#endif /* DEBUG */
-
-/* If DEBUG is defined, Regex prints many voluminous messages about what
- it is doing (if the variable `debug' is nonzero). If linked with the
- main program in `iregex.c', you can enter patterns and strings
- interactively. And if linked with the main program in `main.c' and
- the other test files, you can run the already-written tests. */
-
-#ifdef DEBUG
-
-/* We use standard I/O for debugging. */
-# include <stdio.h>
-
-/* It is useful to test things that ``must'' be true when debugging. */
-# include <assert.h>
-
-static int debug;
-
-# define DEBUG_STATEMENT(e) e
-# define DEBUG_PRINT1(x) if (debug) printf (x)
-# define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
-# define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
-# define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
-# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \
- if (debug) print_partial_compiled_pattern (s, e)
-# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \
- if (debug) print_double_string (w, s1, sz1, s2, sz2)
-
-
-/* Print the fastmap in human-readable form. */
-
-void
-print_fastmap (fastmap)
- char *fastmap;
-{
- unsigned was_a_range = 0;
- unsigned i = 0;
-
- while (i < (1 << BYTEWIDTH))
- {
- if (fastmap[i++])
- {
- was_a_range = 0;
- putchar (i - 1);
- while (i < (1 << BYTEWIDTH) && fastmap[i])
- {
- was_a_range = 1;
- i++;
- }
- if (was_a_range)
- {
- printf ("-");
- putchar (i - 1);
- }
- }
- }
- putchar ('\n');
-}
-
-
-/* Print a compiled pattern string in human-readable form, starting at
- the START pointer into it and ending just before the pointer END. */
-
-void
-print_partial_compiled_pattern (start, end)
- unsigned char *start;
- unsigned char *end;
-{
- int mcnt, mcnt2;
- unsigned char *p1;
- unsigned char *p = start;
- unsigned char *pend = end;
-
- if (start == NULL)
- {
- printf ("(null)\n");
- return;
- }
-
- /* Loop over pattern commands. */
- while (p < pend)
- {
- printf ("%d:\t", p - start);
-
- switch ((re_opcode_t) *p++)
- {
- case no_op:
- printf ("/no_op");
- break;
-
- case exactn:
- mcnt = *p++;
- printf ("/exactn/%d", mcnt);
- do
- {
- putchar ('/');
- putchar (*p++);
- }
- while (--mcnt);
- break;
-
- case start_memory:
- mcnt = *p++;
- printf ("/start_memory/%d/%d", mcnt, *p++);
- break;
-
- case stop_memory:
- mcnt = *p++;
- printf ("/stop_memory/%d/%d", mcnt, *p++);
- break;
-
- case duplicate:
- printf ("/duplicate/%d", *p++);
- break;
-
- case anychar:
- printf ("/anychar");
- break;
-
- case charset:
- case charset_not:
- {
- register int c, last = -100;
- register int in_range = 0;
-
- printf ("/charset [%s",
- (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
-
- assert (p + *p < pend);
-
- for (c = 0; c < 256; c++)
- if (c / 8 < *p
- && (p[1 + (c/8)] & (1 << (c % 8))))
- {
- /* Are we starting a range? */
- if (last + 1 == c && ! in_range)
- {
- putchar ('-');
- in_range = 1;
- }
- /* Have we broken a range? */
- else if (last + 1 != c && in_range)
- {
- putchar (last);
- in_range = 0;
- }
-
- if (! in_range)
- putchar (c);
-
- last = c;
- }
-
- if (in_range)
- putchar (last);
-
- putchar (']');
-
- p += 1 + *p;
- }
- break;
-
- case begline:
- printf ("/begline");
- break;
-
- case endline:
- printf ("/endline");
- break;
-
- case on_failure_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/on_failure_jump to %d", p + mcnt - start);
- break;
-
- case on_failure_keep_string_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/on_failure_keep_string_jump to %d", p + mcnt - start);
- break;
-
- case dummy_failure_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/dummy_failure_jump to %d", p + mcnt - start);
- break;
-
- case push_dummy_failure:
- printf ("/push_dummy_failure");
- break;
-
- case maybe_pop_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/maybe_pop_jump to %d", p + mcnt - start);
- break;
-
- case pop_failure_jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/pop_failure_jump to %d", p + mcnt - start);
- break;
-
- case jump_past_alt:
- extract_number_and_incr (&mcnt, &p);
- printf ("/jump_past_alt to %d", p + mcnt - start);
- break;
-
- case jump:
- extract_number_and_incr (&mcnt, &p);
- printf ("/jump to %d", p + mcnt - start);
- break;
-
- case succeed_n:
- extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
- extract_number_and_incr (&mcnt2, &p);
- printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
- break;
-
- case jump_n:
- extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
- extract_number_and_incr (&mcnt2, &p);
- printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
- break;
-
- case set_number_at:
- extract_number_and_incr (&mcnt, &p);
- p1 = p + mcnt;
- extract_number_and_incr (&mcnt2, &p);
- printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
- break;
-
- case wordbound:
- printf ("/wordbound");
- break;
-
- case notwordbound:
- printf ("/notwordbound");
- break;
-
- case wordbeg:
- printf ("/wordbeg");
- break;
-
- case wordend:
- printf ("/wordend");
-
-# ifdef emacs
- case before_dot:
- printf ("/before_dot");
- break;
-
- case at_dot:
- printf ("/at_dot");
- break;
-
- case after_dot:
- printf ("/after_dot");
- break;
-
- case syntaxspec:
- printf ("/syntaxspec");
- mcnt = *p++;
- printf ("/%d", mcnt);
- break;
-
- case notsyntaxspec:
- printf ("/notsyntaxspec");
- mcnt = *p++;
- printf ("/%d", mcnt);
- break;
-# endif /* emacs */
-
- case wordchar:
- printf ("/wordchar");
- break;
-
- case notwordchar:
- printf ("/notwordchar");
- break;
-
- case begbuf:
- printf ("/begbuf");
- break;
-
- case endbuf:
- printf ("/endbuf");
- break;
-
- default:
- printf ("?%d", *(p-1));
- }
-
- putchar ('\n');
- }
-
- printf ("%d:\tend of pattern.\n", p - start);
-}
-
-
-void
-print_compiled_pattern (bufp)
- struct re_pattern_buffer *bufp;
-{
- unsigned char *buffer = bufp->buffer;
-
- print_partial_compiled_pattern (buffer, buffer + bufp->used);
- printf ("%ld bytes used/%ld bytes allocated.\n",
- bufp->used, bufp->allocated);
-
- if (bufp->fastmap_accurate && bufp->fastmap)
- {
- printf ("fastmap: ");
- print_fastmap (bufp->fastmap);
- }
-
- printf ("re_nsub: %d\t", bufp->re_nsub);
- printf ("regs_alloc: %d\t", bufp->regs_allocated);
- printf ("can_be_null: %d\t", bufp->can_be_null);
- printf ("newline_anchor: %d\n", bufp->newline_anchor);
- printf ("no_sub: %d\t", bufp->no_sub);
- printf ("not_bol: %d\t", bufp->not_bol);
- printf ("not_eol: %d\t", bufp->not_eol);
- printf ("syntax: %lx\n", bufp->syntax);
- /* Perhaps we should print the translate table? */
-}
-
-
-void
-print_double_string (where, string1, size1, string2, size2)
- const char *where;
- const char *string1;
- const char *string2;
- int size1;
- int size2;
-{
- int this_char;
-
- if (where == NULL)
- printf ("(null)");
- else
- {
- if (FIRST_STRING_P (where))
- {
- for (this_char = where - string1; this_char < size1; this_char++)
- putchar (string1[this_char]);
-
- where = string2;
- }
-
- for (this_char = where - string2; this_char < size2; this_char++)
- putchar (string2[this_char]);
- }
-}
-
-void
-printchar (c)
- int c;
-{
- putc (c, stderr);
-}
-
-#else /* not DEBUG */
-
-# undef assert
-# define assert(e)
-
-# define DEBUG_STATEMENT(e)
-# define DEBUG_PRINT1(x)
-# define DEBUG_PRINT2(x1, x2)
-# define DEBUG_PRINT3(x1, x2, x3)
-# define DEBUG_PRINT4(x1, x2, x3, x4)
-# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
-# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
-
-#endif /* not DEBUG */
-
-/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
- also be assigned to arbitrarily: each pattern buffer stores its own
- syntax, so it can be changed between regex compilations. */
-/* This has no initializer because initialized variables in Emacs
- become read-only after dumping. */
-reg_syntax_t re_syntax_options;
-
-
-/* Specify the precise syntax of regexps for compilation. This provides
- for compatibility for various utilities which historically have
- different, incompatible syntaxes.
-
- The argument SYNTAX is a bit mask comprised of the various bits
- defined in regex.h. We return the old syntax. */
-
-reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
-{
- reg_syntax_t ret = re_syntax_options;
-
- re_syntax_options = syntax;
-#ifdef DEBUG
- if (syntax & RE_DEBUG)
- debug = 1;
- else if (debug) /* was on but now is not */
- debug = 0;
-#endif /* DEBUG */
- return ret;
-}
-#ifdef _LIBC
-weak_alias (__re_set_syntax, re_set_syntax)
-#endif
-
-/* This table gives an error message for each of the error codes listed
- in regex.h. Obviously the order here has to be same as there.
- POSIX doesn't require that we do anything for REG_NOERROR,
- but why not be nice? */
-
-static const char re_error_msgid[] =
- {
-#define REG_NOERROR_IDX 0
- gettext_noop ("Success") /* REG_NOERROR */
- "\0"
-#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
- gettext_noop ("No match") /* REG_NOMATCH */
- "\0"
-#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
- gettext_noop ("Invalid regular expression") /* REG_BADPAT */
- "\0"
-#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
- gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
- "\0"
-#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
- gettext_noop ("Invalid character class name") /* REG_ECTYPE */
- "\0"
-#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name")
- gettext_noop ("Trailing backslash") /* REG_EESCAPE */
- "\0"
-#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash")
- gettext_noop ("Invalid back reference") /* REG_ESUBREG */
- "\0"
-#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
- gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
- "\0"
-#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
- gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
- "\0"
-#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
- gettext_noop ("Unmatched \\{") /* REG_EBRACE */
- "\0"
-#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{")
- gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
- "\0"
-#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
- gettext_noop ("Invalid range end") /* REG_ERANGE */
- "\0"
-#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
- gettext_noop ("Memory exhausted") /* REG_ESPACE */
- "\0"
-#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
- gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
- "\0"
-#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
- gettext_noop ("Premature end of regular expression") /* REG_EEND */
- "\0"
-#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression")
- gettext_noop ("Regular expression too big") /* REG_ESIZE */
- "\0"
-#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big")
- gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
- };
-
-static const size_t re_error_msgid_idx[] =
- {
- REG_NOERROR_IDX,
- REG_NOMATCH_IDX,
- REG_BADPAT_IDX,
- REG_ECOLLATE_IDX,
- REG_ECTYPE_IDX,
- REG_EESCAPE_IDX,
- REG_ESUBREG_IDX,
- REG_EBRACK_IDX,
- REG_EPAREN_IDX,
- REG_EBRACE_IDX,
- REG_BADBR_IDX,
- REG_ERANGE_IDX,
- REG_ESPACE_IDX,
- REG_BADRPT_IDX,
- REG_EEND_IDX,
- REG_ESIZE_IDX,
- REG_ERPAREN_IDX
- };
-
-/* Avoiding alloca during matching, to placate r_alloc. */
-
-/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the
- searching and matching functions should not call alloca. On some
- systems, alloca is implemented in terms of malloc, and if we're
- using the relocating allocator routines, then malloc could cause a
- relocation, which might (if the strings being searched are in the
- ralloc heap) shift the data out from underneath the regexp
- routines.
-
- Here's another reason to avoid allocation: Emacs
- processes input from X in a signal handler; processing X input may
- call malloc; if input arrives while a matching routine is calling
- malloc, then we're scrod. But Emacs can't just block input while
- calling matching routines; then we don't notice interrupts when
- they come in. So, Emacs blocks input around all regexp calls
- except the matching calls, which it leaves unprotected, in the
- faith that they will not malloc. */
-
-/* Normally, this is fine. */
-#define MATCH_MAY_ALLOCATE
-
-/* When using GNU C, we are not REALLY using the C alloca, no matter
- what config.h may say. So don't take precautions for it. */
-#ifdef __GNUC__
-# undef C_ALLOCA
-#endif
-
-/* The match routines may not allocate if (1) they would do it with malloc
- and (2) it's not safe for them to use malloc.
- Note that if REL_ALLOC is defined, matching would not use malloc for the
- failure stack, but we would still use it for the register vectors;
- so REL_ALLOC should not affect this. */
-#if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
-# undef MATCH_MAY_ALLOCATE
-#endif
-
-
-/* Failure stack declarations and macros; both re_compile_fastmap and
- re_match_2 use a failure stack. These have to be macros because of
- REGEX_ALLOCATE_STACK. */
-
-
-/* Number of failure points for which to initially allocate space
- when matching. If this number is exceeded, we allocate more
- space, so it is not a hard limit. */
-#ifndef INIT_FAILURE_ALLOC
-# define INIT_FAILURE_ALLOC 5
-#endif
-
-/* Roughly the maximum number of failure points on the stack. Would be
- exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
- This is a variable only so users of regex can assign to it; we never
- change it ourselves. */
-
-#ifdef INT_IS_16BIT
-
-# if defined MATCH_MAY_ALLOCATE
-/* 4400 was enough to cause a crash on Alpha OSF/1,
- whose default stack limit is 2mb. */
-long int re_max_failures = 4000;
-# else
-long int re_max_failures = 2000;
-# endif
-
-union fail_stack_elt
-{
- unsigned char *pointer;
- long int integer;
-};
-
-typedef union fail_stack_elt fail_stack_elt_t;
-
-typedef struct
-{
- fail_stack_elt_t *stack;
- unsigned long int size;
- unsigned long int avail; /* Offset of next open position. */
-} fail_stack_type;
-
-#else /* not INT_IS_16BIT */
-
-# if defined MATCH_MAY_ALLOCATE
-/* 4400 was enough to cause a crash on Alpha OSF/1,
- whose default stack limit is 2mb. */
-int re_max_failures = 20000;
-# else
-int re_max_failures = 2000;
-# endif
-
-union fail_stack_elt
-{
- unsigned char *pointer;
- int integer;
-};
-
-typedef union fail_stack_elt fail_stack_elt_t;
-
-typedef struct
-{
- fail_stack_elt_t *stack;
- unsigned size;
- unsigned avail; /* Offset of next open position. */
-} fail_stack_type;
-
-#endif /* INT_IS_16BIT */
-
-#define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
-#define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
-#define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
-
-
-/* Define macros to initialize and free the failure stack.
- Do `return -2' if the alloc fails. */
-
-#ifdef MATCH_MAY_ALLOCATE
-# define INIT_FAIL_STACK() \
- do { \
- fail_stack.stack = (fail_stack_elt_t *) \
- REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \
- \
- if (fail_stack.stack == NULL) \
- return -2; \
- \
- fail_stack.size = INIT_FAILURE_ALLOC; \
- fail_stack.avail = 0; \
- } while (0)
-
-# define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack)
-#else
-# define INIT_FAIL_STACK() \
- do { \
- fail_stack.avail = 0; \
- } while (0)
-
-# define RESET_FAIL_STACK()
-#endif
-
-
-/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
-
- Return 1 if succeeds, and 0 if either ran out of memory
- allocating space for it or it was already too large.
-
- REGEX_REALLOCATE_STACK requires `destination' be declared. */
-
-#define DOUBLE_FAIL_STACK(fail_stack) \
- ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
- ? 0 \
- : ((fail_stack).stack = (fail_stack_elt_t *) \
- REGEX_REALLOCATE_STACK ((fail_stack).stack, \
- (fail_stack).size * sizeof (fail_stack_elt_t), \
- ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \
- \
- (fail_stack).stack == NULL \
- ? 0 \
- : ((fail_stack).size <<= 1, \
- 1)))
-
-
-/* Push pointer POINTER on FAIL_STACK.
- Return 1 if was able to do so and 0 if ran out of memory allocating
- space to do so. */
-#define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \
- ((FAIL_STACK_FULL () \
- && !DOUBLE_FAIL_STACK (FAIL_STACK)) \
- ? 0 \
- : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \
- 1))
-
-/* Push a pointer value onto the failure stack.
- Assumes the variable `fail_stack'. Probably should only
- be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_POINTER(item) \
- fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item)
-
-/* This pushes an integer-valued item onto the failure stack.
- Assumes the variable `fail_stack'. Probably should only
- be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_INT(item) \
- fail_stack.stack[fail_stack.avail++].integer = (item)
-
-/* Push a fail_stack_elt_t value onto the failure stack.
- Assumes the variable `fail_stack'. Probably should only
- be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_ELT(item) \
- fail_stack.stack[fail_stack.avail++] = (item)
-
-/* These three POP... operations complement the three PUSH... operations.
- All assume that `fail_stack' is nonempty. */
-#define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
-#define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
-#define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
-
-/* Used to omit pushing failure point id's when we're not debugging. */
-#ifdef DEBUG
-# define DEBUG_PUSH PUSH_FAILURE_INT
-# define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT ()
-#else
-# define DEBUG_PUSH(item)
-# define DEBUG_POP(item_addr)
-#endif
-
-
-/* Push the information about the state we will need
- if we ever fail back to it.
-
- Requires variables fail_stack, regstart, regend, reg_info, and
- num_regs_pushed be declared. DOUBLE_FAIL_STACK requires `destination'
- be declared.
-
- Does `return FAILURE_CODE' if runs out of memory. */
-
-#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
- do { \
- char *destination; \
- /* Must be int, so when we don't save any registers, the arithmetic \
- of 0 + -1 isn't done as unsigned. */ \
- /* Can't be int, since there is not a shred of a guarantee that int \
- is wide enough to hold a value of something to which pointer can \
- be assigned */ \
- active_reg_t this_reg; \
- \
- DEBUG_STATEMENT (failure_id++); \
- DEBUG_STATEMENT (nfailure_points_pushed++); \
- DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \
- DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\
- DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\
- \
- DEBUG_PRINT2 (" slots needed: %ld\n", NUM_FAILURE_ITEMS); \
- DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \
- \
- /* Ensure we have enough space allocated for what we will push. */ \
- while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
- { \
- if (!DOUBLE_FAIL_STACK (fail_stack)) \
- return failure_code; \
- \
- DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
- (fail_stack).size); \
- DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\
- } \
- \
- /* Push the info, starting with the registers. */ \
- DEBUG_PRINT1 ("\n"); \
- \
- if (1) \
- for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
- this_reg++) \
- { \
- DEBUG_PRINT2 (" Pushing reg: %lu\n", this_reg); \
- DEBUG_STATEMENT (num_regs_pushed++); \
- \
- DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
- PUSH_FAILURE_POINTER (regstart[this_reg]); \
- \
- DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
- PUSH_FAILURE_POINTER (regend[this_reg]); \
- \
- DEBUG_PRINT2 (" info: %p\n ", \
- reg_info[this_reg].word.pointer); \
- DEBUG_PRINT2 (" match_null=%d", \
- REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
- DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
- DEBUG_PRINT2 (" matched_something=%d", \
- MATCHED_SOMETHING (reg_info[this_reg])); \
- DEBUG_PRINT2 (" ever_matched=%d", \
- EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
- DEBUG_PRINT1 ("\n"); \
- PUSH_FAILURE_ELT (reg_info[this_reg].word); \
- } \
- \
- DEBUG_PRINT2 (" Pushing low active reg: %ld\n", lowest_active_reg);\
- PUSH_FAILURE_INT (lowest_active_reg); \
- \
- DEBUG_PRINT2 (" Pushing high active reg: %ld\n", highest_active_reg);\
- PUSH_FAILURE_INT (highest_active_reg); \
- \
- DEBUG_PRINT2 (" Pushing pattern %p:\n", pattern_place); \
- DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
- PUSH_FAILURE_POINTER (pattern_place); \
- \
- DEBUG_PRINT2 (" Pushing string %p: `", string_place); \
- DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
- size2); \
- DEBUG_PRINT1 ("'\n"); \
- PUSH_FAILURE_POINTER (string_place); \
- \
- DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
- DEBUG_PUSH (failure_id); \
- } while (0)
-
-/* This is the number of items that are pushed and popped on the stack
- for each register. */
-#define NUM_REG_ITEMS 3
-
-/* Individual items aside from the registers. */
-#ifdef DEBUG
-# define NUM_NONREG_ITEMS 5 /* Includes failure point id. */
-#else
-# define NUM_NONREG_ITEMS 4
-#endif
-
-/* We push at most this many items on the stack. */
-/* We used to use (num_regs - 1), which is the number of registers
- this regexp will save; but that was changed to 5
- to avoid stack overflow for a regexp with lots of parens. */
-#define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
-
-/* We actually push this many items. */
-#define NUM_FAILURE_ITEMS \
- (((0 \
- ? 0 : highest_active_reg - lowest_active_reg + 1) \
- * NUM_REG_ITEMS) \
- + NUM_NONREG_ITEMS)
-
-/* How many items can still be added to the stack without overflowing it. */
-#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
-
-
-/* Pops what PUSH_FAIL_STACK pushes.
-
- We restore into the parameters, all of which should be lvalues:
- STR -- the saved data position.
- PAT -- the saved pattern position.
- LOW_REG, HIGH_REG -- the highest and lowest active registers.
- REGSTART, REGEND -- arrays of string positions.
- REG_INFO -- array of information about each subexpression.
-
- Also assumes the variables `fail_stack' and (if debugging), `bufp',
- `pend', `string1', `size1', `string2', and `size2'. */
-
-#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
-{ \
- DEBUG_STATEMENT (unsigned failure_id;) \
- active_reg_t this_reg; \
- const unsigned char *string_temp; \
- \
- assert (!FAIL_STACK_EMPTY ()); \
- \
- /* Remove failure points and point to how many regs pushed. */ \
- DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \
- DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \
- DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \
- \
- assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
- \
- DEBUG_POP (&failure_id); \
- DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \
- \
- /* If the saved string location is NULL, it came from an \
- on_failure_keep_string_jump opcode, and we want to throw away the \
- saved NULL, thus retaining our current position in the string. */ \
- string_temp = POP_FAILURE_POINTER (); \
- if (string_temp != NULL) \
- str = (const char *) string_temp; \
- \
- DEBUG_PRINT2 (" Popping string %p: `", str); \
- DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
- DEBUG_PRINT1 ("'\n"); \
- \
- pat = (unsigned char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" Popping pattern %p:\n", pat); \
- DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
- \
- /* Restore register info. */ \
- high_reg = (active_reg_t) POP_FAILURE_INT (); \
- DEBUG_PRINT2 (" Popping high active reg: %ld\n", high_reg); \
- \
- low_reg = (active_reg_t) POP_FAILURE_INT (); \
- DEBUG_PRINT2 (" Popping low active reg: %ld\n", low_reg); \
- \
- if (1) \
- for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
- { \
- DEBUG_PRINT2 (" Popping reg: %ld\n", this_reg); \
- \
- reg_info[this_reg].word = POP_FAILURE_ELT (); \
- DEBUG_PRINT2 (" info: %p\n", \
- reg_info[this_reg].word.pointer); \
- \
- regend[this_reg] = (const char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
- \
- regstart[this_reg] = (const char *) POP_FAILURE_POINTER (); \
- DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
- } \
- else \
- { \
- for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
- { \
- reg_info[this_reg].word.integer = 0; \
- regend[this_reg] = 0; \
- regstart[this_reg] = 0; \
- } \
- highest_active_reg = high_reg; \
- } \
- \
- set_regs_matched_done = 0; \
- DEBUG_STATEMENT (nfailure_points_popped++); \
-} /* POP_FAILURE_POINT */
-
-
-
-/* Structure for per-register (a.k.a. per-group) information.
- Other register information, such as the
- starting and ending positions (which are addresses), and the list of
- inner groups (which is a bits list) are maintained in separate
- variables.
-
- We are making a (strictly speaking) nonportable assumption here: that
- the compiler will pack our bit fields into something that fits into
- the type of `word', i.e., is something that fits into one item on the
- failure stack. */
-
-
-/* Declarations and macros for re_match_2. */
-
-typedef union
-{
- fail_stack_elt_t word;
- struct
- {
- /* This field is one if this group can match the empty string,
- zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
-#define MATCH_NULL_UNSET_VALUE 3
- unsigned match_null_string_p : 2;
- unsigned is_active : 1;
- unsigned matched_something : 1;
- unsigned ever_matched_something : 1;
- } bits;
-} register_info_type;
-
-#define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p)
-#define IS_ACTIVE(R) ((R).bits.is_active)
-#define MATCHED_SOMETHING(R) ((R).bits.matched_something)
-#define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something)
-
-
-/* Call this when have matched a real character; it sets `matched' flags
- for the subexpressions which we are currently inside. Also records
- that those subexprs have matched. */
-#define SET_REGS_MATCHED() \
- do \
- { \
- if (!set_regs_matched_done) \
- { \
- active_reg_t r; \
- set_regs_matched_done = 1; \
- for (r = lowest_active_reg; r <= highest_active_reg; r++) \
- { \
- MATCHED_SOMETHING (reg_info[r]) \
- = EVER_MATCHED_SOMETHING (reg_info[r]) \
- = 1; \
- } \
- } \
- } \
- while (0)
-
-/* Registers are set to a sentinel when they haven't yet matched. */
-static char reg_unset_dummy;
-#define REG_UNSET_VALUE (&reg_unset_dummy)
-#define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
-
-/* Subroutine declarations and macros for regex_compile. */
-
-static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-static void store_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, int arg));
-static void store_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2));
-static void insert_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg, unsigned char *end));
-static void insert_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2, unsigned char *end));
-static boolean at_begline_loc_p _RE_ARGS ((const char *pattern, const char *p,
- reg_syntax_t syntax));
-static boolean at_endline_loc_p _RE_ARGS ((const char *p, const char *pend,
- reg_syntax_t syntax));
-static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
- const char *pend,
- char *translate,
- reg_syntax_t syntax,
- unsigned char *b));
-
-/* Fetch the next character in the uncompiled pattern---translating it
- if necessary. Also cast from a signed character in the constant
- string passed to us by the user to an unsigned char that we can use
- as an array index (in, e.g., `translate'). */
-#ifndef PATFETCH
-# define PATFETCH(c) \
- do {if (p == pend) return REG_EEND; \
- c = (unsigned char) *p++; \
- if (translate) c = (unsigned char) translate[c]; \
- } while (0)
-#endif
-
-/* Fetch the next character in the uncompiled pattern, with no
- translation. */
-#define PATFETCH_RAW(c) \
- do {if (p == pend) return REG_EEND; \
- c = (unsigned char) *p++; \
- } while (0)
-
-/* Go backwards one character in the pattern. */
-#define PATUNFETCH p--
-
-
-/* If `translate' is non-null, return translate[D], else just D. We
- cast the subscript to translate because some data is declared as
- `char *', to avoid warnings when a string constant is passed. But
- when we use a character as a subscript we must make it unsigned. */
-#ifndef TRANSLATE
-# define TRANSLATE(d) \
- (translate ? (char) translate[(unsigned char) (d)] : (d))
-#endif
-
-
-/* Macros for outputting the compiled pattern into `buffer'. */
-
-/* If the buffer isn't allocated when it comes in, use this. */
-#define INIT_BUF_SIZE 32
-
-/* Make sure we have at least N more bytes of space in buffer. */
-#define GET_BUFFER_SPACE(n) \
- while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
- EXTEND_BUFFER ()
-
-/* Make sure we have one more byte of buffer space and then add C to it. */
-#define BUF_PUSH(c) \
- do { \
- GET_BUFFER_SPACE (1); \
- *b++ = (unsigned char) (c); \
- } while (0)
-
-
-/* Ensure we have two more bytes of buffer space and then append C1 and C2. */
-#define BUF_PUSH_2(c1, c2) \
- do { \
- GET_BUFFER_SPACE (2); \
- *b++ = (unsigned char) (c1); \
- *b++ = (unsigned char) (c2); \
- } while (0)
-
-
-/* As with BUF_PUSH_2, except for three bytes. */
-#define BUF_PUSH_3(c1, c2, c3) \
- do { \
- GET_BUFFER_SPACE (3); \
- *b++ = (unsigned char) (c1); \
- *b++ = (unsigned char) (c2); \
- *b++ = (unsigned char) (c3); \
- } while (0)
-
-
-/* Store a jump with opcode OP at LOC to location TO. We store a
- relative address offset by the three bytes the jump itself occupies. */
-#define STORE_JUMP(op, loc, to) \
- store_op1 (op, loc, (int) ((to) - (loc) - 3))
-
-/* Likewise, for a two-argument jump. */
-#define STORE_JUMP2(op, loc, to, arg) \
- store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
-
-/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
-#define INSERT_JUMP(op, loc, to) \
- insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
-
-/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
-#define INSERT_JUMP2(op, loc, to, arg) \
- insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
-
-
-/* This is not an arbitrary limit: the arguments which represent offsets
- into the pattern are two bytes long. So if 2^16 bytes turns out to
- be too small, many things would have to change. */
-/* Any other compiler which, like MSC, has allocation limit below 2^16
- bytes will have to use approach similar to what was done below for
- MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
- reallocating to 0 bytes. Such thing is not going to work too well.
- You have been warned!! */
-#if defined _MSC_VER && !defined WIN32
-/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
- The REALLOC define eliminates a flurry of conversion warnings,
- but is not required. */
-# define MAX_BUF_SIZE 65500L
-# define REALLOC(p,s) realloc ((p), (size_t) (s))
-#else
-# define MAX_BUF_SIZE (1L << 16)
-# define REALLOC(p,s) realloc ((p), (s))
-#endif
-
-/* Extend the buffer by twice its current size via realloc and
- reset the pointers that pointed into the old block to point to the
- correct places in the new one. If extending the buffer results in it
- being larger than MAX_BUF_SIZE, then flag memory exhausted. */
-#define EXTEND_BUFFER() \
- do { \
- unsigned char *old_buffer = bufp->buffer; \
- if (bufp->allocated == MAX_BUF_SIZE) \
- return REG_ESIZE; \
- bufp->allocated <<= 1; \
- if (bufp->allocated > MAX_BUF_SIZE) \
- bufp->allocated = MAX_BUF_SIZE; \
- bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
- if (bufp->buffer == NULL) \
- return REG_ESPACE; \
- /* If the buffer moved, move all the pointers into it. */ \
- if (old_buffer != bufp->buffer) \
- { \
- b = (b - old_buffer) + bufp->buffer; \
- begalt = (begalt - old_buffer) + bufp->buffer; \
- if (fixup_alt_jump) \
- fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\
- if (laststart) \
- laststart = (laststart - old_buffer) + bufp->buffer; \
- if (pending_exact) \
- pending_exact = (pending_exact - old_buffer) + bufp->buffer; \
- } \
- } while (0)
-
-
-/* Since we have one byte reserved for the register number argument to
- {start,stop}_memory, the maximum number of groups we can report
- things about is what fits in that byte. */
-#define MAX_REGNUM 255
-
-/* But patterns can have more than `MAX_REGNUM' registers. We just
- ignore the excess. */
-typedef unsigned regnum_t;
-
-
-/* Macros for the compile stack. */
-
-/* Since offsets can go either forwards or backwards, this type needs to
- be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
-/* int may be not enough when sizeof(int) == 2. */
-typedef long pattern_offset_t;
-
-typedef struct
-{
- pattern_offset_t begalt_offset;
- pattern_offset_t fixup_alt_jump;
- pattern_offset_t inner_group_offset;
- pattern_offset_t laststart_offset;
- regnum_t regnum;
-} compile_stack_elt_t;
-
-
-typedef struct
-{
- compile_stack_elt_t *stack;
- unsigned size;
- unsigned avail; /* Offset of next open position. */
-} compile_stack_type;
-
-
-#define INIT_COMPILE_STACK_SIZE 32
-
-#define COMPILE_STACK_EMPTY (compile_stack.avail == 0)
-#define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size)
-
-/* The next available element. */
-#define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
-
-
-/* Set the bit for character C in a list. */
-#define SET_LIST_BIT(c) \
- (b[((unsigned char) (c)) / BYTEWIDTH] \
- |= 1 << (((unsigned char) c) % BYTEWIDTH))
-
-
-/* Get the next unsigned number in the uncompiled pattern. */
-#define GET_UNSIGNED_NUMBER(num) \
- { if (p != pend) \
- { \
- PATFETCH (c); \
- while (ISDIGIT (c)) \
- { \
- if (num < 0) \
- num = 0; \
- num = num * 10 + c - '0'; \
- if (p == pend) \
- break; \
- PATFETCH (c); \
- } \
- } \
- }
-
-#if defined _LIBC || WIDE_CHAR_SUPPORT
-/* The GNU C library provides support for user-defined character classes
- and the functions from ISO C amendement 1. */
-# ifdef CHARCLASS_NAME_MAX
-# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
-# else
-/* This shouldn't happen but some implementation might still have this
- problem. Use a reasonable default value. */
-# define CHAR_CLASS_MAX_LENGTH 256
-# endif
-
-# ifdef _LIBC
-# define IS_CHAR_CLASS(string) __wctype (string)
-# else
-# define IS_CHAR_CLASS(string) wctype (string)
-# endif
-#else
-# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
-
-# define IS_CHAR_CLASS(string) \
- (STREQ (string, "alpha") || STREQ (string, "upper") \
- || STREQ (string, "lower") || STREQ (string, "digit") \
- || STREQ (string, "alnum") || STREQ (string, "xdigit") \
- || STREQ (string, "space") || STREQ (string, "print") \
- || STREQ (string, "punct") || STREQ (string, "graph") \
- || STREQ (string, "cntrl") || STREQ (string, "blank"))
-#endif
-
-#ifndef MATCH_MAY_ALLOCATE
-
-/* If we cannot allocate large objects within re_match_2_internal,
- we make the fail stack and register vectors global.
- The fail stack, we grow to the maximum size when a regexp
- is compiled.
- The register vectors, we adjust in size each time we
- compile a regexp, according to the number of registers it needs. */
-
-static fail_stack_type fail_stack;
-
-/* Size with which the following vectors are currently allocated.
- That is so we can make them bigger as needed,
- but never make them smaller. */
-static int regs_allocated_size;
-
-static const char ** regstart, ** regend;
-static const char ** old_regstart, ** old_regend;
-static const char **best_regstart, **best_regend;
-static register_info_type *reg_info;
-static const char **reg_dummy;
-static register_info_type *reg_info_dummy;
-
-/* Make the register vectors big enough for NUM_REGS registers,
- but don't make them smaller. */
-
-static
-regex_grow_registers (num_regs)
- int num_regs;
-{
- if (num_regs > regs_allocated_size)
- {
- RETALLOC_IF (regstart, num_regs, const char *);
- RETALLOC_IF (regend, num_regs, const char *);
- RETALLOC_IF (old_regstart, num_regs, const char *);
- RETALLOC_IF (old_regend, num_regs, const char *);
- RETALLOC_IF (best_regstart, num_regs, const char *);
- RETALLOC_IF (best_regend, num_regs, const char *);
- RETALLOC_IF (reg_info, num_regs, register_info_type);
- RETALLOC_IF (reg_dummy, num_regs, const char *);
- RETALLOC_IF (reg_info_dummy, num_regs, register_info_type);
-
- regs_allocated_size = num_regs;
- }
-}
-
-#endif /* not MATCH_MAY_ALLOCATE */
-
-static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
- compile_stack,
- regnum_t regnum));
-
-/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
- Returns one of error codes defined in `regex.h', or zero for success.
-
- Assumes the `allocated' (and perhaps `buffer') and `translate'
- fields are set in BUFP on entry.
-
- If it succeeds, results are put in BUFP (if it returns an error, the
- contents of BUFP are undefined):
- `buffer' is the compiled pattern;
- `syntax' is set to SYNTAX;
- `used' is set to the length of the compiled pattern;
- `fastmap_accurate' is zero;
- `re_nsub' is the number of subexpressions in PATTERN;
- `not_bol' and `not_eol' are zero;
-
- The `fastmap' and `newline_anchor' fields are neither
- examined nor set. */
-
-/* Return, freeing storage we allocated. */
-#define FREE_STACK_RETURN(value) \
- return (free (compile_stack.stack), value)
-
-static reg_errcode_t
-regex_compile (pattern, size, syntax, bufp)
- const char *pattern;
- size_t size;
- reg_syntax_t syntax;
- struct re_pattern_buffer *bufp;
-{
- /* We fetch characters from PATTERN here. Even though PATTERN is
- `char *' (i.e., signed), we declare these variables as unsigned, so
- they can be reliably used as array indices. */
- register unsigned char c, c1;
-
- /* A random temporary spot in PATTERN. */
- const char *p1;
-
- /* Points to the end of the buffer, where we should append. */
- register unsigned char *b;
-
- /* Keeps track of unclosed groups. */
- compile_stack_type compile_stack;
-
- /* Points to the current (ending) position in the pattern. */
- const char *p = pattern;
- const char *pend = pattern + size;
-
- /* How to translate the characters in the pattern. */
- RE_TRANSLATE_TYPE translate = bufp->translate;
-
- /* Address of the count-byte of the most recently inserted `exactn'
- command. This makes it possible to tell if a new exact-match
- character can be added to that command or if the character requires
- a new `exactn' command. */
- unsigned char *pending_exact = 0;
-
- /* Address of start of the most recently finished expression.
- This tells, e.g., postfix * where to find the start of its
- operand. Reset at the beginning of groups and alternatives. */
- unsigned char *laststart = 0;
-
- /* Address of beginning of regexp, or inside of last group. */
- unsigned char *begalt;
-
- /* Place in the uncompiled pattern (i.e., the {) to
- which to go back if the interval is invalid. */
- const char *beg_interval;
-
- /* Address of the place where a forward jump should go to the end of
- the containing expression. Each alternative of an `or' -- except the
- last -- ends with a forward jump of this sort. */
- unsigned char *fixup_alt_jump = 0;
-
- /* Counts open-groups as they are encountered. Remembered for the
- matching close-group on the compile stack, so the same register
- number is put in the stop_memory as the start_memory. */
- regnum_t regnum = 0;
-
-#ifdef DEBUG
- DEBUG_PRINT1 ("\nCompiling pattern: ");
- if (debug)
- {
- unsigned debug_count;
-
- for (debug_count = 0; debug_count < size; debug_count++)
- putchar (pattern[debug_count]);
- putchar ('\n');
- }
-#endif /* DEBUG */
-
- /* Initialize the compile stack. */
- compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
- if (compile_stack.stack == NULL)
- return REG_ESPACE;
-
- compile_stack.size = INIT_COMPILE_STACK_SIZE;
- compile_stack.avail = 0;
-
- /* Initialize the pattern buffer. */
- bufp->syntax = syntax;
- bufp->fastmap_accurate = 0;
- bufp->not_bol = bufp->not_eol = 0;
-
- /* Set `used' to zero, so that if we return an error, the pattern
- printer (for debugging) will think there's no pattern. We reset it
- at the end. */
- bufp->used = 0;
-
- /* Always count groups, whether or not bufp->no_sub is set. */
- bufp->re_nsub = 0;
-
-#if !defined emacs && !defined SYNTAX_TABLE
- /* Initialize the syntax table. */
- init_syntax_once ();
-#endif
-
- if (bufp->allocated == 0)
- {
- if (bufp->buffer)
- { /* If zero allocated, but buffer is non-null, try to realloc
- enough space. This loses if buffer's address is bogus, but
- that is the user's responsibility. */
- RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char);
- }
- else
- { /* Caller did not allocate a buffer. Do it for them. */
- bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char);
- }
- if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE);
-
- bufp->allocated = INIT_BUF_SIZE;
- }
-
- begalt = b = bufp->buffer;
-
- /* Loop through the uncompiled pattern until we're at the end. */
- while (p != pend)
- {
- PATFETCH (c);
-
- switch (c)
- {
- case '^':
- {
- if ( /* If at start of pattern, it's an operator. */
- p == pattern + 1
- /* If context independent, it's an operator. */
- || syntax & RE_CONTEXT_INDEP_ANCHORS
- /* Otherwise, depends on what's come before. */
- || at_begline_loc_p (pattern, p, syntax))
- BUF_PUSH (begline);
- else
- goto normal_char;
- }
- break;
-
-
- case '$':
- {
- if ( /* If at end of pattern, it's an operator. */
- p == pend
- /* If context independent, it's an operator. */
- || syntax & RE_CONTEXT_INDEP_ANCHORS
- /* Otherwise, depends on what's next. */
- || at_endline_loc_p (p, pend, syntax))
- BUF_PUSH (endline);
- else
- goto normal_char;
- }
- break;
-
-
- case '+':
- case '?':
- if ((syntax & RE_BK_PLUS_QM)
- || (syntax & RE_LIMITED_OPS))
- goto normal_char;
- handle_plus:
- case '*':
- /* If there is no previous pattern... */
- if (!laststart)
- {
- if (syntax & RE_CONTEXT_INVALID_OPS)
- FREE_STACK_RETURN (REG_BADRPT);
- else if (!(syntax & RE_CONTEXT_INDEP_OPS))
- goto normal_char;
- }
-
- {
- /* Are we optimizing this jump? */
- boolean keep_string_p = false;
-
- /* 1 means zero (many) matches is allowed. */
- char zero_times_ok = 0, many_times_ok = 0;
-
- /* If there is a sequence of repetition chars, collapse it
- down to just one (the right one). We can't combine
- interval operators with these because of, e.g., `a{2}*',
- which should only match an even number of `a's. */
-
- for (;;)
- {
- zero_times_ok |= c != '+';
- many_times_ok |= c != '?';
-
- if (p == pend)
- break;
-
- PATFETCH (c);
-
- if (c == '*'
- || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
- ;
-
- else if (syntax & RE_BK_PLUS_QM && c == '\\')
- {
- if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-
- PATFETCH (c1);
- if (!(c1 == '+' || c1 == '?'))
- {
- PATUNFETCH;
- PATUNFETCH;
- break;
- }
-
- c = c1;
- }
- else
- {
- PATUNFETCH;
- break;
- }
-
- /* If we get here, we found another repeat character. */
- }
-
- /* Star, etc. applied to an empty pattern is equivalent
- to an empty pattern. */
- if (!laststart)
- break;
-
- /* Now we know whether or not zero matches is allowed
- and also whether or not two or more matches is allowed. */
- if (many_times_ok)
- { /* More than one repetition is allowed, so put in at the
- end a backward relative jump from `b' to before the next
- jump we're going to put in below (which jumps from
- laststart to after this jump).
-
- But if we are at the `*' in the exact sequence `.*\n',
- insert an unconditional jump backwards to the .,
- instead of the beginning of the loop. This way we only
- push a failure point once, instead of every time
- through the loop. */
- assert (p - 1 > pattern);
-
- /* Allocate the space for the jump. */
- GET_BUFFER_SPACE (3);
-
- /* We know we are not at the first character of the pattern,
- because laststart was nonzero. And we've already
- incremented `p', by the way, to be the character after
- the `*'. Do we have to do something analogous here
- for null bytes, because of RE_DOT_NOT_NULL? */
- if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
- && zero_times_ok
- && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
- && !(syntax & RE_DOT_NEWLINE))
- { /* We have .*\n. */
- STORE_JUMP (jump, b, laststart);
- keep_string_p = true;
- }
- else
- /* Anything else. */
- STORE_JUMP (maybe_pop_jump, b, laststart - 3);
-
- /* We've added more stuff to the buffer. */
- b += 3;
- }
-
- /* On failure, jump from laststart to b + 3, which will be the
- end of the buffer after this jump is inserted. */
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
- : on_failure_jump,
- laststart, b + 3);
- pending_exact = 0;
- b += 3;
-
- if (!zero_times_ok)
- {
- /* At least one repetition is required, so insert a
- `dummy_failure_jump' before the initial
- `on_failure_jump' instruction of the loop. This
- effects a skip over that instruction the first time
- we hit that loop. */
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (dummy_failure_jump, laststart, laststart + 6);
- b += 3;
- }
- }
- break;
-
-
- case '.':
- laststart = b;
- BUF_PUSH (anychar);
- break;
-
-
- case '[':
- {
- boolean had_char_class = false;
-
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- /* Ensure that we have enough space to push a charset: the
- opcode, the length count, and the bitset; 34 bytes in all. */
- GET_BUFFER_SPACE (34);
-
- laststart = b;
-
- /* We test `*p == '^' twice, instead of using an if
- statement, so we only need one BUF_PUSH. */
- BUF_PUSH (*p == '^' ? charset_not : charset);
- if (*p == '^')
- p++;
-
- /* Remember the first position in the bracket expression. */
- p1 = p;
-
- /* Push the number of bytes in the bitmap. */
- BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
-
- /* Clear the whole map. */
- bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
-
- /* charset_not matches newline according to a syntax bit. */
- if ((re_opcode_t) b[-2] == charset_not
- && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
- SET_LIST_BIT ('\n');
-
- /* Read in characters and ranges, setting map bits. */
- for (;;)
- {
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- PATFETCH (c);
-
- /* \ might escape characters inside [...] and [^...]. */
- if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
- {
- if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-
- PATFETCH (c1);
- SET_LIST_BIT (c1);
- continue;
- }
-
- /* Could be the end of the bracket expression. If it's
- not (i.e., when the bracket expression is `[]' so
- far), the ']' character bit gets set way below. */
- if (c == ']' && p != p1 + 1)
- break;
-
- /* Look ahead to see if it's a range when the last thing
- was a character class. */
- if (had_char_class && c == '-' && *p != ']')
- FREE_STACK_RETURN (REG_ERANGE);
-
- /* Look ahead to see if it's a range when the last thing
- was a character: if this is a hyphen not at the
- beginning or the end of a list, then it's the range
- operator. */
- if (c == '-'
- && !(p - 2 >= pattern && p[-2] == '[')
- && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
- && *p != ']')
- {
- reg_errcode_t ret
- = compile_range (&p, pend, translate, syntax, b);
- if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
- }
-
- else if (p[0] == '-' && p[1] != ']')
- { /* This handles ranges made up of characters only. */
- reg_errcode_t ret;
-
- /* Move past the `-'. */
- PATFETCH (c1);
-
- ret = compile_range (&p, pend, translate, syntax, b);
- if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
- }
-
- /* See if we're at the beginning of a possible character
- class. */
-
- else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
- { /* Leave room for the null. */
- char str[CHAR_CLASS_MAX_LENGTH + 1];
-
- PATFETCH (c);
- c1 = 0;
-
- /* If pattern is `[[:'. */
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- for (;;)
- {
- PATFETCH (c);
- if ((c == ':' && *p == ']') || p == pend)
- break;
- if (c1 < CHAR_CLASS_MAX_LENGTH)
- str[c1++] = c;
- else
- /* This is in any case an invalid class name. */
- str[0] = '\0';
- }
- str[c1] = '\0';
-
- /* If isn't a word bracketed by `[:' and `:]':
- undo the ending character, the letters, and leave
- the leading `:' and `[' (but set bits for them). */
- if (c == ':' && *p == ']')
- {
-#if defined _LIBC || WIDE_CHAR_SUPPORT
- boolean is_lower = STREQ (str, "lower");
- boolean is_upper = STREQ (str, "upper");
- wctype_t wt;
- int ch;
-
- wt = IS_CHAR_CLASS (str);
- if (wt == 0)
- FREE_STACK_RETURN (REG_ECTYPE);
-
- /* Throw away the ] at the end of the character
- class. */
- PATFETCH (c);
-
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
- {
-# ifdef _LIBC
- if (__iswctype (__btowc (ch), wt))
- SET_LIST_BIT (ch);
-# else
- if (iswctype (btowc (ch), wt))
- SET_LIST_BIT (ch);
-# endif
-
- if (translate && (is_upper || is_lower)
- && (ISUPPER (ch) || ISLOWER (ch)))
- SET_LIST_BIT (ch);
- }
-
- had_char_class = true;
-#else
- int ch;
- boolean is_alnum = STREQ (str, "alnum");
- boolean is_alpha = STREQ (str, "alpha");
- boolean is_blank = STREQ (str, "blank");
- boolean is_cntrl = STREQ (str, "cntrl");
- boolean is_digit = STREQ (str, "digit");
- boolean is_graph = STREQ (str, "graph");
- boolean is_lower = STREQ (str, "lower");
- boolean is_print = STREQ (str, "print");
- boolean is_punct = STREQ (str, "punct");
- boolean is_space = STREQ (str, "space");
- boolean is_upper = STREQ (str, "upper");
- boolean is_xdigit = STREQ (str, "xdigit");
-
- if (!IS_CHAR_CLASS (str))
- FREE_STACK_RETURN (REG_ECTYPE);
-
- /* Throw away the ] at the end of the character
- class. */
- PATFETCH (c);
-
- if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-
- for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
- {
- /* This was split into 3 if's to
- avoid an arbitrary limit in some compiler. */
- if ( (is_alnum && ISALNUM (ch))
- || (is_alpha && ISALPHA (ch))
- || (is_blank && ISBLANK (ch))
- || (is_cntrl && ISCNTRL (ch)))
- SET_LIST_BIT (ch);
- if ( (is_digit && ISDIGIT (ch))
- || (is_graph && ISGRAPH (ch))
- || (is_lower && ISLOWER (ch))
- || (is_print && ISPRINT (ch)))
- SET_LIST_BIT (ch);
- if ( (is_punct && ISPUNCT (ch))
- || (is_space && ISSPACE (ch))
- || (is_upper && ISUPPER (ch))
- || (is_xdigit && ISXDIGIT (ch)))
- SET_LIST_BIT (ch);
- if ( translate && (is_upper || is_lower)
- && (ISUPPER (ch) || ISLOWER (ch)))
- SET_LIST_BIT (ch);
- }
- had_char_class = true;
-#endif /* libc || wctype.h */
- }
- else
- {
- c1++;
- while (c1--)
- PATUNFETCH;
- SET_LIST_BIT ('[');
- SET_LIST_BIT (':');
- had_char_class = false;
- }
- }
- else
- {
- had_char_class = false;
- SET_LIST_BIT (c);
- }
- }
-
- /* Discard any (non)matching list bytes that are all 0 at the
- end of the map. Decrease the map-length byte too. */
- while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
- b[-1]--;
- b += b[-1];
- }
- break;
-
-
- case '(':
- if (syntax & RE_NO_BK_PARENS)
- goto handle_open;
- else
- goto normal_char;
-
-
- case ')':
- if (syntax & RE_NO_BK_PARENS)
- goto handle_close;
- else
- goto normal_char;
-
-
- case '\n':
- if (syntax & RE_NEWLINE_ALT)
- goto handle_alt;
- else
- goto normal_char;
-
-
- case '|':
- if (syntax & RE_NO_BK_VBAR)
- goto handle_alt;
- else
- goto normal_char;
-
-
- case '{':
- if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
- goto handle_interval;
- else
- goto normal_char;
-
-
- case '\\':
- if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-
- /* Do not translate the character after the \, so that we can
- distinguish, e.g., \B from \b, even if we normally would
- translate, e.g., B to b. */
- PATFETCH_RAW (c);
-
- switch (c)
- {
- case '(':
- if (syntax & RE_NO_BK_PARENS)
- goto normal_backslash;
-
- handle_open:
- bufp->re_nsub++;
- regnum++;
-
- if (COMPILE_STACK_FULL)
- {
- RETALLOC (compile_stack.stack, compile_stack.size << 1,
- compile_stack_elt_t);
- if (compile_stack.stack == NULL) return REG_ESPACE;
-
- compile_stack.size <<= 1;
- }
-
- /* These are the values to restore when we hit end of this
- group. They are all relative offsets, so that if the
- whole pattern moves because of realloc, they will still
- be valid. */
- COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
- COMPILE_STACK_TOP.fixup_alt_jump
- = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
- COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer;
- COMPILE_STACK_TOP.regnum = regnum;
-
- /* We will eventually replace the 0 with the number of
- groups inner to this one. But do not push a
- start_memory for groups beyond the last one we can
- represent in the compiled pattern. */
- if (regnum <= MAX_REGNUM)
- {
- COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2;
- BUF_PUSH_3 (start_memory, regnum, 0);
- }
-
- compile_stack.avail++;
-
- fixup_alt_jump = 0;
- laststart = 0;
- begalt = b;
- /* If we've reached MAX_REGNUM groups, then this open
- won't actually generate any code, so we'll have to
- clear pending_exact explicitly. */
- pending_exact = 0;
- break;
-
-
- case ')':
- if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
-
- if (COMPILE_STACK_EMPTY)
- {
- if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
- goto normal_backslash;
- else
- FREE_STACK_RETURN (REG_ERPAREN);
- }
-
- handle_close:
- if (fixup_alt_jump)
- { /* Push a dummy failure point at the end of the
- alternative for a possible future
- `pop_failure_jump' to pop. See comments at
- `push_dummy_failure' in `re_match_2'. */
- BUF_PUSH (push_dummy_failure);
-
- /* We allocated space for this jump when we assigned
- to `fixup_alt_jump', in the `handle_alt' case below. */
- STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
- }
-
- /* See similar code for backslashed left paren above. */
- if (COMPILE_STACK_EMPTY)
- {
- if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
- goto normal_char;
- else
- FREE_STACK_RETURN (REG_ERPAREN);
- }
-
- /* Since we just checked for an empty stack above, this
- ``can't happen''. */
- assert (compile_stack.avail != 0);
- {
- /* We don't just want to restore into `regnum', because
- later groups should continue to be numbered higher,
- as in `(ab)c(de)' -- the second group is #2. */
- regnum_t this_group_regnum;
-
- compile_stack.avail--;
- begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset;
- fixup_alt_jump
- = COMPILE_STACK_TOP.fixup_alt_jump
- ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
- : 0;
- laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
- this_group_regnum = COMPILE_STACK_TOP.regnum;
- /* If we've reached MAX_REGNUM groups, then this open
- won't actually generate any code, so we'll have to
- clear pending_exact explicitly. */
- pending_exact = 0;
-
- /* We're at the end of the group, so now we know how many
- groups were inside this one. */
- if (this_group_regnum <= MAX_REGNUM)
- {
- unsigned char *inner_group_loc
- = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
-
- *inner_group_loc = regnum - this_group_regnum;
- BUF_PUSH_3 (stop_memory, this_group_regnum,
- regnum - this_group_regnum);
- }
- }
- break;
-
-
- case '|': /* `\|'. */
- if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
- goto normal_backslash;
- handle_alt:
- if (syntax & RE_LIMITED_OPS)
- goto normal_char;
-
- /* Insert before the previous alternative a jump which
- jumps to this alternative if the former fails. */
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (on_failure_jump, begalt, b + 6);
- pending_exact = 0;
- b += 3;
-
- /* The alternative before this one has a jump after it
- which gets executed if it gets matched. Adjust that
- jump so it will jump to this alternative's analogous
- jump (put in below, which in turn will jump to the next
- (if any) alternative's such jump, etc.). The last such
- jump jumps to the correct final destination. A picture:
- _____ _____
- | | | |
- | v | v
- a | b | c
-
- If we are at `b', then fixup_alt_jump right now points to a
- three-byte space after `a'. We'll put in the jump, set
- fixup_alt_jump to right after `b', and leave behind three
- bytes which we'll fill in when we get to after `c'. */
-
- if (fixup_alt_jump)
- STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
-
- /* Mark and leave space for a jump after this alternative,
- to be filled in later either by next alternative or
- when know we're at the end of a series of alternatives. */
- fixup_alt_jump = b;
- GET_BUFFER_SPACE (3);
- b += 3;
-
- laststart = 0;
- begalt = b;
- break;
-
-
- case '{':
- /* If \{ is a literal. */
- if (!(syntax & RE_INTERVALS)
- /* If we're at `\{' and it's not the open-interval
- operator. */
- || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
- || (p - 2 == pattern && p == pend))
- goto normal_backslash;
-
- handle_interval:
- {
- /* If got here, then the syntax allows intervals. */
-
- /* At least (most) this many matches must be made. */
- int lower_bound = -1, upper_bound = -1;
-
- beg_interval = p - 1;
-
- if (p == pend)
- {
- if (syntax & RE_NO_BK_BRACES)
- goto unfetch_interval;
- else
- FREE_STACK_RETURN (REG_EBRACE);
- }
-
- GET_UNSIGNED_NUMBER (lower_bound);
-
- if (c == ',')
- {
- GET_UNSIGNED_NUMBER (upper_bound);
- if (upper_bound < 0) upper_bound = RE_DUP_MAX;
- }
- else
- /* Interval such as `{1}' => match exactly once. */
- upper_bound = lower_bound;
-
- if (lower_bound < 0 || upper_bound > RE_DUP_MAX
- || lower_bound > upper_bound)
- {
- if (syntax & RE_NO_BK_BRACES)
- goto unfetch_interval;
- else
- FREE_STACK_RETURN (REG_BADBR);
- }
-
- if (!(syntax & RE_NO_BK_BRACES))
- {
- if (c != '\\') FREE_STACK_RETURN (REG_EBRACE);
-
- PATFETCH (c);
- }
-
- if (c != '}')
- {
- if (syntax & RE_NO_BK_BRACES)
- goto unfetch_interval;
- else
- FREE_STACK_RETURN (REG_BADBR);
- }
-
- /* We just parsed a valid interval. */
-
- /* If it's invalid to have no preceding re. */
- if (!laststart)
- {
- if (syntax & RE_CONTEXT_INVALID_OPS)
- FREE_STACK_RETURN (REG_BADRPT);
- else if (syntax & RE_CONTEXT_INDEP_OPS)
- laststart = b;
- else
- goto unfetch_interval;
- }
-
- /* If the upper bound is zero, don't want to succeed at
- all; jump from `laststart' to `b + 3', which will be
- the end of the buffer after we insert the jump. */
- if (upper_bound == 0)
- {
- GET_BUFFER_SPACE (3);
- INSERT_JUMP (jump, laststart, b + 3);
- b += 3;
- }
-
- /* Otherwise, we have a nontrivial interval. When
- we're all done, the pattern will look like:
- set_number_at <jump count> <upper bound>
- set_number_at <succeed_n count> <lower bound>
- succeed_n <after jump addr> <succeed_n count>
- <body of loop>
- jump_n <succeed_n addr> <jump count>
- (The upper bound and `jump_n' are omitted if
- `upper_bound' is 1, though.) */
- else
- { /* If the upper bound is > 1, we need to insert
- more at the end of the loop. */
- unsigned nbytes = 10 + (upper_bound > 1) * 10;
-
- GET_BUFFER_SPACE (nbytes);
-
- /* Initialize lower bound of the `succeed_n', even
- though it will be set during matching by its
- attendant `set_number_at' (inserted next),
- because `re_compile_fastmap' needs to know.
- Jump to the `jump_n' we might insert below. */
- INSERT_JUMP2 (succeed_n, laststart,
- b + 5 + (upper_bound > 1) * 5,
- lower_bound);
- b += 5;
-
- /* Code to initialize the lower bound. Insert
- before the `succeed_n'. The `5' is the last two
- bytes of this `set_number_at', plus 3 bytes of
- the following `succeed_n'. */
- insert_op2 (set_number_at, laststart, 5, lower_bound, b);
- b += 5;
-
- if (upper_bound > 1)
- { /* More than one repetition is allowed, so
- append a backward jump to the `succeed_n'
- that starts this interval.
-
- When we've reached this during matching,
- we'll have matched the interval once, so
- jump back only `upper_bound - 1' times. */
- STORE_JUMP2 (jump_n, b, laststart + 5,
- upper_bound - 1);
- b += 5;
-
- /* The location we want to set is the second
- parameter of the `jump_n'; that is `b-2' as
- an absolute address. `laststart' will be
- the `set_number_at' we're about to insert;
- `laststart+3' the number to set, the source
- for the relative address. But we are
- inserting into the middle of the pattern --
- so everything is getting moved up by 5.
- Conclusion: (b - 2) - (laststart + 3) + 5,
- i.e., b - laststart.
-
- We insert this at the beginning of the loop
- so that if we fail during matching, we'll
- reinitialize the bounds. */
- insert_op2 (set_number_at, laststart, b - laststart,
- upper_bound - 1, b);
- b += 5;
- }
- }
- pending_exact = 0;
- beg_interval = NULL;
- }
- break;
-
- unfetch_interval:
- /* If an invalid interval, match the characters as literals. */
- assert (beg_interval);
- p = beg_interval;
- beg_interval = NULL;
-
- /* normal_char and normal_backslash need `c'. */
- PATFETCH (c);
-
- if (!(syntax & RE_NO_BK_BRACES))
- {
- if (p > pattern && p[-1] == '\\')
- goto normal_backslash;
- }
- goto normal_char;
-
-#ifdef emacs
- /* There is no way to specify the before_dot and after_dot
- operators. rms says this is ok. --karl */
- case '=':
- BUF_PUSH (at_dot);
- break;
-
- case 's':
- laststart = b;
- PATFETCH (c);
- BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
- break;
-
- case 'S':
- laststart = b;
- PATFETCH (c);
- BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
- break;
-#endif /* emacs */
-
-
- case 'w':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- laststart = b;
- BUF_PUSH (wordchar);
- break;
-
-
- case 'W':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- laststart = b;
- BUF_PUSH (notwordchar);
- break;
-
-
- case '<':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (wordbeg);
- break;
-
- case '>':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (wordend);
- break;
-
- case 'b':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (wordbound);
- break;
-
- case 'B':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (notwordbound);
- break;
-
- case '`':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (begbuf);
- break;
-
- case '\'':
- if (syntax & RE_NO_GNU_OPS)
- goto normal_char;
- BUF_PUSH (endbuf);
- break;
-
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- if (syntax & RE_NO_BK_REFS)
- goto normal_char;
-
- c1 = c - '0';
-
- if (c1 > regnum)
- FREE_STACK_RETURN (REG_ESUBREG);
-
- /* Can't back reference to a subexpression if inside of it. */
- if (group_in_compile_stack (compile_stack, (regnum_t) c1))
- goto normal_char;
-
- laststart = b;
- BUF_PUSH_2 (duplicate, c1);
- break;
-
-
- case '+':
- case '?':
- if (syntax & RE_BK_PLUS_QM)
- goto handle_plus;
- else
- goto normal_backslash;
-
- default:
- normal_backslash:
- /* You might think it would be useful for \ to mean
- not to translate; but if we don't translate it
- it will never match anything. */
- c = TRANSLATE (c);
- goto normal_char;
- }
- break;
-
-
- default:
- /* Expects the character in `c'. */
- normal_char:
- /* If no exactn currently being built. */
- if (!pending_exact
-
- /* If last exactn not at current position. */
- || pending_exact + *pending_exact + 1 != b
-
- /* We have only one byte following the exactn for the count. */
- || *pending_exact == (1 << BYTEWIDTH) - 1
-
- /* If followed by a repetition operator. */
- || *p == '*' || *p == '^'
- || ((syntax & RE_BK_PLUS_QM)
- ? *p == '\\' && (p[1] == '+' || p[1] == '?')
- : (*p == '+' || *p == '?'))
- || ((syntax & RE_INTERVALS)
- && ((syntax & RE_NO_BK_BRACES)
- ? *p == '{'
- : (p[0] == '\\' && p[1] == '{'))))
- {
- /* Start building a new exactn. */
-
- laststart = b;
-
- BUF_PUSH_2 (exactn, 0);
- pending_exact = b - 1;
- }
-
- BUF_PUSH (c);
- (*pending_exact)++;
- break;
- } /* switch (c) */
- } /* while p != pend */
-
-
- /* Through the pattern now. */
-
- if (fixup_alt_jump)
- STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
-
- if (!COMPILE_STACK_EMPTY)
- FREE_STACK_RETURN (REG_EPAREN);
-
- /* If we don't want backtracking, force success
- the first time we reach the end of the compiled pattern. */
- if (syntax & RE_NO_POSIX_BACKTRACKING)
- BUF_PUSH (succeed);
-
- free (compile_stack.stack);
-
- /* We have succeeded; set the length of the buffer. */
- bufp->used = b - bufp->buffer;
-
-#ifdef DEBUG
- if (debug)
- {
- DEBUG_PRINT1 ("\nCompiled pattern: \n");
- print_compiled_pattern (bufp);
- }
-#endif /* DEBUG */
-
-#ifndef MATCH_MAY_ALLOCATE
- /* Initialize the failure stack to the largest possible stack. This
- isn't necessary unless we're trying to avoid calling alloca in
- the search and match routines. */
- {
- int num_regs = bufp->re_nsub + 1;
-
- /* Since DOUBLE_FAIL_STACK refuses to double only if the current size
- is strictly greater than re_max_failures, the largest possible stack
- is 2 * re_max_failures failure points. */
- if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
- {
- fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
-
-# ifdef emacs
- if (! fail_stack.stack)
- fail_stack.stack
- = (fail_stack_elt_t *) xmalloc (fail_stack.size
- * sizeof (fail_stack_elt_t));
- else
- fail_stack.stack
- = (fail_stack_elt_t *) xrealloc (fail_stack.stack,
- (fail_stack.size
- * sizeof (fail_stack_elt_t)));
-# else /* not emacs */
- if (! fail_stack.stack)
- fail_stack.stack
- = (fail_stack_elt_t *) malloc (fail_stack.size
- * sizeof (fail_stack_elt_t));
- else
- fail_stack.stack
- = (fail_stack_elt_t *) realloc (fail_stack.stack,
- (fail_stack.size
- * sizeof (fail_stack_elt_t)));
-# endif /* not emacs */
- }
-
- regex_grow_registers (num_regs);
- }
-#endif /* not MATCH_MAY_ALLOCATE */
-
- return REG_NOERROR;
-} /* regex_compile */
-
-/* Subroutines for `regex_compile'. */
-
-/* Store OP at LOC followed by two-byte integer parameter ARG. */
-
-static void
-store_op1 (op, loc, arg)
- re_opcode_t op;
- unsigned char *loc;
- int arg;
-{
- *loc = (unsigned char) op;
- STORE_NUMBER (loc + 1, arg);
-}
-
-
-/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
-
-static void
-store_op2 (op, loc, arg1, arg2)
- re_opcode_t op;
- unsigned char *loc;
- int arg1, arg2;
-{
- *loc = (unsigned char) op;
- STORE_NUMBER (loc + 1, arg1);
- STORE_NUMBER (loc + 3, arg2);
-}
-
-
-/* Copy the bytes from LOC to END to open up three bytes of space at LOC
- for OP followed by two-byte integer parameter ARG. */
-
-static void
-insert_op1 (op, loc, arg, end)
- re_opcode_t op;
- unsigned char *loc;
- int arg;
- unsigned char *end;
-{
- register unsigned char *pfrom = end;
- register unsigned char *pto = end + 3;
-
- while (pfrom != loc)
- *--pto = *--pfrom;
-
- store_op1 (op, loc, arg);
-}
-
-
-/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
-
-static void
-insert_op2 (op, loc, arg1, arg2, end)
- re_opcode_t op;
- unsigned char *loc;
- int arg1, arg2;
- unsigned char *end;
-{
- register unsigned char *pfrom = end;
- register unsigned char *pto = end + 5;
-
- while (pfrom != loc)
- *--pto = *--pfrom;
-
- store_op2 (op, loc, arg1, arg2);
-}
-
-
-/* P points to just after a ^ in PATTERN. Return true if that ^ comes
- after an alternative or a begin-subexpression. We assume there is at
- least one character before the ^. */
-
-static boolean
-at_begline_loc_p (pattern, p, syntax)
- const char *pattern, *p;
- reg_syntax_t syntax;
-{
- const char *prev = p - 2;
- boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
-
- return
- /* After a subexpression? */
- (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
- /* After an alternative? */
- || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
-}
-
-
-/* The dual of at_begline_loc_p. This one is for $. We assume there is
- at least one character after the $, i.e., `P < PEND'. */
-
-static boolean
-at_endline_loc_p (p, pend, syntax)
- const char *p, *pend;
- reg_syntax_t syntax;
-{
- const char *next = p;
- boolean next_backslash = *next == '\\';
- const char *next_next = p + 1 < pend ? p + 1 : 0;
-
- return
- /* Before a subexpression? */
- (syntax & RE_NO_BK_PARENS ? *next == ')'
- : next_backslash && next_next && *next_next == ')')
- /* Before an alternative? */
- || (syntax & RE_NO_BK_VBAR ? *next == '|'
- : next_backslash && next_next && *next_next == '|');
-}
-
-
-/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
- false if it's not. */
-
-static boolean
-group_in_compile_stack (compile_stack, regnum)
- compile_stack_type compile_stack;
- regnum_t regnum;
-{
- int this_element;
-
- for (this_element = compile_stack.avail - 1;
- this_element >= 0;
- this_element--)
- if (compile_stack.stack[this_element].regnum == regnum)
- return true;
-
- return false;
-}
-
-
-/* Read the ending character of a range (in a bracket expression) from the
- uncompiled pattern *P_PTR (which ends at PEND). We assume the
- starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
- Then we set the translation of all bits between the starting and
- ending characters (inclusive) in the compiled pattern B.
-
- Return an error code.
-
- We use these short variable names so we can use the same macros as
- `regex_compile' itself. */
-
-static reg_errcode_t
-compile_range (p_ptr, pend, translate, syntax, b)
- const char **p_ptr, *pend;
- RE_TRANSLATE_TYPE translate;
- reg_syntax_t syntax;
- unsigned char *b;
-{
- unsigned this_char;
-
- const char *p = *p_ptr;
- unsigned int range_start, range_end;
-
- if (p == pend)
- return REG_ERANGE;
-
- /* Even though the pattern is a signed `char *', we need to fetch
- with unsigned char *'s; if the high bit of the pattern character
- is set, the range endpoints will be negative if we fetch using a
- signed char *.
-
- We also want to fetch the endpoints without translating them; the
- appropriate translation is done in the bit-setting loop below. */
- /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */
- range_start = ((const unsigned char *) p)[-2];
- range_end = ((const unsigned char *) p)[0];
-
- /* Have to increment the pointer into the pattern string, so the
- caller isn't still at the ending character. */
- (*p_ptr)++;
-
- /* If the start is after the end, the range is empty. */
- if (range_start > range_end)
- return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
-
- /* Here we see why `this_char' has to be larger than an `unsigned
- char' -- the range is inclusive, so if `range_end' == 0xff
- (assuming 8-bit characters), we would otherwise go into an infinite
- loop, since all characters <= 0xff. */
- for (this_char = range_start; this_char <= range_end; this_char++)
- {
- SET_LIST_BIT (TRANSLATE (this_char));
- }
-
- return REG_NOERROR;
-}
-
-/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
- BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
- characters can start a string that matches the pattern. This fastmap
- is used by re_search to skip quickly over impossible starting points.
-
- The caller must supply the address of a (1 << BYTEWIDTH)-byte data
- area as BUFP->fastmap.
-
- We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
- the pattern buffer.
-
- Returns 0 if we succeed, -2 if an internal error. */
-
-int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
-{
- int j, k;
-#ifdef MATCH_MAY_ALLOCATE
- fail_stack_type fail_stack;
-#endif
-#ifndef REGEX_MALLOC
- char *destination;
-#endif
-
- register char *fastmap = bufp->fastmap;
- unsigned char *pattern = bufp->buffer;
- unsigned char *p = pattern;
- register unsigned char *pend = pattern + bufp->used;
-
-#ifdef REL_ALLOC
- /* This holds the pointer to the failure stack, when
- it is allocated relocatably. */
- fail_stack_elt_t *failure_stack_ptr;
-#endif
-
- /* Assume that each path through the pattern can be null until
- proven otherwise. We set this false at the bottom of switch
- statement, to which we get only if a particular path doesn't
- match the empty string. */
- boolean path_can_be_null = true;
-
- /* We aren't doing a `succeed_n' to begin with. */
- boolean succeed_n_p = false;
-
- assert (fastmap != NULL && p != NULL);
-
- INIT_FAIL_STACK ();
- bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
- bufp->fastmap_accurate = 1; /* It will be when we're done. */
- bufp->can_be_null = 0;
-
- while (1)
- {
- if (p == pend || *p == succeed)
- {
- /* We have reached the (effective) end of pattern. */
- if (!FAIL_STACK_EMPTY ())
- {
- bufp->can_be_null |= path_can_be_null;
-
- /* Reset for next path. */
- path_can_be_null = true;
-
- p = fail_stack.stack[--fail_stack.avail].pointer;
-
- continue;
- }
- else
- break;
- }
-
- /* We should never be about to go beyond the end of the pattern. */
- assert (p < pend);
-
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
- {
-
- /* I guess the idea here is to simply not bother with a fastmap
- if a backreference is used, since it's too hard to figure out
- the fastmap for the corresponding group. Setting
- `can_be_null' stops `re_search_2' from using the fastmap, so
- that is all we do. */
- case duplicate:
- bufp->can_be_null = 1;
- goto done;
-
-
- /* Following are the cases which match a character. These end
- with `break'. */
-
- case exactn:
- fastmap[p[1]] = 1;
- break;
-
-
- case charset:
- for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
- if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
- fastmap[j] = 1;
- break;
-
-
- case charset_not:
- /* Chars beyond end of map must be allowed. */
- for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
- fastmap[j] = 1;
-
- for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
- if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
- fastmap[j] = 1;
- break;
-
-
- case wordchar:
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) == Sword)
- fastmap[j] = 1;
- break;
-
-
- case notwordchar:
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) != Sword)
- fastmap[j] = 1;
- break;
-
-
- case anychar:
- {
- int fastmap_newline = fastmap['\n'];
-
- /* `.' matches anything ... */
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- fastmap[j] = 1;
-
- /* ... except perhaps newline. */
- if (!(bufp->syntax & RE_DOT_NEWLINE))
- fastmap['\n'] = fastmap_newline;
-
- /* Return if we have already set `can_be_null'; if we have,
- then the fastmap is irrelevant. Something's wrong here. */
- else if (bufp->can_be_null)
- goto done;
-
- /* Otherwise, have to check alternative paths. */
- break;
- }
-
-#ifdef emacs
- case syntaxspec:
- k = *p++;
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) == (enum syntaxcode) k)
- fastmap[j] = 1;
- break;
-
-
- case notsyntaxspec:
- k = *p++;
- for (j = 0; j < (1 << BYTEWIDTH); j++)
- if (SYNTAX (j) != (enum syntaxcode) k)
- fastmap[j] = 1;
- break;
-
-
- /* All cases after this match the empty string. These end with
- `continue'. */
-
-
- case before_dot:
- case at_dot:
- case after_dot:
- continue;
-#endif /* emacs */
-
-
- case no_op:
- case begline:
- case endline:
- case begbuf:
- case endbuf:
- case wordbound:
- case notwordbound:
- case wordbeg:
- case wordend:
- case push_dummy_failure:
- continue;
-
-
- case jump_n:
- case pop_failure_jump:
- case maybe_pop_jump:
- case jump:
- case jump_past_alt:
- case dummy_failure_jump:
- EXTRACT_NUMBER_AND_INCR (j, p);
- p += j;
- if (j > 0)
- continue;
-
- /* Jump backward implies we just went through the body of a
- loop and matched nothing. Opcode jumped to should be
- `on_failure_jump' or `succeed_n'. Just treat it like an
- ordinary jump. For a * loop, it has pushed its failure
- point already; if so, discard that as redundant. */
- if ((re_opcode_t) *p != on_failure_jump
- && (re_opcode_t) *p != succeed_n)
- continue;
-
- p++;
- EXTRACT_NUMBER_AND_INCR (j, p);
- p += j;
-
- /* If what's on the stack is where we are now, pop it. */
- if (!FAIL_STACK_EMPTY ()
- && fail_stack.stack[fail_stack.avail - 1].pointer == p)
- fail_stack.avail--;
-
- continue;
-
-
- case on_failure_jump:
- case on_failure_keep_string_jump:
- handle_on_failure_jump:
- EXTRACT_NUMBER_AND_INCR (j, p);
-
- /* For some patterns, e.g., `(a?)?', `p+j' here points to the
- end of the pattern. We don't want to push such a point,
- since when we restore it above, entering the switch will
- increment `p' past the end of the pattern. We don't need
- to push such a point since we obviously won't find any more
- fastmap entries beyond `pend'. Such a pattern can match
- the null string, though. */
- if (p + j < pend)
- {
- if (!PUSH_PATTERN_OP (p + j, fail_stack))
- {
- RESET_FAIL_STACK ();
- return -2;
- }
- }
- else
- bufp->can_be_null = 1;
-
- if (succeed_n_p)
- {
- EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */
- succeed_n_p = false;
- }
-
- continue;
-
-
- case succeed_n:
- /* Get to the number of times to succeed. */
- p += 2;
-
- /* Increment p past the n for when k != 0. */
- EXTRACT_NUMBER_AND_INCR (k, p);
- if (k == 0)
- {
- p -= 4;
- succeed_n_p = true; /* Spaghetti code alert. */
- goto handle_on_failure_jump;
- }
- continue;
-
-
- case set_number_at:
- p += 4;
- continue;
-
-
- case start_memory:
- case stop_memory:
- p += 2;
- continue;
-
-
- default:
- abort (); /* We have listed all the cases. */
- } /* switch *p++ */
-
- /* Getting here means we have found the possible starting
- characters for one path of the pattern -- and that the empty
- string does not match. We need not follow this path further.
- Instead, look at the next alternative (remembered on the
- stack), or quit if no more. The test at the top of the loop
- does these things. */
- path_can_be_null = false;
- p = pend;
- } /* while p */
-
- /* Set `can_be_null' for the last path (also the first path, if the
- pattern is empty). */
- bufp->can_be_null |= path_can_be_null;
-
- done:
- RESET_FAIL_STACK ();
- return 0;
-} /* re_compile_fastmap */
-#ifdef _LIBC
-weak_alias (__re_compile_fastmap, re_compile_fastmap)
-#endif
-
-/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
- ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
- this memory for recording register information. STARTS and ENDS
- must be allocated using the malloc library routine, and must each
- be at least NUM_REGS * sizeof (regoff_t) bytes long.
-
- If NUM_REGS == 0, then subsequent matches should allocate their own
- register data.
-
- Unless this function is called, the first search or match using
- PATTERN_BUFFER will allocate its own register data, without
- freeing the old data. */
-
-void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- unsigned num_regs;
- regoff_t *starts, *ends;
-{
- if (num_regs)
- {
- bufp->regs_allocated = REGS_REALLOCATE;
- regs->num_regs = num_regs;
- regs->start = starts;
- regs->end = ends;
- }
- else
- {
- bufp->regs_allocated = REGS_UNALLOCATED;
- regs->num_regs = 0;
- regs->start = regs->end = (regoff_t *) 0;
- }
-}
-#ifdef _LIBC
-weak_alias (__re_set_registers, re_set_registers)
-#endif
-
-/* Searching routines. */
-
-/* Like re_search_2, below, but only one string is specified, and
- doesn't let you say where to stop matching. */
-
-int
-re_search (bufp, string, size, startpos, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, startpos, range;
- struct re_registers *regs;
-{
- return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
- regs, size);
-}
-#ifdef _LIBC
-weak_alias (__re_search, re_search)
-#endif
-
-
-/* Using the compiled pattern in BUFP->buffer, first tries to match the
- virtual concatenation of STRING1 and STRING2, starting first at index
- STARTPOS, then at STARTPOS + 1, and so on.
-
- STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
-
- RANGE is how far to scan while trying to match. RANGE = 0 means try
- only at STARTPOS; in general, the last start tried is STARTPOS +
- RANGE.
-
- In REGS, return the indices of the virtual concatenation of STRING1
- and STRING2 that matched the entire BUFP->buffer and its contained
- subexpressions.
-
- Do not consider matching one past the index STOP in the virtual
- concatenation of STRING1 and STRING2.
-
- We return either the position in the strings at which the match was
- found, -1 if no match, or -2 if error (such as failure
- stack overflow). */
-
-int
-re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int startpos;
- int range;
- struct re_registers *regs;
- int stop;
-{
- int val;
- register char *fastmap = bufp->fastmap;
- register RE_TRANSLATE_TYPE translate = bufp->translate;
- int total_size = size1 + size2;
- int endpos = startpos + range;
-
- /* Check for out-of-range STARTPOS. */
- if (startpos < 0 || startpos > total_size)
- return -1;
-
- /* Fix up RANGE if it might eventually take us outside
- the virtual concatenation of STRING1 and STRING2.
- Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */
- if (endpos < 0)
- range = 0 - startpos;
- else if (endpos > total_size)
- range = total_size - startpos;
-
- /* If the search isn't to be a backwards one, don't waste time in a
- search for a pattern that must be anchored. */
- if (bufp->used > 0 && range > 0
- && ((re_opcode_t) bufp->buffer[0] == begbuf
- /* `begline' is like `begbuf' if it cannot match at newlines. */
- || ((re_opcode_t) bufp->buffer[0] == begline
- && !bufp->newline_anchor)))
- {
- if (startpos > 0)
- return -1;
- else
- range = 1;
- }
-
-#ifdef emacs
- /* In a forward search for something that starts with \=.
- don't keep searching past point. */
- if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
- {
- range = PT - startpos;
- if (range <= 0)
- return -1;
- }
-#endif /* emacs */
-
- /* Update the fastmap now if not correct already. */
- if (fastmap && !bufp->fastmap_accurate)
- if (re_compile_fastmap (bufp) == -2)
- return -2;
-
- /* Loop through the string, looking for a place to start matching. */
- for (;;)
- {
- /* If a fastmap is supplied, skip quickly over characters that
- cannot be the start of a match. If the pattern can match the
- null string, however, we don't need to skip characters; we want
- the first null string. */
- if (fastmap && startpos < total_size && !bufp->can_be_null)
- {
- if (range > 0) /* Searching forwards. */
- {
- register const char *d;
- register int lim = 0;
- int irange = range;
-
- if (startpos < size1 && startpos + range >= size1)
- lim = range - (size1 - startpos);
-
- d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
-
- /* Written out as an if-else to avoid testing `translate'
- inside the loop. */
- if (translate)
- while (range > lim
- && !fastmap[(unsigned char)
- translate[(unsigned char) *d++]])
- range--;
- else
- while (range > lim && !fastmap[(unsigned char) *d++])
- range--;
-
- startpos += irange - range;
- }
- else /* Searching backwards. */
- {
- register char c = (size1 == 0 || startpos >= size1
- ? string2[startpos - size1]
- : string1[startpos]);
-
- if (!fastmap[(unsigned char) TRANSLATE (c)])
- goto advance;
- }
- }
-
- /* If can't match the null string, and that's all we have left, fail. */
- if (range >= 0 && startpos == total_size && fastmap
- && !bufp->can_be_null)
- return -1;
-
- val = re_match_2_internal (bufp, string1, size1, string2, size2,
- startpos, regs, stop);
-#ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-#endif
-
- if (val >= 0)
- return startpos;
-
- if (val == -2)
- return -2;
-
- advance:
- if (!range)
- break;
- else if (range > 0)
- {
- range--;
- startpos++;
- }
- else
- {
- range++;
- startpos--;
- }
- }
- return -1;
-} /* re_search_2 */
-#ifdef _LIBC
-weak_alias (__re_search_2, re_search_2)
-#endif
-
-/* This converts PTR, a pointer into one of the search strings `string1'
- and `string2' into an offset from the beginning of that string. */
-#define POINTER_TO_OFFSET(ptr) \
- (FIRST_STRING_P (ptr) \
- ? ((regoff_t) ((ptr) - string1)) \
- : ((regoff_t) ((ptr) - string2 + size1)))
-
-/* Macros for dealing with the split strings in re_match_2. */
-
-#define MATCHING_IN_FIRST_STRING (dend == end_match_1)
-
-/* Call before fetching a character with *d. This switches over to
- string2 if necessary. */
-#define PREFETCH() \
- while (d == dend) \
- { \
- /* End of string2 => fail. */ \
- if (dend == end_match_2) \
- goto fail; \
- /* End of string1 => advance to string2. */ \
- d = string2; \
- dend = end_match_2; \
- }
-
-
-/* Test if at very beginning or at very end of the virtual concatenation
- of `string1' and `string2'. If only one string, it's `string2'. */
-#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
-#define AT_STRINGS_END(d) ((d) == end2)
-
-
-/* Test if D points to a character which is word-constituent. We have
- two special cases to check for: if past the end of string1, look at
- the first character in string2; and if before the beginning of
- string2, look at the last character in string1. */
-#define WORDCHAR_P(d) \
- (SYNTAX ((d) == end1 ? *string2 \
- : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
- == Sword)
-
-/* Disabled due to a compiler bug -- see comment at case wordbound */
-#if 0
-/* Test if the character before D and the one at D differ with respect
- to being word-constituent. */
-#define AT_WORD_BOUNDARY(d) \
- (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
- || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
-#endif
-
-/* Free everything we malloc. */
-#ifdef MATCH_MAY_ALLOCATE
-# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
-# define FREE_VARIABLES() \
- do { \
- REGEX_FREE_STACK (fail_stack.stack); \
- FREE_VAR (regstart); \
- FREE_VAR (regend); \
- FREE_VAR (old_regstart); \
- FREE_VAR (old_regend); \
- FREE_VAR (best_regstart); \
- FREE_VAR (best_regend); \
- FREE_VAR (reg_info); \
- FREE_VAR (reg_dummy); \
- FREE_VAR (reg_info_dummy); \
- } while (0)
-#else
-# define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */
-#endif /* not MATCH_MAY_ALLOCATE */
-
-/* These values must meet several constraints. They must not be valid
- register values; since we have a limit of 255 registers (because
- we use only one byte in the pattern for the register number), we can
- use numbers larger than 255. They must differ by 1, because of
- NUM_FAILURE_ITEMS above. And the value for the lowest register must
- be larger than the value for the highest register, so we do not try
- to actually save any registers when none are active. */
-#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
-#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
-
-/* Matching routines. */
-
-#ifndef emacs /* Emacs never uses this. */
-/* re_match is like re_match_2 except it takes only a single string. */
-
-int
-re_match (bufp, string, size, pos, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, pos;
- struct re_registers *regs;
-{
- int result = re_match_2_internal (bufp, NULL, 0, string, size,
- pos, regs, size);
-# ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-# endif
- return result;
-}
-# ifdef _LIBC
-weak_alias (__re_match, re_match)
-# endif
-#endif /* not emacs */
-
-static boolean group_match_null_string_p _RE_ARGS ((unsigned char **p,
- unsigned char *end,
- register_info_type *reg_info));
-static boolean alt_match_null_string_p _RE_ARGS ((unsigned char *p,
- unsigned char *end,
- register_info_type *reg_info));
-static boolean common_op_match_null_string_p _RE_ARGS ((unsigned char **p,
- unsigned char *end,
- register_info_type *reg_info));
-static int bcmp_translate _RE_ARGS ((const char *s1, const char *s2,
- int len, char *translate));
-
-/* re_match_2 matches the compiled pattern in BUFP against the
- the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
- and SIZE2, respectively). We start matching at POS, and stop
- matching at STOP.
-
- If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
- store offsets for the substring each group matched in REGS. See the
- documentation for exactly how many groups we fill.
-
- We return -1 if no match, -2 if an internal error (such as the
- failure stack overflowing). Otherwise, we return the length of the
- matched substring. */
-
-int
-re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
-{
- int result = re_match_2_internal (bufp, string1, size1, string2, size2,
- pos, regs, stop);
-#ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-#endif
- return result;
-}
-#ifdef _LIBC
-weak_alias (__re_match_2, re_match_2)
-#endif
-
-/* This is a separate function so that we can force an alloca cleanup
- afterwards. */
-static int
-re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
-{
- /* General temporaries. */
- int mcnt;
- unsigned char *p1;
-
- /* Just past the end of the corresponding string. */
- const char *end1, *end2;
-
- /* Pointers into string1 and string2, just past the last characters in
- each to consider matching. */
- const char *end_match_1, *end_match_2;
-
- /* Where we are in the data, and the end of the current string. */
- const char *d, *dend;
-
- /* Where we are in the pattern, and the end of the pattern. */
- unsigned char *p = bufp->buffer;
- register unsigned char *pend = p + bufp->used;
-
- /* Mark the opcode just after a start_memory, so we can test for an
- empty subpattern when we get to the stop_memory. */
- unsigned char *just_past_start_mem = 0;
-
- /* We use this to map every character in the string. */
- RE_TRANSLATE_TYPE translate = bufp->translate;
-
- /* Failure point stack. Each place that can handle a failure further
- down the line pushes a failure point on this stack. It consists of
- restart, regend, and reg_info for all registers corresponding to
- the subexpressions we're currently inside, plus the number of such
- registers, and, finally, two char *'s. The first char * is where
- to resume scanning the pattern; the second one is where to resume
- scanning the strings. If the latter is zero, the failure point is
- a ``dummy''; if a failure happens and the failure point is a dummy,
- it gets discarded and the next next one is tried. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
- fail_stack_type fail_stack;
-#endif
-#ifdef DEBUG
- static unsigned failure_id;
- unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
-#endif
-
-#ifdef REL_ALLOC
- /* This holds the pointer to the failure stack, when
- it is allocated relocatably. */
- fail_stack_elt_t *failure_stack_ptr;
-#endif
-
- /* We fill all the registers internally, independent of what we
- return, for use in backreferences. The number here includes
- an element for register zero. */
- size_t num_regs = bufp->re_nsub + 1;
-
- /* The currently active registers. */
- active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
-
- /* Information on the contents of registers. These are pointers into
- the input strings; they record just what was matched (on this
- attempt) by a subexpression part of the pattern, that is, the
- regnum-th regstart pointer points to where in the pattern we began
- matching and the regnum-th regend points to right after where we
- stopped matching the regnum-th subexpression. (The zeroth register
- keeps track of what the whole pattern matches.) */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **regstart, **regend;
-#endif
-
- /* If a group that's operated upon by a repetition operator fails to
- match anything, then the register for its start will need to be
- restored because it will have been set to wherever in the string we
- are when we last see its open-group operator. Similarly for a
- register's end. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **old_regstart, **old_regend;
-#endif
-
- /* The is_active field of reg_info helps us keep track of which (possibly
- nested) subexpressions we are currently in. The matched_something
- field of reg_info[reg_num] helps us tell whether or not we have
- matched any of the pattern so far this time through the reg_num-th
- subexpression. These two fields get reset each time through any
- loop their register is in. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
- register_info_type *reg_info;
-#endif
-
- /* The following record the register info as found in the above
- variables when we find a match better than any we've seen before.
- This happens as we backtrack through the failure points, which in
- turn happens only if we have not yet matched the entire string. */
- unsigned best_regs_set = false;
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **best_regstart, **best_regend;
-#endif
-
- /* Logically, this is `best_regend[0]'. But we don't want to have to
- allocate space for that if we're not allocating space for anything
- else (see below). Also, we never need info about register 0 for
- any of the other register vectors, and it seems rather a kludge to
- treat `best_regend' differently than the rest. So we keep track of
- the end of the best match so far in a separate variable. We
- initialize this to NULL so that when we backtrack the first time
- and need to test it, it's not garbage. */
- const char *match_end = NULL;
-
- /* This helps SET_REGS_MATCHED avoid doing redundant work. */
- int set_regs_matched_done = 0;
-
- /* Used when we pop values we don't care about. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- const char **reg_dummy;
- register_info_type *reg_info_dummy;
-#endif
-
-#ifdef DEBUG
- /* Counts the total number of registers pushed. */
- unsigned num_regs_pushed = 0;
-#endif
-
- DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
-
- INIT_FAIL_STACK ();
-
-#ifdef MATCH_MAY_ALLOCATE
- /* Do not bother to initialize all the register variables if there are
- no groups in the pattern, as it takes a fair amount of time. If
- there are groups, we include space for register 0 (the whole
- pattern), even though we never use it, since it simplifies the
- array indexing. We should fix this. */
- if (bufp->re_nsub)
- {
- regstart = REGEX_TALLOC (num_regs, const char *);
- regend = REGEX_TALLOC (num_regs, const char *);
- old_regstart = REGEX_TALLOC (num_regs, const char *);
- old_regend = REGEX_TALLOC (num_regs, const char *);
- best_regstart = REGEX_TALLOC (num_regs, const char *);
- best_regend = REGEX_TALLOC (num_regs, const char *);
- reg_info = REGEX_TALLOC (num_regs, register_info_type);
- reg_dummy = REGEX_TALLOC (num_regs, const char *);
- reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type);
-
- if (!(regstart && regend && old_regstart && old_regend && reg_info
- && best_regstart && best_regend && reg_dummy && reg_info_dummy))
- {
- FREE_VARIABLES ();
- return -2;
- }
- }
- else
- {
- /* We must initialize all our variables to NULL, so that
- `FREE_VARIABLES' doesn't try to free them. */
- regstart = regend = old_regstart = old_regend = best_regstart
- = best_regend = reg_dummy = NULL;
- reg_info = reg_info_dummy = (register_info_type *) NULL;
- }
-#endif /* MATCH_MAY_ALLOCATE */
-
- /* The starting position is bogus. */
- if (pos < 0 || pos > size1 + size2)
- {
- FREE_VARIABLES ();
- return -1;
- }
-
- /* Initialize subexpression text positions to -1 to mark ones that no
- start_memory/stop_memory has been seen for. Also initialize the
- register information struct. */
- for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
- {
- regstart[mcnt] = regend[mcnt]
- = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
-
- REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
- IS_ACTIVE (reg_info[mcnt]) = 0;
- MATCHED_SOMETHING (reg_info[mcnt]) = 0;
- EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
- }
-
- /* We move `string1' into `string2' if the latter's empty -- but not if
- `string1' is null. */
- if (size2 == 0 && string1 != NULL)
- {
- string2 = string1;
- size2 = size1;
- string1 = 0;
- size1 = 0;
- }
- end1 = string1 + size1;
- end2 = string2 + size2;
-
- /* Compute where to stop matching, within the two strings. */
- if (stop <= size1)
- {
- end_match_1 = string1 + stop;
- end_match_2 = string2;
- }
- else
- {
- end_match_1 = end1;
- end_match_2 = string2 + stop - size1;
- }
-
- /* `p' scans through the pattern as `d' scans through the data.
- `dend' is the end of the input string that `d' points within. `d'
- is advanced into the following input string whenever necessary, but
- this happens before fetching; therefore, at the beginning of the
- loop, `d' can be pointing at the end of a string, but it cannot
- equal `string2'. */
- if (size1 > 0 && pos <= size1)
- {
- d = string1 + pos;
- dend = end_match_1;
- }
- else
- {
- d = string2 + pos - size1;
- dend = end_match_2;
- }
-
- DEBUG_PRINT1 ("The compiled pattern is:\n");
- DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
- DEBUG_PRINT1 ("The string to match is: `");
- DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
- DEBUG_PRINT1 ("'\n");
-
- /* This loops over pattern commands. It exits by returning from the
- function if the match is complete, or it drops through if the match
- fails at this starting point in the input data. */
- for (;;)
- {
-#ifdef _LIBC
- DEBUG_PRINT2 ("\n%p: ", p);
-#else
- DEBUG_PRINT2 ("\n0x%x: ", p);
-#endif
-
- if (p == pend)
- { /* End of pattern means we might have succeeded. */
- DEBUG_PRINT1 ("end of pattern ... ");
-
- /* If we haven't matched the entire string, and we want the
- longest match, try backtracking. */
- if (d != end_match_2)
- {
- /* 1 if this match ends in the same string (string1 or string2)
- as the best previous match. */
- boolean same_str_p = (FIRST_STRING_P (match_end)
- == MATCHING_IN_FIRST_STRING);
- /* 1 if this match is the best seen so far. */
- boolean best_match_p;
-
- /* AIX compiler got confused when this was combined
- with the previous declaration. */
- if (same_str_p)
- best_match_p = d > match_end;
- else
- best_match_p = !MATCHING_IN_FIRST_STRING;
-
- DEBUG_PRINT1 ("backtracking.\n");
-
- if (!FAIL_STACK_EMPTY ())
- { /* More failure points to try. */
-
- /* If exceeds best match so far, save it. */
- if (!best_regs_set || best_match_p)
- {
- best_regs_set = true;
- match_end = d;
-
- DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
-
- for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
- {
- best_regstart[mcnt] = regstart[mcnt];
- best_regend[mcnt] = regend[mcnt];
- }
- }
- goto fail;
- }
-
- /* If no failure points, don't restore garbage. And if
- last match is real best match, don't restore second
- best one. */
- else if (best_regs_set && !best_match_p)
- {
- restore_best_regs:
- /* Restore best match. It may happen that `dend ==
- end_match_1' while the restored d is in string2.
- For example, the pattern `x.*y.*z' against the
- strings `x-' and `y-z-', if the two strings are
- not consecutive in memory. */
- DEBUG_PRINT1 ("Restoring best registers.\n");
-
- d = match_end;
- dend = ((d >= string1 && d <= end1)
- ? end_match_1 : end_match_2);
-
- for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
- {
- regstart[mcnt] = best_regstart[mcnt];
- regend[mcnt] = best_regend[mcnt];
- }
- }
- } /* d != end_match_2 */
-
- succeed_label:
- DEBUG_PRINT1 ("Accepting match.\n");
-
- /* If caller wants register contents data back, do it. */
- if (regs && !bufp->no_sub)
- {
- /* Have the register data arrays been allocated? */
- if (bufp->regs_allocated == REGS_UNALLOCATED)
- { /* No. So allocate them with malloc. We need one
- extra element beyond `num_regs' for the `-1' marker
- GNU code uses. */
- regs->num_regs = MAX (RE_NREGS, num_regs + 1);
- regs->start = TALLOC (regs->num_regs, regoff_t);
- regs->end = TALLOC (regs->num_regs, regoff_t);
- if (regs->start == NULL || regs->end == NULL)
- {
- FREE_VARIABLES ();
- return -2;
- }
- bufp->regs_allocated = REGS_REALLOCATE;
- }
- else if (bufp->regs_allocated == REGS_REALLOCATE)
- { /* Yes. If we need more elements than were already
- allocated, reallocate them. If we need fewer, just
- leave it alone. */
- if (regs->num_regs < num_regs + 1)
- {
- regs->num_regs = num_regs + 1;
- RETALLOC (regs->start, regs->num_regs, regoff_t);
- RETALLOC (regs->end, regs->num_regs, regoff_t);
- if (regs->start == NULL || regs->end == NULL)
- {
- FREE_VARIABLES ();
- return -2;
- }
- }
- }
- else
- {
- /* These braces fend off a "empty body in an else-statement"
- warning under GCC when assert expands to nothing. */
- assert (bufp->regs_allocated == REGS_FIXED);
- }
-
- /* Convert the pointer data in `regstart' and `regend' to
- indices. Register zero has to be set differently,
- since we haven't kept track of any info for it. */
- if (regs->num_regs > 0)
- {
- regs->start[0] = pos;
- regs->end[0] = (MATCHING_IN_FIRST_STRING
- ? ((regoff_t) (d - string1))
- : ((regoff_t) (d - string2 + size1)));
- }
-
- /* Go through the first `min (num_regs, regs->num_regs)'
- registers, since that is all we initialized. */
- for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
- mcnt++)
- {
- if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
- regs->start[mcnt] = regs->end[mcnt] = -1;
- else
- {
- regs->start[mcnt]
- = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
- regs->end[mcnt]
- = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
- }
- }
-
- /* If the regs structure we return has more elements than
- were in the pattern, set the extra elements to -1. If
- we (re)allocated the registers, this is the case,
- because we always allocate enough to have at least one
- -1 at the end. */
- for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
- regs->start[mcnt] = regs->end[mcnt] = -1;
- } /* regs && !bufp->no_sub */
-
- DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
- nfailure_points_pushed, nfailure_points_popped,
- nfailure_points_pushed - nfailure_points_popped);
- DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
-
- mcnt = d - pos - (MATCHING_IN_FIRST_STRING
- ? string1
- : string2 - size1);
-
- DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
-
- FREE_VARIABLES ();
- return mcnt;
- }
-
- /* Otherwise match next pattern command. */
- switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
- {
- /* Ignore these. Used to ignore the n of succeed_n's which
- currently have n == 0. */
- case no_op:
- DEBUG_PRINT1 ("EXECUTING no_op.\n");
- break;
-
- case succeed:
- DEBUG_PRINT1 ("EXECUTING succeed.\n");
- goto succeed_label;
-
- /* Match the next n pattern characters exactly. The following
- byte in the pattern defines n, and the n bytes after that
- are the characters to match. */
- case exactn:
- mcnt = *p++;
- DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
-
- /* This is written out as an if-else so we don't waste time
- testing `translate' inside the loop. */
- if (translate)
- {
- do
- {
- PREFETCH ();
- if ((unsigned char) translate[(unsigned char) *d++]
- != (unsigned char) *p++)
- goto fail;
- }
- while (--mcnt);
- }
- else
- {
- do
- {
- PREFETCH ();
- if (*d++ != (char) *p++) goto fail;
- }
- while (--mcnt);
- }
- SET_REGS_MATCHED ();
- break;
-
-
- /* Match any character except possibly a newline or a null. */
- case anychar:
- DEBUG_PRINT1 ("EXECUTING anychar.\n");
-
- PREFETCH ();
-
- if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
- || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
- goto fail;
-
- SET_REGS_MATCHED ();
- DEBUG_PRINT2 (" Matched `%d'.\n", *d);
- d++;
- break;
-
-
- case charset:
- case charset_not:
- {
- register unsigned char c;
- boolean not = (re_opcode_t) *(p - 1) == charset_not;
-
- DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
-
- PREFETCH ();
- c = TRANSLATE (*d); /* The character to match. */
-
- /* Cast to `unsigned' instead of `unsigned char' in case the
- bit list is a full 32 bytes long. */
- if (c < (unsigned) (*p * BYTEWIDTH)
- && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
- not = !not;
-
- p += 1 + *p;
-
- if (!not) goto fail;
-
- SET_REGS_MATCHED ();
- d++;
- break;
- }
-
-
- /* The beginning of a group is represented by start_memory.
- The arguments are the register number in the next byte, and the
- number of groups inner to this one in the next. The text
- matched within the group is recorded (in the internal
- registers data structure) under the register number. */
- case start_memory:
- DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]);
-
- /* Find out if this group can match the empty string. */
- p1 = p; /* To send to group_match_null_string_p. */
-
- if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
- REG_MATCH_NULL_STRING_P (reg_info[*p])
- = group_match_null_string_p (&p1, pend, reg_info);
-
- /* Save the position in the string where we were the last time
- we were at this open-group operator in case the group is
- operated upon by a repetition operator, e.g., with `(a*)*b'
- against `ab'; then we want to ignore where we are now in
- the string in case this attempt to match fails. */
- old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
- ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
- : regstart[*p];
- DEBUG_PRINT2 (" old_regstart: %d\n",
- POINTER_TO_OFFSET (old_regstart[*p]));
-
- regstart[*p] = d;
- DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
-
- IS_ACTIVE (reg_info[*p]) = 1;
- MATCHED_SOMETHING (reg_info[*p]) = 0;
-
- /* Clear this whenever we change the register activity status. */
- set_regs_matched_done = 0;
-
- /* This is the new highest active register. */
- highest_active_reg = *p;
-
- /* If nothing was active before, this is the new lowest active
- register. */
- if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
- lowest_active_reg = *p;
-
- /* Move past the register number and inner group count. */
- p += 2;
- just_past_start_mem = p;
-
- break;
-
-
- /* The stop_memory opcode represents the end of a group. Its
- arguments are the same as start_memory's: the register
- number, and the number of inner groups. */
- case stop_memory:
- DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]);
-
- /* We need to save the string position the last time we were at
- this close-group operator in case the group is operated
- upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
- against `aba'; then we want to ignore where we are now in
- the string in case this attempt to match fails. */
- old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
- ? REG_UNSET (regend[*p]) ? d : regend[*p]
- : regend[*p];
- DEBUG_PRINT2 (" old_regend: %d\n",
- POINTER_TO_OFFSET (old_regend[*p]));
-
- regend[*p] = d;
- DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
-
- /* This register isn't active anymore. */
- IS_ACTIVE (reg_info[*p]) = 0;
-
- /* Clear this whenever we change the register activity status. */
- set_regs_matched_done = 0;
-
- /* If this was the only register active, nothing is active
- anymore. */
- if (lowest_active_reg == highest_active_reg)
- {
- lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- highest_active_reg = NO_HIGHEST_ACTIVE_REG;
- }
- else
- { /* We must scan for the new highest active register, since
- it isn't necessarily one less than now: consider
- (a(b)c(d(e)f)g). When group 3 ends, after the f), the
- new highest active register is 1. */
- unsigned char r = *p - 1;
- while (r > 0 && !IS_ACTIVE (reg_info[r]))
- r--;
-
- /* If we end up at register zero, that means that we saved
- the registers as the result of an `on_failure_jump', not
- a `start_memory', and we jumped to past the innermost
- `stop_memory'. For example, in ((.)*) we save
- registers 1 and 2 as a result of the *, but when we pop
- back to the second ), we are at the stop_memory 1.
- Thus, nothing is active. */
- if (r == 0)
- {
- lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- highest_active_reg = NO_HIGHEST_ACTIVE_REG;
- }
- else
- highest_active_reg = r;
- }
-
- /* If just failed to match something this time around with a
- group that's operated on by a repetition operator, try to
- force exit from the ``loop'', and restore the register
- information for this group that we had before trying this
- last match. */
- if ((!MATCHED_SOMETHING (reg_info[*p])
- || just_past_start_mem == p - 1)
- && (p + 2) < pend)
- {
- boolean is_a_jump_n = false;
-
- p1 = p + 2;
- mcnt = 0;
- switch ((re_opcode_t) *p1++)
- {
- case jump_n:
- is_a_jump_n = true;
- case pop_failure_jump:
- case maybe_pop_jump:
- case jump:
- case dummy_failure_jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- if (is_a_jump_n)
- p1 += 2;
- break;
-
- default:
- /* do nothing */ ;
- }
- p1 += mcnt;
-
- /* If the next operation is a jump backwards in the pattern
- to an on_failure_jump right before the start_memory
- corresponding to this stop_memory, exit from the loop
- by forcing a failure after pushing on the stack the
- on_failure_jump's jump in the pattern, and d. */
- if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
- && (re_opcode_t) p1[3] == start_memory && p1[4] == *p)
- {
- /* If this group ever matched anything, then restore
- what its registers were before trying this last
- failed match, e.g., with `(a*)*b' against `ab' for
- regstart[1], and, e.g., with `((a*)*(b*)*)*'
- against `aba' for regend[3].
-
- Also restore the registers for inner groups for,
- e.g., `((a*)(b*))*' against `aba' (register 3 would
- otherwise get trashed). */
-
- if (EVER_MATCHED_SOMETHING (reg_info[*p]))
- {
- unsigned r;
-
- EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
-
- /* Restore this and inner groups' (if any) registers. */
- for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
- r++)
- {
- regstart[r] = old_regstart[r];
-
- /* xx why this test? */
- if (old_regend[r] >= regstart[r])
- regend[r] = old_regend[r];
- }
- }
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
-
- goto fail;
- }
- }
-
- /* Move past the register number and the inner group count. */
- p += 2;
- break;
-
-
- /* \<digit> has been turned into a `duplicate' command which is
- followed by the numeric value of <digit> as the register number. */
- case duplicate:
- {
- register const char *d2, *dend2;
- int regno = *p++; /* Get which register to match against. */
- DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
-
- /* Can't back reference a group which we've never matched. */
- if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
- goto fail;
-
- /* Where in input to try to start matching. */
- d2 = regstart[regno];
-
- /* Where to stop matching; if both the place to start and
- the place to stop matching are in the same string, then
- set to the place to stop, otherwise, for now have to use
- the end of the first string. */
-
- dend2 = ((FIRST_STRING_P (regstart[regno])
- == FIRST_STRING_P (regend[regno]))
- ? regend[regno] : end_match_1);
- for (;;)
- {
- /* If necessary, advance to next segment in register
- contents. */
- while (d2 == dend2)
- {
- if (dend2 == end_match_2) break;
- if (dend2 == regend[regno]) break;
-
- /* End of string1 => advance to string2. */
- d2 = string2;
- dend2 = regend[regno];
- }
- /* At end of register contents => success */
- if (d2 == dend2) break;
-
- /* If necessary, advance to next segment in data. */
- PREFETCH ();
-
- /* How many characters left in this segment to match. */
- mcnt = dend - d;
-
- /* Want how many consecutive characters we can match in
- one shot, so, if necessary, adjust the count. */
- if (mcnt > dend2 - d2)
- mcnt = dend2 - d2;
-
- /* Compare that many; failure if mismatch, else move
- past them. */
- if (translate
- ? bcmp_translate (d, d2, mcnt, translate)
- : memcmp (d, d2, mcnt))
- goto fail;
- d += mcnt, d2 += mcnt;
-
- /* Do this because we've match some characters. */
- SET_REGS_MATCHED ();
- }
- }
- break;
-
-
- /* begline matches the empty string at the beginning of the string
- (unless `not_bol' is set in `bufp'), and, if
- `newline_anchor' is set, after newlines. */
- case begline:
- DEBUG_PRINT1 ("EXECUTING begline.\n");
-
- if (AT_STRINGS_BEG (d))
- {
- if (!bufp->not_bol) break;
- }
- else if (d[-1] == '\n' && bufp->newline_anchor)
- {
- break;
- }
- /* In all other cases, we fail. */
- goto fail;
-
-
- /* endline is the dual of begline. */
- case endline:
- DEBUG_PRINT1 ("EXECUTING endline.\n");
-
- if (AT_STRINGS_END (d))
- {
- if (!bufp->not_eol) break;
- }
-
- /* We have to ``prefetch'' the next character. */
- else if ((d == end1 ? *string2 : *d) == '\n'
- && bufp->newline_anchor)
- {
- break;
- }
- goto fail;
-
-
- /* Match at the very beginning of the data. */
- case begbuf:
- DEBUG_PRINT1 ("EXECUTING begbuf.\n");
- if (AT_STRINGS_BEG (d))
- break;
- goto fail;
-
-
- /* Match at the very end of the data. */
- case endbuf:
- DEBUG_PRINT1 ("EXECUTING endbuf.\n");
- if (AT_STRINGS_END (d))
- break;
- goto fail;
-
-
- /* on_failure_keep_string_jump is used to optimize `.*\n'. It
- pushes NULL as the value for the string on the stack. Then
- `pop_failure_point' will keep the current value for the
- string, instead of restoring it. To see why, consider
- matching `foo\nbar' against `.*\n'. The .* matches the foo;
- then the . fails against the \n. But the next thing we want
- to do is match the \n against the \n; if we restored the
- string value, we would be back at the foo.
-
- Because this is used only in specific cases, we don't need to
- check all the things that `on_failure_jump' does, to make
- sure the right things get saved on the stack. Hence we don't
- share its code. The only reason to push anything on the
- stack at all is that otherwise we would have to change
- `anychar's code to do something besides goto fail in this
- case; that seems worse than this. */
- case on_failure_keep_string_jump:
- DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
-
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
-#else
- DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
-#endif
-
- PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
- break;
-
-
- /* Uses of on_failure_jump:
-
- Each alternative starts with an on_failure_jump that points
- to the beginning of the next alternative. Each alternative
- except the last ends with a jump that in effect jumps past
- the rest of the alternatives. (They really jump to the
- ending jump of the following alternative, because tensioning
- these jumps is a hassle.)
-
- Repeats start with an on_failure_jump that points past both
- the repetition text and either the following jump or
- pop_failure_jump back to this on_failure_jump. */
- case on_failure_jump:
- on_failure:
- DEBUG_PRINT1 ("EXECUTING on_failure_jump");
-
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
-#else
- DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
-#endif
-
- /* If this on_failure_jump comes right before a group (i.e.,
- the original * applied to a group), save the information
- for that group and all inner ones, so that if we fail back
- to this point, the group's information will be correct.
- For example, in \(a*\)*\1, we need the preceding group,
- and in \(zz\(a*\)b*\)\2, we need the inner group. */
-
- /* We can't use `p' to check ahead because we push
- a failure point to `p + mcnt' after we do this. */
- p1 = p;
-
- /* We need to skip no_op's before we look for the
- start_memory in case this on_failure_jump is happening as
- the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
- against aba. */
- while (p1 < pend && (re_opcode_t) *p1 == no_op)
- p1++;
-
- if (p1 < pend && (re_opcode_t) *p1 == start_memory)
- {
- /* We have a new highest active register now. This will
- get reset at the start_memory we are about to get to,
- but we will have saved all the registers relevant to
- this repetition op, as described above. */
- highest_active_reg = *(p1 + 1) + *(p1 + 2);
- if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
- lowest_active_reg = *(p1 + 1);
- }
-
- DEBUG_PRINT1 (":\n");
- PUSH_FAILURE_POINT (p + mcnt, d, -2);
- break;
-
-
- /* A smart repeat ends with `maybe_pop_jump'.
- We change it to either `pop_failure_jump' or `jump'. */
- case maybe_pop_jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
- DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
- {
- register unsigned char *p2 = p;
-
- /* Compare the beginning of the repeat with what in the
- pattern follows its end. If we can establish that there
- is nothing that they would both match, i.e., that we
- would have to backtrack because of (as in, e.g., `a*a')
- then we can change to pop_failure_jump, because we'll
- never have to backtrack.
-
- This is not true in the case of alternatives: in
- `(a|ab)*' we do need to backtrack to the `ab' alternative
- (e.g., if the string was `ab'). But instead of trying to
- detect that here, the alternative has put on a dummy
- failure point which is what we will end up popping. */
-
- /* Skip over open/close-group commands.
- If what follows this loop is a ...+ construct,
- look at what begins its body, since we will have to
- match at least one of that. */
- while (1)
- {
- if (p2 + 2 < pend
- && ((re_opcode_t) *p2 == stop_memory
- || (re_opcode_t) *p2 == start_memory))
- p2 += 3;
- else if (p2 + 6 < pend
- && (re_opcode_t) *p2 == dummy_failure_jump)
- p2 += 6;
- else
- break;
- }
-
- p1 = p + mcnt;
- /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
- to the `maybe_finalize_jump' of this case. Examine what
- follows. */
-
- /* If we're at the end of the pattern, we can change. */
- if (p2 == pend)
- {
- /* Consider what happens when matching ":\(.*\)"
- against ":/". I don't really understand this code
- yet. */
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1
- (" End of pattern: change to `pop_failure_jump'.\n");
- }
-
- else if ((re_opcode_t) *p2 == exactn
- || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
- {
- register unsigned char c
- = *p2 == (unsigned char) endline ? '\n' : p2[2];
-
- if ((re_opcode_t) p1[3] == exactn && p1[5] != c)
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
- c, p1[5]);
- }
-
- else if ((re_opcode_t) p1[3] == charset
- || (re_opcode_t) p1[3] == charset_not)
- {
- int not = (re_opcode_t) p1[3] == charset_not;
-
- if (c < (unsigned char) (p1[4] * BYTEWIDTH)
- && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
- not = !not;
-
- /* `not' is equal to 1 if c would match, which means
- that we can't change to pop_failure_jump. */
- if (!not)
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
- }
- }
- else if ((re_opcode_t) *p2 == charset)
- {
- /* We win if the first character of the loop is not part
- of the charset. */
- if ((re_opcode_t) p1[3] == exactn
- && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
- && (p2[2 + p1[5] / BYTEWIDTH]
- & (1 << (p1[5] % BYTEWIDTH)))))
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
-
- else if ((re_opcode_t) p1[3] == charset_not)
- {
- int idx;
- /* We win if the charset_not inside the loop
- lists every character listed in the charset after. */
- for (idx = 0; idx < (int) p2[1]; idx++)
- if (! (p2[2 + idx] == 0
- || (idx < (int) p1[4]
- && ((p2[2 + idx] & ~ p1[5 + idx]) == 0))))
- break;
-
- if (idx == p2[1])
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
- }
- else if ((re_opcode_t) p1[3] == charset)
- {
- int idx;
- /* We win if the charset inside the loop
- has no overlap with the one after the loop. */
- for (idx = 0;
- idx < (int) p2[1] && idx < (int) p1[4];
- idx++)
- if ((p2[2 + idx] & p1[5 + idx]) != 0)
- break;
-
- if (idx == p2[1] || idx == p1[4])
- {
- p[-3] = (unsigned char) pop_failure_jump;
- DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
- }
- }
- }
- }
- p -= 2; /* Point at relative address again. */
- if ((re_opcode_t) p[-1] != pop_failure_jump)
- {
- p[-1] = (unsigned char) jump;
- DEBUG_PRINT1 (" Match => jump.\n");
- goto unconditional_jump;
- }
- /* Note fall through. */
-
-
- /* The end of a simple repeat has a pop_failure_jump back to
- its matching on_failure_jump, where the latter will push a
- failure point. The pop_failure_jump takes off failure
- points put on by this pop_failure_jump's matching
- on_failure_jump; we got through the pattern to here from the
- matching on_failure_jump, so didn't fail. */
- case pop_failure_jump:
- {
- /* We need to pass separate storage for the lowest and
- highest registers, even though we don't care about the
- actual values. Otherwise, we will restore only one
- register from the stack, since lowest will == highest in
- `pop_failure_point'. */
- active_reg_t dummy_low_reg, dummy_high_reg;
- unsigned char *pdummy;
- const char *sdummy;
-
- DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
- POP_FAILURE_POINT (sdummy, pdummy,
- dummy_low_reg, dummy_high_reg,
- reg_dummy, reg_dummy, reg_info_dummy);
- }
- /* Note fall through. */
-
- unconditional_jump:
-#ifdef _LIBC
- DEBUG_PRINT2 ("\n%p: ", p);
-#else
- DEBUG_PRINT2 ("\n0x%x: ", p);
-#endif
- /* Note fall through. */
-
- /* Unconditionally jump (without popping any failure points). */
- case jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
- DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
- p += mcnt; /* Do the jump. */
-#ifdef _LIBC
- DEBUG_PRINT2 ("(to %p).\n", p);
-#else
- DEBUG_PRINT2 ("(to 0x%x).\n", p);
-#endif
- break;
-
-
- /* We need this opcode so we can detect where alternatives end
- in `group_match_null_string_p' et al. */
- case jump_past_alt:
- DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
- goto unconditional_jump;
-
-
- /* Normally, the on_failure_jump pushes a failure point, which
- then gets popped at pop_failure_jump. We will end up at
- pop_failure_jump, also, and with a pattern of, say, `a+', we
- are skipping over the on_failure_jump, so we have to push
- something meaningless for pop_failure_jump to pop. */
- case dummy_failure_jump:
- DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
- /* It doesn't matter what we push for the string here. What
- the code at `fail' tests is the value for the pattern. */
- PUSH_FAILURE_POINT (NULL, NULL, -2);
- goto unconditional_jump;
-
-
- /* At the end of an alternative, we need to push a dummy failure
- point in case we are followed by a `pop_failure_jump', because
- we don't want the failure point for the alternative to be
- popped. For example, matching `(a|ab)*' against `aab'
- requires that we match the `ab' alternative. */
- case push_dummy_failure:
- DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
- /* See comments just above at `dummy_failure_jump' about the
- two zeroes. */
- PUSH_FAILURE_POINT (NULL, NULL, -2);
- break;
-
- /* Have to succeed matching what follows at least n times.
- After that, handle like `on_failure_jump'. */
- case succeed_n:
- EXTRACT_NUMBER (mcnt, p + 2);
- DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
-
- assert (mcnt >= 0);
- /* Originally, this is how many times we HAVE to succeed. */
- if (mcnt > 0)
- {
- mcnt--;
- p += 2;
- STORE_NUMBER_AND_INCR (p, mcnt);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p - 2, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - 2, mcnt);
-#endif
- }
- else if (mcnt == 0)
- {
-#ifdef _LIBC
- DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n", p+2);
-#else
- DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2);
-#endif
- p[2] = (unsigned char) no_op;
- p[3] = (unsigned char) no_op;
- goto on_failure;
- }
- break;
-
- case jump_n:
- EXTRACT_NUMBER (mcnt, p + 2);
- DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
-
- /* Originally, this is how many times we CAN jump. */
- if (mcnt)
- {
- mcnt--;
- STORE_NUMBER (p + 2, mcnt);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p + 2, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + 2, mcnt);
-#endif
- goto unconditional_jump;
- }
- /* If don't have to jump any more, skip over the rest of command. */
- else
- p += 4;
- break;
-
- case set_number_at:
- {
- DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
-
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
- p1 = p + mcnt;
- EXTRACT_NUMBER_AND_INCR (mcnt, p);
-#ifdef _LIBC
- DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
-#else
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
-#endif
- STORE_NUMBER (p1, mcnt);
- break;
- }
-
-#if 0
- /* The DEC Alpha C compiler 3.x generates incorrect code for the
- test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
- AT_WORD_BOUNDARY, so this code is disabled. Expanding the
- macro and introducing temporary variables works around the bug. */
-
- case wordbound:
- DEBUG_PRINT1 ("EXECUTING wordbound.\n");
- if (AT_WORD_BOUNDARY (d))
- break;
- goto fail;
-
- case notwordbound:
- DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
- if (AT_WORD_BOUNDARY (d))
- goto fail;
- break;
-#else
- case wordbound:
- {
- boolean prevchar, thischar;
-
- DEBUG_PRINT1 ("EXECUTING wordbound.\n");
- if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
- break;
-
- prevchar = WORDCHAR_P (d - 1);
- thischar = WORDCHAR_P (d);
- if (prevchar != thischar)
- break;
- goto fail;
- }
-
- case notwordbound:
- {
- boolean prevchar, thischar;
-
- DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
- if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
- goto fail;
-
- prevchar = WORDCHAR_P (d - 1);
- thischar = WORDCHAR_P (d);
- if (prevchar != thischar)
- goto fail;
- break;
- }
-#endif
-
- case wordbeg:
- DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
- if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
- break;
- goto fail;
-
- case wordend:
- DEBUG_PRINT1 ("EXECUTING wordend.\n");
- if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
- && (!WORDCHAR_P (d) || AT_STRINGS_END (d)))
- break;
- goto fail;
-
-#ifdef emacs
- case before_dot:
- DEBUG_PRINT1 ("EXECUTING before_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) >= point)
- goto fail;
- break;
-
- case at_dot:
- DEBUG_PRINT1 ("EXECUTING at_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) != point)
- goto fail;
- break;
-
- case after_dot:
- DEBUG_PRINT1 ("EXECUTING after_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) <= point)
- goto fail;
- break;
-
- case syntaxspec:
- DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
- mcnt = *p++;
- goto matchsyntax;
-
- case wordchar:
- DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
- mcnt = (int) Sword;
- matchsyntax:
- PREFETCH ();
- /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
- d++;
- if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
- goto fail;
- SET_REGS_MATCHED ();
- break;
-
- case notsyntaxspec:
- DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
- mcnt = *p++;
- goto matchnotsyntax;
-
- case notwordchar:
- DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
- mcnt = (int) Sword;
- matchnotsyntax:
- PREFETCH ();
- /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
- d++;
- if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
- goto fail;
- SET_REGS_MATCHED ();
- break;
-
-#else /* not emacs */
- case wordchar:
- DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
- PREFETCH ();
- if (!WORDCHAR_P (d))
- goto fail;
- SET_REGS_MATCHED ();
- d++;
- break;
-
- case notwordchar:
- DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
- PREFETCH ();
- if (WORDCHAR_P (d))
- goto fail;
- SET_REGS_MATCHED ();
- d++;
- break;
-#endif /* not emacs */
-
- default:
- abort ();
- }
- continue; /* Successfully executed one pattern command; keep going. */
-
-
- /* We goto here if a matching operation fails. */
- fail:
- if (!FAIL_STACK_EMPTY ())
- { /* A restart point is known. Restore to that state. */
- DEBUG_PRINT1 ("\nFAIL:\n");
- POP_FAILURE_POINT (d, p,
- lowest_active_reg, highest_active_reg,
- regstart, regend, reg_info);
-
- /* If this failure point is a dummy, try the next one. */
- if (!p)
- goto fail;
-
- /* If we failed to the end of the pattern, don't examine *p. */
- assert (p <= pend);
- if (p < pend)
- {
- boolean is_a_jump_n = false;
-
- /* If failed to a backwards jump that's part of a repetition
- loop, need to pop this failure point and use the next one. */
- switch ((re_opcode_t) *p)
- {
- case jump_n:
- is_a_jump_n = true;
- case maybe_pop_jump:
- case pop_failure_jump:
- case jump:
- p1 = p + 1;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
-
- if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
- || (!is_a_jump_n
- && (re_opcode_t) *p1 == on_failure_jump))
- goto fail;
- break;
- default:
- /* do nothing */ ;
- }
- }
-
- if (d >= string1 && d <= end1)
- dend = end_match_1;
- }
- else
- break; /* Matching at this starting point really fails. */
- } /* for (;;) */
-
- if (best_regs_set)
- goto restore_best_regs;
-
- FREE_VARIABLES ();
-
- return -1; /* Failure to match. */
-} /* re_match_2 */
-
-/* Subroutine definitions for re_match_2. */
-
-
-/* We are passed P pointing to a register number after a start_memory.
-
- Return true if the pattern up to the corresponding stop_memory can
- match the empty string, and false otherwise.
-
- If we find the matching stop_memory, sets P to point to one past its number.
- Otherwise, sets P to an undefined byte less than or equal to END.
-
- We don't handle duplicates properly (yet). */
-
-static boolean
-group_match_null_string_p (p, end, reg_info)
- unsigned char **p, *end;
- register_info_type *reg_info;
-{
- int mcnt;
- /* Point to after the args to the start_memory. */
- unsigned char *p1 = *p + 2;
-
- while (p1 < end)
- {
- /* Skip over opcodes that can match nothing, and return true or
- false, as appropriate, when we get to one that can't, or to the
- matching stop_memory. */
-
- switch ((re_opcode_t) *p1)
- {
- /* Could be either a loop or a series of alternatives. */
- case on_failure_jump:
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-
- /* If the next operation is not a jump backwards in the
- pattern. */
-
- if (mcnt >= 0)
- {
- /* Go through the on_failure_jumps of the alternatives,
- seeing if any of the alternatives cannot match nothing.
- The last alternative starts with only a jump,
- whereas the rest start with on_failure_jump and end
- with a jump, e.g., here is the pattern for `a|b|c':
-
- /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
- /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
- /exactn/1/c
-
- So, we have to first go through the first (n-1)
- alternatives and then deal with the last one separately. */
-
-
- /* Deal with the first (n-1) alternatives, which start
- with an on_failure_jump (see above) that jumps to right
- past a jump_past_alt. */
-
- while ((re_opcode_t) p1[mcnt-3] == jump_past_alt)
- {
- /* `mcnt' holds how many bytes long the alternative
- is, including the ending `jump_past_alt' and
- its number. */
-
- if (!alt_match_null_string_p (p1, p1 + mcnt - 3,
- reg_info))
- return false;
-
- /* Move to right after this alternative, including the
- jump_past_alt. */
- p1 += mcnt;
-
- /* Break if it's the beginning of an n-th alternative
- that doesn't begin with an on_failure_jump. */
- if ((re_opcode_t) *p1 != on_failure_jump)
- break;
-
- /* Still have to check that it's not an n-th
- alternative that starts with an on_failure_jump. */
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- if ((re_opcode_t) p1[mcnt-3] != jump_past_alt)
- {
- /* Get to the beginning of the n-th alternative. */
- p1 -= 3;
- break;
- }
- }
-
- /* Deal with the last alternative: go back and get number
- of the `jump_past_alt' just before it. `mcnt' contains
- the length of the alternative. */
- EXTRACT_NUMBER (mcnt, p1 - 2);
-
- if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info))
- return false;
-
- p1 += mcnt; /* Get past the n-th alternative. */
- } /* if mcnt > 0 */
- break;
-
-
- case stop_memory:
- assert (p1[1] == **p);
- *p = p1 + 2;
- return true;
-
-
- default:
- if (!common_op_match_null_string_p (&p1, end, reg_info))
- return false;
- }
- } /* while p1 < end */
-
- return false;
-} /* group_match_null_string_p */
-
-
-/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
- It expects P to be the first byte of a single alternative and END one
- byte past the last. The alternative can contain groups. */
-
-static boolean
-alt_match_null_string_p (p, end, reg_info)
- unsigned char *p, *end;
- register_info_type *reg_info;
-{
- int mcnt;
- unsigned char *p1 = p;
-
- while (p1 < end)
- {
- /* Skip over opcodes that can match nothing, and break when we get
- to one that can't. */
-
- switch ((re_opcode_t) *p1)
- {
- /* It's a loop. */
- case on_failure_jump:
- p1++;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
- break;
-
- default:
- if (!common_op_match_null_string_p (&p1, end, reg_info))
- return false;
- }
- } /* while p1 < end */
-
- return true;
-} /* alt_match_null_string_p */
-
-
-/* Deals with the ops common to group_match_null_string_p and
- alt_match_null_string_p.
-
- Sets P to one after the op and its arguments, if any. */
-
-static boolean
-common_op_match_null_string_p (p, end, reg_info)
- unsigned char **p, *end;
- register_info_type *reg_info;
-{
- int mcnt;
- boolean ret;
- int reg_no;
- unsigned char *p1 = *p;
-
- switch ((re_opcode_t) *p1++)
- {
- case no_op:
- case begline:
- case endline:
- case begbuf:
- case endbuf:
- case wordbeg:
- case wordend:
- case wordbound:
- case notwordbound:
-#ifdef emacs
- case before_dot:
- case at_dot:
- case after_dot:
-#endif
- break;
-
- case start_memory:
- reg_no = *p1;
- assert (reg_no > 0 && reg_no <= MAX_REGNUM);
- ret = group_match_null_string_p (&p1, end, reg_info);
-
- /* Have to set this here in case we're checking a group which
- contains a group and a back reference to it. */
-
- if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
- REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
-
- if (!ret)
- return false;
- break;
-
- /* If this is an optimized succeed_n for zero times, make the jump. */
- case jump:
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- if (mcnt >= 0)
- p1 += mcnt;
- else
- return false;
- break;
-
- case succeed_n:
- /* Get to the number of times to succeed. */
- p1 += 2;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-
- if (mcnt == 0)
- {
- p1 -= 4;
- EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
- }
- else
- return false;
- break;
-
- case duplicate:
- if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
- return false;
- break;
-
- case set_number_at:
- p1 += 4;
-
- default:
- /* All other opcodes mean we cannot match the empty string. */
- return false;
- }
-
- *p = p1;
- return true;
-} /* common_op_match_null_string_p */
-
-
-/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
- bytes; nonzero otherwise. */
-
-static int
-bcmp_translate (s1, s2, len, translate)
- const char *s1, *s2;
- register int len;
- RE_TRANSLATE_TYPE translate;
-{
- register const unsigned char *p1 = (const unsigned char *) s1;
- register const unsigned char *p2 = (const unsigned char *) s2;
- while (len)
- {
- if (translate[*p1++] != translate[*p2++]) return 1;
- len--;
- }
- return 0;
-}
-
-/* Entry points for GNU code. */
-
-/* re_compile_pattern is the GNU regular expression compiler: it
- compiles PATTERN (of length SIZE) and puts the result in BUFP.
- Returns 0 if the pattern was valid, otherwise an error string.
-
- Assumes the `allocated' (and perhaps `buffer') and `translate' fields
- are set in BUFP on entry.
-
- We call regex_compile to do the actual compilation. */
-
-const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
-{
- reg_errcode_t ret;
-
- /* GNU code is written to assume at least RE_NREGS registers will be set
- (and at least one extra will be -1). */
- bufp->regs_allocated = REGS_UNALLOCATED;
-
- /* And GNU code determines whether or not to get register information
- by passing null for the REGS argument to re_match, etc., not by
- setting no_sub. */
- bufp->no_sub = 0;
-
- /* Match anchors at newline. */
- bufp->newline_anchor = 1;
-
- ret = regex_compile (pattern, length, re_syntax_options, bufp);
-
- if (!ret)
- return NULL;
- return gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
-}
-#ifdef _LIBC
-weak_alias (__re_compile_pattern, re_compile_pattern)
-#endif
-
-/* Entry points compatible with 4.2 BSD regex library. We don't define
- them unless specifically requested. */
-
-#if defined _REGEX_RE_COMP || defined _LIBC
-
-/* BSD has one and only one pattern buffer. */
-static struct re_pattern_buffer re_comp_buf;
-
-char *
-#ifdef _LIBC
-/* Make these definitions weak in libc, so POSIX programs can redefine
- these names if they don't use our functions, and still use
- regcomp/regexec below without link errors. */
-weak_function
-#endif
-re_comp (s)
- const char *s;
-{
- reg_errcode_t ret;
-
- if (!s)
- {
- if (!re_comp_buf.buffer)
- return gettext ("No previous regular expression");
- return 0;
- }
-
- if (!re_comp_buf.buffer)
- {
- re_comp_buf.buffer = (unsigned char *) malloc (200);
- if (re_comp_buf.buffer == NULL)
- return (char *) gettext (re_error_msgid
- + re_error_msgid_idx[(int) REG_ESPACE]);
- re_comp_buf.allocated = 200;
-
- re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
- if (re_comp_buf.fastmap == NULL)
- return (char *) gettext (re_error_msgid
- + re_error_msgid_idx[(int) REG_ESPACE]);
- }
-
- /* Since `re_exec' always passes NULL for the `regs' argument, we
- don't need to initialize the pattern buffer fields which affect it. */
-
- /* Match anchors at newlines. */
- re_comp_buf.newline_anchor = 1;
-
- ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
-
- if (!ret)
- return NULL;
-
- /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
- return (char *) gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
-}
-
-
-int
-#ifdef _LIBC
-weak_function
-#endif
-re_exec (s)
- const char *s;
-{
- const int len = strlen (s);
- return
- 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
-}
-
-#endif /* _REGEX_RE_COMP */
-
-/* POSIX.2 functions. Don't define these for Emacs. */
-
-#ifndef emacs
-
-/* regcomp takes a regular expression as a string and compiles it.
-
- PREG is a regex_t *. We do not expect any fields to be initialized,
- since POSIX says we shouldn't. Thus, we set
-
- `buffer' to the compiled pattern;
- `used' to the length of the compiled pattern;
- `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
- REG_EXTENDED bit in CFLAGS is set; otherwise, to
- RE_SYNTAX_POSIX_BASIC;
- `newline_anchor' to REG_NEWLINE being set in CFLAGS;
- `fastmap' to an allocated space for the fastmap;
- `fastmap_accurate' to zero;
- `re_nsub' to the number of subexpressions in PATTERN.
-
- PATTERN is the address of the pattern string.
-
- CFLAGS is a series of bits which affect compilation.
-
- If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
- use POSIX basic syntax.
-
- If REG_NEWLINE is set, then . and [^...] don't match newline.
- Also, regexec will try a match beginning after every newline.
-
- If REG_ICASE is set, then we considers upper- and lowercase
- versions of letters to be equivalent when matching.
-
- If REG_NOSUB is set, then when PREG is passed to regexec, that
- routine will report only success or failure, and nothing about the
- registers.
-
- It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
- the return codes and their meanings.) */
-
-int
-regcomp (preg, pattern, cflags)
- regex_t *preg;
- const char *pattern;
- int cflags;
-{
- reg_errcode_t ret;
- reg_syntax_t syntax
- = (cflags & REG_EXTENDED) ?
- RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
-
- /* regex_compile will allocate the space for the compiled pattern. */
- preg->buffer = 0;
- preg->allocated = 0;
- preg->used = 0;
-
- /* Try to allocate space for the fastmap. */
- preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
-
- if (cflags & REG_ICASE)
- {
- unsigned i;
-
- preg->translate
- = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
- * sizeof (*(RE_TRANSLATE_TYPE)0));
- if (preg->translate == NULL)
- return (int) REG_ESPACE;
-
- /* Map uppercase characters to corresponding lowercase ones. */
- for (i = 0; i < CHAR_SET_SIZE; i++)
- preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
- }
- else
- preg->translate = NULL;
-
- /* If REG_NEWLINE is set, newlines are treated differently. */
- if (cflags & REG_NEWLINE)
- { /* REG_NEWLINE implies neither . nor [^...] match newline. */
- syntax &= ~RE_DOT_NEWLINE;
- syntax |= RE_HAT_LISTS_NOT_NEWLINE;
- /* It also changes the matching behavior. */
- preg->newline_anchor = 1;
- }
- else
- preg->newline_anchor = 0;
-
- preg->no_sub = !!(cflags & REG_NOSUB);
-
- /* POSIX says a null character in the pattern terminates it, so we
- can use strlen here in compiling the pattern. */
- ret = regex_compile (pattern, strlen (pattern), syntax, preg);
-
- /* POSIX doesn't distinguish between an unmatched open-group and an
- unmatched close-group: both are REG_EPAREN. */
- if (ret == REG_ERPAREN) ret = REG_EPAREN;
-
- if (ret == REG_NOERROR && preg->fastmap)
- {
- /* Compute the fastmap now, since regexec cannot modify the pattern
- buffer. */
- if (re_compile_fastmap (preg) == -2)
- {
- /* Some error occured while computing the fastmap, just forget
- about it. */
- free (preg->fastmap);
- preg->fastmap = NULL;
- }
- }
-
- return (int) ret;
-}
-#ifdef _LIBC
-weak_alias (__regcomp, regcomp)
-#endif
-
-
-/* regexec searches for a given pattern, specified by PREG, in the
- string STRING.
-
- If NMATCH is zero or REG_NOSUB was set in the cflags argument to
- `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
- least NMATCH elements, and we set them to the offsets of the
- corresponding matched substrings.
-
- EFLAGS specifies `execution flags' which affect matching: if
- REG_NOTBOL is set, then ^ does not match at the beginning of the
- string; if REG_NOTEOL is set, then $ does not match at the end.
-
- We return 0 if we find a match and REG_NOMATCH if not. */
-
-int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *preg;
- const char *string;
- size_t nmatch;
- regmatch_t pmatch[];
- int eflags;
-{
- int ret;
- struct re_registers regs;
- regex_t private_preg;
- int len = strlen (string);
- boolean want_reg_info = !preg->no_sub && nmatch > 0;
-
- private_preg = *preg;
-
- private_preg.not_bol = !!(eflags & REG_NOTBOL);
- private_preg.not_eol = !!(eflags & REG_NOTEOL);
-
- /* The user has told us exactly how many registers to return
- information about, via `nmatch'. We have to pass that on to the
- matching routines. */
- private_preg.regs_allocated = REGS_FIXED;
-
- if (want_reg_info)
- {
- regs.num_regs = nmatch;
- regs.start = TALLOC (nmatch * 2, regoff_t);
- if (regs.start == NULL)
- return (int) REG_NOMATCH;
- regs.end = regs.start + nmatch;
- }
-
- /* Perform the searching operation. */
- ret = re_search (&private_preg, string, len,
- /* start: */ 0, /* range: */ len,
- want_reg_info ? &regs : (struct re_registers *) 0);
-
- /* Copy the register information to the POSIX structure. */
- if (want_reg_info)
- {
- if (ret >= 0)
- {
- unsigned r;
-
- for (r = 0; r < nmatch; r++)
- {
- pmatch[r].rm_so = regs.start[r];
- pmatch[r].rm_eo = regs.end[r];
- }
- }
-
- /* If we needed the temporary register info, free the space now. */
- free (regs.start);
- }
-
- /* We want zero return to mean success, unlike `re_search'. */
- return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
-}
-#ifdef _LIBC
-weak_alias (__regexec, regexec)
-#endif
-
-
-/* Returns a message corresponding to an error code, ERRCODE, returned
- from either regcomp or regexec. We don't use PREG here. */
-
-size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *preg;
- char *errbuf;
- size_t errbuf_size;
-{
- const char *msg;
- size_t msg_size;
-
- if (errcode < 0
- || errcode >= (int) (sizeof (re_error_msgid_idx)
- / sizeof (re_error_msgid_idx[0])))
- /* Only error codes returned by the rest of the code should be passed
- to this routine. If we are given anything else, or if other regex
- code generates an invalid error code, then the program has a bug.
- Dump core so we can fix it. */
- abort ();
-
- msg = gettext (re_error_msgid + re_error_msgid_idx[errcode]);
-
- msg_size = strlen (msg) + 1; /* Includes the null. */
-
- if (errbuf_size != 0)
- {
- if (msg_size > errbuf_size)
- {
-#if defined HAVE_MEMPCPY || defined _LIBC
- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
-#else
- memcpy (errbuf, msg, errbuf_size - 1);
- errbuf[errbuf_size - 1] = 0;
-#endif
- }
- else
- memcpy (errbuf, msg, msg_size);
- }
-
- return msg_size;
-}
-#ifdef _LIBC
-weak_alias (__regerror, regerror)
-#endif
-
-
-/* Free dynamically allocated space used by PREG. */
-
-void
-regfree (preg)
- regex_t *preg;
-{
- if (preg->buffer != NULL)
- free (preg->buffer);
- preg->buffer = NULL;
-
- preg->allocated = 0;
- preg->used = 0;
-
- if (preg->fastmap != NULL)
- free (preg->fastmap);
- preg->fastmap = NULL;
- preg->fastmap_accurate = 0;
-
- if (preg->translate != NULL)
- free (preg->translate);
- preg->translate = NULL;
-}
-#ifdef _LIBC
-weak_alias (__regfree, regfree)
-#endif
-
-#endif /* not emacs */
diff --git a/lib/m4regex.h b/lib/m4regex.h
deleted file mode 100644
index d88ab92b..00000000
--- a/lib/m4regex.h
+++ /dev/null
@@ -1,542 +0,0 @@
-/* Definitions for data structures and routines for the regular
- expression library, version 0.12.
- Copyright (C) 1985,89,90,91,92,93,95,96,97,98 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _REGEX_H
-#define _REGEX_H 1
-
-/* Allow the use in C++ code. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* POSIX says that <sys/types.h> must be included (by the caller) before
- <regex.h>. */
-
-#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
-/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
- should be there. */
-# include <stddef.h>
-#endif
-
-/* The following two types have to be signed and unsigned integer type
- wide enough to hold a value of a pointer. For most ANSI compilers
- ptrdiff_t and size_t should be likely OK. Still size of these two
- types is 2 for Microsoft C. Ugh... */
-typedef long int s_reg_t;
-typedef unsigned long int active_reg_t;
-
-/* The following bits are used to determine the regexp syntax we
- recognize. The set/not-set meanings are chosen so that Emacs syntax
- remains the value 0. The bits are given in alphabetical order, and
- the definitions shifted by one from the previous bit; thus, when we
- add or remove a bit, only one other definition need change. */
-typedef unsigned long int reg_syntax_t;
-
-/* If this bit is not set, then \ inside a bracket expression is literal.
- If set, then such a \ quotes the following character. */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
-
-/* If this bit is not set, then + and ? are operators, and \+ and \? are
- literals.
- If set, then \+ and \? are operators and + and ? are literals. */
-#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
-
-/* If this bit is set, then character classes are supported. They are:
- [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
- [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
- If not set, then character classes are not supported. */
-#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
-
-/* If this bit is set, then ^ and $ are always anchors (outside bracket
- expressions, of course).
- If this bit is not set, then it depends:
- ^ is an anchor if it is at the beginning of a regular
- expression or after an open-group or an alternation operator;
- $ is an anchor if it is at the end of a regular expression, or
- before a close-group or an alternation operator.
-
- This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
- POSIX draft 11.2 says that * etc. in leading positions is undefined.
- We already implemented a previous draft which made those constructs
- invalid, though, so we haven't changed the code back. */
-#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
-
-/* If this bit is set, then special characters are always special
- regardless of where they are in the pattern.
- If this bit is not set, then special characters are special only in
- some contexts; otherwise they are ordinary. Specifically,
- * + ? and intervals are only special when not after the beginning,
- open-group, or alternation operator. */
-#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
-
-/* If this bit is set, then *, +, ?, and { cannot be first in an re or
- immediately after an alternation or begin-group operator. */
-#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
-
-/* If this bit is set, then . matches newline.
- If not set, then it doesn't. */
-#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
-
-/* If this bit is set, then . doesn't match NUL.
- If not set, then it does. */
-#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
-
-/* If this bit is set, nonmatching lists [^...] do not match newline.
- If not set, they do. */
-#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
-
-/* If this bit is set, either \{...\} or {...} defines an
- interval, depending on RE_NO_BK_BRACES.
- If not set, \{, \}, {, and } are literals. */
-#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-
-/* If this bit is set, +, ? and | aren't recognized as operators.
- If not set, they are. */
-#define RE_LIMITED_OPS (RE_INTERVALS << 1)
-
-/* If this bit is set, newline is an alternation operator.
- If not set, newline is literal. */
-#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-
-/* If this bit is set, then `{...}' defines an interval, and \{ and \}
- are literals.
- If not set, then `\{...\}' defines an interval. */
-#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
-
-/* If this bit is set, (...) defines a group, and \( and \) are literals.
- If not set, \(...\) defines a group, and ( and ) are literals. */
-#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
-
-/* If this bit is set, then \<digit> matches <digit>.
- If not set, then \<digit> is a back-reference. */
-#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-
-/* If this bit is set, then | is an alternation operator, and \| is literal.
- If not set, then \| is an alternation operator, and | is literal. */
-#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
-
-/* If this bit is set, then an ending range point collating higher
- than the starting range point, as in [z-a], is invalid.
- If not set, then when ending range point collates higher than the
- starting range point, the range is ignored. */
-#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
-
-/* If this bit is set, then an unmatched ) is ordinary.
- If not set, then an unmatched ) is invalid. */
-#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
-
-/* If this bit is set, succeed as soon as we match the whole pattern,
- without further backtracking. */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
-
-/* If this bit is set, do not process the GNU regex operators.
- If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
-
-/* If this bit is set, turn on internal regex debugging.
- If not set, and debugging was on, turn it off.
- This only works if regex.c is compiled -DDEBUG.
- We define this bit always, so that all that's needed to turn on
- debugging is to recompile regex.c; the calling code can always have
- this bit set, and it won't affect anything in the normal case. */
-#define RE_DEBUG (RE_NO_GNU_OPS << 1)
-
-/* This global variable defines the particular regexp syntax to use (for
- some interfaces). When a regexp is compiled, the syntax used is
- stored in the pattern buffer, so changing this does not affect
- already-compiled regexps. */
-extern reg_syntax_t re_syntax_options;
-
-/* Define combinations of the above bits for the standard possibilities.
- (The [[[ comments delimit what gets put into the Texinfo file, so
- don't delete them!) */
-/* [[[begin syntaxes]]] */
-#define RE_SYNTAX_EMACS 0
-
-#define RE_SYNTAX_AWK \
- (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
- | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
- | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GNU_AWK \
- ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
- & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
-
-#define RE_SYNTAX_POSIX_AWK \
- (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
- | RE_INTERVALS | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GREP \
- (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
- | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
- | RE_NEWLINE_ALT)
-
-#define RE_SYNTAX_EGREP \
- (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
- | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
- | RE_NO_BK_VBAR)
-
-#define RE_SYNTAX_POSIX_EGREP \
- (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
-
-/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
-#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
-
-#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
-
-/* Syntax bits common to both basic and extended POSIX regex syntax. */
-#define _RE_SYNTAX_POSIX_COMMON \
- (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
- | RE_INTERVALS | RE_NO_EMPTY_RANGES)
-
-#define RE_SYNTAX_POSIX_BASIC \
- (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
-
-/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
- RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
- isn't minimal, since other operators, such as \`, aren't disabled. */
-#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
- (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
-
-#define RE_SYNTAX_POSIX_EXTENDED \
- (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
- | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
- | RE_UNMATCHED_RIGHT_PAREN_ORD)
-
-/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
- replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */
-#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
- (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
-/* [[[end syntaxes]]] */
-
-/* Maximum number of duplicates an interval can allow. Some systems
- (erroneously) define this in other header files, but we want our
- value, so remove any previous define. */
-#ifdef RE_DUP_MAX
-# undef RE_DUP_MAX
-#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
-#define RE_DUP_MAX (0x7fff)
-
-
-/* POSIX `cflags' bits (i.e., information for `regcomp'). */
-
-/* If this bit is set, then use extended regular expression syntax.
- If not set, then use basic regular expression syntax. */
-#define REG_EXTENDED 1
-
-/* If this bit is set, then ignore case when matching.
- If not set, then case is significant. */
-#define REG_ICASE (REG_EXTENDED << 1)
-
-/* If this bit is set, then anchors do not match at newline
- characters in the string.
- If not set, then anchors do match at newlines. */
-#define REG_NEWLINE (REG_ICASE << 1)
-
-/* If this bit is set, then report only success or fail in regexec.
- If not set, then returns differ between not matching and errors. */
-#define REG_NOSUB (REG_NEWLINE << 1)
-
-
-/* POSIX `eflags' bits (i.e., information for regexec). */
-
-/* If this bit is set, then the beginning-of-line operator doesn't match
- the beginning of the string (presumably because it's not the
- beginning of a line).
- If not set, then the beginning-of-line operator does match the
- beginning of the string. */
-#define REG_NOTBOL 1
-
-/* Like REG_NOTBOL, except for the end-of-line. */
-#define REG_NOTEOL (1 << 1)
-
-
-/* If any error codes are removed, changed, or added, update the
- `re_error_msg' table in regex.c. */
-typedef enum
-{
-#ifdef _XOPEN_SOURCE
- REG_ENOSYS = -1, /* This will never happen for this implementation. */
-#endif
-
- REG_NOERROR = 0, /* Success. */
- REG_NOMATCH, /* Didn't find a match (for regexec). */
-
- /* POSIX regcomp return error codes. (In the order listed in the
- standard.) */
- REG_BADPAT, /* Invalid pattern. */
- REG_ECOLLATE, /* Not implemented. */
- REG_ECTYPE, /* Invalid character class name. */
- REG_EESCAPE, /* Trailing backslash. */
- REG_ESUBREG, /* Invalid back reference. */
- REG_EBRACK, /* Unmatched left bracket. */
- REG_EPAREN, /* Parenthesis imbalance. */
- REG_EBRACE, /* Unmatched \{. */
- REG_BADBR, /* Invalid contents of \{\}. */
- REG_ERANGE, /* Invalid range end. */
- REG_ESPACE, /* Ran out of memory. */
- REG_BADRPT, /* No preceding re for repetition op. */
-
- /* Error codes we've added. */
- REG_EEND, /* Premature end. */
- REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
- REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
-} reg_errcode_t;
-
-/* This data structure represents a compiled pattern. Before calling
- the pattern compiler, the fields `buffer', `allocated', `fastmap',
- `translate', and `no_sub' can be set. After the pattern has been
- compiled, the `re_nsub' field is available. All other fields are
- private to the regex routines. */
-
-#ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE char *
-#endif
-
-struct re_pattern_buffer
-{
-/* [[[begin pattern_buffer]]] */
- /* Space that holds the compiled pattern. It is declared as
- `unsigned char *' because its elements are
- sometimes used as array indexes. */
- unsigned char *buffer;
-
- /* Number of bytes to which `buffer' points. */
- unsigned long int allocated;
-
- /* Number of bytes actually used in `buffer'. */
- unsigned long int used;
-
- /* Syntax setting with which the pattern was compiled. */
- reg_syntax_t syntax;
-
- /* Pointer to a fastmap, if any, otherwise zero. re_search uses
- the fastmap, if there is one, to skip over impossible
- starting points for matches. */
- char *fastmap;
-
- /* Either a translate table to apply to all characters before
- comparing them, or zero for no translation. The translation
- is applied to a pattern when it is compiled and to a string
- when it is matched. */
- RE_TRANSLATE_TYPE translate;
-
- /* Number of subexpressions found by the compiler. */
- size_t re_nsub;
-
- /* Zero if this pattern cannot match the empty string, one else.
- Well, in truth it's used only in `re_search_2', to see
- whether or not we should use the fastmap, so we don't set
- this absolutely perfectly; see `re_compile_fastmap' (the
- `duplicate' case). */
- unsigned can_be_null : 1;
-
- /* If REGS_UNALLOCATED, allocate space in the `regs' structure
- for `max (RE_NREGS, re_nsub + 1)' groups.
- If REGS_REALLOCATE, reallocate space if necessary.
- If REGS_FIXED, use what's there. */
-#define REGS_UNALLOCATED 0
-#define REGS_REALLOCATE 1
-#define REGS_FIXED 2
- unsigned regs_allocated : 2;
-
- /* Set to zero when `regex_compile' compiles a pattern; set to one
- by `re_compile_fastmap' if it updates the fastmap. */
- unsigned fastmap_accurate : 1;
-
- /* If set, `re_match_2' does not return information about
- subexpressions. */
- unsigned no_sub : 1;
-
- /* If set, a beginning-of-line anchor doesn't match at the
- beginning of the string. */
- unsigned not_bol : 1;
-
- /* Similarly for an end-of-line anchor. */
- unsigned not_eol : 1;
-
- /* If true, an anchor at a newline matches. */
- unsigned newline_anchor : 1;
-
-/* [[[end pattern_buffer]]] */
-};
-
-typedef struct re_pattern_buffer regex_t;
-
-/* Type for byte offsets within the string. POSIX mandates this. */
-typedef int regoff_t;
-
-
-/* This is the structure we store register match data in. See
- regex.texinfo for a full description of what registers match. */
-struct re_registers
-{
- unsigned num_regs;
- regoff_t *start;
- regoff_t *end;
-};
-
-
-/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
- `re_match_2' returns information about at least this many registers
- the first time a `regs' structure is passed. */
-#ifndef RE_NREGS
-# define RE_NREGS 30
-#endif
-
-
-/* POSIX specification for registers. Aside from the different names than
- `re_registers', POSIX uses an array of structures, instead of a
- structure of arrays. */
-typedef struct
-{
- regoff_t rm_so; /* Byte offset from string's start to substring's start. */
- regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
-} regmatch_t;
-
-/* Declarations for routines. */
-
-/* To avoid duplicating every routine declaration -- once with a
- prototype (if we are ANSI), and once without (if we aren't) -- we
- use the following macro to declare argument types. This
- unfortunately clutters up the declarations a bit, but I think it's
- worth it. */
-
-#if __STDC__
-
-# define _RE_ARGS(args) args
-
-#else /* not __STDC__ */
-
-# define _RE_ARGS(args) ()
-
-#endif /* not __STDC__ */
-
-/* Sets the current default syntax to SYNTAX, and return the old syntax.
- You can also simply assign to the `re_syntax_options' variable. */
-extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
-
-/* Compile the regular expression PATTERN, with length LENGTH
- and syntax given by the global `re_syntax_options', into the buffer
- BUFFER. Return NULL if successful, and an error string if not. */
-extern const char *re_compile_pattern
- _RE_ARGS ((const char *pattern, size_t length,
- struct re_pattern_buffer *buffer));
-
-
-/* Compile a fastmap for the compiled pattern in BUFFER; used to
- accelerate searches. Return 0 if successful and -2 if was an
- internal error. */
-extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
-
-
-/* Search in the string STRING (with length LENGTH) for the pattern
- compiled into BUFFER. Start searching at position START, for RANGE
- characters. Return the starting position of the match, -1 for no
- match, or -2 for an internal error. Also return register
- information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern int re_search
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range, struct re_registers *regs));
-
-
-/* Like `re_search', but search in the concatenation of STRING1 and
- STRING2. Also, stop searching at index START + STOP. */
-extern int re_search_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs, int stop));
-
-
-/* Like `re_search', but return how many characters in STRING the regexp
- in BUFFER matched, starting at position START. */
-extern int re_match
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs));
-
-
-/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int re_match_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop));
-
-
-/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
- ENDS. Subsequent matches using BUFFER and REGS will use this memory
- for recording register information. STARTS and ENDS must be
- allocated with malloc, and must each be at least `NUM_REGS * sizeof
- (regoff_t)' bytes long.
-
- If NUM_REGS == 0, then subsequent matches should allocate their own
- register data.
-
- Unless this function is called, the first search or match using
- PATTERN_BUFFER will allocate its own register data, without
- freeing the old data. */
-extern void re_set_registers
- _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends));
-
-#if defined _REGEX_RE_COMP || defined _LIBC
-# ifndef _CRAY
-/* 4.2 bsd compatibility. */
-extern char *re_comp _RE_ARGS ((const char *));
-extern int re_exec _RE_ARGS ((const char *));
-# endif
-#endif
-
-/* POSIX compatibility. */
-extern int regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
- int __cflags));
-
-extern int regexec _RE_ARGS ((const regex_t *__preg,
- const char *__string, size_t __nmatch,
- regmatch_t __pmatch[], int __eflags));
-
-extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size));
-
-extern void regfree _RE_ARGS ((regex_t *__preg));
-
-
-#ifdef __cplusplus
-}
-#endif /* C++ */
-
-#endif /* regex.h */
-
-/*
-Local variables:
-make-backup-files: t
-version-control: t
-trim-versions-without-asking: nil
-End:
-*/
diff --git a/lib/obstack.c b/lib/obstack.c
index bf18ddc8..a5ffe9f6 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -1,10 +1,10 @@
/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96 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 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
@@ -13,22 +13,34 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "obstack.h"
-/* This is just to get __GNU_LIBRARY__ defined. */
-#include <stdio.h>
+/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
+ incremented whenever callers compiled using an old obstack.h can no
+ longer properly call the functions in this obstack.c. */
+#define OBSTACK_INTERFACE_VERSION 1
/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
+ actually compiling the library itself, and the installed library
+ supports the same library interface we do. This code is part of the GNU
+ C Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
+ program understand `configure --with-gnu-libc' and omit the object
+ files, it is simpler to just do this in the source for each such file. */
+
+#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
+#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
+#include <gnu-versions.h>
+#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+#ifndef ELIDE_CODE
#if defined (__STDC__) && __STDC__
@@ -69,14 +81,14 @@ struct obstack *_obstack;
#define CALL_CHUNKFUN(h, size) \
(((h) -> use_extra_arg) \
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(h)->chunkfun) ((size)))
+ : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
#define CALL_FREEFUN(h, old_chunk) \
do { \
if ((h) -> use_extra_arg) \
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
else \
- (*(h)->freefun) ((old_chunk)); \
+ (*(void (*) ()) (h)->freefun) ((old_chunk)); \
} while (0)
@@ -482,4 +494,4 @@ POINTER (obstack_copy0) (obstack, pointer, length)
#endif /* 0 */
-#endif /* _LIBC or not __GNU_LIBRARY__. */
+#endif /* !ELIDE_CODE */
diff --git a/lib/obstack.h b/lib/obstack.h
index 2f5ec61a..5dd88815 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -1,10 +1,10 @@
/* obstack.h - object stack macros
- Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96 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 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
@@ -13,7 +13,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Summary:
@@ -102,6 +102,15 @@ Summary:
#ifndef __OBSTACK_H__
#define __OBSTACK_H__
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
+# define bcopy(from, to, len) memcpy ((to), (from), (len))
+#endif
+
/* We use subtraction of (char *)0 instead of casting to int
because on word-addressable machines a simple cast to int
@@ -132,6 +141,12 @@ Summary:
#include <stddef.h>
#endif
+#include <sys/types.h>
+
+#ifndef HAVE_PTRDIFF_T
+# define ptrdiff_t off_t
+#endif
+
#if defined (__STDC__) && __STDC__
#define PTR_INT_TYPE ptrdiff_t
#else
@@ -154,9 +169,18 @@ struct obstack /* control current object in current chunk */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
+#if defined (__STDC__) && __STDC__
+ /* These prototypes vary based on `use_extra_arg', and we use
+ casts to the prototypeless function type in all assignments,
+ but having prototypes here quiets -Wstrict-prototypes. */
+ struct _obstack_chunk *(*chunkfun) (void *, long);
+ void (*freefun) (void *, struct _obstack_chunk *);
+ void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
+#else
struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
void (*freefun) (); /* User's function to free a chunk. */
char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
+#endif
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object:1;/* There is a possibility that the current
chunk contains a zero-length object. This
@@ -171,9 +195,10 @@ struct obstack /* control current object in current chunk */
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (), void (*) ());
+ void *(*) (long), void (*) (void *));
extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (), void (*) (), void *);
+ void *(*) (void *, long),
+ void (*) (void *, void *), void *);
#else
extern void _obstack_newchunk ();
extern void _obstack_free ();
@@ -242,6 +267,34 @@ int obstack_chunk_size (struct obstack *obstack);
#define obstack_alignment_mask(h) ((h)->alignment_mask)
+/* To prevent prototype warnings provide complete argument list in
+ standard C version. */
+#if defined (__STDC__) && __STDC__
+
+#define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
+
+#define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
+
+#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
+
+#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+ _obstack_begin_1 ((h), (size), (alignment), \
+ (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun), (arg))
+
+#define obstack_chunkfun(h, newchunkfun) \
+ ((h) -> chunkfun = (struct _obstack_chunk *(*)(long)) (newchunkfun))
+
+#define obstack_freefun(h, newfreefun) \
+ ((h) -> freefun = (void (*)(void *)) (newfreefun))
+
+#else
+
#define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
@@ -264,15 +317,17 @@ int obstack_chunk_size (struct obstack *obstack);
#define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)()) (newfreefun))
+#endif
+
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-#if defined (__GNUC__) && defined (__STDC__)
+#if defined (__GNUC__) && defined (__STDC__) && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */
-#if __GNUC__ < 2 || (NeXt && !__GNUC_MINOR__)
+#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
#define __extension__
#endif
@@ -331,7 +386,7 @@ __extension__ \
/* These assume that the obstack alignment is good enough for pointers or ints,
and that the data added so far to the current object
shares that much alignment. */
-
+
#define obstack_ptr_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
diff --git a/lib/regex.c b/lib/regex.c
index 33c7ea24..c75177cc 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -3,7 +3,7 @@
(Implements POSIX draft P10003.2/D11.2, except for
internationalization features.)
- Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997 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
@@ -15,23 +15,41 @@
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. */
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* AIX requires this to be the first thing in the file. */
#if defined (_AIX) && !defined (REGEX_MALLOC)
#pragma alloca
#endif
+#undef _GNU_SOURCE
#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#if defined(STDC_HEADERS) && !defined(emacs)
+#include <stddef.h>
+#else
/* We need this for `regex.h', and perhaps for the Emacs include files. */
#include <sys/types.h>
+#endif
+
+/* This is for other GNU distributions with internationalized messages. */
+#if HAVE_LIBINTL_H || defined (_LIBC)
+# include <libintl.h>
+#else
+# define gettext(msgid) (msgid)
+#endif
+
+#ifndef gettext_noop
+/* This define is so xgettext can find the internationalizable
+ strings. */
+#define gettext_noop(String) String
+#endif
/* The `emacs' switch turns on certain matching commands
that make sense only in Emacs. */
@@ -41,23 +59,35 @@
#include "buffer.h"
#include "syntax.h"
-/* Emacs uses `NULL' as a predicate. */
-#undef NULL
-
#else /* not emacs */
-#ifdef STDC_HEADERS
+/* If we are not linking with Emacs proper,
+ we can't use the relocating allocator
+ even if config.h says that we can. */
+#undef REL_ALLOC
+
+#if defined (STDC_HEADERS) || defined (_LIBC)
#include <stdlib.h>
#else
char *malloc ();
char *realloc ();
#endif
+/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
+ If nothing else has been done, use the method below. */
+#ifdef INHIBIT_STRING_HEADER
+#if !(defined (HAVE_BZERO) && defined (HAVE_BCOPY))
+#if !defined (bzero) && !defined (bcopy)
+#undef INHIBIT_STRING_HEADER
+#endif
+#endif
+#endif
-/* We used to test for `BSTRING' here, but only GCC and Emacs define
- `BSTRING', as far as I know, and neither of them use this code. */
+/* This is the normal way of making sure we have a bcopy and a bzero.
+ This is used in most programs--a few other programs avoid this
+ by defining INHIBIT_STRING_HEADER. */
#ifndef INHIBIT_STRING_HEADER
-#if HAVE_STRING_H || STDC_HEADERS
+#if defined (HAVE_STRING_H) || defined (STDC_HEADERS) || defined (_LIBC)
#include <string.h>
#ifndef bcmp
#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
@@ -77,10 +107,16 @@ char *realloc ();
/* This must be nonzero for the wordchar and notwordchar pattern
commands in re_match_2. */
-#ifndef Sword
+#ifndef Sword
#define Sword 1
#endif
+#ifdef SWITCH_ENUM_BUG
+#define SWITCH_ENUM_CAST(x) ((int)(x))
+#else
+#define SWITCH_ENUM_CAST(x) (x)
+#endif
+
#ifdef SYNTAX_TABLE
extern char *re_syntax_table;
@@ -169,7 +205,7 @@ init_syntax_once ()
#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
#ifndef NULL
-#define NULL 0
+#define NULL (void *)0
#endif
/* We remove any previous definition of `SIGN_EXTEND_CHAR',
@@ -188,8 +224,8 @@ init_syntax_once ()
use `alloca' instead of `malloc'. This is because using malloc in
re_search* or re_match* could cause memory leaks when C-g is used in
Emacs; also, malloc is slower and causes storage fragmentation. On
- the other hand, malloc is more portable, and easier to debug.
-
+ the other hand, malloc is more portable, and easier to debug.
+
Because we sometimes use alloca, some routines have to be macros,
not functions -- `alloca'-allocated space disappears at the end of the
function it is called in. */
@@ -198,6 +234,7 @@ init_syntax_once ()
#define REGEX_ALLOCATE malloc
#define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
+#define REGEX_FREE free
#else /* not REGEX_MALLOC */
@@ -211,10 +248,12 @@ init_syntax_once ()
#if HAVE_ALLOCA_H
#include <alloca.h>
#else /* not __GNUC__ or HAVE_ALLOCA_H */
+#if 0 /* It is a bad idea to declare alloca. We always cast the result. */
#ifndef _AIX /* Already did AIX, up at the top. */
char *alloca ();
#endif /* not _AIX */
-#endif /* not HAVE_ALLOCA_H */
+#endif
+#endif /* not HAVE_ALLOCA_H */
#endif /* not __GNUC__ */
#endif /* not alloca */
@@ -227,8 +266,42 @@ char *alloca ();
bcopy (source, destination, osize), \
destination)
+/* No need to do anything to free, after alloca. */
+#define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */
+
#endif /* not REGEX_MALLOC */
+/* Define how to allocate the failure stack. */
+
+#if defined (REL_ALLOC) && defined (REGEX_MALLOC)
+
+#define REGEX_ALLOCATE_STACK(size) \
+ r_alloc (&failure_stack_ptr, (size))
+#define REGEX_REALLOCATE_STACK(source, osize, nsize) \
+ r_re_alloc (&failure_stack_ptr, (nsize))
+#define REGEX_FREE_STACK(ptr) \
+ r_alloc_free (&failure_stack_ptr)
+
+#else /* not using relocating allocator */
+
+#ifdef REGEX_MALLOC
+
+#define REGEX_ALLOCATE_STACK malloc
+#define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
+#define REGEX_FREE_STACK free
+
+#else /* not REGEX_MALLOC */
+
+#define REGEX_ALLOCATE_STACK alloca
+
+#define REGEX_REALLOCATE_STACK(source, osize, nsize) \
+ REGEX_REALLOCATE (source, osize, nsize)
+/* No need to explicitly free anything. */
+#define REGEX_FREE_STACK(arg)
+
+#endif /* not REGEX_MALLOC */
+#endif /* not using relocating allocator */
+
/* True if `size1' is non-NULL and PTR is pointing anywhere inside
`string1' or just past its end. This works if PTR is NULL, which is
@@ -267,6 +340,9 @@ typedef enum
{
no_op = 0,
+ /* Succeed right away--no more backtracking. */
+ succeed,
+
/* Followed by one byte giving n, then by n literal bytes. */
exactn,
@@ -319,9 +395,9 @@ typedef enum
/* Analogously, for end of buffer/string. */
endbuf,
-
+
/* Followed by two byte relative address to which to jump. */
- jump,
+ jump,
/* Same as jump, but marks the end of an alternative. */
jump_past_alt,
@@ -329,11 +405,11 @@ typedef enum
/* Followed by two-byte relative address of place to resume at
in case of failure. */
on_failure_jump,
-
+
/* Like on_failure_jump, but pushes a placeholder instead of the
current string position when executed. */
on_failure_keep_string_jump,
-
+
/* Throw away latest failure point and then jump to following
two-byte relative address. */
pop_failure_jump,
@@ -424,12 +500,13 @@ typedef enum
} while (0)
#ifdef DEBUG
+static void extract_number _RE_ARGS ((int *dest, unsigned char *source));
static void
extract_number (dest, source)
int *dest;
unsigned char *source;
{
- int temp = SIGN_EXTEND_CHAR (*(source + 1));
+ int temp = SIGN_EXTEND_CHAR (*(source + 1));
*dest = *source & 0377;
*dest += temp << 8;
}
@@ -451,11 +528,13 @@ extract_number (dest, source)
} while (0)
#ifdef DEBUG
+static void extract_number_and_incr _RE_ARGS ((int *destination,
+ unsigned char **source));
static void
extract_number_and_incr (destination, source)
int *destination;
unsigned char **source;
-{
+{
extract_number (destination, *source);
*source += 2;
}
@@ -495,8 +574,6 @@ static int debug = 0;
if (debug) print_double_string (w, s1, sz1, s2, sz2)
-extern void printchar ();
-
/* Print the fastmap in human-readable form. */
void
@@ -504,14 +581,14 @@ print_fastmap (fastmap)
char *fastmap;
{
unsigned was_a_range = 0;
- unsigned i = 0;
-
+ unsigned i = 0;
+
while (i < (1 << BYTEWIDTH))
{
if (fastmap[i++])
{
was_a_range = 0;
- printchar (i - 1);
+ putchar (i - 1);
while (i < (1 << BYTEWIDTH) && fastmap[i])
{
was_a_range = 1;
@@ -520,11 +597,11 @@ print_fastmap (fastmap)
if (was_a_range)
{
printf ("-");
- printchar (i - 1);
+ putchar (i - 1);
}
}
}
- putchar ('\n');
+ putchar ('\n');
}
@@ -537,6 +614,7 @@ print_partial_compiled_pattern (start, end)
unsigned char *end;
{
int mcnt, mcnt2;
+ unsigned char *p1;
unsigned char *p = start;
unsigned char *pend = end;
@@ -545,7 +623,7 @@ print_partial_compiled_pattern (start, end)
printf ("(null)\n");
return;
}
-
+
/* Loop over pattern commands. */
while (p < pend)
{
@@ -563,7 +641,7 @@ print_partial_compiled_pattern (start, end)
do
{
putchar ('/');
- printchar (*p++);
+ putchar (*p++);
}
while (--mcnt);
break;
@@ -594,7 +672,7 @@ print_partial_compiled_pattern (start, end)
printf ("/charset [%s",
(re_opcode_t) *(p - 1) == charset_not ? "^" : "");
-
+
assert (p + *p < pend);
for (c = 0; c < 256; c++)
@@ -610,18 +688,18 @@ print_partial_compiled_pattern (start, end)
/* Have we broken a range? */
else if (last + 1 != c && in_range)
{
- printchar (last);
+ putchar (last);
in_range = 0;
}
-
+
if (! in_range)
- printchar (c);
+ putchar (c);
last = c;
}
if (in_range)
- printchar (last);
+ putchar (last);
putchar (']');
@@ -655,7 +733,7 @@ print_partial_compiled_pattern (start, end)
case push_dummy_failure:
printf ("/push_dummy_failure");
break;
-
+
case maybe_pop_jump:
extract_number_and_incr (&mcnt, &p);
printf ("/maybe_pop_jump to %d", p + mcnt - start);
@@ -664,36 +742,39 @@ print_partial_compiled_pattern (start, end)
case pop_failure_jump:
extract_number_and_incr (&mcnt, &p);
printf ("/pop_failure_jump to %d", p + mcnt - start);
- break;
-
+ break;
+
case jump_past_alt:
extract_number_and_incr (&mcnt, &p);
printf ("/jump_past_alt to %d", p + mcnt - start);
- break;
-
+ break;
+
case jump:
extract_number_and_incr (&mcnt, &p);
printf ("/jump to %d", p + mcnt - start);
break;
- case succeed_n:
+ case succeed_n:
extract_number_and_incr (&mcnt, &p);
+ p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/succeed_n to %d, %d times", p + mcnt - start, mcnt2);
+ printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
break;
-
- case jump_n:
+
+ case jump_n:
extract_number_and_incr (&mcnt, &p);
+ p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/jump_n to %d, %d times", p + mcnt - start, mcnt2);
+ printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
break;
-
- case set_number_at:
+
+ case set_number_at:
extract_number_and_incr (&mcnt, &p);
+ p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/set_number_at location %d to %d", p + mcnt - start, mcnt2);
+ printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
break;
-
+
case wordbound:
printf ("/wordbound");
break;
@@ -705,10 +786,10 @@ print_partial_compiled_pattern (start, end)
case wordbeg:
printf ("/wordbeg");
break;
-
+
case wordend:
printf ("/wordend");
-
+
#ifdef emacs
case before_dot:
printf ("/before_dot");
@@ -727,7 +808,7 @@ print_partial_compiled_pattern (start, end)
mcnt = *p++;
printf ("/%d", mcnt);
break;
-
+
case notsyntaxspec:
printf ("/notsyntaxspec");
mcnt = *p++;
@@ -738,7 +819,7 @@ print_partial_compiled_pattern (start, end)
case wordchar:
printf ("/wordchar");
break;
-
+
case notwordchar:
printf ("/notwordchar");
break;
@@ -769,7 +850,8 @@ print_compiled_pattern (bufp)
unsigned char *buffer = bufp->buffer;
print_partial_compiled_pattern (buffer, buffer + bufp->used);
- printf ("%d bytes used/%d bytes allocated.\n", bufp->used, bufp->allocated);
+ printf ("%ld bytes used/%ld bytes allocated.\n",
+ bufp->used, bufp->allocated);
if (bufp->fastmap_accurate && bufp->fastmap)
{
@@ -784,7 +866,7 @@ print_compiled_pattern (bufp)
printf ("no_sub: %d\t", bufp->no_sub);
printf ("not_bol: %d\t", bufp->not_bol);
printf ("not_eol: %d\t", bufp->not_eol);
- printf ("syntax: %d\n", bufp->syntax);
+ printf ("syntax: %lx\n", bufp->syntax);
/* Perhaps we should print the translate table? */
}
@@ -797,8 +879,8 @@ print_double_string (where, string1, size1, string2, size2)
int size1;
int size2;
{
- unsigned this_char;
-
+ int this_char;
+
if (where == NULL)
printf ("(null)");
else
@@ -806,16 +888,23 @@ print_double_string (where, string1, size1, string2, size2)
if (FIRST_STRING_P (where))
{
for (this_char = where - string1; this_char < size1; this_char++)
- printchar (string1[this_char]);
+ putchar (string1[this_char]);
- where = string2;
+ where = string2;
}
for (this_char = where - string2; this_char < size2; this_char++)
- printchar (string2[this_char]);
+ putchar (string2[this_char]);
}
}
+void
+printchar (c)
+ int c;
+{
+ putc (c, stderr);
+}
+
#else /* not DEBUG */
#undef assert
@@ -834,7 +923,9 @@ print_double_string (where, string1, size1, string2, size2)
/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
also be assigned to arbitrarily: each pattern buffer stores its own
syntax, so it can be changed between regex compilations. */
-reg_syntax_t re_syntax_options = RE_SYNTAX_EMACS;
+/* This has no initializer because initialized variables in Emacs
+ become read-only after dumping. */
+reg_syntax_t re_syntax_options;
/* Specify the precise syntax of regexps for compilation. This provides
@@ -849,32 +940,35 @@ re_set_syntax (syntax)
reg_syntax_t syntax;
{
reg_syntax_t ret = re_syntax_options;
-
+
re_syntax_options = syntax;
return ret;
}
/* This table gives an error message for each of the error codes listed
- in regex.h. Obviously the order here has to be same as there. */
-
-static const char *re_error_msg[] =
- { NULL, /* REG_NOERROR */
- "No match", /* REG_NOMATCH */
- "Invalid regular expression", /* REG_BADPAT */
- "Invalid collation character", /* REG_ECOLLATE */
- "Invalid character class name", /* REG_ECTYPE */
- "Trailing backslash", /* REG_EESCAPE */
- "Invalid back reference", /* REG_ESUBREG */
- "Unmatched [ or [^", /* REG_EBRACK */
- "Unmatched ( or \\(", /* REG_EPAREN */
- "Unmatched \\{", /* REG_EBRACE */
- "Invalid content of \\{\\}", /* REG_BADBR */
- "Invalid range end", /* REG_ERANGE */
- "Memory exhausted", /* REG_ESPACE */
- "Invalid preceding regular expression", /* REG_BADRPT */
- "Premature end of regular expression", /* REG_EEND */
- "Regular expression too big", /* REG_ESIZE */
- "Unmatched ) or \\)", /* REG_ERPAREN */
+ in regex.h. Obviously the order here has to be same as there.
+ POSIX doesn't require that we do anything for REG_NOERROR,
+ but why not be nice? */
+
+static const char *re_error_msgid[] =
+ {
+ gettext_noop ("Success"), /* REG_NOERROR */
+ gettext_noop ("No match"), /* REG_NOMATCH */
+ gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
+ gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
+ gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
+ gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
+ gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
+ gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */
+ gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
+ gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
+ gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
+ gettext_noop ("Invalid range end"), /* REG_ERANGE */
+ gettext_noop ("Memory exhausted"), /* REG_ESPACE */
+ gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
+ gettext_noop ("Premature end of regular expression"), /* REG_EEND */
+ gettext_noop ("Regular expression too big"), /* REG_ESIZE */
+ gettext_noop ("Unmatched ) or \\)"), /* REG_ERPAREN */
};
/* Avoiding alloca during matching, to placate r_alloc. */
@@ -887,7 +981,7 @@ static const char *re_error_msg[] =
ralloc heap) shift the data out from underneath the regexp
routines.
- Here's another reason to avoid allocation: Emacs
+ Here's another reason to avoid allocation: Emacs
processes input from X in a signal handler; processing X input may
call malloc; if input arrives while a matching routine is calling
malloc, then we're scrod. But Emacs can't just block input while
@@ -899,17 +993,26 @@ static const char *re_error_msg[] =
/* Normally, this is fine. */
#define MATCH_MAY_ALLOCATE
+/* When using GNU C, we are not REALLY using the C alloca, no matter
+ what config.h may say. So don't take precautions for it. */
+#ifdef __GNUC__
+#undef C_ALLOCA
+#endif
+
/* The match routines may not allocate if (1) they would do it with malloc
- and (2) it's not safe for them to use malloc. */
-#if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && (defined (emacs) || defined (REL_ALLOC))
+ and (2) it's not safe for them to use malloc.
+ Note that if REL_ALLOC is defined, matching would not use malloc for the
+ failure stack, but we would still use it for the register vectors;
+ so REL_ALLOC should not affect this. */
+#if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && defined (emacs)
#undef MATCH_MAY_ALLOCATE
#endif
/* Failure stack declarations and macros; both re_compile_fastmap and
re_match_2 use a failure stack. These have to be macros because of
- REGEX_ALLOCATE. */
-
+ REGEX_ALLOCATE_STACK. */
+
/* Number of failure points for which to initially allocate space
when matching. If this number is exceeded, we allocate more
@@ -922,9 +1025,47 @@ static const char *re_error_msg[] =
exactly that if always used MAX_FAILURE_SPACE each time we failed.
This is a variable only so users of regex can assign to it; we never
change it ourselves. */
+
+#ifdef INT_IS_16BIT
+
+#if defined (MATCH_MAY_ALLOCATE)
+long re_max_failures = 4000;
+#else
+long re_max_failures = 2000;
+#endif
+
+union fail_stack_elt
+{
+ unsigned char *pointer;
+ long integer;
+};
+
+typedef union fail_stack_elt fail_stack_elt_t;
+
+typedef struct
+{
+ fail_stack_elt_t *stack;
+ unsigned long size;
+ unsigned long avail; /* Offset of next open position. */
+} fail_stack_type;
+
+#else /* not INT_IS_16BIT */
+
+#if defined (MATCH_MAY_ALLOCATE)
+/* 4400 was enough to cause a crash on Alpha OSF/1,
+ whose default stack limit is 2mb. */
+int re_max_failures = 4000;
+#else
int re_max_failures = 2000;
+#endif
+
+union fail_stack_elt
+{
+ unsigned char *pointer;
+ int integer;
+};
-typedef unsigned char *fail_stack_elt_t;
+typedef union fail_stack_elt fail_stack_elt_t;
typedef struct
{
@@ -933,19 +1074,21 @@ typedef struct
unsigned avail; /* Offset of next open position. */
} fail_stack_type;
+#endif /* INT_IS_16BIT */
+
#define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
#define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
#define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
-#define FAIL_STACK_TOP() (fail_stack.stack[fail_stack.avail])
-/* Initialize `fail_stack'. Do `return -2' if the alloc fails. */
+/* Define macros to initialize and free the failure stack.
+ Do `return -2' if the alloc fails. */
#ifdef MATCH_MAY_ALLOCATE
#define INIT_FAIL_STACK() \
do { \
fail_stack.stack = (fail_stack_elt_t *) \
- REGEX_ALLOCATE (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \
+ REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t)); \
\
if (fail_stack.stack == NULL) \
return -2; \
@@ -953,26 +1096,30 @@ typedef struct
fail_stack.size = INIT_FAILURE_ALLOC; \
fail_stack.avail = 0; \
} while (0)
+
+#define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack)
#else
#define INIT_FAIL_STACK() \
do { \
fail_stack.avail = 0; \
} while (0)
+
+#define RESET_FAIL_STACK()
#endif
/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
Return 1 if succeeds, and 0 if either ran out of memory
- allocating space for it or it was already too large.
-
- REGEX_REALLOCATE requires `destination' be declared. */
+ allocating space for it or it was already too large.
+
+ REGEX_REALLOCATE_STACK requires `destination' be declared. */
#define DOUBLE_FAIL_STACK(fail_stack) \
- ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS \
+ ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
? 0 \
: ((fail_stack).stack = (fail_stack_elt_t *) \
- REGEX_REALLOCATE ((fail_stack).stack, \
+ REGEX_REALLOCATE_STACK ((fail_stack).stack, \
(fail_stack).size * sizeof (fail_stack_elt_t), \
((fail_stack).size << 1) * sizeof (fail_stack_elt_t)), \
\
@@ -982,30 +1129,44 @@ typedef struct
1)))
-/* Push PATTERN_OP on FAIL_STACK.
-
+/* Push pointer POINTER on FAIL_STACK.
Return 1 if was able to do so and 0 if ran out of memory allocating
space to do so. */
-#define PUSH_PATTERN_OP(pattern_op, fail_stack) \
+#define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \
((FAIL_STACK_FULL () \
- && !DOUBLE_FAIL_STACK (fail_stack)) \
- ? 0 \
- : ((fail_stack).stack[(fail_stack).avail++] = pattern_op, \
- 1))
+ && !DOUBLE_FAIL_STACK (FAIL_STACK)) \
+ ? 0 \
+ : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \
+ 1))
-/* This pushes an item onto the failure stack. Must be a four-byte
- value. Assumes the variable `fail_stack'. Probably should only
+/* Push a pointer value onto the failure stack.
+ Assumes the variable `fail_stack'. Probably should only
be called from within `PUSH_FAILURE_POINT'. */
-#define PUSH_FAILURE_ITEM(item) \
- fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
+#define PUSH_FAILURE_POINTER(item) \
+ fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item)
-/* The complement operation. Assumes `fail_stack' is nonempty. */
-#define POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail]
+/* This pushes an integer-valued item onto the failure stack.
+ Assumes the variable `fail_stack'. Probably should only
+ be called from within `PUSH_FAILURE_POINT'. */
+#define PUSH_FAILURE_INT(item) \
+ fail_stack.stack[fail_stack.avail++].integer = (item)
+
+/* Push a fail_stack_elt_t value onto the failure stack.
+ Assumes the variable `fail_stack'. Probably should only
+ be called from within `PUSH_FAILURE_POINT'. */
+#define PUSH_FAILURE_ELT(item) \
+ fail_stack.stack[fail_stack.avail++] = (item)
+
+/* These three POP... operations complement the three PUSH... operations.
+ All assume that `fail_stack' is nonempty. */
+#define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
+#define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
+#define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
/* Used to omit pushing failure point id's when we're not debugging. */
#ifdef DEBUG
-#define DEBUG_PUSH PUSH_FAILURE_ITEM
-#define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_ITEM ()
+#define DEBUG_PUSH PUSH_FAILURE_INT
+#define DEBUG_POP(item_addr) (item_addr)->integer = POP_FAILURE_INT ()
#else
#define DEBUG_PUSH(item)
#define DEBUG_POP(item_addr)
@@ -1013,12 +1174,12 @@ typedef struct
/* Push the information about the state we will need
- if we ever fail back to it.
-
+ if we ever fail back to it.
+
Requires variables fail_stack, regstart, regend, reg_info, and
num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be
declared.
-
+
Does `return FAILURE_CODE' if runs out of memory. */
#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
@@ -1026,7 +1187,10 @@ typedef struct
char *destination; \
/* Must be int, so when we don't save any registers, the arithmetic \
of 0 + -1 isn't done as unsigned. */ \
- int this_reg; \
+ /* Can't be int, since there is not a shred of a guarantee that int \
+ is wide enough to hold a value of something to which pointer can \
+ be assigned */ \
+ s_reg_t this_reg; \
\
DEBUG_STATEMENT (failure_id++); \
DEBUG_STATEMENT (nfailure_points_pushed++); \
@@ -1040,7 +1204,7 @@ typedef struct
/* Ensure we have enough space allocated for what we will push. */ \
while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
{ \
- if (!DOUBLE_FAIL_STACK (fail_stack)) \
+ if (!DOUBLE_FAIL_STACK (fail_stack)) \
return failure_code; \
\
DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
@@ -1051,45 +1215,46 @@ typedef struct
/* Push the info, starting with the registers. */ \
DEBUG_PRINT1 ("\n"); \
\
- for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
- this_reg++) \
- { \
- DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \
- DEBUG_STATEMENT (num_regs_pushed++); \
+ if (1) \
+ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
+ this_reg++) \
+ { \
+ DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \
+ DEBUG_STATEMENT (num_regs_pushed++); \
\
- DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \
- PUSH_FAILURE_ITEM (regstart[this_reg]); \
- \
- DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \
- PUSH_FAILURE_ITEM (regend[this_reg]); \
+ DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \
+ PUSH_FAILURE_POINTER (regstart[this_reg]); \
\
- DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \
- DEBUG_PRINT2 (" match_null=%d", \
- REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
- DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
- DEBUG_PRINT2 (" matched_something=%d", \
- MATCHED_SOMETHING (reg_info[this_reg])); \
- DEBUG_PRINT2 (" ever_matched=%d", \
- EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
- DEBUG_PRINT1 ("\n"); \
- PUSH_FAILURE_ITEM (reg_info[this_reg].word); \
- } \
+ DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \
+ PUSH_FAILURE_POINTER (regend[this_reg]); \
+ \
+ DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \
+ DEBUG_PRINT2 (" match_null=%d", \
+ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" matched_something=%d", \
+ MATCHED_SOMETHING (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" ever_matched=%d", \
+ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
+ DEBUG_PRINT1 ("\n"); \
+ PUSH_FAILURE_ELT (reg_info[this_reg].word); \
+ } \
\
DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\
- PUSH_FAILURE_ITEM (lowest_active_reg); \
+ PUSH_FAILURE_INT (lowest_active_reg); \
\
DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\
- PUSH_FAILURE_ITEM (highest_active_reg); \
+ PUSH_FAILURE_INT (highest_active_reg); \
\
- DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \
+ DEBUG_PRINT2 (" Pushing pattern 0x%x:\n", pattern_place); \
DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
- PUSH_FAILURE_ITEM (pattern_place); \
+ PUSH_FAILURE_POINTER (pattern_place); \
\
DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \
DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
size2); \
DEBUG_PRINT1 ("'\n"); \
- PUSH_FAILURE_ITEM (string_place); \
+ PUSH_FAILURE_POINTER (string_place); \
\
DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
DEBUG_PUSH (failure_id); \
@@ -1107,12 +1272,17 @@ typedef struct
#endif
/* We push at most this many items on the stack. */
-#define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
+/* We used to use (num_regs - 1), which is the number of registers
+ this regexp will save; but that was changed to 5
+ to avoid stack overflow for a regexp with lots of parens. */
+#define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
/* We actually push this many items. */
-#define NUM_FAILURE_ITEMS \
- ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \
- + NUM_NONREG_ITEMS)
+#define NUM_FAILURE_ITEMS \
+ (((0 \
+ ? 0 : highest_active_reg - lowest_active_reg + 1) \
+ * NUM_REG_ITEMS) \
+ + NUM_NONREG_ITEMS)
/* How many items can still be added to the stack without overflowing it. */
#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
@@ -1126,14 +1296,14 @@ typedef struct
LOW_REG, HIGH_REG -- the highest and lowest active registers.
REGSTART, REGEND -- arrays of string positions.
REG_INFO -- array of information about each subexpression.
-
+
Also assumes the variables `fail_stack' and (if debugging), `bufp',
`pend', `string1', `size1', `string2', and `size2'. */
#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
{ \
DEBUG_STATEMENT (fail_stack_elt_t failure_id;) \
- int this_reg; \
+ s_reg_t this_reg; \
const unsigned char *string_temp; \
\
assert (!FAIL_STACK_EMPTY ()); \
@@ -1151,7 +1321,7 @@ typedef struct
/* If the saved string location is NULL, it came from an \
on_failure_keep_string_jump opcode, and we want to throw away the \
saved NULL, thus retaining our current position in the string. */ \
- string_temp = POP_FAILURE_ITEM (); \
+ string_temp = POP_FAILURE_POINTER (); \
if (string_temp != NULL) \
str = (const char *) string_temp; \
\
@@ -1159,47 +1329,62 @@ typedef struct
DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
DEBUG_PRINT1 ("'\n"); \
\
- pat = (unsigned char *) POP_FAILURE_ITEM (); \
- DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \
+ pat = (unsigned char *) POP_FAILURE_POINTER (); \
+ DEBUG_PRINT2 (" Popping pattern 0x%x:\n", pat); \
DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
\
/* Restore register info. */ \
- high_reg = (unsigned) POP_FAILURE_ITEM (); \
+ high_reg = (active_reg_t) POP_FAILURE_INT (); \
DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \
\
- low_reg = (unsigned) POP_FAILURE_ITEM (); \
+ low_reg = (active_reg_t) POP_FAILURE_INT (); \
DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \
\
- for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
- { \
- DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \
+ if (1) \
+ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
+ { \
+ DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \
\
- reg_info[this_reg].word = POP_FAILURE_ITEM (); \
- DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \
+ reg_info[this_reg].word = POP_FAILURE_ELT (); \
+ DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \
\
- regend[this_reg] = (const char *) POP_FAILURE_ITEM (); \
- DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \
+ regend[this_reg] = (const char *) POP_FAILURE_POINTER (); \
+ DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \
\
- regstart[this_reg] = (const char *) POP_FAILURE_ITEM (); \
- DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \
+ regstart[this_reg] = (const char *) POP_FAILURE_POINTER (); \
+ DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \
+ } \
+ else \
+ { \
+ for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
+ { \
+ reg_info[this_reg].word.integer = 0; \
+ regend[this_reg] = 0; \
+ regstart[this_reg] = 0; \
+ } \
+ highest_active_reg = high_reg; \
} \
\
+ set_regs_matched_done = 0; \
DEBUG_STATEMENT (nfailure_points_popped++); \
} /* POP_FAILURE_POINT */
/* Structure for per-register (a.k.a. per-group) information.
- This must not be longer than one word, because we push this value
- onto the failure stack. Other register information, such as the
+ Other register information, such as the
starting and ending positions (which are addresses), and the list of
inner groups (which is a bits list) are maintained in separate
- variables.
-
+ variables.
+
We are making a (strictly speaking) nonportable assumption here: that
the compiler will pack our bit fields into something that fits into
the type of `word', i.e., is something that fits into one item on the
failure stack. */
+
+
+/* Declarations and macros for re_match_2. */
+
typedef union
{
fail_stack_elt_t word;
@@ -1227,55 +1412,58 @@ typedef union
#define SET_REGS_MATCHED() \
do \
{ \
- unsigned r; \
- for (r = lowest_active_reg; r <= highest_active_reg; r++) \
- { \
- MATCHED_SOMETHING (reg_info[r]) \
- = EVER_MATCHED_SOMETHING (reg_info[r]) \
- = 1; \
- } \
+ if (!set_regs_matched_done) \
+ { \
+ active_reg_t r; \
+ set_regs_matched_done = 1; \
+ for (r = lowest_active_reg; r <= highest_active_reg; r++) \
+ { \
+ MATCHED_SOMETHING (reg_info[r]) \
+ = EVER_MATCHED_SOMETHING (reg_info[r]) \
+ = 1; \
+ } \
+ } \
} \
while (0)
-
/* Registers are set to a sentinel when they haven't yet matched. */
-#define REG_UNSET_VALUE ((char *) -1)
+static char reg_unset_dummy;
+#define REG_UNSET_VALUE (&reg_unset_dummy)
#define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
-
-
-
-/* How do we implement a missing MATCH_MAY_ALLOCATE?
- We make the fail stack a global thing, and then grow it to
- re_max_failures when we compile. */
-#ifndef MATCH_MAY_ALLOCATE
-static fail_stack_type fail_stack;
-
-static const char ** regstart, ** regend;
-static const char ** old_regstart, ** old_regend;
-static const char **best_regstart, **best_regend;
-static register_info_type *reg_info;
-static const char **reg_dummy;
-static register_info_type *reg_info_dummy;
-#endif
-
/* Subroutine declarations and macros for regex_compile. */
-static void store_op1 (), store_op2 ();
-static void insert_op1 (), insert_op2 ();
-static boolean at_begline_loc_p (), at_endline_loc_p ();
-static boolean group_in_compile_stack ();
-static reg_errcode_t compile_range ();
-
-/* Fetch the next character in the uncompiled pattern---translating it
+static reg_errcode_t regex_compile _RE_ARGS ((const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp));
+static void store_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, int arg));
+static void store_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
+ int arg1, int arg2));
+static void insert_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
+ int arg, unsigned char *end));
+static void insert_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
+ int arg1, int arg2, unsigned char *end));
+static boolean at_begline_loc_p _RE_ARGS ((const char *pattern, const char *p,
+ reg_syntax_t syntax));
+static boolean at_endline_loc_p _RE_ARGS ((const char *p, const char *pend,
+ reg_syntax_t syntax));
+static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr,
+ const char *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ unsigned char *b));
+
+/* Fetch the next character in the uncompiled pattern---translating it
if necessary. Also cast from a signed character in the constant
string passed to us by the user to an unsigned char that we can use
as an array index (in, e.g., `translate'). */
+#ifndef PATFETCH
#define PATFETCH(c) \
do {if (p == pend) return REG_EEND; \
c = (unsigned char) *p++; \
- if (translate) c = translate[c]; \
+ if (translate) c = (unsigned char) translate[c]; \
} while (0)
+#endif
/* Fetch the next character in the uncompiled pattern, with no
translation. */
@@ -1292,7 +1480,10 @@ static reg_errcode_t compile_range ();
cast the subscript to translate because some data is declared as
`char *', to avoid warnings when a string constant is passed. But
when we use a character as a subscript we must make it unsigned. */
-#define TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d))
+#ifndef TRANSLATE
+#define TRANSLATE(d) \
+ (translate ? (char) translate[(unsigned char) (d)] : (d))
+#endif
/* Macros for outputting the compiled pattern into `buffer'. */
@@ -1302,7 +1493,7 @@ static reg_errcode_t compile_range ();
/* Make sure we have at least N more bytes of space in buffer. */
#define GET_BUFFER_SPACE(n) \
- while (b - bufp->buffer + (n) > bufp->allocated) \
+ while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
EXTEND_BUFFER ()
/* Make sure we have one more byte of buffer space and then add C to it. */
@@ -1335,26 +1526,39 @@ static reg_errcode_t compile_range ();
/* Store a jump with opcode OP at LOC to location TO. We store a
relative address offset by the three bytes the jump itself occupies. */
#define STORE_JUMP(op, loc, to) \
- store_op1 (op, loc, (to) - (loc) - 3)
+ store_op1 (op, loc, (int) ((to) - (loc) - 3))
/* Likewise, for a two-argument jump. */
#define STORE_JUMP2(op, loc, to, arg) \
- store_op2 (op, loc, (to) - (loc) - 3, arg)
+ store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP(op, loc, to) \
- insert_op1 (op, loc, (to) - (loc) - 3, b)
+ insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP2(op, loc, to, arg) \
- insert_op2 (op, loc, (to) - (loc) - 3, arg, b)
+ insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
/* This is not an arbitrary limit: the arguments which represent offsets
into the pattern are two bytes long. So if 2^16 bytes turns out to
be too small, many things would have to change. */
+/* Any other compiler which, like MSC, has allocation limit below 2^16
+ bytes will have to use approach similar to what was done below for
+ MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
+ reallocating to 0 bytes. Such thing is not going to work too well.
+ You have been warned!! */
+#ifdef _MSC_VER
+/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
+ The REALLOC define eliminates a flurry of conversion warnings,
+ but is not required. */
+#define MAX_BUF_SIZE 65500L
+#define REALLOC(p,s) realloc ((p), (size_t) (s))
+#else
#define MAX_BUF_SIZE (1L << 16)
-
+#define REALLOC(p,s) realloc ((p), (s))
+#endif
/* Extend the buffer by twice its current size via realloc and
reset the pointers that pointed into the old block to point to the
@@ -1368,7 +1572,7 @@ static reg_errcode_t compile_range ();
bufp->allocated <<= 1; \
if (bufp->allocated > MAX_BUF_SIZE) \
bufp->allocated = MAX_BUF_SIZE; \
- bufp->buffer = (unsigned char *) realloc (bufp->buffer, bufp->allocated);\
+ bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
if (bufp->buffer == NULL) \
return REG_ESPACE; \
/* If the buffer moved, move all the pointers into it. */ \
@@ -1400,14 +1604,15 @@ typedef unsigned regnum_t;
/* Since offsets can go either forwards or backwards, this type needs to
be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
-typedef int pattern_offset_t;
+/* int may be not enough when sizeof(int) == 2. */
+typedef long pattern_offset_t;
typedef struct
{
pattern_offset_t begalt_offset;
pattern_offset_t fixup_alt_jump;
pattern_offset_t inner_group_offset;
- pattern_offset_t laststart_offset;
+ pattern_offset_t laststart_offset;
regnum_t regnum;
} compile_stack_elt_t;
@@ -1450,7 +1655,7 @@ typedef struct
PATFETCH (c); \
} \
} \
- }
+ }
#define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
@@ -1462,6 +1667,58 @@ typedef struct
|| STREQ (string, "punct") || STREQ (string, "graph") \
|| STREQ (string, "cntrl") || STREQ (string, "blank"))
+#ifndef MATCH_MAY_ALLOCATE
+
+/* If we cannot allocate large objects within re_match_2_internal,
+ we make the fail stack and register vectors global.
+ The fail stack, we grow to the maximum size when a regexp
+ is compiled.
+ The register vectors, we adjust in size each time we
+ compile a regexp, according to the number of registers it needs. */
+
+static fail_stack_type fail_stack;
+
+/* Size with which the following vectors are currently allocated.
+ That is so we can make them bigger as needed,
+ but never make them smaller. */
+static int regs_allocated_size;
+
+static const char ** regstart, ** regend;
+static const char ** old_regstart, ** old_regend;
+static const char **best_regstart, **best_regend;
+static register_info_type *reg_info;
+static const char **reg_dummy;
+static register_info_type *reg_info_dummy;
+
+/* Make the register vectors big enough for NUM_REGS registers,
+ but don't make them smaller. */
+
+static
+regex_grow_registers (num_regs)
+ int num_regs;
+{
+ if (num_regs > regs_allocated_size)
+ {
+ RETALLOC_IF (regstart, num_regs, const char *);
+ RETALLOC_IF (regend, num_regs, const char *);
+ RETALLOC_IF (old_regstart, num_regs, const char *);
+ RETALLOC_IF (old_regend, num_regs, const char *);
+ RETALLOC_IF (best_regstart, num_regs, const char *);
+ RETALLOC_IF (best_regend, num_regs, const char *);
+ RETALLOC_IF (reg_info, num_regs, register_info_type);
+ RETALLOC_IF (reg_dummy, num_regs, const char *);
+ RETALLOC_IF (reg_info_dummy, num_regs, register_info_type);
+
+ regs_allocated_size = num_regs;
+ }
+}
+
+#endif /* not MATCH_MAY_ALLOCATE */
+
+static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
+ compile_stack,
+ regnum_t regnum));
+
/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
Returns one of error codes defined in `regex.h', or zero for success.
@@ -1476,7 +1733,7 @@ typedef struct
`fastmap_accurate' is zero;
`re_nsub' is the number of subexpressions in PATTERN;
`not_bol' and `not_eol' are zero;
-
+
The `fastmap' and `newline_anchor' fields are neither
examined nor set. */
@@ -1487,7 +1744,7 @@ typedef struct
static reg_errcode_t
regex_compile (pattern, size, syntax, bufp)
const char *pattern;
- int size;
+ size_t size;
reg_syntax_t syntax;
struct re_pattern_buffer *bufp;
{
@@ -1495,22 +1752,22 @@ regex_compile (pattern, size, syntax, bufp)
`char *' (i.e., signed), we declare these variables as unsigned, so
they can be reliably used as array indices. */
register unsigned char c, c1;
-
+
/* A random temporary spot in PATTERN. */
const char *p1;
/* Points to the end of the buffer, where we should append. */
register unsigned char *b;
-
+
/* Keeps track of unclosed groups. */
compile_stack_type compile_stack;
/* Points to the current (ending) position in the pattern. */
const char *p = pattern;
const char *pend = pattern + size;
-
+
/* How to translate the characters in the pattern. */
- char *translate = bufp->translate;
+ RE_TRANSLATE_TYPE translate = bufp->translate;
/* Address of the count-byte of the most recently inserted `exactn'
command. This makes it possible to tell if a new exact-match
@@ -1529,7 +1786,7 @@ regex_compile (pattern, size, syntax, bufp)
/* Place in the uncompiled pattern (i.e., the {) to
which to go back if the interval is invalid. */
const char *beg_interval;
-
+
/* Address of the place where a forward jump should go to the end of
the containing expression. Each alternative of an `or' -- except the
last -- ends with a forward jump of this sort. */
@@ -1545,9 +1802,9 @@ regex_compile (pattern, size, syntax, bufp)
if (debug)
{
unsigned debug_count;
-
+
for (debug_count = 0; debug_count < size; debug_count++)
- printchar (pattern[debug_count]);
+ putchar (pattern[debug_count]);
putchar ('\n');
}
#endif /* DEBUG */
@@ -1569,9 +1826,9 @@ regex_compile (pattern, size, syntax, bufp)
printer (for debugging) will think there's no pattern. We reset it
at the end. */
bufp->used = 0;
-
+
/* Always count groups, whether or not bufp->no_sub is set. */
- bufp->re_nsub = 0;
+ bufp->re_nsub = 0;
#if !defined (emacs) && !defined (SYNTAX_TABLE)
/* Initialize the syntax table. */
@@ -1622,7 +1879,7 @@ regex_compile (pattern, size, syntax, bufp)
case '$':
{
if ( /* If at end of pattern, it's an operator. */
- p == pend
+ p == pend
/* If context independent, it's an operator. */
|| syntax & RE_CONTEXT_INDEP_ANCHORS
/* Otherwise, depends on what's next. */
@@ -1653,7 +1910,7 @@ regex_compile (pattern, size, syntax, bufp)
{
/* Are we optimizing this jump? */
boolean keep_string_p = false;
-
+
/* 1 means zero (many) matches is allowed. */
char zero_times_ok = 0, many_times_ok = 0;
@@ -1701,7 +1958,7 @@ regex_compile (pattern, size, syntax, bufp)
/* Star, etc. applied to an empty pattern is equivalent
to an empty pattern. */
- if (!laststart)
+ if (!laststart)
break;
/* Now we know whether or not zero matches is allowed
@@ -1710,7 +1967,7 @@ regex_compile (pattern, size, syntax, bufp)
{ /* More than one repetition is allowed, so put in at the
end a backward relative jump from `b' to before the next
jump we're going to put in below (which jumps from
- laststart to after this jump).
+ laststart to after this jump).
But if we are at the `*' in the exact sequence `.*\n',
insert an unconditional jump backwards to the .,
@@ -1787,7 +2044,7 @@ regex_compile (pattern, size, syntax, bufp)
/* We test `*p == '^' twice, instead of using an if
statement, so we only need one BUF_PUSH. */
- BUF_PUSH (*p == '^' ? charset_not : charset);
+ BUF_PUSH (*p == '^' ? charset_not : charset);
if (*p == '^')
p++;
@@ -1837,8 +2094,8 @@ regex_compile (pattern, size, syntax, bufp)
was a character: if this is a hyphen not at the
beginning or the end of a list, then it's the range
operator. */
- if (c == '-'
- && !(p - 2 >= pattern && p[-2] == '[')
+ if (c == '-'
+ && !(p - 2 >= pattern && p[-2] == '[')
&& !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
&& *p != ']')
{
@@ -1853,7 +2110,7 @@ regex_compile (pattern, size, syntax, bufp)
/* Move past the `-'. */
PATFETCH (c1);
-
+
ret = compile_range (&p, pend, translate, syntax, b);
if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
}
@@ -1882,7 +2139,7 @@ regex_compile (pattern, size, syntax, bufp)
str[c1] = '\0';
/* If isn't a word bracketed by `[:' and:`]':
- undo the ending character, the letters, and leave
+ undo the ending character, the letters, and leave
the leading `:' and `[' (but set bits for them). */
if (c == ':' && *p == ']')
{
@@ -1899,13 +2156,13 @@ regex_compile (pattern, size, syntax, bufp)
boolean is_space = STREQ (str, "space");
boolean is_upper = STREQ (str, "upper");
boolean is_xdigit = STREQ (str, "xdigit");
-
+
if (!IS_CHAR_CLASS (str))
FREE_STACK_RETURN (REG_ECTYPE);
/* Throw away the ] at the end of the character
class. */
- PATFETCH (c);
+ PATFETCH (c);
if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
@@ -1928,13 +2185,16 @@ regex_compile (pattern, size, syntax, bufp)
|| (is_upper && ISUPPER (ch))
|| (is_xdigit && ISXDIGIT (ch)))
SET_LIST_BIT (ch);
+ if ( translate && (is_upper || is_lower)
+ && (ISUPPER (ch) || ISLOWER (ch)))
+ SET_LIST_BIT (ch);
}
had_char_class = true;
}
else
{
c1++;
- while (c1--)
+ while (c1--)
PATUNFETCH;
SET_LIST_BIT ('[');
SET_LIST_BIT (':');
@@ -1950,8 +2210,8 @@ regex_compile (pattern, size, syntax, bufp)
/* Discard any (non)matching list bytes that are all 0 at the
end of the map. Decrease the map-length byte too. */
- while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
- b[-1]--;
+ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
+ b[-1]--;
b += b[-1];
}
break;
@@ -2011,7 +2271,7 @@ regex_compile (pattern, size, syntax, bufp)
regnum++;
if (COMPILE_STACK_FULL)
- {
+ {
RETALLOC (compile_stack.stack, compile_stack.size << 1,
compile_stack_elt_t);
if (compile_stack.stack == NULL) return REG_ESPACE;
@@ -2024,7 +2284,7 @@ regex_compile (pattern, size, syntax, bufp)
whole pattern moves because of realloc, they will still
be valid. */
COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
- COMPILE_STACK_TOP.fixup_alt_jump
+ COMPILE_STACK_TOP.fixup_alt_jump
= fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer;
COMPILE_STACK_TOP.regnum = regnum;
@@ -2038,7 +2298,7 @@ regex_compile (pattern, size, syntax, bufp)
COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2;
BUF_PUSH_3 (start_memory, regnum, 0);
}
-
+
compile_stack.avail++;
fixup_alt_jump = 0;
@@ -2067,7 +2327,7 @@ regex_compile (pattern, size, syntax, bufp)
`pop_failure_jump' to pop. See comments at
`push_dummy_failure' in `re_match_2'. */
BUF_PUSH (push_dummy_failure);
-
+
/* We allocated space for this jump when we assigned
to `fixup_alt_jump', in the `handle_alt' case below. */
STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
@@ -2089,11 +2349,11 @@ regex_compile (pattern, size, syntax, bufp)
as in `(ab)c(de)' -- the second group is #2. */
regnum_t this_group_regnum;
- compile_stack.avail--;
+ compile_stack.avail--;
begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset;
fixup_alt_jump
= COMPILE_STACK_TOP.fixup_alt_jump
- ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
+ ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
: 0;
laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
this_group_regnum = COMPILE_STACK_TOP.regnum;
@@ -2108,7 +2368,7 @@ regex_compile (pattern, size, syntax, bufp)
{
unsigned char *inner_group_loc
= bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
-
+
*inner_group_loc = regnum - this_group_regnum;
BUF_PUSH_3 (stop_memory, this_group_regnum,
regnum - this_group_regnum);
@@ -2137,10 +2397,10 @@ regex_compile (pattern, size, syntax, bufp)
jump (put in below, which in turn will jump to the next
(if any) alternative's such jump, etc.). The last such
jump jumps to the correct final destination. A picture:
- _____ _____
- | | | |
- | v | v
- a | b | c
+ _____ _____
+ | | | |
+ | v | v
+ a | b | c
If we are at `b', then fixup_alt_jump right now points to a
three-byte space after `a'. We'll put in the jump, set
@@ -2162,10 +2422,10 @@ regex_compile (pattern, size, syntax, bufp)
break;
- case '{':
+ case '{':
/* If \{ is a literal. */
if (!(syntax & RE_INTERVALS)
- /* If we're at `\{' and it's not the open-interval
+ /* If we're at `\{' and it's not the open-interval
operator. */
|| ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
|| (p - 2 == pattern && p == pend))
@@ -2204,11 +2464,11 @@ regex_compile (pattern, size, syntax, bufp)
{
if (syntax & RE_NO_BK_BRACES)
goto unfetch_interval;
- else
+ else
FREE_STACK_RETURN (REG_BADBR);
}
- if (!(syntax & RE_NO_BK_BRACES))
+ if (!(syntax & RE_NO_BK_BRACES))
{
if (c != '\\') FREE_STACK_RETURN (REG_EBRACE);
@@ -2219,7 +2479,7 @@ regex_compile (pattern, size, syntax, bufp)
{
if (syntax & RE_NO_BK_BRACES)
goto unfetch_interval;
- else
+ else
FREE_STACK_RETURN (REG_BADBR);
}
@@ -2255,7 +2515,7 @@ regex_compile (pattern, size, syntax, bufp)
jump_n <succeed_n addr> <jump count>
(The upper bound and `jump_n' are omitted if
`upper_bound' is 1, though.) */
- else
+ else
{ /* If the upper bound is > 1, we need to insert
more at the end of the loop. */
unsigned nbytes = 10 + (upper_bound > 1) * 10;
@@ -2272,7 +2532,7 @@ regex_compile (pattern, size, syntax, bufp)
lower_bound);
b += 5;
- /* Code to initialize the lower bound. Insert
+ /* Code to initialize the lower bound. Insert
before the `succeed_n'. The `5' is the last two
bytes of this `set_number_at', plus 3 bytes of
the following `succeed_n'. */
@@ -2283,7 +2543,7 @@ regex_compile (pattern, size, syntax, bufp)
{ /* More than one repetition is allowed, so
append a backward jump to the `succeed_n'
that starts this interval.
-
+
When we've reached this during matching,
we'll have matched the interval once, so
jump back only `upper_bound - 1' times. */
@@ -2301,7 +2561,7 @@ regex_compile (pattern, size, syntax, bufp)
so everything is getting moved up by 5.
Conclusion: (b - 2) - (laststart + 3) + 5,
i.e., b - laststart.
-
+
We insert this at the beginning of the loop
so that if we fail during matching, we'll
reinitialize the bounds. */
@@ -2322,7 +2582,7 @@ regex_compile (pattern, size, syntax, bufp)
beg_interval = NULL;
/* normal_char and normal_backslash need `c'. */
- PATFETCH (c);
+ PATFETCH (c);
if (!(syntax & RE_NO_BK_BRACES))
{
@@ -2338,7 +2598,7 @@ regex_compile (pattern, size, syntax, bufp)
BUF_PUSH (at_dot);
break;
- case 's':
+ case 's':
laststart = b;
PATFETCH (c);
BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
@@ -2353,38 +2613,54 @@ regex_compile (pattern, size, syntax, bufp)
case 'w':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
laststart = b;
BUF_PUSH (wordchar);
break;
case 'W':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
laststart = b;
BUF_PUSH (notwordchar);
break;
case '<':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
BUF_PUSH (wordbeg);
break;
case '>':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
BUF_PUSH (wordend);
break;
case 'b':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
BUF_PUSH (wordbound);
break;
case 'B':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
BUF_PUSH (notwordbound);
break;
case '`':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
BUF_PUSH (begbuf);
break;
case '\'':
+ if (re_syntax_options & RE_NO_GNU_OPS)
+ goto normal_char;
BUF_PUSH (endbuf);
break;
@@ -2399,7 +2675,7 @@ regex_compile (pattern, size, syntax, bufp)
FREE_STACK_RETURN (REG_ESUBREG);
/* Can't back reference to a subexpression if inside of it. */
- if (group_in_compile_stack (compile_stack, c1))
+ if (group_in_compile_stack (compile_stack, (regnum_t) c1))
goto normal_char;
laststart = b;
@@ -2429,11 +2705,11 @@ regex_compile (pattern, size, syntax, bufp)
/* Expects the character in `c'. */
normal_char:
/* If no exactn currently being built. */
- if (!pending_exact
+ if (!pending_exact
/* If last exactn not at current position. */
|| pending_exact + *pending_exact + 1 != b
-
+
/* We have only one byte following the exactn for the count. */
|| *pending_exact == (1 << BYTEWIDTH) - 1
@@ -2448,28 +2724,33 @@ regex_compile (pattern, size, syntax, bufp)
: (p[0] == '\\' && p[1] == '{'))))
{
/* Start building a new exactn. */
-
+
laststart = b;
BUF_PUSH_2 (exactn, 0);
pending_exact = b - 1;
}
-
+
BUF_PUSH (c);
(*pending_exact)++;
break;
} /* switch (c) */
} /* while p != pend */
-
+
/* Through the pattern now. */
-
+
if (fixup_alt_jump)
STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
- if (!COMPILE_STACK_EMPTY)
+ if (!COMPILE_STACK_EMPTY)
FREE_STACK_RETURN (REG_EPAREN);
+ /* If we don't want backtracking, force success
+ the first time we reach the end of the compiled pattern. */
+ if (syntax & RE_NO_POSIX_BACKTRACKING)
+ BUF_PUSH (succeed);
+
free (compile_stack.stack);
/* We have succeeded; set the length of the buffer. */
@@ -2500,7 +2781,7 @@ regex_compile (pattern, size, syntax, bufp)
#ifdef emacs
if (! fail_stack.stack)
fail_stack.stack
- = (fail_stack_elt_t *) xmalloc (fail_stack.size
+ = (fail_stack_elt_t *) xmalloc (fail_stack.size
* sizeof (fail_stack_elt_t));
else
fail_stack.stack
@@ -2510,7 +2791,7 @@ regex_compile (pattern, size, syntax, bufp)
#else /* not emacs */
if (! fail_stack.stack)
fail_stack.stack
- = (fail_stack_elt_t *) malloc (fail_stack.size
+ = (fail_stack_elt_t *) malloc (fail_stack.size
* sizeof (fail_stack_elt_t));
else
fail_stack.stack
@@ -2520,18 +2801,9 @@ regex_compile (pattern, size, syntax, bufp)
#endif /* not emacs */
}
- /* Initialize some other variables the matcher uses. */
- RETALLOC_IF (regstart, num_regs, const char *);
- RETALLOC_IF (regend, num_regs, const char *);
- RETALLOC_IF (old_regstart, num_regs, const char *);
- RETALLOC_IF (old_regend, num_regs, const char *);
- RETALLOC_IF (best_regstart, num_regs, const char *);
- RETALLOC_IF (best_regend, num_regs, const char *);
- RETALLOC_IF (reg_info, num_regs, register_info_type);
- RETALLOC_IF (reg_dummy, num_regs, const char *);
- RETALLOC_IF (reg_info_dummy, num_regs, register_info_type);
+ regex_grow_registers (num_regs);
}
-#endif
+#endif /* not MATCH_MAY_ALLOCATE */
return REG_NOERROR;
} /* regex_compile */
@@ -2573,14 +2845,14 @@ insert_op1 (op, loc, arg, end)
re_opcode_t op;
unsigned char *loc;
int arg;
- unsigned char *end;
+ unsigned char *end;
{
register unsigned char *pfrom = end;
register unsigned char *pto = end + 3;
while (pfrom != loc)
*--pto = *--pfrom;
-
+
store_op1 (op, loc, arg);
}
@@ -2592,14 +2864,14 @@ insert_op2 (op, loc, arg1, arg2, end)
re_opcode_t op;
unsigned char *loc;
int arg1, arg2;
- unsigned char *end;
+ unsigned char *end;
{
register unsigned char *pfrom = end;
register unsigned char *pto = end + 5;
while (pfrom != loc)
*--pto = *--pfrom;
-
+
store_op2 (op, loc, arg1, arg2);
}
@@ -2615,7 +2887,7 @@ at_begline_loc_p (pattern, p, syntax)
{
const char *prev = p - 2;
boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
-
+
return
/* After a subexpression? */
(*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
@@ -2630,12 +2902,12 @@ at_begline_loc_p (pattern, p, syntax)
static boolean
at_endline_loc_p (p, pend, syntax)
const char *p, *pend;
- int syntax;
+ reg_syntax_t syntax;
{
const char *next = p;
boolean next_backslash = *next == '\\';
- const char *next_next = p + 1 < pend ? p + 1 : NULL;
-
+ const char *next_next = p + 1 < pend ? p + 1 : 0;
+
return
/* Before a subexpression? */
(syntax & RE_NO_BK_PARENS ? *next == ')'
@@ -2646,7 +2918,7 @@ at_endline_loc_p (p, pend, syntax)
}
-/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
+/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
false if it's not. */
static boolean
@@ -2656,8 +2928,8 @@ group_in_compile_stack (compile_stack, regnum)
{
int this_element;
- for (this_element = compile_stack.avail - 1;
- this_element >= 0;
+ for (this_element = compile_stack.avail - 1;
+ this_element >= 0;
this_element--)
if (compile_stack.stack[this_element].regnum == regnum)
return true;
@@ -2671,24 +2943,24 @@ group_in_compile_stack (compile_stack, regnum)
starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
Then we set the translation of all bits between the starting and
ending characters (inclusive) in the compiled pattern B.
-
+
Return an error code.
-
+
We use these short variable names so we can use the same macros as
`regex_compile' itself. */
static reg_errcode_t
compile_range (p_ptr, pend, translate, syntax, b)
const char **p_ptr, *pend;
- char *translate;
+ RE_TRANSLATE_TYPE translate;
reg_syntax_t syntax;
unsigned char *b;
{
unsigned this_char;
const char *p = *p_ptr;
- int range_start, range_end;
-
+ unsigned int range_start, range_end;
+
if (p == pend)
return REG_ERANGE;
@@ -2697,7 +2969,7 @@ compile_range (p_ptr, pend, translate, syntax, b)
is set, the range endpoints will be negative if we fetch using a
signed char *.
- We also want to fetch the endpoints without translating them; the
+ We also want to fetch the endpoints without translating them; the
appropriate translation is done in the bit-setting loop below. */
/* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */
range_start = ((const unsigned char *) p)[-2];
@@ -2719,7 +2991,7 @@ compile_range (p_ptr, pend, translate, syntax, b)
{
SET_LIST_BIT (TRANSLATE (this_char));
}
-
+
return REG_NOERROR;
}
@@ -2730,7 +3002,7 @@ compile_range (p_ptr, pend, translate, syntax, b)
The caller must supply the address of a (1 << BYTEWIDTH)-byte data
area as BUFP->fastmap.
-
+
We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
the pattern buffer.
@@ -2749,12 +3021,17 @@ re_compile_fastmap (bufp)
#endif
/* We don't push any register information onto the failure stack. */
unsigned num_regs = 0;
-
+
register char *fastmap = bufp->fastmap;
unsigned char *pattern = bufp->buffer;
- unsigned long size = bufp->used;
unsigned char *p = pattern;
- register unsigned char *pend = pattern + size;
+ register unsigned char *pend = pattern + bufp->used;
+
+#ifdef REL_ALLOC
+ /* This holds the pointer to the failure stack, when
+ it is allocated relocatably. */
+ fail_stack_elt_t *failure_stack_ptr;
+#endif
/* Assume that each path through the pattern can be null until
proven otherwise. We set this false at the bottom of switch
@@ -2766,32 +3043,36 @@ re_compile_fastmap (bufp)
boolean succeed_n_p = false;
assert (fastmap != NULL && p != NULL);
-
+
INIT_FAIL_STACK ();
bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
bufp->fastmap_accurate = 1; /* It will be when we're done. */
bufp->can_be_null = 0;
-
- while (p != pend || !FAIL_STACK_EMPTY ())
+
+ while (1)
{
- if (p == pend)
- {
- bufp->can_be_null |= path_can_be_null;
-
- /* Reset for next path. */
- path_can_be_null = true;
-
- p = fail_stack.stack[--fail_stack.avail];
+ if (p == pend || *p == succeed)
+ {
+ /* We have reached the (effective) end of pattern. */
+ if (!FAIL_STACK_EMPTY ())
+ {
+ bufp->can_be_null |= path_can_be_null;
+
+ /* Reset for next path. */
+ path_can_be_null = true;
+
+ p = fail_stack.stack[--fail_stack.avail].pointer;
+
+ continue;
+ }
+ else
+ break;
}
/* We should never be about to go beyond the end of the pattern. */
assert (p < pend);
-
-#ifdef SWITCH_ENUM_BUG
- switch ((int) ((re_opcode_t) *p++))
-#else
- switch ((re_opcode_t) *p++)
-#endif
+
+ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
{
/* I guess the idea here is to simply not bother with a fastmap
@@ -2801,7 +3082,7 @@ re_compile_fastmap (bufp)
that is all we do. */
case duplicate:
bufp->can_be_null = 1;
- return 0;
+ goto done;
/* Following are the cases which match a character. These end
@@ -2859,7 +3140,7 @@ re_compile_fastmap (bufp)
/* Return if we have already set `can_be_null'; if we have,
then the fastmap is irrelevant. Something's wrong here. */
else if (bufp->can_be_null)
- return 0;
+ goto done;
/* Otherwise, have to check alternative paths. */
break;
@@ -2890,7 +3171,7 @@ re_compile_fastmap (bufp)
case at_dot:
case after_dot:
continue;
-#endif /* not emacs */
+#endif /* emacs */
case no_op:
@@ -2913,10 +3194,10 @@ re_compile_fastmap (bufp)
case jump_past_alt:
case dummy_failure_jump:
EXTRACT_NUMBER_AND_INCR (j, p);
- p += j;
+ p += j;
if (j > 0)
continue;
-
+
/* Jump backward implies we just went through the body of a
loop and matched nothing. Opcode jumped to should be
`on_failure_jump' or `succeed_n'. Just treat it like an
@@ -2928,11 +3209,11 @@ re_compile_fastmap (bufp)
p++;
EXTRACT_NUMBER_AND_INCR (j, p);
- p += j;
-
+ p += j;
+
/* If what's on the stack is where we are now, pop it. */
- if (!FAIL_STACK_EMPTY ()
- && fail_stack.stack[fail_stack.avail - 1] == p)
+ if (!FAIL_STACK_EMPTY ()
+ && fail_stack.stack[fail_stack.avail - 1].pointer == p)
fail_stack.avail--;
continue;
@@ -2953,7 +3234,10 @@ re_compile_fastmap (bufp)
if (p + j < pend)
{
if (!PUSH_PATTERN_OP (p + j, fail_stack))
- return -2;
+ {
+ RESET_FAIL_STACK ();
+ return -2;
+ }
}
else
bufp->can_be_null = 1;
@@ -2969,7 +3253,7 @@ re_compile_fastmap (bufp)
case succeed_n:
/* Get to the number of times to succeed. */
- p += 2;
+ p += 2;
/* Increment p past the n for when k != 0. */
EXTRACT_NUMBER_AND_INCR (k, p);
@@ -3010,6 +3294,9 @@ re_compile_fastmap (bufp)
/* Set `can_be_null' for the last path (also the first path, if the
pattern is empty). */
bufp->can_be_null |= path_can_be_null;
+
+ done:
+ RESET_FAIL_STACK ();
return 0;
} /* re_compile_fastmap */
@@ -3060,7 +3347,7 @@ re_search (bufp, string, size, startpos, range, regs)
int size, startpos, range;
struct re_registers *regs;
{
- return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
+ return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
regs, size);
}
@@ -3068,17 +3355,17 @@ re_search (bufp, string, size, startpos, range, regs)
/* Using the compiled pattern in BUFP->buffer, first tries to match the
virtual concatenation of STRING1 and STRING2, starting first at index
STARTPOS, then at STARTPOS + 1, and so on.
-
+
STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
-
+
RANGE is how far to scan while trying to match. RANGE = 0 means try
only at STARTPOS; in general, the last start tried is STARTPOS +
RANGE.
-
+
In REGS, return the indices of the virtual concatenation of STRING1
and STRING2 that matched the entire BUFP->buffer and its contained
subexpressions.
-
+
Do not consider matching one past the index STOP in the virtual
concatenation of STRING1 and STRING2.
@@ -3098,18 +3385,19 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
{
int val;
register char *fastmap = bufp->fastmap;
- register char *translate = bufp->translate;
+ register RE_TRANSLATE_TYPE translate = bufp->translate;
int total_size = size1 + size2;
int endpos = startpos + range;
/* Check for out-of-range STARTPOS. */
if (startpos < 0 || startpos > total_size)
return -1;
-
+
/* Fix up RANGE if it might eventually take us outside
- the virtual concatenation of STRING1 and STRING2. */
- if (endpos < -1)
- range = -1 - startpos;
+ the virtual concatenation of STRING1 and STRING2.
+ Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */
+ if (endpos < 0)
+ range = 0 - startpos;
else if (endpos > total_size)
range = total_size - startpos;
@@ -3123,14 +3411,25 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
range = 1;
}
+#ifdef emacs
+ /* In a forward search for something that starts with \=.
+ don't keep searching past point. */
+ if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
+ {
+ range = PT - startpos;
+ if (range <= 0)
+ return -1;
+ }
+#endif /* emacs */
+
/* Update the fastmap now if not correct already. */
if (fastmap && !bufp->fastmap_accurate)
if (re_compile_fastmap (bufp) == -2)
return -2;
-
+
/* Loop through the string, looking for a place to start matching. */
for (;;)
- {
+ {
/* If a fastmap is supplied, skip quickly over characters that
cannot be the start of a match. If the pattern can match the
null string, however, we don't need to skip characters; we want
@@ -3147,7 +3446,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
lim = range - (size1 - startpos);
d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
-
+
/* Written out as an if-else to avoid testing `translate'
inside the loop. */
if (translate)
@@ -3164,7 +3463,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
else /* Searching backwards. */
{
register char c = (size1 == 0 || startpos >= size1
- ? string2[startpos - size1]
+ ? string2[startpos - size1]
: string1[startpos]);
if (!fastmap[(unsigned char) TRANSLATE (c)])
@@ -3187,34 +3486,27 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
if (val >= 0)
return startpos;
-
+
if (val == -2)
return -2;
advance:
- if (!range)
+ if (!range)
break;
- else if (range > 0)
+ else if (range > 0)
{
- range--;
+ range--;
startpos++;
}
else
{
- range++;
+ range++;
startpos--;
}
}
return -1;
} /* re_search_2 */
-/* Declarations and macros for re_match_2. */
-
-static int bcmp_translate ();
-static boolean alt_match_null_string_p (),
- common_op_match_null_string_p (),
- group_match_null_string_p ();
-
/* This converts PTR, a pointer into one of the search strings `string1'
and `string2' into an offset from the beginning of that string. */
#define POINTER_TO_OFFSET(ptr) \
@@ -3243,7 +3535,7 @@ static boolean alt_match_null_string_p (),
/* Test if at very beginning or at very end of the virtual concatenation
of `string1' and `string2'. If only one string, it's `string2'. */
#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
-#define AT_STRINGS_END(d) ((d) == end2)
+#define AT_STRINGS_END(d) ((d) == end2)
/* Test if D points to a character which is word-constituent. We have
@@ -3264,11 +3556,10 @@ static boolean alt_match_null_string_p (),
/* Free everything we malloc. */
#ifdef MATCH_MAY_ALLOCATE
-#ifdef REGEX_MALLOC
-#define FREE_VAR(var) if (var) free (var); var = NULL
+#define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
#define FREE_VARIABLES() \
do { \
- FREE_VAR (fail_stack.stack); \
+ REGEX_FREE_STACK (fail_stack.stack); \
FREE_VAR (regstart); \
FREE_VAR (regend); \
FREE_VAR (old_regstart); \
@@ -3279,12 +3570,8 @@ static boolean alt_match_null_string_p (),
FREE_VAR (reg_dummy); \
FREE_VAR (reg_info_dummy); \
} while (0)
-#else /* not REGEX_MALLOC */
-/* This used to do alloca (0), but now we do that in the caller. */
-#define FREE_VARIABLES() /* Nothing */
-#endif /* not REGEX_MALLOC */
#else
-#define FREE_VARIABLES() /* Do nothing! */
+#define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */
#endif /* not MATCH_MAY_ALLOCATE */
/* These values must meet several constraints. They must not be valid
@@ -3311,17 +3598,32 @@ re_match (bufp, string, size, pos, regs)
{
int result = re_match_2_internal (bufp, NULL, 0, string, size,
pos, regs, size);
+#ifndef REGEX_MALLOC
+#ifdef C_ALLOCA
alloca (0);
+#endif
+#endif
return result;
}
#endif /* not emacs */
+static boolean group_match_null_string_p _RE_ARGS ((unsigned char **p,
+ unsigned char *end,
+ register_info_type *reg_info));
+static boolean alt_match_null_string_p _RE_ARGS ((unsigned char *p,
+ unsigned char *end,
+ register_info_type *reg_info));
+static boolean common_op_match_null_string_p _RE_ARGS ((unsigned char **p,
+ unsigned char *end,
+ register_info_type *reg_info));
+static int bcmp_translate _RE_ARGS ((const char *s1, const char *s2,
+ int len, char *translate));
/* re_match_2 matches the compiled pattern in BUFP against the
the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
and SIZE2, respectively). We start matching at POS, and stop
matching at STOP.
-
+
If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
store offsets for the substring each group matched in REGS. See the
documentation for exactly how many groups we fill.
@@ -3341,7 +3643,11 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
{
int result = re_match_2_internal (bufp, string1, size1, string2, size2,
pos, regs, stop);
+#ifndef REGEX_MALLOC
+#ifdef C_ALLOCA
alloca (0);
+#endif
+#endif
return result;
}
@@ -3369,7 +3675,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Where we are in the data, and the end of the current string. */
const char *d, *dend;
-
+
/* Where we are in the pattern, and the end of the pattern. */
unsigned char *p = bufp->buffer;
register unsigned char *pend = p + bufp->used;
@@ -3379,7 +3685,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
unsigned char *just_past_start_mem = 0;
/* We use this to map every character in the string. */
- char *translate = bufp->translate;
+ RE_TRANSLATE_TYPE translate = bufp->translate;
/* Failure point stack. Each place that can handle a failure further
down the line pushes a failure point on this stack. It consists of
@@ -3398,14 +3704,20 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
#endif
+#ifdef REL_ALLOC
+ /* This holds the pointer to the failure stack, when
+ it is allocated relocatably. */
+ fail_stack_elt_t *failure_stack_ptr;
+#endif
+
/* We fill all the registers internally, independent of what we
return, for use in backreferences. The number here includes
an element for register zero. */
- unsigned num_regs = bufp->re_nsub + 1;
-
+ size_t num_regs = bufp->re_nsub + 1;
+
/* The currently active registers. */
- unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG;
- unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+ active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
/* Information on the contents of registers. These are pointers into
the input strings; they record just what was matched (on this
@@ -3434,18 +3746,18 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
subexpression. These two fields get reset each time through any
loop their register is in. */
#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
- register_info_type *reg_info;
+ register_info_type *reg_info;
#endif
/* The following record the register info as found in the above
- variables when we find a match better than any we've seen before.
+ variables when we find a match better than any we've seen before.
This happens as we backtrack through the failure points, which in
turn happens only if we have not yet matched the entire string. */
unsigned best_regs_set = false;
#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
const char **best_regstart, **best_regend;
#endif
-
+
/* Logically, this is `best_regend[0]'. But we don't want to have to
allocate space for that if we're not allocating space for anything
else (see below). Also, we never need info about register 0 for
@@ -3456,6 +3768,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
and need to test it, it's not garbage. */
const char *match_end = NULL;
+ /* This helps SET_REGS_MATCHED avoid doing redundant work. */
+ int set_regs_matched_done = 0;
+
/* Used when we pop values we don't care about. */
#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
const char **reg_dummy;
@@ -3464,13 +3779,13 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
#ifdef DEBUG
/* Counts the total number of registers pushed. */
- unsigned num_regs_pushed = 0;
+ unsigned num_regs_pushed = 0;
#endif
DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
-
+
INIT_FAIL_STACK ();
-
+
#ifdef MATCH_MAY_ALLOCATE
/* Do not bother to initialize all the register variables if there are
no groups in the pattern, as it takes a fair amount of time. If
@@ -3489,14 +3804,13 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
reg_dummy = REGEX_TALLOC (num_regs, const char *);
reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type);
- if (!(regstart && regend && old_regstart && old_regend && reg_info
- && best_regstart && best_regend && reg_dummy && reg_info_dummy))
+ if (!(regstart && regend && old_regstart && old_regend && reg_info
+ && best_regstart && best_regend && reg_dummy && reg_info_dummy))
{
FREE_VARIABLES ();
return -2;
}
}
-#if defined (REGEX_MALLOC)
else
{
/* We must initialize all our variables to NULL, so that
@@ -3505,7 +3819,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
= best_regend = reg_dummy = NULL;
reg_info = reg_info_dummy = (register_info_type *) NULL;
}
-#endif /* REGEX_MALLOC */
#endif /* MATCH_MAY_ALLOCATE */
/* The starting position is bogus. */
@@ -3514,21 +3827,21 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
FREE_VARIABLES ();
return -1;
}
-
+
/* Initialize subexpression text positions to -1 to mark ones that no
start_memory/stop_memory has been seen for. Also initialize the
register information struct. */
- for (mcnt = 1; mcnt < num_regs; mcnt++)
+ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
{
- regstart[mcnt] = regend[mcnt]
+ regstart[mcnt] = regend[mcnt]
= old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
-
+
REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
IS_ACTIVE (reg_info[mcnt]) = 0;
MATCHED_SOMETHING (reg_info[mcnt]) = 0;
EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
}
-
+
/* We move `string1' into `string2' if the latter's empty -- but not if
`string1' is null. */
if (size2 == 0 && string1 != NULL)
@@ -3553,7 +3866,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
end_match_2 = string2 + stop - size1;
}
- /* `p' scans through the pattern as `d' scans through the data.
+ /* `p' scans through the pattern as `d' scans through the data.
`dend' is the end of the input string that `d' points within. `d'
is advanced into the following input string whenever necessary, but
this happens before fetching; therefore, at the beginning of the
@@ -3570,30 +3883,34 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
dend = end_match_2;
}
- DEBUG_PRINT1 ("The compiled pattern is: ");
+ DEBUG_PRINT1 ("The compiled pattern is:\n");
DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
DEBUG_PRINT1 ("The string to match is: `");
DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
DEBUG_PRINT1 ("'\n");
-
+
/* This loops over pattern commands. It exits by returning from the
function if the match is complete, or it drops through if the match
fails at this starting point in the input data. */
for (;;)
{
+#ifdef _LIBC
+ DEBUG_PRINT2 ("\n%p: ", p);
+#else
DEBUG_PRINT2 ("\n0x%x: ", p);
+#endif
if (p == pend)
{ /* End of pattern means we might have succeeded. */
DEBUG_PRINT1 ("end of pattern ... ");
-
+
/* If we haven't matched the entire string, and we want the
longest match, try backtracking. */
if (d != end_match_2)
{
/* 1 if this match ends in the same string (string1 or string2)
as the best previous match. */
- boolean same_str_p = (FIRST_STRING_P (match_end)
+ boolean same_str_p = (FIRST_STRING_P (match_end)
== MATCHING_IN_FIRST_STRING);
/* 1 if this match is the best seen so far. */
boolean best_match_p;
@@ -3606,7 +3923,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
best_match_p = !MATCHING_IN_FIRST_STRING;
DEBUG_PRINT1 ("backtracking.\n");
-
+
if (!FAIL_STACK_EMPTY ())
{ /* More failure points to try. */
@@ -3615,16 +3932,16 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
{
best_regs_set = true;
match_end = d;
-
+
DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
-
- for (mcnt = 1; mcnt < num_regs; mcnt++)
+
+ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
{
best_regstart[mcnt] = regstart[mcnt];
best_regend[mcnt] = regend[mcnt];
}
}
- goto fail;
+ goto fail;
}
/* If no failure points, don't restore garbage. And if
@@ -3639,12 +3956,12 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
strings `x-' and `y-z-', if the two strings are
not consecutive in memory. */
DEBUG_PRINT1 ("Restoring best registers.\n");
-
+
d = match_end;
dend = ((d >= string1 && d <= end1)
? end_match_1 : end_match_2);
- for (mcnt = 1; mcnt < num_regs; mcnt++)
+ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
{
regstart[mcnt] = best_regstart[mcnt];
regend[mcnt] = best_regend[mcnt];
@@ -3652,6 +3969,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
}
} /* d != end_match_2 */
+ succeed_label:
DEBUG_PRINT1 ("Accepting match.\n");
/* If caller wants register contents data back, do it. */
@@ -3666,7 +3984,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
regs->start = TALLOC (regs->num_regs, regoff_t);
regs->end = TALLOC (regs->num_regs, regoff_t);
if (regs->start == NULL || regs->end == NULL)
- return -2;
+ {
+ FREE_VARIABLES ();
+ return -2;
+ }
bufp->regs_allocated = REGS_REALLOCATE;
}
else if (bufp->regs_allocated == REGS_REALLOCATE)
@@ -3679,7 +4000,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
RETALLOC (regs->start, regs->num_regs, regoff_t);
RETALLOC (regs->end, regs->num_regs, regoff_t);
if (regs->start == NULL || regs->end == NULL)
- return -2;
+ {
+ FREE_VARIABLES ();
+ return -2;
+ }
}
}
else
@@ -3699,10 +4023,11 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
? ((regoff_t) (d - string1))
: ((regoff_t) (d - string2 + size1)));
}
-
+
/* Go through the first `min (num_regs, regs->num_regs)'
registers, since that is all we initialized. */
- for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++)
+ for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
+ mcnt++)
{
if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
regs->start[mcnt] = regs->end[mcnt] = -1;
@@ -3714,37 +4039,33 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
= (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
}
}
-
+
/* If the regs structure we return has more elements than
were in the pattern, set the extra elements to -1. If
we (re)allocated the registers, this is the case,
because we always allocate enough to have at least one
-1 at the end. */
- for (mcnt = num_regs; mcnt < regs->num_regs; mcnt++)
+ for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
regs->start[mcnt] = regs->end[mcnt] = -1;
} /* regs && !bufp->no_sub */
- FREE_VARIABLES ();
DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
nfailure_points_pushed, nfailure_points_popped,
nfailure_points_pushed - nfailure_points_popped);
DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
- mcnt = d - pos - (MATCHING_IN_FIRST_STRING
- ? string1
+ mcnt = d - pos - (MATCHING_IN_FIRST_STRING
+ ? string1
: string2 - size1);
DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
+ FREE_VARIABLES ();
return mcnt;
}
/* Otherwise match next pattern command. */
-#ifdef SWITCH_ENUM_BUG
- switch ((int) ((re_opcode_t) *p++))
-#else
- switch ((re_opcode_t) *p++)
-#endif
+ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
{
/* Ignore these. Used to ignore the n of succeed_n's which
currently have n == 0. */
@@ -3752,6 +4073,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT1 ("EXECUTING no_op.\n");
break;
+ case succeed:
+ DEBUG_PRINT1 ("EXECUTING succeed.\n");
+ goto succeed_label;
/* Match the next n pattern characters exactly. The following
byte in the pattern defines n, and the n bytes after that
@@ -3767,7 +4091,8 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
do
{
PREFETCH ();
- if (translate[(unsigned char) *d++] != (char) *p++)
+ if ((unsigned char) translate[(unsigned char) *d++]
+ != (unsigned char) *p++)
goto fail;
}
while (--mcnt);
@@ -3821,7 +4146,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
p += 1 + *p;
if (!not) goto fail;
-
+
SET_REGS_MATCHED ();
d++;
break;
@@ -3838,9 +4163,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Find out if this group can match the empty string. */
p1 = p; /* To send to group_match_null_string_p. */
-
+
if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
- REG_MATCH_NULL_STRING_P (reg_info[*p])
+ REG_MATCH_NULL_STRING_P (reg_info[*p])
= group_match_null_string_p (&p1, pend, reg_info);
/* Save the position in the string where we were the last time
@@ -3851,7 +4176,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
? REG_UNSET (regstart[*p]) ? d : regstart[*p]
: regstart[*p];
- DEBUG_PRINT2 (" old_regstart: %d\n",
+ DEBUG_PRINT2 (" old_regstart: %d\n",
POINTER_TO_OFFSET (old_regstart[*p]));
regstart[*p] = d;
@@ -3859,10 +4184,13 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
IS_ACTIVE (reg_info[*p]) = 1;
MATCHED_SOMETHING (reg_info[*p]) = 0;
-
+
+ /* Clear this whenever we change the register activity status. */
+ set_regs_matched_done = 0;
+
/* This is the new highest active register. */
highest_active_reg = *p;
-
+
/* If nothing was active before, this is the new lowest active
register. */
if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
@@ -3871,6 +4199,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Move past the register number and inner group count. */
p += 2;
just_past_start_mem = p;
+
break;
@@ -3879,7 +4208,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
number, and the number of inner groups. */
case stop_memory:
DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]);
-
+
/* We need to save the string position the last time we were at
this close-group operator in case the group is operated
upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
@@ -3888,7 +4217,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
? REG_UNSET (regend[*p]) ? d : regend[*p]
: regend[*p];
- DEBUG_PRINT2 (" old_regend: %d\n",
+ DEBUG_PRINT2 (" old_regend: %d\n",
POINTER_TO_OFFSET (old_regend[*p]));
regend[*p] = d;
@@ -3896,7 +4225,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* This register isn't active anymore. */
IS_ACTIVE (reg_info[*p]) = 0;
-
+
+ /* Clear this whenever we change the register activity status. */
+ set_regs_matched_done = 0;
+
/* If this was the only register active, nothing is active
anymore. */
if (lowest_active_reg == highest_active_reg)
@@ -3912,7 +4244,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
unsigned char r = *p - 1;
while (r > 0 && !IS_ACTIVE (reg_info[r]))
r--;
-
+
/* If we end up at register zero, that means that we saved
the registers as the result of an `on_failure_jump', not
a `start_memory', and we jumped to past the innermost
@@ -3928,7 +4260,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
else
highest_active_reg = r;
}
-
+
/* If just failed to match something this time around with a
group that's operated on by a repetition operator, try to
force exit from the ``loop'', and restore the register
@@ -3936,10 +4268,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
last match. */
if ((!MATCHED_SOMETHING (reg_info[*p])
|| just_past_start_mem == p - 1)
- && (p + 2) < pend)
+ && (p + 2) < pend)
{
boolean is_a_jump_n = false;
-
+
p1 = p + 2;
mcnt = 0;
switch ((re_opcode_t) *p1++)
@@ -3954,12 +4286,12 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
if (is_a_jump_n)
p1 += 2;
break;
-
+
default:
/* do nothing */ ;
}
p1 += mcnt;
-
+
/* If the next operation is a jump backwards in the pattern
to an on_failure_jump right before the start_memory
corresponding to this stop_memory, exit from the loop
@@ -3973,26 +4305,27 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
failed match, e.g., with `(a*)*b' against `ab' for
regstart[1], and, e.g., with `((a*)*(b*)*)*'
against `aba' for regend[3].
-
+
Also restore the registers for inner groups for,
e.g., `((a*)(b*))*' against `aba' (register 3 would
otherwise get trashed). */
-
+
if (EVER_MATCHED_SOMETHING (reg_info[*p]))
{
- unsigned r;
-
+ unsigned r;
+
EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
-
+
/* Restore this and inner groups' (if any) registers. */
- for (r = *p; r < *p + *(p + 1); r++)
+ for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
+ r++)
{
regstart[r] = old_regstart[r];
/* xx why this test? */
- if ((int) old_regend[r] >= (int) regstart[r])
+ if (old_regend[r] >= regstart[r])
regend[r] = old_regend[r];
- }
+ }
}
p1++;
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
@@ -4001,7 +4334,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
goto fail;
}
}
-
+
/* Move past the register number and the inner group count. */
p += 2;
break;
@@ -4018,16 +4351,16 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Can't back reference a group which we've never matched. */
if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
goto fail;
-
+
/* Where in input to try to start matching. */
d2 = regstart[regno];
-
+
/* Where to stop matching; if both the place to start and
the place to stop matching are in the same string, then
set to the place to stop, otherwise, for now have to use
the end of the first string. */
- dend2 = ((FIRST_STRING_P (regstart[regno])
+ dend2 = ((FIRST_STRING_P (regstart[regno])
== FIRST_STRING_P (regend[regno]))
? regend[regno] : end_match_1);
for (;;)
@@ -4051,19 +4384,22 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* How many characters left in this segment to match. */
mcnt = dend - d;
-
+
/* Want how many consecutive characters we can match in
one shot, so, if necessary, adjust the count. */
if (mcnt > dend2 - d2)
mcnt = dend2 - d2;
-
+
/* Compare that many; failure if mismatch, else move
past them. */
- if (translate
- ? bcmp_translate (d, d2, mcnt, translate)
+ if (translate
+ ? bcmp_translate (d, d2, mcnt, translate)
: bcmp (d, d2, mcnt))
goto fail;
d += mcnt, d2 += mcnt;
+
+ /* Do this because we've match some characters. */
+ SET_REGS_MATCHED ();
}
}
break;
@@ -4074,7 +4410,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
`newline_anchor' is set, after newlines. */
case begline:
DEBUG_PRINT1 ("EXECUTING begline.\n");
-
+
if (AT_STRINGS_BEG (d))
{
if (!bufp->not_bol) break;
@@ -4095,7 +4431,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
{
if (!bufp->not_eol) break;
}
-
+
/* We have to ``prefetch'' the next character. */
else if ((d == end1 ? *string2 : *d) == '\n'
&& bufp->newline_anchor)
@@ -4129,7 +4465,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
then the . fails against the \n. But the next thing we want
to do is match the \n against the \n; if we restored the
string value, we would be back at the foo.
-
+
Because this is used only in specific cases, we don't need to
check all the things that `on_failure_jump' does, to make
sure the right things get saved on the stack. Hence we don't
@@ -4139,16 +4475,20 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
case; that seems worse than this. */
case on_failure_keep_string_jump:
DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
-
+
EXTRACT_NUMBER_AND_INCR (mcnt, p);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
+#else
DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
+#endif
PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
break;
/* Uses of on_failure_jump:
-
+
Each alternative starts with an on_failure_jump that points
to the beginning of the next alternative. Each alternative
except the last ends with a jump that in effect jumps past
@@ -4164,14 +4504,18 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT1 ("EXECUTING on_failure_jump");
EXTRACT_NUMBER_AND_INCR (mcnt, p);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
+#else
DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
+#endif
/* If this on_failure_jump comes right before a group (i.e.,
the original * applied to a group), save the information
for that group and all inner ones, so that if we fail back
to this point, the group's information will be correct.
For example, in \(a*\)*\1, we need the preceding group,
- and in \(\(a*\)b*\)\2, we need the inner group. */
+ and in \(zz\(a*\)b*\)\2, we need the inner group. */
/* We can't use `p' to check ahead because we push
a failure point to `p + mcnt' after we do this. */
@@ -4214,7 +4558,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
would have to backtrack because of (as in, e.g., `a*a')
then we can change to pop_failure_jump, because we'll
never have to backtrack.
-
+
This is not true in the case of alternatives: in
`(a|ab)*' we do need to backtrack to the `ab' alternative
(e.g., if the string was `ab'). But instead of trying to
@@ -4240,7 +4584,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
p1 = p + mcnt;
/* p1[0] ... p1[2] are the `on_failure_jump' corresponding
- to the `maybe_finalize_jump' of this case. Examine what
+ to the `maybe_finalize_jump' of this case. Examine what
follows. */
/* If we're at the end of the pattern, we can change. */
@@ -4266,12 +4610,12 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
c, p1[5]);
}
-
+
else if ((re_opcode_t) p1[3] == charset
|| (re_opcode_t) p1[3] == charset_not)
{
int not = (re_opcode_t) p1[3] == charset_not;
-
+
if (c < (unsigned char) (p1[4] * BYTEWIDTH)
&& p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
not = !not;
@@ -4292,16 +4636,23 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
= *p2 == (unsigned char) endline ? '\n' : p2[2];
#endif
+#if 0
+ if ((re_opcode_t) p1[3] == exactn
+ && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
+ && (p2[2 + p1[5] / BYTEWIDTH]
+ & (1 << (p1[5] % BYTEWIDTH)))))
+#else
if ((re_opcode_t) p1[3] == exactn
&& ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
- && (p2[1 + p1[4] / BYTEWIDTH]
+ && (p2[2 + p1[4] / BYTEWIDTH]
& (1 << (p1[4] % BYTEWIDTH)))))
+#endif
{
p[-3] = (unsigned char) pop_failure_jump;
DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
c, p1[5]);
}
-
+
else if ((re_opcode_t) p1[3] == charset_not)
{
int idx;
@@ -4361,7 +4712,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
actual values. Otherwise, we will restore only one
register from the stack, since lowest will == highest in
`pop_failure_point'. */
- unsigned dummy_low_reg, dummy_high_reg;
+ active_reg_t dummy_low_reg, dummy_high_reg;
unsigned char *pdummy;
const char *sdummy;
@@ -4370,19 +4721,28 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
dummy_low_reg, dummy_high_reg,
reg_dummy, reg_dummy, reg_info_dummy);
}
+
+ unconditional_jump:
+#ifdef _LIBC
+ DEBUG_PRINT2 ("\n%p: ", p);
+#else
+ DEBUG_PRINT2 ("\n0x%x: ", p);
+#endif
/* Note fall through. */
-
/* Unconditionally jump (without popping any failure points). */
case jump:
- unconditional_jump:
EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
p += mcnt; /* Do the jump. */
+#ifdef _LIBC
+ DEBUG_PRINT2 ("(to %p).\n", p);
+#else
DEBUG_PRINT2 ("(to 0x%x).\n", p);
+#endif
break;
-
+
/* We need this opcode so we can detect where alternatives end
in `group_match_null_string_p' et al. */
case jump_past_alt:
@@ -4417,7 +4777,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Have to succeed matching what follows at least n times.
After that, handle like `on_failure_jump'. */
- case succeed_n:
+ case succeed_n:
EXTRACT_NUMBER (mcnt, p + 2);
DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
@@ -4428,18 +4788,26 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
mcnt--;
p += 2;
STORE_NUMBER_AND_INCR (p, mcnt);
- DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p, mcnt);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" Setting %p to %d.\n", p - 2, mcnt);
+#else
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - 2, mcnt);
+#endif
}
else if (mcnt == 0)
{
+#ifdef _LIBC
+ DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n", p+2);
+#else
DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n", p+2);
+#endif
p[2] = (unsigned char) no_op;
p[3] = (unsigned char) no_op;
goto on_failure;
}
break;
-
- case jump_n:
+
+ case jump_n:
EXTRACT_NUMBER (mcnt, p + 2);
DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
@@ -4448,13 +4816,18 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
{
mcnt--;
STORE_NUMBER (p + 2, mcnt);
- goto unconditional_jump;
+#ifdef _LIBC
+ DEBUG_PRINT3 (" Setting %p to %d.\n", p + 2, mcnt);
+#else
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + 2, mcnt);
+#endif
+ goto unconditional_jump;
}
/* If don't have to jump any more, skip over the rest of command. */
- else
- p += 4;
+ else
+ p += 4;
break;
-
+
case set_number_at:
{
DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
@@ -4462,22 +4835,63 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
EXTRACT_NUMBER_AND_INCR (mcnt, p);
p1 = p + mcnt;
EXTRACT_NUMBER_AND_INCR (mcnt, p);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
+#else
DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
+#endif
STORE_NUMBER (p1, mcnt);
break;
}
- case wordbound:
- DEBUG_PRINT1 ("EXECUTING wordbound.\n");
- if (AT_WORD_BOUNDARY (d))
+#if 0
+ /* The DEC Alpha C compiler 3.x generates incorrect code for the
+ test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
+ AT_WORD_BOUNDARY, so this code is disabled. Expanding the
+ macro and introducing temporary variables works around the bug. */
+
+ case wordbound:
+ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+ if (AT_WORD_BOUNDARY (d))
break;
- goto fail;
+ goto fail;
case notwordbound:
- DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
if (AT_WORD_BOUNDARY (d))
goto fail;
- break;
+ break;
+#else
+ case wordbound:
+ {
+ boolean prevchar, thischar;
+
+ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
+ break;
+
+ prevchar = WORDCHAR_P (d - 1);
+ thischar = WORDCHAR_P (d);
+ if (prevchar != thischar)
+ break;
+ goto fail;
+ }
+
+ case notwordbound:
+ {
+ boolean prevchar, thischar;
+
+ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
+ goto fail;
+
+ prevchar = WORDCHAR_P (d - 1);
+ thischar = WORDCHAR_P (d);
+ if (prevchar != thischar)
+ goto fail;
+ break;
+ }
+#endif
case wordbeg:
DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
@@ -4498,25 +4912,18 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
if (PTR_CHAR_POS ((unsigned char *) d) >= point)
goto fail;
break;
-
+
case at_dot:
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
if (PTR_CHAR_POS ((unsigned char *) d) != point)
goto fail;
break;
-
+
case after_dot:
DEBUG_PRINT1 ("EXECUTING after_dot.\n");
if (PTR_CHAR_POS ((unsigned char *) d) <= point)
goto fail;
break;
-#if 0 /* not emacs19 */
- case at_dot:
- DEBUG_PRINT1 ("EXECUTING at_dot.\n");
- if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point)
- goto fail;
- break;
-#endif /* not emacs19 */
case syntaxspec:
DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
@@ -4561,7 +4968,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
SET_REGS_MATCHED ();
d++;
break;
-
+
case notwordchar:
DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
PREFETCH ();
@@ -4571,7 +4978,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
d++;
break;
#endif /* not emacs */
-
+
default:
abort ();
}
@@ -4596,7 +5003,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
if (p < pend)
{
boolean is_a_jump_n = false;
-
+
/* If failed to a backwards jump that's part of a repetition
loop, need to pop this failure point and use the next one. */
switch ((re_opcode_t) *p)
@@ -4608,7 +5015,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
case jump:
p1 = p + 1;
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
- p1 += mcnt;
+ p1 += mcnt;
if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
|| (!is_a_jump_n
@@ -4639,10 +5046,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* We are passed P pointing to a register number after a start_memory.
-
+
Return true if the pattern up to the corresponding stop_memory can
match the empty string, and false otherwise.
-
+
If we find the matching stop_memory, sets P to point to one past its number.
Otherwise, sets P to an undefined byte less than or equal to END.
@@ -4656,20 +5063,20 @@ group_match_null_string_p (p, end, reg_info)
int mcnt;
/* Point to after the args to the start_memory. */
unsigned char *p1 = *p + 2;
-
+
while (p1 < end)
{
/* Skip over opcodes that can match nothing, and return true or
false, as appropriate, when we get to one that can't, or to the
matching stop_memory. */
-
+
switch ((re_opcode_t) *p1)
{
/* Could be either a loop or a series of alternatives. */
case on_failure_jump:
p1++;
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-
+
/* If the next operation is not a jump backwards in the
pattern. */
@@ -4683,7 +5090,7 @@ group_match_null_string_p (p, end, reg_info)
/on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
/on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
- /exactn/1/c
+ /exactn/1/c
So, we have to first go through the first (n-1)
alternatives and then deal with the last one separately. */
@@ -4699,19 +5106,19 @@ group_match_null_string_p (p, end, reg_info)
is, including the ending `jump_past_alt' and
its number. */
- if (!alt_match_null_string_p (p1, p1 + mcnt - 3,
+ if (!alt_match_null_string_p (p1, p1 + mcnt - 3,
reg_info))
return false;
/* Move to right after this alternative, including the
jump_past_alt. */
- p1 += mcnt;
+ p1 += mcnt;
/* Break if it's the beginning of an n-th alternative
that doesn't begin with an on_failure_jump. */
if ((re_opcode_t) *p1 != on_failure_jump)
break;
-
+
/* Still have to check that it's not an n-th
alternative that starts with an on_failure_jump. */
p1++;
@@ -4736,14 +5143,14 @@ group_match_null_string_p (p, end, reg_info)
} /* if mcnt > 0 */
break;
-
+
case stop_memory:
assert (p1[1] == **p);
*p = p1 + 2;
return true;
-
- default:
+
+ default:
if (!common_op_match_null_string_p (&p1, end, reg_info))
return false;
}
@@ -4756,7 +5163,7 @@ group_match_null_string_p (p, end, reg_info)
/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
It expects P to be the first byte of a single alternative and END one
byte past the last. The alternative can contain groups. */
-
+
static boolean
alt_match_null_string_p (p, end, reg_info)
unsigned char *p, *end;
@@ -4764,12 +5171,12 @@ alt_match_null_string_p (p, end, reg_info)
{
int mcnt;
unsigned char *p1 = p;
-
+
while (p1 < end)
{
- /* Skip over opcodes that can match nothing, and break when we get
+ /* Skip over opcodes that can match nothing, and break when we get
to one that can't. */
-
+
switch ((re_opcode_t) *p1)
{
/* It's a loop. */
@@ -4778,8 +5185,8 @@ alt_match_null_string_p (p, end, reg_info)
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
p1 += mcnt;
break;
-
- default:
+
+ default:
if (!common_op_match_null_string_p (&p1, end, reg_info))
return false;
}
@@ -4790,8 +5197,8 @@ alt_match_null_string_p (p, end, reg_info)
/* Deals with the ops common to group_match_null_string_p and
- alt_match_null_string_p.
-
+ alt_match_null_string_p.
+
Sets P to one after the op and its arguments, if any. */
static boolean
@@ -4826,7 +5233,7 @@ common_op_match_null_string_p (p, end, reg_info)
reg_no = *p1;
assert (reg_no > 0 && reg_no <= MAX_REGNUM);
ret = group_match_null_string_p (&p1, end, reg_info);
-
+
/* Have to set this here in case we're checking a group which
contains a group and a back reference to it. */
@@ -4836,7 +5243,7 @@ common_op_match_null_string_p (p, end, reg_info)
if (!ret)
return false;
break;
-
+
/* If this is an optimized succeed_n for zero times, make the jump. */
case jump:
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
@@ -4848,7 +5255,7 @@ common_op_match_null_string_p (p, end, reg_info)
case succeed_n:
/* Get to the number of times to succeed. */
- p1 += 2;
+ p1 += 2;
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
if (mcnt == 0)
@@ -4861,7 +5268,7 @@ common_op_match_null_string_p (p, end, reg_info)
return false;
break;
- case duplicate:
+ case duplicate:
if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
return false;
break;
@@ -4881,14 +5288,15 @@ common_op_match_null_string_p (p, end, reg_info)
/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
bytes; nonzero otherwise. */
-
+
static int
bcmp_translate (s1, s2, len, translate)
- unsigned char *s1, *s2;
+ const char *s1, *s2;
register int len;
- char *translate;
+ RE_TRANSLATE_TYPE translate;
{
- register unsigned char *p1 = s1, *p2 = s2;
+ register const unsigned char *p1 = (const unsigned char *) s1;
+ register const unsigned char *p2 = (const unsigned char *) s2;
while (len)
{
if (translate[*p1++] != translate[*p2++]) return 1;
@@ -4902,55 +5310,57 @@ bcmp_translate (s1, s2, len, translate)
/* re_compile_pattern is the GNU regular expression compiler: it
compiles PATTERN (of length SIZE) and puts the result in BUFP.
Returns 0 if the pattern was valid, otherwise an error string.
-
+
Assumes the `allocated' (and perhaps `buffer') and `translate' fields
are set in BUFP on entry.
-
+
We call regex_compile to do the actual compilation. */
const char *
re_compile_pattern (pattern, length, bufp)
const char *pattern;
- int length;
+ size_t length;
struct re_pattern_buffer *bufp;
{
reg_errcode_t ret;
-
+
/* GNU code is written to assume at least RE_NREGS registers will be set
(and at least one extra will be -1). */
bufp->regs_allocated = REGS_UNALLOCATED;
-
+
/* And GNU code determines whether or not to get register information
by passing null for the REGS argument to re_match, etc., not by
setting no_sub. */
bufp->no_sub = 0;
-
+
/* Match anchors at newline. */
bufp->newline_anchor = 1;
-
+
ret = regex_compile (pattern, length, re_syntax_options, bufp);
- return re_error_msg[(int) ret];
-}
+ if (!ret)
+ return NULL;
+ return gettext (re_error_msgid[(int) ret]);
+}
/* Entry points compatible with 4.2 BSD regex library. We don't define
them unless specifically requested. */
-#ifdef _REGEX_RE_COMP
+#if defined (_REGEX_RE_COMP) || defined (_LIBC)
/* BSD has one and only one pattern buffer. */
static struct re_pattern_buffer re_comp_buf;
-char *
+char * weak_function
re_comp (s)
const char *s;
{
reg_errcode_t ret;
-
+
if (!s)
{
if (!re_comp_buf.buffer)
- return "No previous regular expression";
+ return gettext ("No previous regular expression");
return 0;
}
@@ -4958,12 +5368,12 @@ re_comp (s)
{
re_comp_buf.buffer = (unsigned char *) malloc (200);
if (re_comp_buf.buffer == NULL)
- return "Memory exhausted";
+ return gettext (re_error_msgid[(int) REG_ESPACE]);
re_comp_buf.allocated = 200;
re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
if (re_comp_buf.fastmap == NULL)
- return "Memory exhausted";
+ return gettext (re_error_msgid[(int) REG_ESPACE]);
}
/* Since `re_exec' always passes NULL for the `regs' argument, we
@@ -4973,13 +5383,16 @@ re_comp (s)
re_comp_buf.newline_anchor = 1;
ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
-
- /* Yes, we're discarding `const' here. */
- return (char *) re_error_msg[(int) ret];
+
+ if (!ret)
+ return NULL;
+
+ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
+ return (char *) gettext (re_error_msgid[(int) ret]);
}
-int
+int weak_function
re_exec (s)
const char *s;
{
@@ -4987,6 +5400,7 @@ re_exec (s)
return
0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
}
+
#endif /* _REGEX_RE_COMP */
/* POSIX.2 functions. Don't define these for Emacs. */
@@ -5030,11 +5444,11 @@ re_exec (s)
int
regcomp (preg, pattern, cflags)
regex_t *preg;
- const char *pattern;
+ const char *pattern;
int cflags;
{
reg_errcode_t ret;
- unsigned syntax
+ reg_syntax_t syntax
= (cflags & REG_EXTENDED) ?
RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
@@ -5042,18 +5456,20 @@ regcomp (preg, pattern, cflags)
preg->buffer = 0;
preg->allocated = 0;
preg->used = 0;
-
+
/* Don't bother to use a fastmap when searching. This simplifies the
REG_NEWLINE case: if we used a fastmap, we'd have to put all the
characters after newlines into the fastmap. This way, we just try
every character. */
preg->fastmap = 0;
-
+
if (cflags & REG_ICASE)
{
unsigned i;
-
- preg->translate = (char *) malloc (CHAR_SET_SIZE);
+
+ preg->translate
+ = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
+ * sizeof (*(RE_TRANSLATE_TYPE)0));
if (preg->translate == NULL)
return (int) REG_ESPACE;
@@ -5077,38 +5493,38 @@ regcomp (preg, pattern, cflags)
preg->no_sub = !!(cflags & REG_NOSUB);
- /* POSIX says a null character in the pattern terminates it, so we
+ /* POSIX says a null character in the pattern terminates it, so we
can use strlen here in compiling the pattern. */
ret = regex_compile (pattern, strlen (pattern), syntax, preg);
-
+
/* POSIX doesn't distinguish between an unmatched open-group and an
unmatched close-group: both are REG_EPAREN. */
if (ret == REG_ERPAREN) ret = REG_EPAREN;
-
+
return (int) ret;
}
/* regexec searches for a given pattern, specified by PREG, in the
string STRING.
-
+
If NMATCH is zero or REG_NOSUB was set in the cflags argument to
`regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
least NMATCH elements, and we set them to the offsets of the
corresponding matched substrings.
-
+
EFLAGS specifies `execution flags' which affect matching: if
REG_NOTBOL is set, then ^ does not match at the beginning of the
string; if REG_NOTEOL is set, then $ does not match at the end.
-
+
We return 0 if we find a match and REG_NOMATCH if not. */
int
regexec (preg, string, nmatch, pmatch, eflags)
const regex_t *preg;
- const char *string;
- size_t nmatch;
- regmatch_t pmatch[];
+ const char *string;
+ size_t nmatch;
+ regmatch_t pmatch[];
int eflags;
{
int ret;
@@ -5118,15 +5534,15 @@ regexec (preg, string, nmatch, pmatch, eflags)
boolean want_reg_info = !preg->no_sub && nmatch > 0;
private_preg = *preg;
-
+
private_preg.not_bol = !!(eflags & REG_NOTBOL);
private_preg.not_eol = !!(eflags & REG_NOTEOL);
-
+
/* The user has told us exactly how many registers to return
information about, via `nmatch'. We have to pass that on to the
matching routines. */
private_preg.regs_allocated = REGS_FIXED;
-
+
if (want_reg_info)
{
regs.num_regs = nmatch;
@@ -5140,7 +5556,7 @@ regexec (preg, string, nmatch, pmatch, eflags)
ret = re_search (&private_preg, string, len,
/* start: */ 0, /* range: */ len,
want_reg_info ? &regs : (struct re_registers *) 0);
-
+
/* Copy the register information to the POSIX structure. */
if (want_reg_info)
{
@@ -5179,22 +5595,18 @@ regerror (errcode, preg, errbuf, errbuf_size)
size_t msg_size;
if (errcode < 0
- || errcode >= (sizeof (re_error_msg) / sizeof (re_error_msg[0])))
- /* Only error codes returned by the rest of the code should be passed
+ || errcode >= (int) (sizeof (re_error_msgid)
+ / sizeof (re_error_msgid[0])))
+ /* Only error codes returned by the rest of the code should be passed
to this routine. If we are given anything else, or if other regex
code generates an invalid error code, then the program has a bug.
Dump core so we can fix it. */
abort ();
- msg = re_error_msg[errcode];
-
- /* POSIX doesn't require that we do anything in this case, but why
- not be nice. */
- if (! msg)
- msg = "Success";
+ msg = gettext (re_error_msgid[errcode]);
msg_size = strlen (msg) + 1; /* Includes the null. */
-
+
if (errbuf_size != 0)
{
if (msg_size > errbuf_size)
@@ -5219,7 +5631,7 @@ regfree (preg)
if (preg->buffer != NULL)
free (preg->buffer);
preg->buffer = NULL;
-
+
preg->allocated = 0;
preg->used = 0;
@@ -5234,11 +5646,3 @@ regfree (preg)
}
#endif /* not emacs */
-
-/*
-Local variables:
-make-backup-files: t
-version-control: t
-trim-versions-without-asking: nil
-End:
-*/
diff --git a/lib/regex.h b/lib/regex.h
index 55927f62..63eef10d 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,7 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
-
- Copyright (C) 1985, 89, 90, 91, 92, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1985,89,90,91,92,93,95,96,97 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
@@ -13,36 +12,47 @@
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. */
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef __REGEXP_LIBRARY_H__
#define __REGEXP_LIBRARY_H__
+/* Allow the use in C++ code. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* POSIX says that <sys/types.h> must be included (by the caller) before
<regex.h>. */
-#ifdef VMS
+#if !defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE) && defined (VMS)
/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
should be there. */
#include <stddef.h>
#endif
+/* The following two types have to be signed and unsigned integer type
+ wide enough to hold a value of a pointer. For most ANSI compilers
+ ptrdiff_t and size_t should be likely OK. Still size of these two
+ types is 2 for Microsoft C. Ugh... */
+typedef long int s_reg_t;
+typedef unsigned long int active_reg_t;
/* The following bits are used to determine the regexp syntax we
recognize. The set/not-set meanings are chosen so that Emacs syntax
remains the value 0. The bits are given in alphabetical order, and
the definitions shifted by one from the previous bit; thus, when we
add or remove a bit, only one other definition need change. */
-typedef unsigned reg_syntax_t;
+typedef unsigned long int reg_syntax_t;
/* If this bit is not set, then \ inside a bracket expression is literal.
If set, then such a \ quotes the following character. */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
+#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
/* If this bit is not set, then + and ? are operators, and \+ and \? are
- literals.
+ literals.
If set, then \+ and \? are operators and + and ? are literals. */
#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
@@ -58,7 +68,7 @@ typedef unsigned reg_syntax_t;
^ is an anchor if it is at the beginning of a regular
expression or after an open-group or an alternation operator;
$ is an anchor if it is at the end of a regular expression, or
- before a close-group or an alternation operator.
+ before a close-group or an alternation operator.
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
POSIX draft 11.2 says that * etc. in leading positions is undefined.
@@ -69,7 +79,7 @@ typedef unsigned reg_syntax_t;
/* If this bit is set, then special characters are always special
regardless of where they are in the pattern.
If this bit is not set, then special characters are special only in
- some contexts; otherwise they are ordinary. Specifically,
+ some contexts; otherwise they are ordinary. Specifically,
* + ? and intervals are only special when not after the beginning,
open-group, or alternation operator. */
#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
@@ -91,7 +101,7 @@ typedef unsigned reg_syntax_t;
#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
/* If this bit is set, either \{...\} or {...} defines an
- interval, depending on RE_NO_BK_BRACES.
+ interval, depending on RE_NO_BK_BRACES.
If not set, \{, \}, {, and } are literals. */
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
@@ -116,7 +126,7 @@ typedef unsigned reg_syntax_t;
If not set, then \<digit> is a back-reference. */
#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-/* If this bit is set, then | is an alternation operator, and \| is literal.
+/* If this bit is set, then | is an alternation operator, and \| is literal.
If not set, then \| is an alternation operator, and | is literal. */
#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
@@ -130,6 +140,14 @@ typedef unsigned reg_syntax_t;
If not set, then an unmatched ) is invalid. */
#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+/* If this bit is set, succeed as soon as we match the whole pattern,
+ without further backtracking. */
+#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
+/* If this bit is set, do not process the GNU regex operators.
+ If not set, then the GNU regex operators are recognized. */
+#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+
/* This global variable defines the particular regexp syntax to use (for
some interfaces). When a regexp is compiled, the syntax used is
stored in the pattern buffer, so changing this does not affect
@@ -138,18 +156,23 @@ extern reg_syntax_t re_syntax_options;
/* Define combinations of the above bits for the standard possibilities.
(The [[[ comments delimit what gets put into the Texinfo file, so
- don't delete them!) */
+ don't delete them!) */
/* [[[begin syntaxes]]] */
#define RE_SYNTAX_EMACS 0
#define RE_SYNTAX_AWK \
- (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
- | RE_UNMATCHED_RIGHT_PAREN_ORD)
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_DOT_NEWLINE \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
+
+#define RE_SYNTAX_GNU_AWK \
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) \
+ & ~(RE_DOT_NOT_NULL | RE_INTERVALS))
#define RE_SYNTAX_POSIX_AWK \
- (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_NO_GNU_OPS)
#define RE_SYNTAX_GREP \
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
@@ -205,7 +228,8 @@ extern reg_syntax_t re_syntax_options;
#ifdef RE_DUP_MAX
#undef RE_DUP_MAX
#endif
-#define RE_DUP_MAX ((1 << 15) - 1)
+/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
+#define RE_DUP_MAX (0x7fff)
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
@@ -217,7 +241,7 @@ extern reg_syntax_t re_syntax_options;
/* If this bit is set, then ignore case when matching.
If not set, then case is significant. */
#define REG_ICASE (REG_EXTENDED << 1)
-
+
/* If this bit is set, then anchors do not match at newline
characters in the string.
If not set, then anchors do match at newlines. */
@@ -256,7 +280,7 @@ typedef enum
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* Unmatched left bracket. */
- REG_EPAREN, /* Parenthesis imbalance. */
+ REG_EPAREN, /* Parenthesis imbalance. */
REG_EBRACE, /* Unmatched \{. */
REG_BADBR, /* Invalid contents of \{\}. */
REG_ERANGE, /* Invalid range end. */
@@ -275,6 +299,10 @@ typedef enum
compiled, the `re_nsub' field is available. All other fields are
private to the regex routines. */
+#ifndef RE_TRANSLATE_TYPE
+#define RE_TRANSLATE_TYPE char *
+#endif
+
struct re_pattern_buffer
{
/* [[[begin pattern_buffer]]] */
@@ -287,7 +315,7 @@ struct re_pattern_buffer
unsigned long allocated;
/* Number of bytes actually used in `buffer'. */
- unsigned long used;
+ unsigned long used;
/* Syntax setting with which the pattern was compiled. */
reg_syntax_t syntax;
@@ -301,7 +329,7 @@ struct re_pattern_buffer
comparing them, or zero for no translation. The translation
is applied to a pattern when it is compiled and to a string
when it is matched. */
- char *translate;
+ RE_TRANSLATE_TYPE translate;
/* Number of subexpressions found by the compiler. */
size_t re_nsub;
@@ -331,7 +359,7 @@ struct re_pattern_buffer
unsigned no_sub : 1;
/* If set, a beginning-of-line anchor doesn't match at the
- beginning of the string. */
+ beginning of the string. */
unsigned not_bol : 1;
/* Similarly for an end-of-line anchor. */
@@ -402,7 +430,7 @@ extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
and syntax given by the global `re_syntax_options', into the buffer
BUFFER. Return NULL if successful, and an error string if not. */
extern const char *re_compile_pattern
- _RE_ARGS ((const char *pattern, int length,
+ _RE_ARGS ((const char *pattern, size_t length,
struct re_pattern_buffer *buffer));
@@ -438,7 +466,7 @@ extern int re_match
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int re_match_2
+extern int re_match_2
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
int length1, const char *string2, int length2,
int start, struct re_registers *regs, int stop));
@@ -461,10 +489,12 @@ extern void re_set_registers
unsigned num_regs, regoff_t *starts, regoff_t *ends));
#ifdef _REGEX_RE_COMP
+#ifndef _CRAY
/* 4.2 bsd compatibility. */
extern char *re_comp _RE_ARGS ((const char *));
extern int re_exec _RE_ARGS ((const char *));
#endif
+#endif
/* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
@@ -476,6 +506,11 @@ extern size_t regerror
size_t errbuf_size));
extern void regfree _RE_ARGS ((regex_t *preg));
+
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
#endif /* not __REGEXP_LIBRARY_H__ */
/*
diff --git a/lib/strtol.c b/lib/strtol.c
index 08ef0a47..025287a3 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -1,9 +1,12 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* strtol - Convert string representation of a number into an integer value.
+ Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
+ NOTE: The canonical source of this file is maintained with the GNU C
+ Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
- 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 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
@@ -11,88 +14,210 @@
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. */
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define USE_NUMBER_GROUPING
+# define STDC_HEADERS
+# define HAVE_LIMITS_H
#endif
#include <ctype.h>
#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
+#ifdef STDC_HEADERS
+# include <stddef.h>
+# include <stdlib.h>
+# include <string.h>
+#else
+# ifndef NULL
+# define NULL 0
+# endif
+#endif
+
+#ifdef USE_NUMBER_GROUPING
+# include "../locale/localeinfo.h"
+#endif
+
+/* Nonzero if we are defining `strtoul' or `strtouq', operating on
+ unsigned integers. */
+#ifndef UNSIGNED
+# define UNSIGNED 0
+# define INT LONG int
+#else
+# define INT unsigned LONG int
+#endif
+
+/* Determine the name. */
+#if UNSIGNED
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol wcstouq
+# else
+# define strtol wcstoul
+# endif
+# else
+# ifdef QUAD
+# define strtol strtouq
+# else
+# define strtol strtoul
+# endif
+# endif
+#else
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol wcstoq
+# else
+# define strtol wcstol
+# endif
+# else
+# ifdef QUAD
+# define strtol strtoq
+# endif
+# endif
#endif
+/* If QUAD is defined, we are defining `strtoq' or `strtouq',
+ operating on `long long int's. */
+#ifdef QUAD
+# define LONG long long
+# undef LONG_MIN
+# define LONG_MIN LONG_LONG_MIN
+# undef LONG_MAX
+# define LONG_MAX LONG_LONG_MAX
+# undef ULONG_MAX
+# define ULONG_MAX ULONG_LONG_MAX
+# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
+ /* Work around gcc bug with using this constant. */
+ static const unsigned long long int maxquad = ULONG_LONG_MAX;
+# undef ULONG_MAX
+# define ULONG_MAX maxquad
+# endif
+#else
+# define LONG long
+
+#ifndef ULONG_MAX
+# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
+#endif
#ifndef LONG_MAX
-#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1)))
+# define LONG_MAX ((long int) (ULONG_MAX >> 1))
+#endif
#endif
-#ifndef LONG_MIN
-#define LONG_MIN (-LONG_MAX - 1)
+#ifdef USE_WIDE_CHAR
+# include <wchar.h>
+# include <wctype.h>
+# define L_(Ch) L##Ch
+# define UCHAR_TYPE wint_t
+# define STRING_TYPE wchar_t
+# define ISSPACE(Ch) iswspace (Ch)
+# define ISALPHA(Ch) iswalpha (Ch)
+# define TOUPPER(Ch) towupper (Ch)
+#else
+# define L_(Ch) Ch
+# define UCHAR_TYPE unsigned char
+# define STRING_TYPE char
+# define ISSPACE(Ch) isspace (Ch)
+# define ISALPHA(Ch) isalpha (Ch)
+# define TOUPPER(Ch) toupper (Ch)
#endif
-#if STDC_HEADERS
-#include <stddef.h>
-#include <stdlib.h>
+#ifdef __STDC__
+# define INTERNAL(X) INTERNAL1(X)
+# define INTERNAL1(X) __##X##_internal
+# define WEAKNAME(X) WEAKNAME1(X)
#else
-#define NULL 0
-extern int errno;
+# define INTERNAL(X) __/**/X/**/_internal
#endif
-#ifndef UNSIGNED
-#define UNSIGNED 0
+#ifdef USE_NUMBER_GROUPING
+/* This file defines a function to check for correct grouping. */
+# include "grouping.h"
#endif
+
/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
If BASE is 0 the base is determined by the presence of a leading
zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
If BASE is < 2 or > 36, it is reset to 10.
If ENDPTR is not NULL, a pointer to the character after the last
one converted is stored in *ENDPTR. */
-#if UNSIGNED
-unsigned long int
-#define strtol strtoul
-#else
-long int
-#endif
-strtol (nptr, endptr, base)
- const char *nptr;
- char **endptr;
+
+INT
+INTERNAL (strtol) (nptr, endptr, base, group)
+ const STRING_TYPE *nptr;
+ STRING_TYPE **endptr;
int base;
+ int group;
{
int negative;
- register unsigned long int cutoff;
+ register unsigned LONG int cutoff;
register unsigned int cutlim;
- register unsigned long int i;
- register const char *s;
- register unsigned char c;
- const char *save;
+ register unsigned LONG int i;
+ register const STRING_TYPE *s;
+ register UCHAR_TYPE c;
+ const STRING_TYPE *save, *end;
int overflow;
+#ifdef USE_NUMBER_GROUPING
+ /* The thousands character of the current locale. */
+ wchar_t thousands;
+ /* The numeric grouping specification of the current locale,
+ in the format described in <locale.h>. */
+ const char *grouping;
+
+ if (group)
+ {
+ grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
+ if (*grouping <= 0 || *grouping == CHAR_MAX)
+ grouping = NULL;
+ else
+ {
+ /* Figure out the thousands separator character. */
+ if (mbtowc (&thousands, _NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP),
+ strlen (_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP))) <= 0)
+ thousands = (wchar_t) *_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP);
+ if (thousands == L'\0')
+ grouping = NULL;
+ }
+ }
+ else
+ grouping = NULL;
+#endif
+
if (base < 0 || base == 1 || base > 36)
base = 10;
- s = nptr;
+ save = s = nptr;
/* Skip white space. */
- while (isspace (*s))
+ while (ISSPACE (*s))
++s;
- if (*s == '\0')
+ if (*s == L_('\0'))
goto noconv;
/* Check for a sign. */
- if (*s == '-')
+ if (*s == L_('-'))
{
negative = 1;
++s;
}
- else if (*s == '+')
+ else if (*s == L_('+'))
{
negative = 0;
++s;
@@ -100,50 +225,69 @@ strtol (nptr, endptr, base)
else
negative = 0;
- if (base == 16 && s[0] == '0' && toupper (s[1]) == 'X')
+ if (base == 16 && s[0] == L_('0') && TOUPPER (s[1]) == L_('X'))
s += 2;
/* If BASE is zero, figure it out ourselves. */
if (base == 0)
- {
- if (*s == '0')
- {
- if (toupper (s[1]) == 'X')
- {
- s += 2;
- base = 16;
- }
- else
- base = 8;
- }
- else
- base = 10;
- }
+ if (*s == L_('0'))
+ {
+ if (TOUPPER (s[1]) == L_('X'))
+ {
+ s += 2;
+ base = 16;
+ }
+ else
+ base = 8;
+ }
+ else
+ base = 10;
/* Save the pointer so we can check later if anything happened. */
save = s;
- cutoff = ULONG_MAX / (unsigned long int) base;
- cutlim = ULONG_MAX % (unsigned long int) base;
+#ifdef USE_NUMBER_GROUPING
+ if (group)
+ {
+ /* Find the end of the digit string and check its grouping. */
+ end = s;
+ for (c = *end; c != L_('\0'); c = *++end)
+ if ((wchar_t) c != thousands
+ && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
+ && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
+ break;
+ if (*s == thousands)
+ end = s;
+ else
+ end = correctly_grouped_prefix (s, end, thousands, grouping);
+ }
+ else
+#endif
+ end = NULL;
+
+ cutoff = ULONG_MAX / (unsigned LONG int) base;
+ cutlim = ULONG_MAX % (unsigned LONG int) base;
overflow = 0;
i = 0;
- for (c = *s; c != '\0'; c = *++s)
+ for (c = *s; c != L_('\0'); c = *++s)
{
- if (isdigit (c))
- c -= '0';
- else if (isalpha (c))
- c = toupper (c) - 'A' + 10;
+ if (s == end)
+ break;
+ if (c >= L_('0') && c <= L_('9'))
+ c -= L_('0');
+ else if (ISALPHA (c))
+ c = TOUPPER (c) - L_('A') + 10;
else
break;
- if (c >= base)
+ if ((int) c >= base)
break;
/* Check for overflow. */
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
- i *= (unsigned long int) base;
+ i *= (unsigned LONG int) base;
i += c;
}
}
@@ -155,20 +299,22 @@ strtol (nptr, endptr, base)
/* Store in ENDPTR the address of one character
past the last character we converted. */
if (endptr != NULL)
- *endptr = (char *) s;
+ *endptr = (STRING_TYPE *) s;
-#if !UNSIGNED
+#if !UNSIGNED
/* Check for a value that is within the range of
- `unsigned long int', but outside the range of `long int'. */
- if (i > (negative ?
- -(unsigned long int) LONG_MIN : (unsigned long int) LONG_MAX))
+ `unsigned LONG int', but outside the range of `LONG int'. */
+ if (overflow == 0
+ && i > (negative
+ ? -((unsigned LONG int) (LONG_MIN + 1)) + 1
+ : (unsigned LONG int) LONG_MAX))
overflow = 1;
#endif
if (overflow)
{
- errno = ERANGE;
-#if UNSIGNED
+ __set_errno (ERANGE);
+#if UNSIGNED
return ULONG_MAX;
#else
return negative ? LONG_MIN : LONG_MAX;
@@ -178,9 +324,45 @@ strtol (nptr, endptr, base)
/* Return the result of the appropriate sign. */
return (negative ? -i : i);
-noconv:;
- /* There was no number to convert. */
+noconv:
+ /* We must handle a special case here: the base is 0 or 16 and the
+ first two characters are '0' and 'x', but the rest are no
+ hexadecimal digits. This is no error case. We return 0 and
+ ENDPTR points to the `x`. */
if (endptr != NULL)
- *endptr = (char *) nptr;
+ if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
+ && save[-2] == L_('0'))
+ *endptr = (STRING_TYPE *) &save[-1];
+ else
+ /* There was no number to convert. */
+ *endptr = (STRING_TYPE *) nptr;
+
return 0L;
}
+
+/* External user entry point. */
+
+#if _LIBC - 0 == 0
+# undef PARAMS
+# if defined (__STDC__) && __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+
+/* Prototype. */
+INT strtol PARAMS ((const STRING_TYPE *nptr, STRING_TYPE **endptr, int base));
+#endif
+
+
+INT
+#ifdef weak_function
+weak_function
+#endif
+strtol (nptr, endptr, base)
+ const STRING_TYPE *nptr;
+ STRING_TYPE **endptr;
+ int base;
+{
+ return INTERNAL (strtol) (nptr, endptr, base, 0);
+}
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 9f701111..8217c992 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -1,5 +1,5 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96 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
@@ -12,33 +12,53 @@
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. */
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#if __STDC__
-#define VOID void
+# define VOID void
#else
-#define VOID char
+# define VOID char
#endif
#include <sys/types.h>
#if STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
#else
+VOID *calloc ();
VOID *malloc ();
VOID *realloc ();
void free ();
#endif
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define textdomain(Domain)
+# define _(Text) Text
+#endif
+
+#include "error.h"
+
#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
+# define EXIT_FAILURE 1
#endif
+/* Prototypes for functions defined here. */
+#if defined (__STDC__) && __STDC__
+static VOID *fixup_null_alloc (size_t n);
+VOID *xmalloc (size_t n);
+VOID *xcalloc (size_t n, size_t s);
+VOID *xrealloc (VOID *p, size_t n);
+#endif
+
+
/* Exit value when the requested amount of memory is not available.
The caller may set it to some other value. */
int xmalloc_exit_failure = EXIT_FAILURE;
@@ -59,7 +79,7 @@ fixup_null_alloc (n)
if (n == 0)
p = malloc ((size_t) 1);
if (p == 0)
- error (xmalloc_exit_failure, 0, "memory exhausted");
+ error (xmalloc_exit_failure, 0, _("Memory exhausted"));
return p;
}
@@ -77,6 +97,20 @@ xmalloc (n)
return p;
}
+/* Allocate memory for N elements of S bytes, with error checking. */
+
+VOID *
+xcalloc (n, s)
+ size_t n, s;
+{
+ VOID *p;
+
+ p = calloc (n, s);
+ if (p == 0)
+ p = fixup_null_alloc (n);
+ return p;
+}
+
/* Change the size of an allocated block of memory P to N bytes,
with error checking.
If P is NULL, run xmalloc. */
diff --git a/lib/xstrdup.c b/lib/xstrdup.c
index 27cd0c67..d5bcaf38 100644
--- a/lib/xstrdup.c
+++ b/lib/xstrdup.c
@@ -1,5 +1,5 @@
/* xstrdup.c -- copy a string with out of memory checking
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1996 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
@@ -12,19 +12,25 @@
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. */
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
-#include <string.h>
+# include <string.h>
#else
-#include <strings.h>
+# include <strings.h>
#endif
+
+#if defined (__STDC__) && __STDC__
+char *xmalloc (size_t);
+char *xstrdup (char *string);
+#else
char *xmalloc ();
+#endif
/* Return a newly allocated copy of STRING. */
diff --git a/libltdl/COPYING.LIB b/libltdl/COPYING.LIB
deleted file mode 100644
index eb685a5e..00000000
--- a/libltdl/COPYING.LIB
+++ /dev/null
@@ -1,481 +0,0 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am
deleted file mode 100644
index 12bdcbbf..00000000
--- a/libltdl/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-if INSTALL_LTDL
-include_HEADERS = ltdl.h
-lib_LTLIBRARIES = libltdl.la
-else
-noinst_HEADERS = ltdl.h
-endif
-
-if CONVENIENCE_LTDL
-noinst_LTLIBRARIES = libltdlc.la
-endif
-
-libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -version-info 1:1:1
-libltdl_la_LIBADD = $(LIBADD_DL)
-
-libltdlc_la_SOURCES = ltdl.c
-libltdlc_la_LIBADD = $(LIBADD_DL)
-
-## Because we do not have automatic dependency tracking:
-ltdl.lo: ltdl.h config.h
-
-$(OBJECTS): libtool
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
-
-## This allows us to install libltdl without using ln and without creating
-## a world writeable directory.
-## FIXME: Removed this rule once automake can do this properly by itself.
-local-install-files: $(DISTFILES)
- -rm -rf $(DESTDIR)$(datadir)/libtool/libltdl
- $(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \
- else \
- test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \
- || cp -p $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \
- fi; \
- done
diff --git a/libltdl/Makefile.in b/libltdl/Makefile.in
deleted file mode 100644
index 6d4c93b2..00000000
--- a/libltdl/Makefile.in
+++ /dev/null
@@ -1,454 +0,0 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_alias = @host_alias@
-host_triplet = @host@
-AS = @AS@
-CC = @CC@
-DLLTOOL = @DLLTOOL@
-LD = @LD@
-LIBADD_DL = @LIBADD_DL@
-LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-OBJDUMP = @OBJDUMP@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-
-AUTOMAKE_OPTIONS = no-dependencies foreign
-
-@INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h
-@INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la
-@INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h
-
-@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la
-
-libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -version-info 1:1:1
-libltdl_la_LIBADD = $(LIBADD_DL)
-
-libltdlc_la_SOURCES = ltdl.c
-libltdlc_la_LIBADD = $(LIBADD_DL)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libltdl_la_DEPENDENCIES =
-libltdl_la_OBJECTS = ltdl.lo
-libltdlc_la_LDFLAGS =
-libltdlc_la_DEPENDENCIES =
-libltdlc_la_OBJECTS = ltdl.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-HEADERS = $(include_HEADERS) $(noinst_HEADERS)
-
-DIST_COMMON = README ./stamp-h.in COPYING.LIB Makefile.am Makefile.in \
-acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES)
-OBJECTS = $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
- cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-config.h: stamp-h
- @if test ! -f $@; then \
- rm -f stamp-h; \
- $(MAKE) stamp-h; \
- else :; fi
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES= CONFIG_HEADERS=config.h \
- $(SHELL) ./config.status
- @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
- @if test ! -f $@; then \
- rm -f $(srcdir)/stamp-h.in; \
- $(MAKE) $(srcdir)/stamp-h.in; \
- else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
- cd $(top_srcdir) && $(AUTOHEADER)
- @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
- -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-libLTLIBRARIES:
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-
-distclean-libLTLIBRARIES:
-
-maintainer-clean-libLTLIBRARIES:
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
- done
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS)
-
-libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES)
- $(LINK) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS)
-
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(includedir)
- @list='$(include_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
- done
-
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- list='$(include_HEADERS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(includedir)/$$p; \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-all-recursive-am: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am: install-libLTLIBRARIES
-install-exec: install-exec-am
-
-install-data-am: install-includeHEADERS
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
- mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-hdr clean-libLTLIBRARIES clean-noinstLTLIBRARIES \
- clean-compile clean-libtool clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-hdr distclean-libLTLIBRARIES \
- distclean-noinstLTLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-hdr \
- maintainer-clean-libLTLIBRARIES \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES \
-mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
-clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool uninstall-includeHEADERS \
-install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck all-recursive-am install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-ltdl.lo: ltdl.h config.h
-
-$(OBJECTS): libtool
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
-
-local-install-files: $(DISTFILES)
- -rm -rf $(DESTDIR)$(datadir)/libtool/libltdl
- $(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \
- else \
- test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \
- || cp -p $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \
- fi; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/libltdl/README b/libltdl/README
deleted file mode 100644
index 0b08ae28..00000000
--- a/libltdl/README
+++ /dev/null
@@ -1 +0,0 @@
-This is GNU libltdl, a system independent dlopen wrapper for GNU libtool.
diff --git a/libltdl/acconfig.h b/libltdl/acconfig.h
deleted file mode 100644
index 15f115c7..00000000
--- a/libltdl/acconfig.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Some of these are defined here, not in configure.in, because
- they're AC_DEFINEd in two different places, which causes two
- defines to appear. Some C compilers might now appreciate it... */
-
-/* Define if you have the libdl library or equivalent. */
-#undef HAVE_LIBDL
-
-/* Define if you have the GNU dld library. */
-#undef HAVE_DLD
-
-/* Define if you have the shl_load function. */
-#undef HAVE_SHL_LOAD
diff --git a/libltdl/acinclude.m4 b/libltdl/acinclude.m4
deleted file mode 100644
index 2ad32064..00000000
--- a/libltdl/acinclude.m4
+++ /dev/null
@@ -1,427 +0,0 @@
-## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
-## Copyright (C) 1996-1999 Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-##
-## 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 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$host" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$host" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
diff --git a/libltdl/aclocal.m4 b/libltdl/aclocal.m4
deleted file mode 100644
index 7ade1e6e..00000000
--- a/libltdl/aclocal.m4
+++ /dev/null
@@ -1,566 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4
-
-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-
-# serial 40 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN(AC_LIBTOOL_SETUP,
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_RANLIB])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-dnl
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$host" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
-define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case "$host" in
-*-*-beos* | *-*-cygwin*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library, adds --enable-ltdl-convenience to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library, and adds --enable-ltdl-install to
-# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
-# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
-# to be `${top_builddir}/libltdl'. Make sure you start DIR with
-# '${top_builddir}/' (note the single quotes!) if your package is not
-# flat, and, if you're not using automake, define top_builddir as
-# appropriate in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
- INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-dnl old names
-AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
-AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
-AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
-AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
-AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# 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.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN(AM_MAINTAINER_MODE,
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-# Define a conditional.
-
-AC_DEFUN(AM_CONDITIONAL,
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
diff --git a/libltdl/config.h.in b/libltdl/config.h.in
deleted file mode 100644
index 1e7613ef..00000000
--- a/libltdl/config.h.in
+++ /dev/null
@@ -1,80 +0,0 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if you have the libdl library or equivalent. */
-#undef HAVE_LIBDL
-
-/* Define if you have the GNU dld library. */
-#undef HAVE_DLD
-
-/* Define if you have the shl_load function. */
-#undef HAVE_SHL_LOAD
-
-/* Define if you have the dlerror function. */
-#undef HAVE_DLERROR
-
-/* Define if you have the index function. */
-#undef HAVE_INDEX
-
-/* Define if you have the rindex function. */
-#undef HAVE_RINDEX
-
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
-
-/* Define if you have the strrchr function. */
-#undef HAVE_STRRCHR
-
-/* Define if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define if you have the <dl.h> header file. */
-#undef HAVE_DL_H
-
-/* Define if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
-/* Define if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define if you have the <stdio.h> header file. */
-#undef HAVE_STDIO_H
-
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to the extension used for shared libraries, say, .so. */
-#undef LTDL_SHLIB_EXT
-
-/* Define to the name of the environment variable that determines the dynamic library search path. */
-#undef LTDL_SHLIBPATH_VAR
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries. */
-#undef LTDL_OBJDIR
-
-/* Define if libtool can extract symbol lists from object files. */
-#undef HAVE_PRELOADED_SYMBOLS
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-#undef NEED_USCORE
-
diff --git a/libltdl/configure b/libltdl/configure
deleted file mode 100755
index 91329a88..00000000
--- a/libltdl/configure
+++ /dev/null
@@ -1,3077 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --enable-ltdl-install install libltdl"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=ltdl.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
- if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then
- # if libltdl is libtoolized, it is assumed to be stand-alone and
- # installed unless the command line overrides it (tested above)
- enable_ltdl_install=yes
- else
- echo "configure: warning: *** The top-level configure must select either" 1>&2
- echo "configure: warning: *** A""C_LIBLTDL_INSTALLABLE or A""C_LIBLTDL_CONVENIENCE." 1>&2
- { echo "configure: error: *** Maybe you want to --enable-ltdl-install?" 1>&2; exit 1; }
- fi
-fi
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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:584: 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
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:637: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:694: 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
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=libltdl
-
-VERSION=1.0
-
-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; }
-fi
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:733: 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.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:746: 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.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:759: 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.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:772: 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.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:785: 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.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:802: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# 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: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
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-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:858: 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
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:909: 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
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:941: 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.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 952 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-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:983: 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:988: 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
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$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
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1016: 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
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1048: 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 1053 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1123: 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 1130 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case "$enableval" in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1238: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1259: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-# 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:1279: 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
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1318: checking for ld used by GCC" >&5
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1342: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1345: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1381: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
-
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1397: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- ac_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- break
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- break
- else
- ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi
-fi
-
-NM="$ac_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1434: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case "$host" in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 1478 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1500: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1505 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
-DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-# Check whether --enable-ltdl-install or --disable-ltdl-install was given.
-if test "${enable_ltdl_install+set}" = set; then
- enableval="$enable_ltdl_install"
- :
-fi
-
-
-
-
-if test x"${enable_ltdl_install-no}" != xno; then
- INSTALL_LTDL_TRUE=
- INSTALL_LTDL_FALSE='#'
-else
- INSTALL_LTDL_TRUE='#'
- INSTALL_LTDL_FALSE=
-fi
-
-
-if test x"${enable_ltdl_convenience-no}" != xno; then
- CONVENIENCE_LTDL_TRUE=
- CONVENIENCE_LTDL_FALSE='#'
-else
- CONVENIENCE_LTDL_TRUE='#'
- CONVENIENCE_LTDL_FALSE=
-fi
-
-rm -f conftest
-./libtool --config > conftest
-. ./conftest
-rm -f conftest
-
-echo $ac_n "checking which extension is used for shared libraries""... $ac_c" 1>&6
-echo "configure:1647: checking which extension is used for shared libraries" >&5
-if eval "test \"`echo '$''{'libltdl_cv_shlibext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- (
- last=
- for spec in $library_names_spec; do
- last="$spec"
- done
-
- echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest
-
-)
-libltdl_cv_shlibext=`cat conftest`
-rm -f conftest
-
-fi
-
-echo "$ac_t""$libltdl_cv_shlibext" 1>&6
-if test -n "$libltdl_cv_shlibext"; then
- cat >> confdefs.h <<EOF
-#define LTDL_SHLIB_EXT "$libltdl_cv_shlibext"
-EOF
-
-fi
-
-echo $ac_n "checking which variable specifies run-time library path""... $ac_c" 1>&6
-echo "configure:1674: checking which variable specifies run-time library path" >&5
-if eval "test \"`echo '$''{'libltdl_cv_shlibpath_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- libltdl_cv_shlibpath_var="$shlibpath_var"
-fi
-
-echo "$ac_t""$libltdl_cv_shlibpath_var" 1>&6
-if test -n "$libltdl_cv_shlibpath_var"; then
- cat >> confdefs.h <<EOF
-#define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var"
-EOF
-
-fi
-
-echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:1690: checking for objdir" >&5
-if eval "test \"`echo '$''{'libltdl_cv_objdir'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- libltdl_cv_objdir="$objdir"
-fi
-
-echo "$ac_t""$libltdl_cv_objdir" 1>&6
-test -z "$libltdl_cv_objdir" && libltdl_cv_objdir=".libs"
-cat >> confdefs.h <<EOF
-#define LTDL_OBJDIR "$libltdl_cv_objdir/"
-EOF
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1705: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1720 "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:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1737 "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:1743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1754 "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:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1785: 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 1790 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-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 1815 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-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 1833 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 1854 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-for ac_hdr in malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1892: 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 1897 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-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
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in string.h strings.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1932: 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 1937 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-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
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in strchr index
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1971: 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 1976 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in strrchr rindex
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2026: 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 2031 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking whether libtool supports -dlopen/-dlpreopen""... $ac_c" 1>&6
-echo "configure:2080: checking whether libtool supports -dlopen/-dlpreopen" >&5
-if eval "test \"`echo '$''{'libltdl_cv_preloaded_symbols'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$global_symbol_pipe"; then
- libltdl_cv_preloaded_symbols=yes
- else
- libltdl_cv_preloaded_symbols=no
- fi
-
-fi
-
-echo "$ac_t""$libltdl_cv_preloaded_symbols" 1>&6
-if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PRELOADED_SYMBOLS 1
-EOF
-
-fi
-
-LIBADD_DL=
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2102: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2110 "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
- builtin and then its argument prototype would still apply. */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_LIBDL 1
-EOF
- LIBADD_DL="-ldl"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:2143: checking for dlopen" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2148 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-dlopen();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_dlopen=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_dlopen=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_LIBDL 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:2196: checking for shl_load" >&5
-if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2201 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-shl_load();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_shl_load=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_shl_load=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_SHL_LOAD 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:2245: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldld $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2253 "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
- builtin and then its argument prototype would still apply. */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_SHL_LOAD 1
-EOF
- LIBADD_DL="$LIBADD_DL -ldld"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:2290: checking for dld_link in -ldld" >&5
-ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldld $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2298 "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
- builtin and then its argument prototype would still apply. */
-char dld_link();
-
-int main() {
-dld_link()
-; return 0; }
-EOF
-if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_DLD 1
-EOF
-test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
- LIBS_SAVE="$LIBS"
- LIBS="$LIBS $LIBADD_DL"
- for ac_func in dlerror
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2340: 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 2345 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- LIBS="$LIBS_SAVE"
-fi
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
-echo "configure:2397: checking command to parse $NM output" >&5
-if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # These are sane defaults that work on at least a few old systems.
-# {They come from Ultrix. What could be older than Ultrix?!! ;)}
-
-# Character class describing NM global symbol codes.
-ac_symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-ac_symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
- ac_symcode='[BCDT]'
- ;;
-cygwin* | mingw*)
- ac_symcode='[ABCDGISTW]'
- ;;
-hpux*)
- ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
- ;;
-irix*)
- ac_symcode='[BCDEGRST]'
- ;;
-solaris*)
- ac_symcode='[BDT]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- ac_symcode='[ABCDGISTW]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- ac_pipe_works=no
- rm -f conftest.$ac_ext
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func;return 0;}
-EOF
-
- if { (eval echo configure:2460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
-
- if { (eval echo configure:2464: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
-
- # Try sorting and uniquifying the output.
- if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
- mv -f "$ac_nlist"T "$ac_nlist"
- else
- rm -f "$ac_nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
- cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
-
- cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
- sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
- cat <<\EOF >> conftest.c
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- ac_save_LIBS="$LIBS"
- ac_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- ac_pipe_works=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.c >&5
- fi
- LIBS="$ac_save_LIBS"
- CFLAGS="$ac_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $ac_nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $ac_nlist" >&5
- fi
- else
- echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.c >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$ac_pipe_works" = yes; then
- if test x"$ac_symprfx" = x"_"; then
- ac_cv_sys_symbol_underscore=yes
- else
- ac_cv_sys_symbol_underscore=no
- fi
- break
- else
- ac_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-
-ac_result=yes
-if test -z "$ac_cv_sys_global_symbol_pipe"; then
- ac_result=no
-fi
-echo "$ac_t""$ac_result" 1>&6
-
-echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
-echo "configure:2562: checking for _ prefix in compiled symbols" >&5
-if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_sys_symbol_underscore=no
-cat > conftest.$ac_ext <<EOF
-void nm_test_func(){}
-int main(){nm_test_func;return 0;}
-EOF
-if { (eval echo configure:2571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
- if { (eval echo configure:2574: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
- # See whether the symbols have a leading underscore.
- if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
- ac_cv_sys_symbol_underscore=yes
- else
- if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
- :
- else
- echo "configure: cannot find nm_test_func in $ac_nlist" >&5
- fi
- fi
- else
- echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.c >&5
-fi
-rm -rf conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
-
-if test x"$ac_cv_sys_symbol_underscore" = xyes; then
- if test x"$ac_cv_func_dlopen" = xyes ||
- test x"$ac_cv_lib_dl_dlopen" = xyes ; then
- echo $ac_n "checking whether we have to add an underscore for dlsym""... $ac_c" 1>&6
-echo "configure:2602: checking whether we have to add an underscore for dlsym" >&5
-if eval "test \"`echo '$''{'libltdl_cv_need_uscore'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- libltdl_cv_need_uscore=cross
-
-else
- cat > conftest.$ac_ext <<EOF
-#line 2611 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
- if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
- if(ptr1 && !ptr2) exit(0); } exit(1); }
-
-EOF
-if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- libltdl_cv_need_uscore=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- libltdl_cv_need_uscore=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$libltdl_cv_need_uscore" 1>&6
- fi
-fi
-
-if test x"$libltdl_cv_need_uscore" = xyes; then
- cat >> confdefs.h <<\EOF
-#define NEED_USCORE 1
-EOF
-
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@RANLIB@%$RANLIB%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
-s%@LN_S@%$LN_S%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
-s%@INSTALL_LTDL_TRUE@%$INSTALL_LTDL_TRUE%g
-s%@INSTALL_LTDL_FALSE@%$INSTALL_LTDL_FALSE%g
-s%@CONVENIENCE_LTDL_TRUE@%$CONVENIENCE_LTDL_TRUE%g
-s%@CONVENIENCE_LTDL_FALSE@%$CONVENIENCE_LTDL_FALSE%g
-s%@CPP@%$CPP%g
-s%@LIBADD_DL@%$LIBADD_DL%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/libltdl/configure.in b/libltdl/configure.in
deleted file mode 100644
index 10233c6c..00000000
--- a/libltdl/configure.in
+++ /dev/null
@@ -1,373 +0,0 @@
-dnl Process this file with autoconf to create configure.
-
-AC_INIT(ltdl.c)
-
-if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
- if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then
- # if libltdl is libtoolized, it is assumed to be stand-alone and
- # installed unless the command line overrides it (tested above)
- enable_ltdl_install=yes
- else
- AC_MSG_WARN([*** The top-level configure must select either])
- AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].])
- AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?])
- fi
-fi
-
-AM_INIT_AUTOMAKE(libltdl,1.0,-)
-AM_CONFIG_HEADER(config.h)
-AM_MAINTAINER_MODE
-
-AC_PROG_CC
-AC_C_CONST
-AC_C_INLINE
-AM_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
-
-AC_ARG_ENABLE(ltdl-install,
-[ --enable-ltdl-install install libltdl])
-
-AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
-AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
-
-dnl Read the libtool configuration
-rm -f conftest
-./libtool --config > conftest
-. ./conftest
-rm -f conftest
-
-AC_CACHE_CHECK([which extension is used for shared libraries],
- libltdl_cv_shlibext, [dnl
-(
- last=
- for spec in $library_names_spec; do
- last="$spec"
- done
-changequote(, )
- echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest
-changequote([, ])
-)
-libltdl_cv_shlibext=`cat conftest`
-rm -f conftest
-])
-if test -n "$libltdl_cv_shlibext"; then
- AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
- [Define to the extension used for shared libraries, say, ".so". ])
-fi
-
-AC_CACHE_CHECK([which variable specifies run-time library path],
- libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
-if test -n "$libltdl_cv_shlibpath_var"; then
- AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
- [Define to the name of the environment variable that determines the dynamic library search path. ])
-fi
-
-AC_CACHE_CHECK([for objdir],
- libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"])
-test -z "$libltdl_cv_objdir" && libltdl_cv_objdir=".libs"
-AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries. ])
-
-AC_HEADER_STDC
-AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h)
-AC_CHECK_HEADERS(string.h strings.h, break)
-AC_CHECK_FUNCS(strchr index, break)
-AC_CHECK_FUNCS(strrchr rindex, break)
-
-AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
- libltdl_cv_preloaded_symbols, [dnl
- if test -n "$global_symbol_pipe"; then
- libltdl_cv_preloaded_symbols=yes
- else
- libltdl_cv_preloaded_symbols=no
- fi
-])
-if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
- AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
- [Define if libtool can extract symbol lists from object files. ])
-fi
-
-LIBADD_DL=
-AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1) LIBADD_DL="-ldl"],
-[AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1)])])
-AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1)],
-[AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1) LIBADD_DL="$LIBADD_DL -ldld"])])
-AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1)dnl
-test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
-AC_SUBST(LIBADD_DL)
-
-if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
- LIBS_SAVE="$LIBS"
- LIBS="$LIBS $LIBADD_DL"
- AC_CHECK_FUNCS(dlerror)
- LIBS="$LIBS_SAVE"
-fi
-
-dnl Check for command to grab the raw symbol name followed
-dnl by C symbol name from nm.
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
-[# These are sane defaults that work on at least a few old systems.
-# {They come from Ultrix. What could be older than Ultrix?!! ;)}
-
-changequote(,)dnl
-# Character class describing NM global symbol codes.
-ac_symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-ac_symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case "$host_os" in
-aix*)
- ac_symcode='[BCDT]'
- ;;
-cygwin* | mingw*)
- ac_symcode='[ABCDGISTW]'
- ;;
-hpux*)
- ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
- ;;
-irix*)
- ac_symcode='[BCDEGRST]'
- ;;
-solaris*)
- ac_symcode='[BDT]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- ac_symcode='[ABCDGISTW]'
-fi
-changequote([,])dnl
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- ac_pipe_works=no
- rm -f conftest.$ac_ext
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func;return 0;}
-EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
-
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
-
- # Try sorting and uniquifying the output.
- if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
- mv -f "$ac_nlist"T "$ac_nlist"
- else
- rm -f "$ac_nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
- cat <<EOF > conftest.c
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
-
- cat <<EOF >> conftest.c
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-changequote(,)dnl
-lt_preloaded_symbols[] =
-changequote([,])dnl
-{
-EOF
- sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
- cat <<\EOF >> conftest.c
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- ac_save_LIBS="$LIBS"
- ac_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest; then
- ac_pipe_works=yes
- else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
- fi
- LIBS="$ac_save_LIBS"
- CFLAGS="$ac_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
- fi
- else
- echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
- fi
- else
- echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
- else
- echo "$progname: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$ac_pipe_works" = yes; then
- if test x"$ac_symprfx" = x"_"; then
- ac_cv_sys_symbol_underscore=yes
- else
- ac_cv_sys_symbol_underscore=no
- fi
- break
- else
- ac_cv_sys_global_symbol_pipe=
- fi
-done
-])
-
-ac_result=yes
-if test -z "$ac_cv_sys_global_symbol_pipe"; then
- ac_result=no
-fi
-AC_MSG_RESULT($ac_result)
-
-dnl does the compiler prefix global symbols with an underscore?
-AC_MSG_CHECKING([for _ prefix in compiled symbols])
-AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
-[ac_cv_sys_symbol_underscore=no
-cat > conftest.$ac_ext <<EOF
-void nm_test_func(){}
-int main(){nm_test_func;return 0;}
-EOF
-if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- ac_nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
- # See whether the symbols have a leading underscore.
- if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
- ac_cv_sys_symbol_underscore=yes
- else
- if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
- :
- else
- echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
- fi
- fi
- else
- echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.c >&AC_FD_CC
-fi
-rm -rf conftest*
-])
-AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
-
-if test x"$ac_cv_sys_symbol_underscore" = xyes; then
- if test x"$ac_cv_func_dlopen" = xyes ||
- test x"$ac_cv_lib_dl_dlopen" = xyes ; then
- AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
- libltdl_cv_need_uscore, [dnl
- AC_TRY_RUN([
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
- if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
- if(ptr1 && !ptr2) exit(0); } exit(1); }
-], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
- libltdl_cv_need_uscore=cross
-)])
- fi
-fi
-
-if test x"$libltdl_cv_need_uscore" = xyes; then
- AC_DEFINE(NEED_USCORE, 1,
- [Define if dlsym() requires a leading underscode in symbol names. ])
-fi
-
-dnl Output the makefile
-AC_OUTPUT(Makefile)
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
deleted file mode 100644
index ce37e27e..00000000
--- a/libltdl/ltdl.c
+++ /dev/null
@@ -1,1577 +0,0 @@
-/* ltdl.c -- system independent dlopen wrapper
- Copyright (C) 1998-1999 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@gmx.de>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Library General Public License,
-if you distribute this file as part of a program that uses GNU libtool
-to create libraries and programs, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free
-Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#define _LTDL_COMPILE_
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#if HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
-#if HAVE_MEMORY_H
-#include <memory.h>
-#endif
-
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "ltdl.h"
-
-/* max. filename length */
-#ifndef LTDL_FILENAME_MAX
-#define LTDL_FILENAME_MAX 1024
-#endif
-
-#undef LTDL_READTEXT_MODE
-/* fopen() mode flags for reading a text file */
-#ifdef _WIN32
-#define LTDL_READTEXT_MODE "rt"
-#else
-#define LTDL_READTEXT_MODE "r"
-#endif
-
-#undef LTDL_SYMBOL_LENGTH
-/* This is the maximum symbol size that won't require malloc/free */
-#define LTDL_SYMBOL_LENGTH 128
-
-#undef LTDL_SYMBOL_OVERHEAD
-/* This accounts for the _LTX_ separator */
-#define LTDL_SYMBOL_OVERHEAD 5
-
-static const char objdir[] = LTDL_OBJDIR;
-#ifdef LTDL_SHLIB_EXT
-static const char shlib_ext[] = LTDL_SHLIB_EXT;
-#endif
-
-static const char unknown_error[] = "unknown error";
-static const char dlopen_not_supported_error[] = "dlopen support not available";
-static const char file_not_found_error[] = "file not found";
-static const char no_symbols_error[] = "no symbols defined";
-static const char cannot_open_error[] = "can't open the module";
-static const char cannot_close_error[] = "can't close the module";
-static const char symbol_error[] = "symbol not found";
-static const char memory_error[] = "not enough memory";
-static const char invalid_handle_error[] = "invalid handle";
-static const char buffer_overflow_error[] = "internal buffer overflow";
-static const char shutdown_error[] = "library already shutdown";
-
-#ifndef HAVE_PRELOADED_SYMBOLS
-/* If libtool won't define it, we'd better do */
-const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
-#endif
-
-static const char *last_error = 0;
-
-lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
-void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
-
-typedef struct lt_dltype_t {
- struct lt_dltype_t *next;
- const char *sym_prefix; /* prefix for symbols */
- int (*mod_init) LTDL_PARAMS((void));
- int (*mod_exit) LTDL_PARAMS((void));
- int (*lib_open) LTDL_PARAMS((lt_dlhandle handle, const char *filename));
- int (*lib_close) LTDL_PARAMS((lt_dlhandle handle));
- lt_ptr_t (*find_sym) LTDL_PARAMS((lt_dlhandle handle, const char *symbol));
-} lt_dltype_t;
-
-#define LTDL_TYPE_TOP 0
-
-typedef struct lt_dlhandle_t {
- struct lt_dlhandle_t *next;
- lt_dltype_t *type; /* dlopening interface */
- char *filename; /* file name */
- char *name; /* module name */
- int usage; /* usage */
- int depcount; /* number of dependencies */
- lt_dlhandle *deplibs; /* dependencies */
- lt_ptr_t handle; /* system handle */
- lt_ptr_t system; /* system specific data */
-} lt_dlhandle_t;
-
-#undef strdup
-#define strdup xstrdup
-
-static inline char *
-strdup(str)
- const char *str;
-{
- char *tmp;
-
- if (!str)
- return 0;
- tmp = (char*) lt_dlmalloc(strlen(str)+1);
- if (tmp)
- strcpy(tmp, str);
- return tmp;
-}
-
-#if ! HAVE_STRCHR
-
-# if HAVE_INDEX
-
-# define strchr index
-
-# else
-
-# define strchr xstrchr
-
-static inline const char*
-strchr(str, ch)
- const char *str;
- int ch;
-{
- const char *p;
-
- for (p = str; *p != (char)ch && p != '\0'; p++)
- /*NOWORK*/;
-
- return (*p == (char)ch) ? p : 0;
-}
-
-# endif
-
-#endif
-
-#if ! HAVE_STRRCHR
-
-# if HAVE_RINDEX
-
-# define strrchr rindex
-
-# else
-
-# define strrchr xstrrchr
-
-static inline const char*
-strrchr(str, ch)
- const char *str;
- int ch;
-{
- const char *p;
-
- for (p = str; p != '\0'; p++)
- /*NOWORK*/;
-
- while (*p != (char)ch && p >= str)
- p--;
-
- return (*p == (char)ch) ? p : 0;
-}
-
-# endif
-
-#endif
-
-#if HAVE_LIBDL
-
-/* dynamic linking with dlopen/dlsym */
-
-#if HAVE_DLFCN_H
-# include <dlfcn.h>
-#endif
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-static int
-sys_dl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW);
- if (!handle->handle) {
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = cannot_open_error;
-#endif
- return 1;
- }
- return 0;
-}
-
-static int
-sys_dl_close (handle)
- lt_dlhandle handle;
-{
- if (dlclose(handle->handle) != 0) {
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = cannot_close_error;
-#endif
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_dl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = dlsym(handle->handle, symbol);
-
- if (!address)
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = symbol_error;
-#endif
- return address;
-}
-
-static
-lt_dltype_t
-#ifdef NEED_USCORE
-sys_dl = { LTDL_TYPE_TOP, "_", sys_dl_init, sys_dl_exit,
- sys_dl_open, sys_dl_close, sys_dl_sym };
-#else
-sys_dl = { LTDL_TYPE_TOP, 0, sys_dl_init, sys_dl_exit,
- sys_dl_open, sys_dl_close, sys_dl_sym };
-#endif
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_dl
-
-#endif
-
-#if HAVE_SHL_LOAD
-
-/* dynamic linking with shl_load (HP-UX) (comments from gmodule) */
-
-#ifdef HAVE_DL_H
-#include <dl.h>
-#endif
-
-/* some flags are missing on some systems, so we provide
- * harmless defaults.
- *
- * Mandatory:
- * BIND_IMMEDIATE - Resolve symbol references when the library is loaded.
- * BIND_DEFERRED - Delay code symbol resolution until actual reference.
- *
- * Optionally:
- * BIND_FIRST - Place the library at the head of the symbol search order.
- * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied
- * symbols as fatal. This flag allows binding of unsatisfied code
- * symbols to be deferred until use.
- * [Perl: For certain libraries, like DCE, deferred binding often
- * causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE
- * still allows unresolved references in situations like this.]
- * BIND_NOSTART - Do not call the initializer for the shared library when the
- * library is loaded, nor on a future call to shl_unload().
- * BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols.
- *
- * hp9000s700/hp9000s800:
- * BIND_RESTRICTED - Restrict symbols visible by the library to those present at
- * library load time.
- * DYNAMIC_PATH - Allow the loader to dynamically search for the library specified
- * by the path argument.
- */
-
-#ifndef DYNAMIC_PATH
-#define DYNAMIC_PATH 0
-#endif /* DYNAMIC_PATH */
-#ifndef BIND_RESTRICTED
-#define BIND_RESTRICTED 0
-#endif /* BIND_RESTRICTED */
-
-#define LTDL_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | BIND_VERBOSE | DYNAMIC_PATH)
-
-static int
-sys_shl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_shl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_shl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = shl_load(filename, LTDL_BIND_FLAGS, 0L);
- if (!handle->handle) {
- last_error = cannot_open_error;
- return 1;
- }
- return 0;
-}
-
-static int
-sys_shl_close (handle)
- lt_dlhandle handle;
-{
- if (shl_unload((shl_t) (handle->handle)) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_shl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address;
-
- if (handle->handle && shl_findsym((shl_t*) &(handle->handle),
- symbol, TYPE_UNDEFINED, &address) == 0)
- if (address)
- return address;
- last_error = symbol_error;
- return 0;
-}
-
-static
-lt_dltype_t
-sys_shl = { LTDL_TYPE_TOP, 0, sys_shl_init, sys_shl_exit,
- sys_shl_open, sys_shl_close, sys_shl_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_shl
-
-#endif
-
-#if HAVE_DLD
-
-/* dynamic linking with dld */
-
-#if HAVE_DLD_H
-#include <dld.h>
-#endif
-
-static int
-sys_dld_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dld_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dld_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = strdup(filename);
- if (!handle->handle) {
- last_error = memory_error;
- return 1;
- }
- if (dld_link(filename) != 0) {
- last_error = cannot_open_error;
- lt_dlfree(handle->handle);
- return 1;
- }
- return 0;
-}
-
-static int
-sys_dld_close (handle)
- lt_dlhandle handle;
-{
- if (dld_unlink_by_file((char*)(handle->handle), 1) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- lt_dlfree(handle->filename);
- return 0;
-}
-
-static lt_ptr_t
-sys_dld_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = dld_get_func(symbol);
-
- if (!address)
- last_error = symbol_error;
- return address;
-}
-
-static
-lt_dltype_t
-sys_dld = { LTDL_TYPE_TOP, 0, sys_dld_init, sys_dld_exit,
- sys_dld_open, sys_dld_close, sys_dld_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_dld
-
-#endif
-
-#ifdef _WIN32
-
-/* dynamic linking for Win32 */
-
-#include <windows.h>
-
-static int
-sys_wll_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_wll_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_wll_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = LoadLibrary(filename);
- if (!handle->handle) {
- last_error = cannot_open_error;
- return 1;
- }
- return 0;
-}
-
-static int
-sys_wll_close (handle)
- lt_dlhandle handle;
-{
- if (FreeLibrary(handle->handle) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_wll_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = GetProcAddress(handle->handle, symbol);
-
- if (!address)
- last_error = symbol_error;
- return address;
-}
-
-static
-lt_dltype_t
-sys_wll = { LTDL_TYPE_TOP, 0, sys_wll_init, sys_wll_exit,
- sys_wll_open, sys_wll_close, sys_wll_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_wll
-
-#endif
-
-#ifdef __BEOS__
-
-/* dynamic linking for BeOS */
-
-#include <kernel/image.h>
-
-static int
-sys_bedl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_bedl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_bedl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- image_id image = 0;
-
- if (filename) {
- image = load_add_on(filename);
- } else {
- image_info info;
- int32 cookie = 0;
- if (get_next_image_info(0, &cookie, &info) == B_OK)
- image = load_add_on(info.name);
- }
- if (image <= 0) {
- last_error = cannot_open_error;
- return 1;
- }
- handle->handle = (void*) image;
- return 0;
-}
-
-static int
-sys_bedl_close (handle)
- lt_dlhandle handle;
-{
- if (unload_add_on((image_id)handle->handle) != B_OK) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_bedl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = 0;
- image_id image = (image_id)handle->handle;
-
- if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY,
- &address) != B_OK) {
- last_error = symbol_error;
- return 0;
- }
- return address;
-}
-
-static
-lt_dltype_t
-sys_bedl = { LTDL_TYPE_TOP, 0, sys_bedl_init, sys_bedl_exit,
- sys_bedl_open, sys_bedl_close, sys_bedl_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_bedl
-
-#endif
-
-/* emulate dynamic linking using preloaded_symbols */
-
-typedef struct lt_dlsymlists_t {
- struct lt_dlsymlists_t *next;
- const lt_dlsymlist *syms;
-} lt_dlsymlists_t;
-
-static const lt_dlsymlist *default_preloaded_symbols = 0;
-static lt_dlsymlists_t *preloaded_symbols = 0;
-
-static int
-presym_init LTDL_PARAMS((void))
-{
- preloaded_symbols = 0;
- if (default_preloaded_symbols)
- return lt_dlpreload(default_preloaded_symbols);
- return 0;
-}
-
-static int
-presym_free_symlists LTDL_PARAMS((void))
-{
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- while (lists) {
- lt_dlsymlists_t *tmp = lists;
-
- lists = lists->next;
- lt_dlfree(tmp);
- }
- preloaded_symbols = 0;
- return 0;
-}
-
-static int
-presym_exit LTDL_PARAMS((void))
-{
- presym_free_symlists();
- return 0;
-}
-
-static int
-presym_add_symlist (preloaded)
- const lt_dlsymlist *preloaded;
-{
- lt_dlsymlists_t *tmp;
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- while (lists) {
- if (lists->syms == preloaded)
- return 0;
- lists = lists->next;
- }
-
- tmp = (lt_dlsymlists_t*) lt_dlmalloc(sizeof(lt_dlsymlists_t));
- if (!tmp) {
- last_error = memory_error;
- return 1;
- }
- tmp->syms = preloaded;
- tmp->next = 0;
- if (!preloaded_symbols)
- preloaded_symbols = tmp;
- else {
- /* append to the end */
- lists = preloaded_symbols;
- while (lists->next)
- lists = lists->next;
- lists->next = tmp;
- }
- return 0;
-}
-
-static int
-presym_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- if (!lists) {
- last_error = no_symbols_error;
- return 1;
- }
- if (!filename)
- filename = "@PROGRAM@";
- while (lists) {
- const lt_dlsymlist *syms = lists->syms;
-
- while (syms->name) {
- if (!syms->address &&
- strcmp(syms->name, filename) == 0) {
- handle->handle = (lt_ptr_t) syms;
- return 0;
- }
- syms++;
- }
- lists = lists->next;
- }
- last_error = file_not_found_error;
- return 1;
-}
-
-static int
-presym_close (handle)
- lt_dlhandle handle;
-{
- /* Just to silence gcc -Wall */
- handle = 0;
- return 0;
-}
-
-static lt_ptr_t
-presym_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_dlsymlist *syms = (lt_dlsymlist*)(handle->handle);
-
- syms++;
- while (syms->address) {
- if (strcmp(syms->name, symbol) == 0)
- return syms->address;
- syms++;
- }
- last_error = symbol_error;
- return 0;
-}
-
-static
-lt_dltype_t
-presym = { LTDL_TYPE_TOP, 0, presym_init, presym_exit,
- presym_open, presym_close, presym_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &presym
-
-static char *user_search_path = 0;
-static lt_dlhandle handles = 0;
-static int initialized = 0;
-
-static lt_dltype_t *types = LTDL_TYPE_TOP;
-#undef LTDL_TYPE_TOP
-
-int
-lt_dlinit LTDL_PARAMS((void))
-{
- /* initialize libltdl */
- lt_dltype_t **type = &types;
- int typecount = 0;
-
- if (initialized) { /* Initialize only at first call. */
- initialized++;
- return 0;
- }
- handles = 0;
- user_search_path = 0; /* empty search path */
-
- while (*type) {
- if ((*type)->mod_init())
- *type = (*type)->next; /* Remove it from the list */
- else {
- type = &(*type)->next; /* Keep it */
- typecount++;
- }
- }
- if (typecount == 0) {
- last_error = dlopen_not_supported_error;
- return 1;
- }
- last_error = 0;
- initialized = 1;
- return 0;
-}
-
-int
-lt_dlpreload (preloaded)
- const lt_dlsymlist *preloaded;
-{
- if (preloaded)
- return presym_add_symlist(preloaded);
- presym_free_symlists();
- if (default_preloaded_symbols)
- return lt_dlpreload(default_preloaded_symbols);
- return 0;
-}
-
-int
-lt_dlpreload_default (preloaded)
- const lt_dlsymlist *preloaded;
-{
- default_preloaded_symbols = preloaded;
- return 0;
-}
-
-int
-lt_dlexit LTDL_PARAMS((void))
-{
- /* shut down libltdl */
- lt_dltype_t *type = types;
- int errors;
-
- if (!initialized) {
- last_error = shutdown_error;
- return 1;
- }
- if (initialized != 1) { /* shut down only at last call. */
- initialized--;
- return 0;
- }
- /* close all modules */
- errors = 0;
- while (handles) {
- /* FIXME: what if a module depends on another one? */
- if (lt_dlclose(handles))
- errors++;
- }
- initialized = 0;
- while (type) {
- if (type->mod_exit())
- errors++;
- type = type->next;
- }
- return errors;
-}
-
-static int
-tryall_dlopen (handle, filename)
- lt_dlhandle *handle;
- const char *filename;
-{
- lt_dlhandle cur;
- lt_dltype_t *type = types;
- const char *saved_error = last_error;
-
- /* check whether the module was already opened */
- cur = handles;
- while (cur) {
- if (!cur->filename && !filename)
- break;
- if (cur->filename && filename &&
- strcmp(cur->filename, filename) == 0)
- break;
- cur = cur->next;
- }
- if (cur) {
- cur->usage++;
- *handle = cur;
- return 0;
- }
-
- cur = *handle;
- if (filename) {
- cur->filename = strdup(filename);
- if (!cur->filename) {
- last_error = memory_error;
- return 1;
- }
- } else
- cur->filename = 0;
- while (type) {
- if (type->lib_open(cur, filename) == 0)
- break;
- type = type->next;
- }
- if (!type) {
- if (cur->filename)
- lt_dlfree(cur->filename);
- return 1;
- }
- cur->type = type;
- last_error = saved_error;
- return 0;
-}
-
-static int
-find_module (handle, dir, libdir, dlname, old_name, installed)
- lt_dlhandle *handle;
- const char *dir;
- const char *libdir;
- const char *dlname;
- const char *old_name;
- int installed;
-{
- int error;
- char *filename;
- /* try to open the old library first; if it was dlpreopened,
- we want the preopened version of it, even if a dlopenable
- module is available */
- if (old_name && tryall_dlopen(handle, old_name) == 0)
- return 0;
- /* try to open the dynamic library */
- if (dlname) {
- /* try to open the installed module */
- if (installed && libdir) {
- filename = (char*)
- lt_dlmalloc(strlen(libdir)+1+strlen(dlname)+1);
- if (!filename) {
- last_error = memory_error;
- return 1;
- }
- strcpy(filename, libdir);
- strcat(filename, "/");
- strcat(filename, dlname);
- error = tryall_dlopen(handle, filename) == 0;
- lt_dlfree(filename);
- if (error)
- return 0;
- }
- /* try to open the not-installed module */
- if (!installed) {
- filename = (char*)
- lt_dlmalloc((dir ? strlen(dir) : 0)
- + strlen(objdir) + strlen(dlname) + 1);
- if (!filename) {
- last_error = memory_error;
- return 1;
- }
- if (dir)
- strcpy(filename, dir);
- else
- *filename = 0;
- strcat(filename, objdir);
- strcat(filename, dlname);
-
- error = tryall_dlopen(handle, filename) == 0;
- lt_dlfree(filename);
- if (error)
- return 0;
- }
- /* hmm, maybe it was moved to another directory */
- {
- filename = (char*)
- lt_dlmalloc((dir ? strlen(dir) : 0)
- + strlen(dlname) + 1);
- if (dir)
- strcpy(filename, dir);
- else
- *filename = 0;
- strcat(filename, dlname);
- error = tryall_dlopen(handle, filename) == 0;
- lt_dlfree(filename);
- if (error)
- return 0;
- }
- }
- last_error = file_not_found_error;
- return 1;
-}
-
-static lt_ptr_t
-find_file (basename, search_path, pdir, handle)
- const char *basename;
- const char *search_path;
- char **pdir;
- lt_dlhandle *handle;
-{
- /* when handle != NULL search a library, otherwise a file */
- /* return NULL on failure, otherwise the file/handle */
-
- char *filename = 0;
- int filenamesize = 0;
- const char *next = search_path;
- int lenbase = strlen(basename);
-
- if (!next || !*next) {
- last_error = file_not_found_error;
- return 0;
- }
- while (next) {
- int lendir;
- const char *cur = next;
-
- next = strchr(cur, ':');
- if (!next)
- next = cur + strlen(cur);
- lendir = next - cur;
- if (*next == ':')
- ++next;
- else
- next = 0;
- if (lendir == 0)
- continue;
- if (lendir + 1 + lenbase >= filenamesize) {
- if (filename)
- lt_dlfree(filename);
- filenamesize = lendir + 1 + lenbase + 1;
- filename = (char*) lt_dlmalloc(filenamesize);
- if (!filename) {
- last_error = memory_error;
- return 0;
- }
- }
- strncpy(filename, cur, lendir);
- if (filename[lendir-1] != '/')
- filename[lendir++] = '/';
- strcpy(filename+lendir, basename);
- if (handle) {
- if (tryall_dlopen(handle, filename) == 0) {
- lt_dlfree(filename);
- return (lt_ptr_t) handle;
- }
- } else {
- FILE *file = fopen(filename, LTDL_READTEXT_MODE);
- if (file) {
- if (*pdir)
- lt_dlfree(*pdir);
- filename[lendir] = '\0';
- *pdir = strdup(filename);
- if (!*pdir) {
- /* We could have even avoided the
- strdup, but there would be some
- memory overhead. */
- *pdir = filename;
- } else
- lt_dlfree(filename);
- return (lt_ptr_t) file;
- }
- }
- }
- if (filename)
- lt_dlfree(filename);
- last_error = file_not_found_error;
- return 0;
-}
-
-static int
-load_deplibs(handle, deplibs)
- lt_dlhandle handle;
- const char *deplibs;
-{
- /* FIXME: load deplibs */
- handle->depcount = 0;
- handle->deplibs = 0;
- /* Just to silence gcc -Wall */
- deplibs = 0;
- return 0;
-}
-
-static int
-unload_deplibs(handle)
- lt_dlhandle handle;
-{
- /* FIXME: unload deplibs */
- /* Just to silence gcc -Wall */
- handle = 0;
- return 0;
-}
-
-static inline int
-trim (dest, str)
- char **dest;
- const char *str;
-{
- /* remove the leading and trailing "'" from str
- and store the result in dest */
- char *tmp;
- char *end = strrchr(str, '\'');
- int len = strlen(str);
-
- if (*dest)
- lt_dlfree(*dest);
- if (len > 3 && str[0] == '\'') {
- tmp = (char*) lt_dlmalloc(end - str);
- if (!tmp) {
- last_error = memory_error;
- return 1;
- }
- strncpy(tmp, &str[1], (end - str) - 1);
- tmp[len-3] = '\0';
- *dest = tmp;
- } else
- *dest = 0;
- return 0;
-}
-
-static inline int
-free_vars(dir, name, dlname, oldname, libdir, deplibs)
- char *dir;
- char *name;
- char *dlname;
- char *oldname;
- char *libdir;
- char *deplibs;
-{
- if (dir)
- lt_dlfree(dir);
- if (name)
- lt_dlfree(name);
- if (dlname)
- lt_dlfree(dlname);
- if (oldname)
- lt_dlfree(oldname);
- if (libdir)
- lt_dlfree(libdir);
- if (deplibs)
- lt_dlfree(deplibs);
- return 0;
-}
-
-lt_dlhandle
-lt_dlopen (filename)
- const char *filename;
-{
- lt_dlhandle handle, newhandle;
- const char *basename, *ext;
- const char *saved_error = last_error;
- char *dir = 0, *name = 0;
-
- if (!filename) {
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle) {
- last_error = memory_error;
- return 0;
- }
- handle->usage = 0;
- handle->depcount = 0;
- handle->deplibs = 0;
- newhandle = handle;
- if (tryall_dlopen(&newhandle, 0) != 0) {
- lt_dlfree(handle);
- return 0;
- }
- goto register_handle;
- }
- basename = strrchr(filename, '/');
- if (basename) {
- basename++;
- dir = (char*) lt_dlmalloc(basename - filename + 1);
- if (!dir) {
- last_error = memory_error;
- return 0;
- }
- strncpy(dir, filename, basename - filename);
- dir[basename - filename] = '\0';
- } else
- basename = filename;
- /* check whether we open a libtool module (.la extension) */
- ext = strrchr(basename, '.');
- if (ext && strcmp(ext, ".la") == 0) {
- /* this seems to be a libtool module */
- FILE *file;
- int i;
- char *dlname = 0, *old_name = 0;
- char *libdir = 0, *deplibs = 0;
- char *line;
- int error = 0;
- /* if we can't find the installed flag, it is probably an
- installed libtool archive, produced with an old version
- of libtool */
- int installed = 1;
-
- /* extract the module name from the file name */
- name = (char*) lt_dlmalloc(ext - basename + 1);
- if (!name) {
- last_error = memory_error;
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- /* canonicalize the module name */
- for (i = 0; i < ext - basename; i++)
- if (isalnum((int)(basename[i])))
- name[i] = basename[i];
- else
- name[i] = '_';
- name[ext - basename] = '\0';
- /* now try to open the .la file */
- file = fopen(filename, LTDL_READTEXT_MODE);
- if (!file)
- last_error = file_not_found_error;
- if (!file && !dir) {
- /* try other directories */
- file = (FILE*) find_file(basename,
- user_search_path,
- &dir, 0);
- if (!file)
- file = (FILE*) find_file(basename,
- getenv("LTDL_LIBRARY_PATH"),
- &dir, 0);
-#ifdef LTDL_SHLIBPATH_VAR
- if (!file)
- file = (FILE*) find_file(basename,
- getenv(LTDL_SHLIBPATH_VAR),
- &dir, 0);
-#endif
- }
- if (!file) {
- if (name)
- lt_dlfree(name);
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- line = (char*) lt_dlmalloc(LTDL_FILENAME_MAX);
- if (!line) {
- fclose(file);
- last_error = memory_error;
- return 0;
- }
- /* read the .la file */
- while (!feof(file)) {
- if (!fgets(line, LTDL_FILENAME_MAX, file))
- break;
- if (line[0] == '\n' || line[0] == '#')
- continue;
-# undef STR_DLNAME
-# define STR_DLNAME "dlname="
- if (strncmp(line, STR_DLNAME,
- sizeof(STR_DLNAME) - 1) == 0)
- error = trim(&dlname,
- &line[sizeof(STR_DLNAME) - 1]);
- else
-# undef STR_OLD_LIBRARY
-# define STR_OLD_LIBRARY "old_library="
- if (strncmp(line, STR_OLD_LIBRARY,
- sizeof(STR_OLD_LIBRARY) - 1) == 0)
- error = trim(&old_name,
- &line[sizeof(STR_OLD_LIBRARY) - 1]);
- else
-# undef STR_LIBDIR
-# define STR_LIBDIR "libdir="
- if (strncmp(line, STR_LIBDIR,
- sizeof(STR_LIBDIR) - 1) == 0)
- error = trim(&libdir,
- &line[sizeof(STR_LIBDIR) - 1]);
- else
-# undef STR_DL_DEPLIBS
-# define STR_DL_DEPLIBS "dl_dependency_libs="
- if (strncmp(line, STR_DL_DEPLIBS,
- sizeof(STR_DL_DEPLIBS) - 1) == 0)
- error = trim(&deplibs,
- &line[sizeof(STR_DL_DEPLIBS) - 1]);
- else
- if (strcmp(line, "installed=yes\n") == 0)
- installed = 1;
- else
- if (strcmp(line, "installed=no\n") == 0)
- installed = 0;
- if (error)
- break;
- }
- fclose(file);
- lt_dlfree(line);
- /* allocate the handle */
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle || error) {
- if (handle)
- lt_dlfree(handle);
- if (!error)
- last_error = memory_error;
- free_vars(name, dir, dlname, old_name, libdir, deplibs);
- return 0;
- }
- handle->usage = 0;
- if (load_deplibs(handle, deplibs) == 0) {
- newhandle = handle;
- /* find_module may replace newhandle */
- if (find_module(&newhandle, dir, libdir,
- dlname, old_name, installed)) {
- unload_deplibs(handle);
- error = 1;
- }
- } else
- error = 1;
- if (error) {
- lt_dlfree(handle);
- free_vars(name, dir, dlname, old_name, libdir, deplibs);
- return 0;
- }
- if (handle != newhandle) {
- unload_deplibs(handle);
- }
- } else {
- /* not a libtool module */
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle) {
- last_error = memory_error;
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- handle->usage = 0;
- /* non-libtool modules don't have dependencies */
- handle->depcount = 0;
- handle->deplibs = 0;
- newhandle = handle;
- if (tryall_dlopen(&newhandle, filename)
- && (!dir
- || (!find_file(basename, user_search_path,
- 0, &newhandle)
- && !find_file(basename,
- getenv("LTDL_LIBRARY_PATH"),
- 0, &newhandle)
-#ifdef LTDL_SHLIBPATH_VAR
- && !find_file(basename,
- getenv(LTDL_SHLIBPATH_VAR),
- 0, &newhandle)
-#endif
- ))) {
- lt_dlfree(handle);
- if (dir)
- lt_dlfree(dir);
- return 0;
- }
- }
-register_handle:
- if (newhandle != handle) {
- lt_dlfree(handle);
- handle = newhandle;
- }
- if (!handle->usage) {
- handle->usage = 1;
- handle->name = name;
- handle->next = handles;
- handles = handle;
- } else if (name)
- lt_dlfree(name);
- if (dir)
- lt_dlfree(dir);
- last_error = saved_error;
- return handle;
-}
-
-lt_dlhandle
-lt_dlopenext (filename)
- const char *filename;
-{
- lt_dlhandle handle;
- char *tmp;
- int len;
- const char *saved_error = last_error;
-
- if (!filename)
- return lt_dlopen(filename);
- len = strlen(filename);
- if (!len) {
- last_error = file_not_found_error;
- return 0;
- }
- /* try the normal file name */
- handle = lt_dlopen(filename);
- if (handle)
- return handle;
- /* try "filename.la" */
- tmp = (char*) lt_dlmalloc(len+4);
- if (!tmp) {
- last_error = memory_error;
- return 0;
- }
- strcpy(tmp, filename);
- strcat(tmp, ".la");
- handle = lt_dlopen(tmp);
- if (handle) {
- last_error = saved_error;
- lt_dlfree(tmp);
- return handle;
- }
-#ifdef LTDL_SHLIB_EXT
- /* try "filename.EXT" */
- if (strlen(shlib_ext) > 3) {
- lt_dlfree(tmp);
- tmp = (char*) lt_dlmalloc(len + strlen(shlib_ext) + 1);
- if (!tmp) {
- last_error = memory_error;
- return 0;
- }
- strcpy(tmp, filename);
- } else
- tmp[len] = '\0';
- strcat(tmp, shlib_ext);
- handle = lt_dlopen(tmp);
- if (handle) {
- last_error = saved_error;
- lt_dlfree(tmp);
- return handle;
- }
-#endif
- last_error = file_not_found_error;
- lt_dlfree(tmp);
- return 0;
-}
-
-int
-lt_dlclose (handle)
- lt_dlhandle handle;
-{
- lt_dlhandle cur, last;
-
- /* check whether the handle is valid */
- last = cur = handles;
- while (cur && handle != cur) {
- last = cur;
- cur = cur->next;
- }
- if (!cur) {
- last_error = invalid_handle_error;
- return 1;
- }
- handle->usage--;
- if (!handle->usage) {
- int error;
-
- if (handle != handles)
- last->next = handle->next;
- else
- handles = handle->next;
- error = handle->type->lib_close(handle);
- error += unload_deplibs(handle);
- if (handle->filename)
- lt_dlfree(handle->filename);
- if (handle->name)
- lt_dlfree(handle->name);
- lt_dlfree(handle);
- return error;
- }
- return 0;
-}
-
-lt_ptr_t
-lt_dlsym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- int lensym;
- char lsym[LTDL_SYMBOL_LENGTH];
- char *sym;
- lt_ptr_t address;
-
- if (!handle) {
- last_error = invalid_handle_error;
- return 0;
- }
- if (!symbol) {
- last_error = symbol_error;
- return 0;
- }
- lensym = strlen(symbol);
- if (handle->type->sym_prefix)
- lensym += strlen(handle->type->sym_prefix);
- if (handle->name)
- lensym += strlen(handle->name);
- if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH)
- sym = lsym;
- else
- sym = (char*) lt_dlmalloc(lensym + LTDL_SYMBOL_OVERHEAD + 1);
- if (!sym) {
- last_error = buffer_overflow_error;
- return 0;
- }
- if (handle->name) {
- /* this is a libtool module */
- if (handle->type->sym_prefix) {
- strcpy(sym, handle->type->sym_prefix);
- strcat(sym, handle->name);
- } else
- strcpy(sym, handle->name);
- strcat(sym, "_LTX_");
- strcat(sym, symbol);
- /* try "modulename_LTX_symbol" */
- address = handle->type->find_sym(handle, sym);
- if (address) {
- if (sym != lsym)
- lt_dlfree(sym);
- return address;
- }
- }
- /* otherwise try "symbol" */
- if (handle->type->sym_prefix) {
- strcpy(sym, handle->type->sym_prefix);
- strcat(sym, symbol);
- } else
- strcpy(sym, symbol);
- address = handle->type->find_sym(handle, sym);
- if (sym != lsym)
- lt_dlfree(sym);
- return address;
-}
-
-const char *
-lt_dlerror LTDL_PARAMS((void))
-{
- const char *error = last_error;
-
- last_error = 0;
- return error;
-}
-
-int
-lt_dladdsearchdir (search_dir)
- const char *search_dir;
-{
- if (!search_dir || !strlen(search_dir))
- return 0;
- if (!user_search_path) {
- user_search_path = strdup(search_dir);
- if (!user_search_path) {
- last_error = memory_error;
- return 1;
- }
- } else {
- char *new_search_path = (char*)
- lt_dlmalloc(strlen(user_search_path) +
- strlen(search_dir) + 2); /* ':' + '\0' == 2 */
- if (!new_search_path) {
- last_error = memory_error;
- return 1;
- }
- strcpy(new_search_path, user_search_path);
- strcat(new_search_path, ":");
- strcat(new_search_path, search_dir);
- lt_dlfree(user_search_path);
- user_search_path = new_search_path;
- }
- return 0;
-}
-
-int
-lt_dlsetsearchpath (search_path)
- const char *search_path;
-{
- if (user_search_path)
- lt_dlfree(user_search_path);
- user_search_path = 0; /* reset the search path */
- if (!search_path || !strlen(search_path))
- return 0;
- user_search_path = strdup(search_path);
- if (!user_search_path)
- return 1;
- return 0;
-}
-
-const char *
-lt_dlgetsearchpath LTDL_PARAMS((void))
-{
- return user_search_path;
-}
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h
deleted file mode 100644
index bebbc6d2..00000000
--- a/libltdl/ltdl.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* ltdl.h -- generic dlopen functions
- Copyright (C) 1998-1999 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@gmx.de>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Library General Public License,
-if you distribute this file as part of a program that uses GNU libtool
-to create libraries and programs, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free
-Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/* Only include this header file once. */
-#ifndef _LTDL_H_
-#define _LTDL_H_ 1
-
-/* __BEGIN_DECLS should be used at the beginning of your declarations,
- so that C++ compilers don't mangle their names. Use __END_DECLS at
- the end of C declarations. */
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
-/* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
- that don't understand ANSI C prototypes still work, and ANSI C
- compilers can issue warnings about type mismatches. */
-#undef LTDL_PARAMS
-#undef lt_ptr_t
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
-# define LTDL_PARAMS(protos) protos
-# define lt_ptr_t void*
-#else
-# define LTDL_PARAMS(protos) ()
-# define lt_ptr_t char*
-#endif
-
-#include <stdlib.h>
-
-#ifdef _LTDL_COMPILE_
-typedef struct lt_dlhandle_t *lt_dlhandle;
-#else
-typedef lt_ptr_t lt_dlhandle;
-#endif
-
-typedef struct {
- const char *name;
- lt_ptr_t address;
-} lt_dlsymlist;
-
-__BEGIN_DECLS
-extern int lt_dlinit LTDL_PARAMS((void));
-extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlpreload_default LTDL_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlexit LTDL_PARAMS((void));
-extern lt_dlhandle lt_dlopen LTDL_PARAMS((const char *filename));
-extern lt_dlhandle lt_dlopenext LTDL_PARAMS((const char *filename));
-extern int lt_dlclose LTDL_PARAMS((lt_dlhandle handle));
-extern lt_ptr_t lt_dlsym LTDL_PARAMS((lt_dlhandle handle, const char *name));
-extern const char *lt_dlerror LTDL_PARAMS((void));
-extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
-extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
-extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
-
-extern const lt_dlsymlist lt_preloaded_symbols[];
-#define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
-
-extern lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
-extern void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
-
-__END_DECLS
-
-#endif /* !_LTDL_H_ */
diff --git a/libltdl/stamp-h.in b/libltdl/stamp-h.in
deleted file mode 100644
index 9788f702..00000000
--- a/libltdl/stamp-h.in
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/mkinstalldirs b/mkinstalldirs
index 91f6d04e..d0fd194f 100755
--- a/mkinstalldirs
+++ b/mkinstalldirs
@@ -1,18 +1,21 @@
-#!/bin/sh
+#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
-# Last modified: 1994-03-25
# Public domain
+# $Id$
+
errstatus=0
-for file in ${1+"$@"} ; do
+for file
+do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
- for d in ${1+"$@"} ; do
+ for d
+ do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
@@ -20,7 +23,12 @@ for file in ${1+"$@"} ; do
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
- mkdir "$pathcomp" || errstatus=$?
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
fi
pathcomp="$pathcomp/"
diff --git a/modules/Makefile.am b/modules/Makefile.am
deleted file mode 100644
index 01ef5c23..00000000
--- a/modules/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-noinst_PROGRAMS = test.so time.so
-
-test_so_SOURCES = test.c
-time_so_SOURCES = time.c
-
-EXTRA_DIST = test.m4 time.m4
-
-INCLUDES = -I$(srcdir)/../src -I$(srcdir)/../lib
-LDFLAGS = -shared
diff --git a/modules/Makefile.in b/modules/Makefile.in
deleted file mode 100644
index 06248f02..00000000
--- a/modules/Makefile.in
+++ /dev/null
@@ -1,300 +0,0 @@
-# Makefile.in generated automatically by automake 1.3b from Makefile.am
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CPP = @CPP@
-DATADIRNAME = @DATADIRNAME@
-GENCAT = @GENCAT@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
-INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-PACKAGE = @PACKAGE@
-PERL = @PERL@
-POFILES = @POFILES@
-POSUB = @POSUB@
-RANLIB = @RANLIB@
-STACKOVF = @STACKOVF@
-U = @U@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-l = @l@
-
-noinst_PROGRAMS = test.so time.so
-
-test_so_SOURCES = test.c
-time_so_SOURCES = time.c
-
-EXTRA_DIST = test.m4 time.m4
-
-INCLUDES = -I$(srcdir)/../src -I$(srcdir)/../lib
-LDFLAGS = -shared
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-test_so_OBJECTS = test.o
-test_so_LDADD = $(LDADD)
-test_so_DEPENDENCIES =
-test_so_LDFLAGS =
-time_so_OBJECTS = time.o
-time_so_LDADD = $(LDADD)
-time_so_DEPENDENCIES =
-time_so_LDFLAGS =
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = README Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP = --best
-DEP_FILES = .deps/test.P .deps/time.P
-SOURCES = $(test_so_SOURCES) $(time_so_SOURCES)
-OBJECTS = $(test_so_OBJECTS) $(time_so_OBJECTS)
-
-all: Makefile $(PROGRAMS)
-
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu modules/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstPROGRAMS:
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-test.so: $(test_so_OBJECTS) $(test_so_DEPENDENCIES)
- @rm -f test.so
- $(LINK) $(test_so_LDFLAGS) $(test_so_OBJECTS) $(test_so_LDADD) $(LIBS)
-
-time.so: $(time_so_OBJECTS) $(time_so_DEPENDENCIES)
- @rm -f time.so
- $(LINK) $(time_so_LDFLAGS) $(time_so_OBJECTS) $(time_so_LDADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = modules
-
-distdir: $(DISTFILES)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu modules/Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
-
-maintainer-clean-depend:
- -rm -rf .deps
-
-%.o: %.c
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
-
-%.lo: %.c
- @echo '$(LTCOMPILE) -c $<'; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
- @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
- < .deps/$(*F).p > .deps/$(*F).P
- @-rm -f .deps/$(*F).p
-info:
-dvi:
-check: all
-installcheck:
-install-exec:
- @$(NORMAL_INSTALL)
-
-install-data:
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall:
-
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-clean: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
- clean-generic mostlyclean
-
-distclean: distclean-noinstPROGRAMS distclean-compile distclean-tags \
- distclean-depend distclean-generic clean
- -rm -f config.status
-
-maintainer-clean: maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
-clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info dvi \
-installcheck install-exec install-data install uninstall all \
-installdirs mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/modules/README b/modules/README
deleted file mode 100644
index 93e7bbb1..00000000
--- a/modules/README
+++ /dev/null
@@ -1,62 +0,0 @@
-This directory contains demonstration modules for GNU m4.
-
-Nothing in this directory is built by default.
-
-Dynamic modules is a experimental feature of GNU m4, and might change or
-disappear altogether in future versions. Currently it has only been
-certified to work under Linux 2.0.
-
-Dynamic modules are only available if GNU m4 was configured with
---with-modules and if the dlopen(3) interface is available in the
-operating system.
-
-Implementation details are in ../src/module.c
-
-A module is a compiled shared object, i.e., modules are written in C and
-then compiled. The compiled file can then be loaded into a running m4
-process by calling the builtin "loadmodule". This will give GNU m4
-access to any system feature with a C interface.
-
-A module extends GNU m4 by defining new builtins, It can define builtins
-with the same names as existing builtins, which will then be
-unavailable. A module cannot redefine internal functions of GNU m4,
-such as the input parser or argument handling.
-
-The infrastructure for writing and compiling modules is still a bit
-wanting, quasi non-existent.
-
-Each module should include the two header files ../src/m4.h and
-../src/builtin.h. These will include <ctype.h>, <stdio.h>,
-../lib/obstack.h and ../config.h.
-
-Each module *must* define the symbol "m4_macro_table" as a pointer to a
-table of "struct builtin" (defined in m4.h). The table ends with an
-entry with name == NULL. The builtins described in the table will be
-defined by GNU m4 as were they normal builtins.
-
-If a module defines the symbol "m4_init_module", it is supposed to be a
-function with a prototype of "void m4_init_module(struct obstack *obs)",
-and it will be called as soon as the module is loaded. Any non-finished
-object left on the obstack will be the expansion of the call of the
-builtin "loadmodule". The obstack pointer might be NULL (in the future).
-
-If a module defines the symbol "m4_finish_module", it is supposed to be
-a function with a prototype of "void m4_finish_module(void)", and it
-will be called just before GNU m4 exits. This will allow a module to
-clean up before exit. There is no way of communicating information to
-the user, as GNU m4 exits immeidately afterwards.
-
-No other symbols will be used by GNU m4. Other external symbols within
-the module are private and will not be accessible to GNU m4 or to other
-modules.
-
-Modules are allowed to call external functions already defined within
-the GNU m4 sources. Some of these have prototypes in builtin.h.
-
-
-A complete, though silly, example is found in test.c. A more
-interesting example is in time.c.
-
-To try the demos, compile with `make' and run them with the commands as:
-
- M4MODPATH=`pwd` ../src/m4 time.m4
diff --git a/modules/TODO b/modules/TODO
deleted file mode 100644
index c5d7ec4d..00000000
--- a/modules/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-The file src/m4.h will have to be split to have an installable m4defs.h
-suitable for modules. Modules should be compilable without have the m4
-source available.
diff --git a/modules/defs b/modules/defs
deleted file mode 100644
index 403eabbe..00000000
--- a/modules/defs
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- ksh -*-
-# Defines for GNU m4 testing environment.
-# Erick Branderhorst <Erick.Branderhorst@asml.nl>
-
-# Ensure $srcdir set correctly.
-test -f ${srcdir}/defs || {
- echo "defs: installation error" 1>&2
- exit 1
-}
-
-# If srcdir is relative, we need to modify it.
-case "$srcdir" in
- /*)
- ;;
-
- .)
- srcdir=".."
- ;;
-
- *)
- srcdir="../$srcdir"
- ;;
-esac
-
-rm -rf testSubDir > /dev/null 2>&1
-mkdir testSubDir
-cd testSubDir
-
-# Build appropriate environment in test directory. Eg create
-# configure.in, touch all necessary files, etc.
-
-# nothing yet
-
-# See how redirections should work. User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
- exec > /dev/null 2>&1
-}
-
-# User can set MAKE to choose which make to use. Must use GNU make.
-test -z "$MAKE" && MAKE=make
-
-echo "=== Running test $0"
-
-# See how GNU m4 should be run. No options as default.
-test -z "$M4" && M4="${SHELL-/bin/sh} ../../libtool --mode=execute ../../src/m4"
-
-# See how cmp should be run.
-test -z "$CMP" && CMP=cmp
-
-# Setting nls related vars. Override them in the test when needed.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
diff --git a/modules/modpath1.test b/modules/modpath1.test
deleted file mode 100755
index 2722ed43..00000000
--- a/modules/modpath1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# test.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-# cannot perform test without --with-modules
-#test -z "$WITH_MODULES" && exit 77
-
-cat ${srcdir}/test.m4 >in
-
-cat <<'EOF' >ok
-Test module loaded.
-Test module called.
-Dumpdef:
-EOF
-
-cat <<'EOF' >okerr
-test: <test>
-EOF
-
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -M `cd $srcdir; pwd` -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/modpath2.test b/modules/modpath2.test
deleted file mode 100755
index 06af519a..00000000
--- a/modules/modpath2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# test.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-# cannot perform test without --with-modules
-#test -z "$WITH_MODULES" && exit 77
-
-cat ${srcdir}/test.m4 >in
-
-cat <<'EOF' >ok
-Test module loaded.
-Test module called.
-Dumpdef:
-EOF
-
-cat <<'EOF' >okerr
-test: <test>
-EOF
-
-LTDL_LIBRARY_PATH=`cd $srcdir; pwd` M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/modpath3.test b/modules/modpath3.test
deleted file mode 100755
index 6064265b..00000000
--- a/modules/modpath3.test
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# test.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-# cannot perform test without --with-modules
-#test -z "$WITH_MODULES" && exit 77
-
-
-
-cat <<'EOF' >in
-test
-Dumpdef: dumpdef(`test')
-EOF
-
-cat <<'EOF' >ok
-Test module called.
-Dumpdef:
-EOF
-
-cat <<'EOF' >okerr
-test: <test>
-EOF
-
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -m test -M `cd $srcdir; pwd` -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/modpath4.test b/modules/modpath4.test
deleted file mode 100755
index 780cdbeb..00000000
--- a/modules/modpath4.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# test.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-cat ${srcdir}/test.m4 >in
-
-
-cat <<'EOF' >ok
-Test module loaded.
-Test module called.
-Dumpdef:
-EOF
-
-cat <<'EOF' >okerr
-test: <test>
-EOF
-
-
-M4MODPATH=`cd $srcdir; pwd` M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/shadow.c b/modules/shadow.c
deleted file mode 100644
index 5955828b..00000000
--- a/modules/shadow.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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.
-*/
-
-#include <m4module.h> /* This is obligatory */
-
-#define LTDL_MODULE_NAME shadow
-
-module_init_t m4_init_module; /* initialisation function */
-module_finish_t m4_finish_module; /* cleanup function */
-
-/* declare builtins */
-M4BUILTIN(shadow);
-M4BUILTIN(test);
-#undef M4BUILTIN
-
-#define m4_macro_table shadow_LTX_m4_macro_table
-#define m4_init_module shadow_LTX_m4_init_module
-#define m4_finish_module shadow_LTX_m4_finish_module
-
-/* The table of builtins defined by this module - just one */
-
-builtin m4_macro_table[] =
-{
- /* name GNUext macros blind function */
- { "shadow", FALSE, FALSE, FALSE, shadow },
- { "test", FALSE, FALSE, FALSE, test },
- { 0, FALSE, FALSE, FALSE, 0 },
-};
-
-void
-m4_init_module(struct obstack *obs)
-{
- char *s = "Shadow module loaded.";
- if (obs != 0)
- obstack_grow (obs, s, strlen(s));
-}
-
-void
-m4_finish_module(void)
-{
- return;
-}
-
-/* The functions for builtins can be static */
-static void
-shadow (struct obstack *obs, int argc, token_data **argv)
-{
- char *s = "Shadow::`shadow' called.";
- obstack_grow (obs, s, strlen(s));
-}
-
-static void
-test (struct obstack *obs, int argc, token_data **argv)
-{
- char *s = "Shadow::`test' called.";
- obstack_grow (obs, s, strlen(s));
-}
-
-
-
diff --git a/modules/shadow.m4 b/modules/shadow.m4
deleted file mode 100644
index b55adbcb..00000000
--- a/modules/shadow.m4
+++ /dev/null
@@ -1,59 +0,0 @@
-# no modules loaded yet
-test
-shadow
-
-# define our own macros for `test' and `shadow'
-define(`test', `local::`test'')
-define(`shadow', `local::`shadow'')
-test
-shadow
-
-# save our local `shadow' macro until the Shadow module is unloaded
-pushdef(`shadow')
-
-# module Shadow defines `shadow' and `test' macros
-loadmodule(`shadow')
-dumpdef(`test')
-dumpdef(`shadow')
-test
-shadow
-
-# save the definition of `test' from the Shadow module
-define(`Shadow::test', defn(`test'))
-
-# module Test also defines a `test' macro
-loadmodule(`test')
-dumpdef(`test')
-dumpdef(`shadow')
-test
-shadow
-
-# Reloading Shadow shouldn't affect anything
-loadmodule(`shadow')
-dumpdef(`test')
-dumpdef(`shadow')
-test
-shadow
-
-# Unloading Test will not unshadow the test definition in Shadow without
-# some macro magic
-unloadmodule(`test')
-define(`test', defn(`Shadow::test'))
-undefine(`Shadow::test')
-dumpdef(`test')
-dumpdef(`shadow')
-test
-shadow
-
-# Unloading Shadow once has no effect (we loaded it twice)
-unloadmodule(`shadow')
-dumpdef(`test')
-dumpdef(`shadow')
-test
-shadow
-
-# Unloading Shadow again will revert to copying `test' and the locally
-# pushed `shadow' macro.
-unloadmodule(`shadow')
-test
-shadow
diff --git a/modules/shadow.test b/modules/shadow.test
deleted file mode 100755
index c8952b59..00000000
--- a/modules/shadow.test
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-
-# shadow.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-# cannot perform test without --with-modules
-# test -z "$WITH_MODULES" && exit 77
-
-cat ${srcdir}/shadow.m4 >in
-
-cat <<'EOF' >ok
-# no modules loaded yet
-test
-shadow
-
-# define our own macros for `test' and `shadow'
-
-
-local::test
-local::shadow
-
-# save our local `shadow' macro until the Shadow module is unloaded
-
-
-# module Shadow defines `shadow' and `test' macros
-Shadow module loaded.
-
-
-Shadow::test called.
-Shadow::shadow called.
-
-# save the definition of `test' from the Shadow module
-
-
-# module Test also defines a `test' macro
-Test module loaded.
-
-
-Test module called.
-Shadow::shadow called.
-
-# Reloading Shadow shouldn't affect anything
-
-
-
-Test module called.
-Shadow::shadow called.
-
-# Unloading Test will not unshadow the test definition in Shadow without
-# some macro magic
-
-
-
-
-
-Shadow::test called.
-Shadow::shadow called.
-
-# Unloading Shadow once has no effect (we loaded it twice)
-
-
-
-Shadow::test called.
-Shadow::shadow called.
-
-# Unloading Shadow again will revert to copying `test' and the locally
-# pushed `shadow' macro.
-
-test
-local::shadow
-EOF
-
-cat <<'EOF' >okerr
-test: <test>
-shadow: <shadow>
-test: <test>
-shadow: <shadow>
-test: <test>
-shadow: <shadow>
-test: <test>
-shadow: <shadow>
-test: <test>
-shadow: <shadow>
-EOF
-
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -M `cd $srcdir; pwd` -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/stdlib.c b/modules/stdlib.c
deleted file mode 100644
index 6ba8556d..00000000
--- a/modules/stdlib.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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.
-*/
-
-#include <m4.h>
-#include <builtin.h>
-
-#include <pwd.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/utsname.h>
-#include <sys/types.h>
-
-DECLARE(m4_getcwd);
-DECLARE(m4_getlogin);
-DECLARE(m4_getpid);
-DECLARE(m4_getppid);
-DECLARE(m4_getuid);
-DECLARE(m4_getpwnam);
-DECLARE(m4_getpwuid);
-DECLARE(m4_hostname);
-DECLARE(m4_rand);
-DECLARE(m4_srand);
-DECLARE(m4_getenv);
-DECLARE(m4_setenv);
-DECLARE(m4_unsetenv);
-DECLARE(m4_uname);
-
-#undef DECLARE
-
-builtin m4_macro_table[] =
-{
- /* name GNUext macros blind function */
- { "getcwd", TRUE, FALSE, FALSE, m4_getcwd },
- { "getenv", TRUE, FALSE, TRUE, m4_getenv },
- { "setenv", TRUE, FALSE, TRUE, m4_setenv },
- { "unsetenv", TRUE, FALSE, TRUE, m4_unsetenv },
- { "getlogin", TRUE, FALSE, FALSE, m4_getlogin },
- { "getpid", TRUE, FALSE, FALSE, m4_getpid },
- { "getppid", TRUE, FALSE, FALSE, m4_getppid },
- { "getpwnam", TRUE, FALSE, TRUE, m4_getpwnam },
- { "getpwuid", TRUE, FALSE, TRUE, m4_getpwuid },
- { "getuid", TRUE, FALSE, FALSE, m4_getuid },
- { "hostname", TRUE, FALSE, FALSE, m4_hostname },
- { "rand", TRUE, FALSE, FALSE, m4_rand },
- { "srand", TRUE, FALSE, FALSE, m4_srand },
- { "uname", TRUE, FALSE, FALSE, m4_uname },
- { 0, FALSE, FALSE, FALSE, 0 },
-};
-
-
-
-static void
-m4_getcwd (struct obstack *obs, int argc, token_data **argv)
-{
- char buf[1024];
- char *bp;
- int l;
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- bp = getcwd(buf, sizeof buf);
-
- if (bp != NULL) /* in case of error return null string */
- shipout_string (obs, buf, 0 , FALSE);
-}
-
-static void
-m4_getenv (struct obstack *obs, int argc, token_data **argv)
-{
- char *env;
-
- if (bad_argc (argv[0], argc, 2, 2))
- return;
-
- env = getenv(ARG(1));
-
- if (env != NULL)
- shipout_string (obs, env, 0, FALSE);
-}
-
-static void
-m4_setenv (struct obstack *obs, int argc, token_data **argv)
-{
- char *env;
- int overwrite = 1;
-
- if (bad_argc (argv[0], argc, 3, 4))
- return;
-
- if (argc == 4)
- if (!numeric_arg(argv[0], ARG(3), &overwrite))
- return;
-
- setenv(ARG(1), ARG(2), overwrite);
-}
-
-static void
-m4_unsetenv (struct obstack *obs, int argc, token_data **argv)
-{
- char *env;
-
- if (bad_argc (argv[0], argc, 2, 2))
- return;
-
- unsetenv(ARG(1));
-}
-
-static void
-m4_getlogin (struct obstack *obs, int argc, token_data **argv)
-{
- char *login;
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- login = getlogin();
-
- if (login != NULL)
- shipout_string (obs, login, 0, FALSE);
-}
-
-static void
-m4_getpid (struct obstack *obs, int argc, token_data **argv)
-{
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- shipout_int(obs, getpid());
-}
-
-static void
-m4_getppid (struct obstack *obs, int argc, token_data **argv)
-{
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- shipout_int(obs, getppid());
-}
-
-static void
-m4_getpwnam (struct obstack *obs, int argc, token_data **argv)
-{
- struct passwd *pw;
-
- if (bad_argc (argv[0], argc, 2, 2))
- return;
-
- pw = getpwnam(ARG(1));
-
- if (pw != NULL)
- {
- shipout_string (obs, pw->pw_name, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_passwd, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_int(obs, pw->pw_uid);
- obstack_1grow (obs, ',');
- shipout_int(obs, pw->pw_gid);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_gecos, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_dir, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_shell, 0, TRUE);
- }
-}
-
-static void
-m4_getpwuid (struct obstack *obs, int argc, token_data **argv)
-{
- struct passwd *pw;
- int uid;
-
- if (bad_argc (argv[0], argc, 2, 2))
- return;
-
- if (!numeric_arg(argv[0], ARG(1), &uid))
- return;
-
- pw = getpwuid(uid);
-
- if (pw != NULL)
- {
- shipout_string (obs, pw->pw_name, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_passwd, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_int(obs, pw->pw_uid);
- obstack_1grow (obs, ',');
- shipout_int(obs, pw->pw_gid);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_gecos, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_dir, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, pw->pw_shell, 0, TRUE);
- }
-}
-
-static void
-m4_hostname (struct obstack *obs, int argc, token_data **argv)
-{
- char buf[1024];
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- if (gethostname(buf, sizeof buf) < 0)
- return;
-
- shipout_string (obs, buf, 0, FALSE);
-}
-
-static void
-m4_rand (struct obstack *obs, int argc, token_data **argv)
-{
- int i;
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- shipout_int(obs, rand());
-}
-
-static void
-m4_srand (struct obstack *obs, int argc, token_data **argv)
-{
- char buf[64];
- int seed;
-
- if (bad_argc (argv[0], argc, 1, 2))
- return;
-
- if (argc == 1)
- seed = time(0L) * getpid();
- else
- {
- if (!numeric_arg(argv[0], ARG(1), &seed))
- return;
- }
-
- srand(seed);
-}
-
-static void
-m4_uname (struct obstack *obs, int argc, token_data **argv)
-{
- struct utsname ut;
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- if (uname(&ut) == 0)
- {
- shipout_string (obs, ut.sysname, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, ut.nodename, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, ut.release, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, ut.machine, 0, TRUE);
- obstack_1grow (obs, ',');
- shipout_string (obs, ut.domainname, 0, TRUE);
- }
-}
-
-static void
-m4_getuid (struct obstack *obs, int argc, token_data **argv)
-{
- int i;
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- shipout_int(obs, getuid());
-}
diff --git a/modules/stdlib.m4 b/modules/stdlib.m4
deleted file mode 100644
index a023643d..00000000
--- a/modules/stdlib.m4
+++ /dev/null
@@ -1,41 +0,0 @@
-loadmodule(`stdlib')
-
-`getenv - 'getenv(PATH)
-
-setenv TEST=??? setenv(`TEST', `???')
-getenv TEST - getenv(`TEST')
-
-setenv TEST=Second test setenv(`TEST', `Second test')
-getenv TEST - getenv(`TEST')
-
-unsetenv TEST unsetenv(`TEST')
-getenv TEST - getenv(`TEST')
-
-
-
-`getlogin - 'getlogin
-`getcwd = 'getcwd
-`getpid - 'getpid
-`getppid - 'getppid
-
-syscmd(`ps ajx|grep m4')
-
-`getuid - 'getuid
-
-user root - getpwnam(`root')
-user sync - getpwnam(`sync')
-user rene - getpwnam(`rene')
-
-uid 5 - getpwuid(5)
-me - getpwuid(getuid)
-
-`hostname = 'hostname
-
-`rand' - rand,rand,rand,rand
-`srand' srand
-`rand' - rand,rand,rand,rand
-`srand' srand
-`rand' - rand,rand,rand,rand
-
-`uname - ' uname
-
diff --git a/modules/test.c b/modules/test.c
deleted file mode 100644
index 1a8a8092..00000000
--- a/modules/test.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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.
-*/
-
-#include <m4.h> /* These are obligatory */
-#include <builtin.h>
-
-module_init_t m4_init_module; /* initialisation function */
-module_finish_t m4_finish_module; /* cleanup function */
-
-DECLARE(test); /* declare test as implementing
- a builtin */
-
-#undef DECLARE
-
-/* The table of builtins defined by this module - just one */
-
-builtin m4_macro_table[] =
-{
- /* name GNUext macros blind function */
- { "test", FALSE, FALSE, FALSE, test },
- { 0, FALSE, FALSE, FALSE, 0 },
-};
-
-void
-m4_init_module(struct obstack *obs)
-{
- char *s = "Test module loaded.";
- obstack_grow (obs, s, strlen(s));
-}
-
-void
-m4_finish_module(void)
-{
- return;
-}
-
-/* The functions for builtins can be static */
-static void
-test (struct obstack *obs, int argc, token_data **argv)
-{
- char *s = "Test module called";
- obstack_grow (obs, s, strlen(s));
-}
diff --git a/modules/test.m4 b/modules/test.m4
deleted file mode 100644
index f8486578..00000000
--- a/modules/test.m4
+++ /dev/null
@@ -1,3 +0,0 @@
-loadmodule(`test.so')
-test
-Dumpdef: dumpdef(`test')
diff --git a/modules/test.test b/modules/test.test
deleted file mode 100755
index 6f0c335f..00000000
--- a/modules/test.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# test.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-cat ${srcdir}/test.m4 >in
-
-
-cat <<'EOF' >ok
-Test module loaded.
-Test module called.
-Dumpdef:
-EOF
-
-cat <<'EOF' >okerr
-test: <test>
-EOF
-
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -M `cd $srcdir; pwd` -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/time.c b/modules/time.c
deleted file mode 100644
index 5f98e8a7..00000000
--- a/modules/time.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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.
-*/
-
-#include <m4.h>
-#include <builtin.h>
-
-#include <time.h>
-
-DECLARE(m4_currenttime);
-DECLARE(m4_ctime);
-DECLARE(m4_gmtime);
-DECLARE(m4_localtime);
-DECLARE(m4_mktime);
-DECLARE(m4_strftime);
-
-#undef DECLARE
-
-builtin m4_macro_table[] =
-{
- /* name GNUext macros blind function */
- { "currenttime", TRUE, FALSE, FALSE, m4_currenttime },
- { "ctime", TRUE, FALSE, FALSE, m4_ctime },
- { "gmtime", TRUE, FALSE, TRUE, m4_gmtime },
- { "localtime", TRUE, FALSE, TRUE, m4_localtime },
- { "mktime", TRUE, FALSE, TRUE, m4_mktime },
- { "strftime", TRUE, FALSE, TRUE, m4_strftime },
- { 0, FALSE, FALSE, FALSE, 0 },
-};
-
-
-
-static void
-m4_currenttime (struct obstack *obs, int argc, token_data **argv)
-{
- char buf[64];
- time_t now;
- int l;
-
- if (bad_argc (argv[0], argc, 1, 1))
- return;
-
- now = time(0L);
- l = sprintf(buf, "%ld", now);
-
- obstack_grow (obs, buf, l);
-}
-
-static void
-m4_ctime (struct obstack *obs, int argc, token_data **argv)
-{
- char buf[64];
- time_t t;
- int l;
-
- if (bad_argc (argv[0], argc, 1, 2))
- return;
-
- if (argc == 2)
- numeric_arg(argv[0], ARG(1), (int *)&t);
- else
- t = time(0L);
-
- obstack_grow (obs, ctime(&t), 24);
-}
-
-static void
-format_tm(struct obstack *obs, struct tm *tm)
-{
- shipout_int(obs, tm->tm_sec);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_min);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_hour);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_mday);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_mon);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_year);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_wday);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_yday);
- obstack_1grow(obs, ',');
-
- shipout_int(obs, tm->tm_isdst);
-}
-
-static void
-m4_gmtime (struct obstack *obs, int argc, token_data **argv)
-{
- time_t t;
- struct tm *tm;
-
- if (bad_argc (argv[0], argc, 2, 2))
- return;
-
- if (!numeric_arg (argv[0], ARG (1), (int *)&t))
- return;
-
- format_tm(obs, gmtime(&t));
-}
-
-static void
-m4_localtime (struct obstack *obs, int argc, token_data **argv)
-{
- time_t t;
- struct tm *tm;
-
- if (bad_argc (argv[0], argc, 2, 2))
- return;
-
- if (!numeric_arg (argv[0], ARG (1), (int *)&t))
- return;
-
- format_tm(obs, localtime(&t));
-}
-
-/*-------------------------------------------.
-| mktime(sec,min,hour,mday,month,year,isdst) |
-`-------------------------------------------*/
-
-static void
-m4_mktime (struct obstack *obs, int argc, token_data **argv)
-{
- struct tm tm;
- time_t t;
-
- if (bad_argc (argv[0], argc, 7, 8))
- return;
-
- if (!numeric_arg (argv[0], ARG (1), &tm.tm_sec))
- return;
- if (!numeric_arg (argv[0], ARG (2), &tm.tm_min))
- return;
- if (!numeric_arg (argv[0], ARG (3), &tm.tm_hour))
- return;
- if (!numeric_arg (argv[0], ARG (4), &tm.tm_mday))
- return;
- if (!numeric_arg (argv[0], ARG (5), &tm.tm_mon))
- return;
- if (!numeric_arg (argv[0], ARG (6), &tm.tm_year))
- return;
- if (ARG(7) && !numeric_arg (argv[0], ARG (7), &tm.tm_isdst))
- return;
-
- t = mktime(&tm);
-
- shipout_int(obs, t);
-}
-
-static void
-m4_strftime (struct obstack *obs, int argc, token_data **argv)
-{
- struct tm *tm;
- time_t t;
- char *buf;
- int l;
-
- if (bad_argc (argv[0], argc, 3, 3))
- return;
-
- if (!numeric_arg (argv[0], ARG (2), (int *)&t))
- return;
-
- tm = localtime(&t);
-
- buf = (char *) obstack_alloc(obs, 1024);
- l = strftime(buf, 1024, ARG(1), tm);
- obstack_grow(obs, buf, l);
-}
diff --git a/modules/time.m4 b/modules/time.m4
deleted file mode 100644
index e87f6bdf..00000000
--- a/modules/time.m4
+++ /dev/null
@@ -1,16 +0,0 @@
-loadmodule(`time.so')
-
-`currenttime' = currenttime
-`ctime' = ctime != ctime(eval(currenttime+60*60*24))
-gmtime = gmtime(currenttime)
-localtime = localtime(currenttime)
-define(`q', `$1,$2,$3,$4,$5,$6,$9')dnl
-
-currenttime
-eval(currenttime+60*60*24)
-localtime(eval(currenttime+60*60*24))
-q(localtime(eval(currenttime+60*60*24)))
-mktime = mktime(q(localtime(eval(currenttime+60*60*24))))
-
-%A %B %d, %Y = strftime(`%A %B %d, %Y', currenttime)
-%X on %x = strftime(`%X on %x', currenttime)
diff --git a/modules/time.test b/modules/time.test
deleted file mode 100755
index a2155e69..00000000
--- a/modules/time.test
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-# test.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ../../tests/config.sh
-
-cat <<'EOF' >in
-ifelse(regexp(currenttime, `^[1-9][0-9]*$'), 0, NUMERIC, NON NUMERIC)
-
-define(`sometime', 1890962700)dnl someones 65th birthday, hopefully
-`ctime' = ctime(sometime) != ctime(eval(sometime+60*60*24))
-gmtime = gmtime(sometime)
-localtime = localtime(sometime)
-define(`q', `$1,$2,$3,$4,$5,$6,$9')dnl
-
-sometime
-eval(sometime+60*60*24)
-localtime(eval(sometime+60*60*24))
-q(localtime(eval(sometime+60*60*24)))
-mktime = mktime(q(localtime(eval(sometime+60*60*24))))
-
-%A %B %d, %Y = strftime(`%A %B %d, %Y', sometime)
-%X on %x = strftime(`%X on %x', sometime)
-EOF
-
-cat <<'EOF' >ok
-NUMERIC
-
-ctime = Mon Dec 3 04:25:00 2029 != Tue Dec 4 04:25:00 2029
-gmtime = 0,25,3,3,11,129,1,336,0
-localtime = 0,25,4,3,11,129,1,336,0
-
-1890962700
-1891049100
-0,25,4,4,11,129,2,337,0
-0,25,4,4,11,129,0
-mktime = 1891049100
-
-%A %B %d, %Y = Monday December 03, 2029
-%X on %x = 04:25:00 on 12/03/29
-EOF
-
-cat <<'EOF' >okerr
-EOF
-
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -m time -M `cd $srcdir; pwd` -d in >out 2>err
-sed -e "s,^[^:]*[lt-]*m4[.ex]*:,m4:," err >sederr && mv sederr err
-$CMP -s out ok && $CMP -s err okerr
diff --git a/modules/time2.m4 b/modules/time2.m4
deleted file mode 100644
index 286f8bfd..00000000
--- a/modules/time2.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-`currenttime' = currenttime
-`ctime' = ctime != ctime(eval(currenttime+60*60*24))
-gmtime = gmtime(currenttime)
-localtime = localtime(currenttime)
-define(`q', `$1,$2,$3,$4,$5,$6,$9')dnl
-
-currenttime
-eval(currenttime+60*60*24)
-localtime(eval(currenttime+60*60*24))
-q(localtime(eval(currenttime+60*60*24)))
-mktime = mktime(q(localtime(eval(currenttime+60*60*24))))
-
-%A %B %d, %Y = strftime(`%A %B %d, %Y', currenttime)
-%X on %x = strftime(`%X on %x', currenttime)
diff --git a/po/cs.gmo b/po/cs.gmo
deleted file mode 100644
index 69918181..00000000
--- a/po/cs.gmo
+++ /dev/null
Binary files differ
diff --git a/po/cs.po b/po/cs.po
deleted file mode 100644
index 5e355a64..00000000
--- a/po/cs.po
+++ /dev/null
@@ -1,725 +0,0 @@
-# Czech translation of the GNU m4.
-# Copyright (C) 1998 Free Software Foundation, Inc.
-# Jiøí Pavlovskư <pavlovsk@ff.cuni.cz>, 1998.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4n\n"
-"POT-Creation-Date: 2000-01-10 05:27+0100\n"
-"PO-Revision-Date: 1998-12-07 22:02+01:00\n"
-"Last-Translator: Jiøí Pavlovskư <pavlovsk@ff.cuni.cz>\n"
-"Language-Team: Czech <cs@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: lib/getopt.c:677
-#, c-format
-msgid "%s: option `%s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:702
-#, c-format
-msgid "%s: option `--%s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:707
-#, c-format
-msgid "%s: option `%c%s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:725 lib/getopt.c:898
-#, c-format
-msgid "%s: option `%s' requires an argument\n"
-msgstr ""
-
-#. --option
-#: lib/getopt.c:754
-#, c-format
-msgid "%s: unrecognized option `--%s'\n"
-msgstr ""
-
-#. +option or -option
-#: lib/getopt.c:758
-#, c-format
-msgid "%s: unrecognized option `%c%s'\n"
-msgstr ""
-
-#. 1003.2 specifies the format of this message.
-#: lib/getopt.c:784
-#, c-format
-msgid "%s: illegal option -- %c\n"
-msgstr ""
-
-#: lib/getopt.c:787
-#, c-format
-msgid "%s: invalid option -- %c\n"
-msgstr ""
-
-#. 1003.2 specifies the format of this message.
-#: lib/getopt.c:817 lib/getopt.c:947
-#, c-format
-msgid "%s: option requires an argument -- %c\n"
-msgstr ""
-
-#: lib/getopt.c:864
-#, c-format
-msgid "%s: option `-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:882
-#, c-format
-msgid "%s: option `-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/obstack.c:471
-msgid "memory exhausted"
-msgstr ""
-
-#: lib/regex.c:1019
-msgid "Success"
-msgstr ""
-
-#: lib/regex.c:1022
-msgid "No match"
-msgstr ""
-
-# , c-format
-#: lib/regex.c:1025
-#, fuzzy
-msgid "Invalid regular expression"
-msgstr "©patnư regulární vưraz `%s': %s"
-
-#: lib/regex.c:1028
-msgid "Invalid collation character"
-msgstr ""
-
-#: lib/regex.c:1031
-msgid "Invalid character class name"
-msgstr ""
-
-#: lib/regex.c:1034
-msgid "Trailing backslash"
-msgstr ""
-
-#: lib/regex.c:1037
-msgid "Invalid back reference"
-msgstr ""
-
-#: lib/regex.c:1040
-msgid "Unmatched [ or [^"
-msgstr ""
-
-#: lib/regex.c:1043
-msgid "Unmatched ( or \\("
-msgstr ""
-
-#: lib/regex.c:1046
-msgid "Unmatched \\{"
-msgstr ""
-
-#: lib/regex.c:1049
-msgid "Invalid content of \\{\\}"
-msgstr ""
-
-#: lib/regex.c:1052
-msgid "Invalid range end"
-msgstr ""
-
-#: lib/regex.c:1055 lib/xmalloc.c:82
-msgid "Memory exhausted"
-msgstr ""
-
-# , c-format
-#: lib/regex.c:1058
-#, fuzzy
-msgid "Invalid preceding regular expression"
-msgstr "Chyba pøi porovnávání regulárního vưrazu `%s'"
-
-#: lib/regex.c:1061
-#, fuzzy
-msgid "Premature end of regular expression"
-msgstr "Pøedèasnư konec zmrazeného souboru"
-
-# , c-format
-#: lib/regex.c:1064
-#, fuzzy
-msgid "Regular expression too big"
-msgstr "©patnư regulární vưraz `%s': %s"
-
-#: lib/regex.c:1067
-msgid "Unmatched ) or \\)"
-msgstr ""
-
-# , c-format
-#: lib/regex.c:5564
-#, fuzzy
-msgid "No previous regular expression"
-msgstr "Chyba pøi porovnávání regulárního vưrazu `%s'"
-
-# , c-format
-#: src/builtin.c:349
-#, c-format
-msgid "Warning: Too few arguments to built-in `%s'"
-msgstr "Varování: pøíli¹ málo argumentù pro vestav́né makro `%s'"
-
-# , c-format
-#: src/builtin.c:355
-#, c-format
-msgid "Warning: Excess arguments to built-in `%s' ignored"
-msgstr ""
-"Varování: pøíli¹ mnoho argumentù pro vestav́né makro `%s' - budou ignorovány"
-
-# , c-format
-#: src/builtin.c:383
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Neèíselnư argument pro vestav́né makro `%s'"
-
-#: src/builtin.c:494
-msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ tokenu v define_macro ()"
-
-# , c-format
-#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
-#, c-format
-msgid "Undefined name %s"
-msgstr "Jméno %s není definováno"
-
-#: src/builtin.c:721
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "VNITØNÍ CHYBA: Vestav́né makro nenalezeno v tabulce vestav́nưch maker!"
-
-#: src/builtin.c:729
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ tokenu v m4_dumpdef ()"
-
-# , c-format
-#: src/builtin.c:804
-#, fuzzy, c-format
-msgid "Undefined name `%s'"
-msgstr "Jméno %s není definováno"
-
-#: src/builtin.c:842
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ symbolu v m4_defn ()"
-
-# , c-format
-#: src/builtin.c:908
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Rouru do pøíkazu `%s' nelze otevøít"
-
-# , c-format
-#: src/builtin.c:948
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Základ v makru eval je mimo rozsah (základ = %d)"
-
-#: src/builtin.c:957
-msgid "Negative width to eval"
-msgstr "Záporná ¹íøka v makru eval"
-
-# , c-format
-#: src/builtin.c:1063
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Neèíselnư argument pro %s"
-
-# , c-format
-#: src/builtin.c:1075
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Chyba pøi volání makra undivert pro %s"
-
-# , c-format
-#: src/builtin.c:1223
-#, c-format
-msgid "Undefined syntax code %c"
-msgstr "Syntaktickư kód %c není definován"
-
-# , c-format
-#: src/builtin.c:1274 src/freeze.c:211
-#, c-format
-msgid "Cannot open %s"
-msgstr "%s nelze otevøít"
-
-# , c-format
-#: src/builtin.c:1483
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Ladící mód: ¹patné ladící volby: `%s'"
-
-# , c-format
-#: src/builtin.c:1519
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Chybovư soubor %s nelze pou¾ít"
-
-#: src/builtin.c:1740
-msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
-msgstr "VAROVÁNÍ: \\0 zmizí, pøi nahrazování pou¾ijte \\&"
-
-# , c-format
-#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "©patnư regulární vưraz `%s': %s"
-
-# , c-format
-#: src/builtin.c:1812 src/builtin.c:1885
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Chyba pøi porovnávání regulárního vưrazu `%s'"
-
-#: src/debug.c:380
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"VNITØNÍ CHYBA: vestav́né makro nenalezeno v tabulce vestav́nưch maker\n"
-"(trace_pre ())!"
-
-#: src/debug.c:388
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ tokenu (trace_pre ())"
-
-# , c-format
-#: src/eval.c:309
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "©patnư vưraz v makru eval (chybí pravá závorka): %s"
-
-# , c-format
-#: src/eval.c:315
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "©patnư vưraz v makru eval: %s"
-
-# , c-format
-#: src/eval.c:320
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "©patnư vưraz v makru eval (¹patnư vstup): %s"
-
-# , c-format
-#: src/eval.c:325
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "©patnư vưraz v makru eval (nadbyteènư vstup): %s"
-
-# , c-format
-#: src/eval.c:330
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "D́lení nulou v makru eval: %s"
-
-# , c-format
-#: src/eval.c:335
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Modulo nulou v makru eval: %s"
-
-#: src/eval.c:340
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư chybovư kód v evaluate ()"
-
-#: src/eval.c:594
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư operátor porovnání v cmp_term ()"
-
-#: src/eval.c:639
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư operátor posunu v shift_term ()"
-
-#: src/eval.c:738
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư operátor v mult_term ()"
-
-#: src/freeze.c:119
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "VNITØNÍ CHYBA: Vestav́né makro nenalezeno v tabulce vestav́nưch maker!"
-
-#: src/freeze.c:132
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ tokenu ve freeze_one_symbol ()"
-
-#: src/freeze.c:163
-msgid "Expecting line feed in frozen file"
-msgstr "Ve zmrazeném souboru oèekáván LF"
-
-# , c-format
-#: src/freeze.c:165
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Ve zmrazeném souboru oèekáván znak `%c'"
-
-#: src/freeze.c:222
-msgid "Ill-formated frozen file"
-msgstr "©patnư formát zmrazeného souboru"
-
-#: src/freeze.c:277 src/freeze.c:293
-msgid "Premature end of frozen file"
-msgstr "Pøedèasnư konec zmrazeného souboru"
-
-# , c-format
-#: src/freeze.c:327
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr "`%s' ze zmrazeného souboru nenalezeno v tabulce vestav́nưch maker!"
-
-# , c-format
-#: src/input.c:318
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Vstup èten z %s, øádku %d"
-
-# , c-format
-#: src/input.c:346
-#, c-format
-msgid "Input read from %s"
-msgstr "Vstup èten z %s"
-
-#: src/input.c:506
-msgid "INTERNAL ERROR: Recursive push_string!"
-msgstr "VNITØNÍ CHYBA: rekurzivní push_string!"
-
-#: src/input.c:623
-msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
-msgstr "VNITØNÍ CHYBA: ¹patné volání init_macro_token ()"
-
-#: src/input.c:663
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "VNITØNÍ CHYBA: chyba vstupního zásobníku v next_char ()"
-
-#: src/input.c:700
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "VNITØNÍ CHYBA: chyba vstupního zásobníku v peek_input ()"
-
-#: src/input.c:805
-msgid "NONE"
-msgstr "®ÁDNƯ"
-
-#: src/input.c:1199 src/input.c:1226
-msgid "ERROR: EOF in string"
-msgstr "CHYBA: EOF v øet́zci"
-
-#: src/m4.c:119
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "CHYBA: Pøeteèení zásobníku. (nekoneèná rekurze makra define?)"
-
-# , c-format
-#: src/m4.c:146
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Více informací získáte pøíkazem `%s --help'.\n"
-
-# , c-format
-#: src/m4.c:150
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "Pou¾ití: %s [PØEPÍNAÈ]... [SOUBOR]...\n"
-
-#: src/m4.c:151
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Povinné èi volitelné argumenty pro dlouhé pøepínaèe jsou povinné respektive\n"
-"volitelné i pro odpovídající pøepínaèe krátké.\n"
-"\n"
-"Chování programu:\n"
-" --help vypí¹e tuto nápov́du a skonèí\n"
-" --version vypí¹e oznaèení verze a skonèí\n"
-" -e, --interactive nebufferovanư vưstup, ignoruje pøeru¹ení\n"
-" -E, --fatal-warnings skonèí po prvním varování\n"
-" -Q, --quiet, --silent potlaèí ńkterá varování tưkající se\n"
-" vestav́nưch maker\n"
-" -P, --prefix-builtins v¹echna vestav́ná makra budou mít prefix "
-"`m4_'\n"
-
-#: src/m4.c:164
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr ""
-" -W, --word-regexp=REGVƯR syntaxe jmen maker bude urèena pomocí REGVƯR\n"
-
-#: src/m4.c:169
-msgid ""
-"\n"
-"Dynamic loading features:\n"
-" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
-" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
-msgstr ""
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"Nastavení preprocesoru:\n"
-" -I, --include=ADRESÁØ ADRESÁØ bude druhư v poøadí pøi hledání\n"
-" vlo¾enưch souborù\n"
-" -D, --define=MAKRO[=HODNOTA] definuje MAKRO mající HODNOTU, mù¾e bưt\n"
-" i prázdné\n"
-" -U, --undefine=MAKRO sma¾e vestav́né MAKRO\n"
-" -s, --synclines vlo¾í øádky tvaru `#line ÈÍSLO \"SOUBOR\"'\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"Nastavení limitù:\n"
-" -G, --traditional vypne roz¹íøení GNU\n"
-" -H, --hashsize=PRVOÈÍSLO velikost hash tabulky pro vyhledávání "
-"symbolù\n"
-" -L, --nesting-limit=ÈÍSLO nastaví limit pro vnoøená volání maker\n"
-
-#: src/m4.c:191
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Zmrazené soubory:\n"
-" -F, --freeze-state=SOUBOR pøi ukonèení ulo¾í zmrazenư stav do SOUBORU\n"
-" -R, --reload-state=SOUBOR pøi startu naète zmrazenư stav ze SOUBORU\n"
-
-#: src/m4.c:197
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Lad́ní:\n"
-" -d, --debug=[VOLBY] nastaví úrovẹ lad́ní (pokud nejsou VOLBY\n"
-" zadány, pak implicitń `aeq')\n"
-" -t, --trace=MAKRO sleduje MAKRO, kdy¾ je definováno\n"
-" -l, --arglength=POÈET reguluje poèet vưstupních informací\n"
-" ze sledování maker\n"
-" -o, --error-output=SOUBOR pøesḿruje vưstup lad́ní a sledování do "
-"SOUBORU\n"
-
-#: src/m4.c:205
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"VOLBOU mù¾e bưt cokoliv z:\n"
-" t sleduje v¹echna makra, nejenom ta urèená pomocí traceon\n"
-" a vypí¹e aktuální argumenty\n"
-" e vypí¹e expanzi\n"
-" q dle potøeby uzavøe hodnoty mezi apostrofy, s volbami a nebo e\n"
-" c vypí¹e hodnoty pøed a po vyhodnocení argumentù a po volání makra\n"
-" x bude vypisovat jedineèné ID volání makra, u¾iteèné s volbou c\n"
-" f bude vypisovat jméno vstupního souboru\n"
-" l bude vypisovat èíslo vstupního øádku\n"
-" p vypí¹e informace o nalezení zadaného souboru\n"
-" i vypí¹e informace o ka¾dé zḿń vstupního souboru\n"
-" V zkratka pro v¹echny vư¹e uvedené volby\n"
-
-#: src/m4.c:220
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"Jestli¾e SOUBOR není zadán, nebo je SOUBOR `-', pak je èten standardní "
-"vstup.\n"
-
-#: src/m4.c:225
-msgid ""
-"\n"
-"Report bugs to <bug-m4@gnu.org>.\n"
-msgstr ""
-"\n"
-"Chyby v programu oznamujte na adrese <bug-m4@gnu.org> (anglicky).\n"
-"Pøipomínky k pøekladu zasílejte na adresu <cs@li.org> (èesky).\n"
-
-# , c-format
-#: src/m4.c:414
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "©patné ladící volby: `%s'"
-
-#: src/m4.c:436
-#, c-format
-msgid "ERROR: failed to add search directory `%s'"
-msgstr ""
-
-#: src/m4.c:440
-#, c-format
-msgid "ERROR: failed to add search directory `%s': %s"
-msgstr ""
-
-#: src/m4.c:460
-msgid " (options:"
-msgstr " (pøelo¾eno s volbami:"
-
-#: src/m4.c:542
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "VNITØNÍ CHYBA: ¹patnư kód v odlo¾enưch argumentech"
-
-#: src/macro.c:97
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ tokenu v expand_token ()"
-
-#: src/macro.c:163
-msgid "ERROR: EOF in argument list"
-msgstr "CHYBA: EOF v seznamu argumentù"
-
-#: src/macro.c:182
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ tokenu v expand_argument ()"
-
-#: src/macro.c:259
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư typ symbolu v call_macro ()"
-
-# , c-format
-#: src/macro.c:288
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr "CHYBA: pøekroèen limit pro rekurzi (%d), zṃ́te jej pomocí -L<N>"
-
-# , c-format
-#: src/module.c:123
-#, fuzzy, c-format
-msgid "ERROR: failed to initialise modules: %s"
-msgstr "CHYBA: modul `%s' nelze nalézt: %s"
-
-# , c-format
-#: src/module.c:221
-#, fuzzy, c-format
-msgid "ERROR: cannot find module: `%s'"
-msgstr "CHYBA: modul `%s' nelze nalézt"
-
-# , c-format
-#: src/module.c:224
-#, fuzzy, c-format
-msgid "ERROR: cannot find module: `%s': %s"
-msgstr "CHYBA: modul `%s' nelze nalézt: %s"
-
-# , c-format
-#: src/module.c:274
-#, fuzzy
-msgid "ERROR: cannot close modules"
-msgstr "CHYBA: modul `%s' nelze nalézt"
-
-# , c-format
-#: src/module.c:277
-#, fuzzy, c-format
-msgid "ERROR: cannot cannot close modules: %s"
-msgstr "CHYBA: modul `%s' nelze nalézt: %s"
-
-# , c-format
-#: src/module.c:284
-#, fuzzy, c-format
-msgid "ERROR: cannot close module: `%s'"
-msgstr "CHYBA: modul `%s' nelze nalézt"
-
-# , c-format
-#: src/module.c:288
-#, fuzzy, c-format
-msgid "ERROR: cannot cannot close module: `%s': %s"
-msgstr "CHYBA: modul `%s' nelze nalézt: %s"
-
-#: src/output.c:262
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "CHYBA: doèasnư soubor pro ulo¾ení odlo¾eného vưstupu nelze vytvoøit"
-
-#: src/output.c:272
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "CHYBA: odlo¾enư vưstup nelze zapsat do doèasného souboru"
-
-#: src/output.c:356
-msgid "ERROR: Copying inserted file"
-msgstr "CHYBA: pøi zapisování vlo¾eného souboru"
-
-#: src/output.c:537
-msgid "ERROR: Reading inserted file"
-msgstr "CHYBA: pøi ètení vlo¾eného souboru"
-
-#: src/output.c:636
-msgid "Cannot stat diversion"
-msgstr "Chyba pøi volání funkce stat pro soubor obsahující odlo¾enư vưstup"
-
-#: src/output.c:639
-msgid "Diversion too large"
-msgstr ""
-
-# , c-format
-#: src/path.c:157
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "Hledán soubor `%s', nalezen soubor `%s'"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:175
-msgid "VMEM limit exceeded?\n"
-msgstr "Pøekroèen VMEM limit?\n"
-
-#: src/stackovf.c:197
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Neoprávńnư pøístup do paḿti (SIGSEGV). Jedná se buï o pøeteèení "
-"zásobníku,\n"
-"nebo o chybu "
-
-#: src/stackovf.c:202
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Prov́øte, zda se nejedná o nekoneènou rekurzi.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "VNITØNÍ CHYBA: ¹patnư mód pro symbol_lookup ()"
-
-# , c-format
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Jméno `%s' není známo\n"
-
-# , c-format
-#~ msgid "Undefined macro `%s'"
-#~ msgstr "Makro `%s' není definováno"
-
-# , c-format
-#~ msgid "Module search for `%s' found `%s'"
-#~ msgstr "Hledán modul `%s', nalezen modul `%s'"
diff --git a/po/de.gmo b/po/de.gmo
deleted file mode 100644
index d61f7983..00000000
--- a/po/de.gmo
+++ /dev/null
Binary files differ
diff --git a/po/de.po b/po/de.po
deleted file mode 100644
index f6c51f48..00000000
--- a/po/de.po
+++ /dev/null
@@ -1,507 +0,0 @@
-# German translation for the GNU m4 messages
-# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995
-# Martin von Löwis <martin@mira.isdn.cs.tu-berlin.de>, 1996
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: src/builtin.c:272
-#, 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
-#, 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
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Nicht-numerisches Argument in eingebauter Funktion `%s'"
-
-#: src/builtin.c:438
-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
-#, c-format
-msgid "Undefined name %s"
-msgstr "Name %s nicht definiert"
-
-#: src/builtin.c:636
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
-
-#: src/builtin.c:644
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in m4_dumpdef ()"
-
-#: src/builtin.c:695
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "Makro `%s' nicht definiert"
-
-#: src/builtin.c:735
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "INTERNER FEHLER: Falscher Symboltyp in m4_defn ()"
-
-#: src/builtin.c:772
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Kann keine `pipe' für Kommando `%s' öffnen"
-
-#: src/builtin.c:811
-#, 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
-msgid "Negative width to eval"
-msgstr "Negative Breite in `eval'"
-
-#: src/builtin.c:925
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Nicht-numerisches Argument in %s"
-
-#: src/builtin.c:937
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Kann Umleitung %s nicht aufheben"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "Kann %s nicht öffnen"
-
-#: src/builtin.c:1248
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Debug Modus: falsche Debug Flags: `%s'"
-
-#: src/builtin.c:1284
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Kann Fehlerdatei nicht vorbereiten: %s"
-
-#: src/builtin.c:1501
-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
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "Falscher regulärer Ausdruck `%s': %s"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Fehler beim Erkennen des regulären Ausdrucks `%s'"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden! (trace_pre "
-"())"
-
-#: src/debug.c:387
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens (trace_pre ())"
-
-#: src/eval.c:277
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "Falscher Ausdruck in `eval' (fehlende rechte Klammer): %s"
-
-#: src/eval.c:283
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "Falscher Ausdruck in `eval': %s"
-
-#: src/eval.c:288
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "Falscher Ausdruck in `eval' (falsche Eingabe): %s"
-
-#: src/eval.c:293
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "Falscher Ausdruck in `eval' (zu große Eingabe): %s"
-
-#: src/eval.c:298
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Division durch Null in `eval': %s"
-
-#: src/eval.c:303
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Modulo Null in `eval': %s"
-
-#: src/eval.c:308
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "INTERNER FEHLER: Falscher Fehlerkode in evaluate ()"
-
-#: src/eval.c:547
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "INTERNER FEHLER: Falscher Vergleichsoperator in cmp_term ()"
-
-#: src/eval.c:590
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "INTERNER FEHLER: Falscher Shift-Operator in shift_term ()"
-
-#: src/eval.c:674
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "INTERNER FEHLER: Falscher Operator in mult_term ()"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in freeze_one_symbol ()"
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "Erwarte Zeilenumbruch in eingefrorener Datei"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Erwarte Zeichen `%c' in eingefrorener Datei"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "Fehlerhafte eingefrorene Datei"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "Vorzeitiges Ende der eingefrorenen Datei"
-
-#: src/freeze.c:323
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr ""
-"`%s' aus eingefrorener Datei nicht in Tabelle der eingebauten Funktionen "
-"gefunden!"
-
-#: src/input.c:174
-#, c-format
-msgid "Input read from %s"
-msgstr "Eingabe gelesen von %s"
-
-#: src/input.c:231
-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
-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
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr ""
-"INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in next_char ()"
-
-# 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
-msgid "NONE"
-msgstr "NONE"
-
-#: src/input.c:777
-msgid "ERROR: EOF in string"
-msgstr "FEHLER: Dateiende in Zeichenkette"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "FEHLER: Keller voll. (Unendliche `define' Rekursion?)"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "`%s --help' zeigt weitere Informationen.\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "Aufruf: %s [OPTION]... [DATEI]...\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Notwendige bzw. optionale Argumente für Optionen der Langform sind auch \n"
-"für die Kurform notwendig bzw. optional.\n"
-"\n"
-"Operationsmodi:\n"
-" --help zeige diese Hilfe an und beende\n"
-" --version zeige Versionsinformation an und beende\n"
-" -e, --interactive keine Ausgabepufferung, ignoriere Interrupts\n"
-" -E, --fatal-warnings beende Ausführung nach erster Warnung\n"
-" -Q, --quiet, --silent unterdrücke Warnungen bei eingebauten "
-"Funktionen\n"
-" -P, --prefix-builtins erzwinge `m4_' Präfix für eingebaute "
-"Funktionen\n"
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr " -W, --word-regexp=REGEXP benutze REGEXP für Makronamensyntax\n"
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"Präprozessoreigenschaften:\n"
-" -I, --include=VERZEICHNIS durchsuche VERZEICHNIS als zweites bei "
-"`include'\n"
-" -D, --define=NAME[=WERT] füge NAME mit WERT (oder leer) ein\n"
-" -U, --undefine=NAME lösche eingebaute Funktion NAME\n"
-" -s, --synclines erzeuge `#line NR \"DATEI\"' Zeilen\n"
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"Setze Grenzen:\n"
-" -G, --traditional schalte alle GNU Erweiterungen aus\n"
-" -H, --hashsize=PRIMZAHL setze Größe der Symbol-Hashtabelle\n"
-" -L, --nesting-limit=NUMMER setze künstliche Grenze für "
-"Schachtelungstiefe\n"
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Eingefrorene Dateien:\n"
-" -F, --freeze-state=DATEI erzeuge am Ende eine eingefrorene Form in "
-"DATEI\n"
-" -R, --reload-state=DATEI lade zu Beginn Zustand von eingefrorener "
-"DATEI\n"
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] setze Debuglevel (keine FLAGS bedeutet "
-"`aeq')\\\n"
-" -t, --trace=NAME verfolge NAME, wenn er definiert wird\n"
-" -l, --arglength=NUMMER beschränke Größe bei Macroverfolgung\n"
-" -o, --error-output=DATEI leite Debug- und Verfolgungsausgaben nach "
-"DATEI\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"FLAGS ist Kombination aus folgendem:\n"
-" t verfolge alle Makroaufrufe, nicht nur die von `traceon'\n"
-" a zeige aktuelle Argumente\n"
-" e zeige Ausdehnung\n"
-" q setze Werte in Anführungszeichen, wenn nötig, mit a- oder e-Flag\n"
-" c zeige vor und nach `collect' und nach Aufruf an\n"
-" x zeige für jeden Aufruf eindeutige Nummer an, hilfreich bei -c\n"
-" f gebe Namen der aktuellen Eingabedatei aus\n"
-" l gebe aktuelle Zeilennummer der Eingabezeile aus\n"
-" p gebe Ergebnis der Pfadsuche aus\n"
-" i gebe Veränderungen der Eingabedatei aus\n"
-" V Kurzform für alle Flags oben zusammen\n"
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"Ohne DATEI oder wenn DATEI `-' ist, wird die Standardeingabe gelesen\n"
-
-#: src/m4.c:358
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "Falsche Debug Flags: `%s'"
-
-#: src/m4.c:437
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "INTERNER FEHLER: Falscher Kode in zurückgestellten Argumenten"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in expands_token ()"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "FEHLER: Dateiende in Argumentliste"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "INTERNER FEHLER: Falscher Typ des Tokens in expand_argument ()"
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "INTERNER FEHLER: Falsche Symboltyp in call_macro ()"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr ""
-"FEHLER: Grenze der Rekursion von %d überschritten, benutze -L<N> zur Änderung"
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "FEHLER: Kann keine temporäre Datei für Umleitung erzeugen"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "FEHLER: Kann Umleitung nicht in temporäre Datei ausgeben"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "FEHLER: Während Kopieren einer eingefügten Datei"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "FEHLER: Während Lesen einer eingefügten Datei"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr "Kann `stat' nicht auf Umleitung anwenden"
-
-#: src/path.c:131
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "Pfad für Suche nach `%s' hat `%s' gefunden"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "VMEM Beschränkung überschritten?\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Verletzung der Speichergrenzen festgestellt (SIGSEGV). Entweder ist ein\n"
-"Stacküberlauf aufgetreten, oder es gibt einen Fehler in "
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Untersuche auf mögliche unendliche Rekursion.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "INTERNER FEHLER: Illegaler Modus bei symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Name `%s' ist unbekannt\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Falscher regulärer Ausdruck: `%s': %s"
-
-#~ msgid "%s: option `%s' is ambiguous\n"
-#~ msgstr "%s: Option `%s' ist mehrdeutig\n"
-
-#~ msgid "%s: option `--%s' doesn't allow an argument\n"
-#~ msgstr "%s: Option `--%s' erlaubt kein Argument\n"
-
-#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
-#~ msgstr "%s: Option `%c%s' erlaubt kein Argument\n"
-
-#~ msgid "%s: option `%s' requires an argument\n"
-#~ msgstr "%s: Option `%s' verlangt ein Argument\n"
-
-#~ msgid "%s: unrecognized option `--%s'\n"
-#~ msgstr "%s: nicht erkannte Option `--%s'\n"
-
-#~ msgid "%s: unrecognized option `%c%s'\n"
-#~ msgstr "%s: nicht erkannte Option `%c%s'\n"
-
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: illegale Option -- %c\n"
-
-#~ msgid "%s: invalid option -- %c\n"
-#~ msgstr "%s: ungültige Options -- %c\n"
-
-#~ msgid "%s: option requires an argument -- %c\n"
-#~ msgstr "%s: Option verlangt ein Argument -- %c\n"
-
-# Der aktuelle Ausdruck ist NULL und vorher gab es auch noch keinen.
-#~ msgid "No previous regular expression"
-#~ msgstr "Regulärer Ausdruck fehlt"
-
-#~ msgid "Memory exhausted"
-#~ msgstr "Speicher voll"
diff --git a/po/el.gmo b/po/el.gmo
deleted file mode 100644
index 479d0010..00000000
--- a/po/el.gmo
+++ /dev/null
Binary files differ
diff --git a/po/el.po b/po/el.po
deleted file mode 100644
index 4dd6ed1d..00000000
--- a/po/el.po
+++ /dev/null
@@ -1,690 +0,0 @@
-# Greek messages for GNU m4.
-# Copyright (C) 1999 Free Software Foundation, Inc.
-# Simos Xenitellis <S.Xenitellis@rhbnc.ac.uk>, 1999.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU m4 1.4n\n"
-"POT-Creation-Date: 2000-01-10 05:27+0100\n"
-"PO-Revision-Date: 1999-06-24 00:25+0000\n"
-"Last-Translator: Simos Xenitellis <S.Xenitellis@rhbnc.ac.uk>\n"
-"Language-Team: Greek <nls@tux.hellug.gr>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-7\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: lib/getopt.c:677
-#, c-format
-msgid "%s: option `%s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:702
-#, c-format
-msgid "%s: option `--%s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:707
-#, c-format
-msgid "%s: option `%c%s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/getopt.c:725 lib/getopt.c:898
-#, c-format
-msgid "%s: option `%s' requires an argument\n"
-msgstr ""
-
-#. --option
-#: lib/getopt.c:754
-#, c-format
-msgid "%s: unrecognized option `--%s'\n"
-msgstr ""
-
-#. +option or -option
-#: lib/getopt.c:758
-#, c-format
-msgid "%s: unrecognized option `%c%s'\n"
-msgstr ""
-
-#. 1003.2 specifies the format of this message.
-#: lib/getopt.c:784
-#, c-format
-msgid "%s: illegal option -- %c\n"
-msgstr ""
-
-#: lib/getopt.c:787
-#, c-format
-msgid "%s: invalid option -- %c\n"
-msgstr ""
-
-#. 1003.2 specifies the format of this message.
-#: lib/getopt.c:817 lib/getopt.c:947
-#, c-format
-msgid "%s: option requires an argument -- %c\n"
-msgstr ""
-
-#: lib/getopt.c:864
-#, c-format
-msgid "%s: option `-W %s' is ambiguous\n"
-msgstr ""
-
-#: lib/getopt.c:882
-#, c-format
-msgid "%s: option `-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: lib/obstack.c:471
-msgid "memory exhausted"
-msgstr ""
-
-#: lib/regex.c:1019
-msgid "Success"
-msgstr ""
-
-#: lib/regex.c:1022
-msgid "No match"
-msgstr ""
-
-#: lib/regex.c:1025
-#, fuzzy
-msgid "Invalid regular expression"
-msgstr "ËÜèị̈ êáíïíéễ Ưêöñáóç `%s': %s"
-
-#: lib/regex.c:1028
-msgid "Invalid collation character"
-msgstr ""
-
-#: lib/regex.c:1031
-msgid "Invalid character class name"
-msgstr ""
-
-#: lib/regex.c:1034
-msgid "Trailing backslash"
-msgstr ""
-
-#: lib/regex.c:1037
-msgid "Invalid back reference"
-msgstr ""
-
-#: lib/regex.c:1040
-msgid "Unmatched [ or [^"
-msgstr ""
-
-#: lib/regex.c:1043
-msgid "Unmatched ( or \\("
-msgstr ""
-
-#: lib/regex.c:1046
-msgid "Unmatched \\{"
-msgstr ""
-
-#: lib/regex.c:1049
-msgid "Invalid content of \\{\\}"
-msgstr ""
-
-#: lib/regex.c:1052
-msgid "Invalid range end"
-msgstr ""
-
-#: lib/regex.c:1055 lib/xmalloc.c:82
-msgid "Memory exhausted"
-msgstr ""
-
-#: lib/regex.c:1058
-#, fuzzy
-msgid "Invalid preceding regular expression"
-msgstr "ÓöÜë́á óôï ôáßñéáó́á óôçí êáíïíéễ Ưêöñáóç `%s'"
-
-#: lib/regex.c:1061
-#, fuzzy
-msgid "Premature end of regular expression"
-msgstr "Đñüùñï ôƯëị̈ đáăù́Ưíïơ áñ÷åßïơ"
-
-#: lib/regex.c:1064
-#, fuzzy
-msgid "Regular expression too big"
-msgstr "ËÜèị̈ êáíïíéễ Ưêöñáóç `%s': %s"
-
-#: lib/regex.c:1067
-msgid "Unmatched ) or \\)"
-msgstr ""
-
-#: lib/regex.c:5564
-#, fuzzy
-msgid "No previous regular expression"
-msgstr "ÓöÜë́á óôï ôáßñéáó́á óôçí êáíïíéễ Ưêöñáóç `%s'"
-
-#: src/builtin.c:349
-#, c-format
-msgid "Warning: Too few arguments to built-in `%s'"
-msgstr "Đñïåéäïđïßçóç: Đïëư ëßăá ïñßó́áôá óôï åóùäḯḉƯíï `%s'"
-
-#: src/builtin.c:355
-#, c-format
-msgid "Warning: Excess arguments to built-in `%s' ignored"
-msgstr "Đñïåéäïđïßçóç: ÅđéđëƯïí ïñßó́áôá óôï åóùäḯḉƯíï `%s' áăíï̃èçêáí"
-
-#: src/builtin.c:383
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "̀ç-áñè́çôéêü üñéó́á óôï åóùäḯḉƯíï `%s'"
-
-#: src/builtin.c:494
-msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
-msgstr ""
-"ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôưđị̈ äåäḯƯíïơ áíôéêåé́Ưíïơ óôï define_macro ()"
-
-#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
-#, c-format
-msgid "Undefined name %s"
-msgstr "̀ç ïñéó́Ưíï üíḯá %s"
-
-#: src/builtin.c:721
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ÅóùäḯḉƯíï äå âñƯèçêå óôï đßíáêá åóùäḯḉƯíùí!"
-
-#: src/builtin.c:729
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôưđị̈ äåäḯƯíïơ áíôéêåé́Ưíïơ óôï m4_dumpdef ()"
-
-#: src/builtin.c:804
-#, fuzzy, c-format
-msgid "Undefined name `%s'"
-msgstr "̀ç ïñéó́Ưíï üíḯá %s"
-
-#: src/builtin.c:842
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôưđị̈ óớâüëïơ óôï m4_defn ()"
-
-#: src/builtin.c:908
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Áäơíá́ßá áíïßắáôị̈ óùë̃íùóç̣ óôçí åíôïë̃ `%s'"
-
-#: src/builtin.c:948
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Ç âÜóç óôçí áđïôß́çóç åßíáé åêôụ̈ ïñßïơ (âÜóç = %d)"
-
-#: src/builtin.c:957
-msgid "Negative width to eval"
-msgstr "Áñíçôéêü đëÜôị̈ óôçí áđïôß́çóç"
-
-#: src/builtin.c:1063
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "̀ç áñéè́çôéêü üñéó́á óôï %s"
-
-#: src/builtin.c:1075
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Áäơíá́ßá åđáíáöïñỤ̈ ôïơ %s"
-
-#: src/builtin.c:1223
-#, c-format
-msgid "Undefined syntax code %c"
-msgstr "̀ç ïñéó́Ưíị̈ ê₫äéêạ́ óưíôáîç̣ %c"
-
-#: src/builtin.c:1274 src/freeze.c:211
-#, c-format
-msgid "Cannot open %s"
-msgstr "Áäơíá́ßá áíïßắáôị̈ ôïơ %s"
-
-#: src/builtin.c:1483
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "ÊáôÜóôáóç áđïóöáë́Üôùóç̣: ëÜèị̈ óḉáßạ̊ áđïóöáë́Üôùóç̣: `%s'"
-
-#: src/builtin.c:1519
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Áäơíá́ßá ñưè́éóç̣ ôïơ áñ÷åßïơ óöáë́Üôùí: %s"
-
-#: src/builtin.c:1740
-msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
-msgstr ""
-"ĐÑÏÅÉÄÏĐÏÉÇÓÇ: Ôï \\0 èá åîáöáíéóôåß, êÜíåôå ÷ñ̃óç ôïơ \\& áíôßèåôá óôẹ́ "
-"áíôéêáôáóôÜóåẹ́"
-
-#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "ËÜèị̈ êáíïíéễ Ưêöñáóç `%s': %s"
-
-#: src/builtin.c:1812 src/builtin.c:1885
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "ÓöÜë́á óôï ôáßñéáó́á óôçí êáíïíéễ Ưêöñáóç `%s'"
-
-#: src/debug.c:380
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ÅóùäḯḉƯíï äåí âñƯèçêå óôï đßíáêá åóùäḯḉƯíùí! "
-"(trace_pre ())"
-
-#: src/debug.c:388
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôưđị̈ äåäḯƯíïơ áíôéêåé́Ưíïơ (trace_pre ())"
-
-#: src/eval.c:309
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "ËÜèị̈ Ưêöñáóç óôçí áđïôß́çóç (ëåßđåé äåîéÜ đáñƯíèåóç): %s"
-
-#: src/eval.c:315
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "ËÜèị̈ Ưêöñáóç óôçí áđïôß́çóç: %s"
-
-#: src/eval.c:320
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "ËÜèị̈ Ưêöñáóç óôçí áđïôß́çóç (ëÜèị̈ åßóïäị̈): %s"
-
-#: src/eval.c:325
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "ËÜèị̈ Ưêöñáóç óôçí áđïôß́çóç (ơđåñâïëéễ åßóïäị̈): %s"
-
-#: src/eval.c:330
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Äéáßñåóç ́å ́çäƯí óôçí áđïôß́çóç: %s"
-
-#: src/eval.c:335
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Ơđüëïéđï ́å ́çäƯí óôçí áđïôß́çóç: %s"
-
-#: src/eval.c:340
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ê₫äéêạ́ óöÜë́áôị̈ óôçí evaluate ()"
-
-#: src/eval.c:594
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôåëåóộ̃ óưăêñéóç̣ óôï cmp_term ()"
-
-#: src/eval.c:639
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôåëåóộ̃ ïëßóèçóç̣ óôï shift_term ()"
-
-#: src/eval.c:738
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôåëåóộ̃ óôï mult_term ()"
-
-#: src/freeze.c:119
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ÅóùäḯḉƯíï äå âñƯèçêå óôï đßíáêá åóùäḯḉƯíùí!"
-
-#: src/freeze.c:132
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr ""
-"ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ ôưđị̈ äåäḯƯíïơ áíôéêåé́Ưíïơ óôï freeze_one_symbol ()"
-
-#: src/freeze.c:163
-msgid "Expecting line feed in frozen file"
-msgstr "Áíá́åíüôáí `line feed' óôï đáăù́Ưíï áñ÷åßï"
-
-#: src/freeze.c:165
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Áíá́åíüôáí ÷áñáêỗñạ́ `%c' óôï đáăù́Ưíï áñ÷åßï"
-
-#: src/freeze.c:222
-msgid "Ill-formated frozen file"
-msgstr "Êáêü-́ïñöïđïéḉƯíï đáăù́Ưíï áñ÷åßï"
-
-#: src/freeze.c:277 src/freeze.c:293
-msgid "Premature end of frozen file"
-msgstr "Đñüùñï ôƯëị̈ đáăù́Ưíïơ áñ÷åßïơ"
-
-#: src/freeze.c:327
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr "ôï `%s' áđü đáăù́Ưíï áñ÷åßï äå âñƯèçêå óôïí đßíáêá åóùäḯḉƯíùí"
-
-#: src/input.c:318
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Ç åßóïäị̈ åđáíáöƯñèçêå óôï %s, ăñá́́̃ %d"
-
-#: src/input.c:346
-#, c-format
-msgid "Input read from %s"
-msgstr "Ç åßóïäị̈ áíáăí₫óôçêå áđü ôï %s"
-
-#: src/input.c:506
-msgid "INTERNAL ERROR: Recursive push_string!"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: Áíáäñḯéêü push_string!"
-
-#: src/input.c:623
-msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: Êáễ êë̃óç óôï init_macro_token ()"
-
-#: src/input.c:663
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: Áëëïßùóç óôïßâạ́ åéóüäïơ óôï next_char ()"
-
-#: src/input.c:700
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: Áëëïßùóç óôïßâạ́ åéóüäïơ óôï peek_input ()"
-
-#: src/input.c:805
-msgid "NONE"
-msgstr "ÊÁÍÅÍÁ"
-
-#: src/input.c:1199 src/input.c:1226
-msgid "ERROR: EOF in string"
-msgstr "ÓÖÁË̀Á: EOF óôï áëöáñéè́çôéêü"
-
-#: src/m4.c:119
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "ÓÖÁË̀Á: Ơđåñ÷åßëçóç óôïßâạ́. (Áíáäñḯ̃ áđåßñïơ âÜèïợ;)"
-
-#: src/m4.c:146
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Äïêé́Üóôå `%s --help' ăéá đåñéóóüôåñç âï̃èåéá.\n"
-
-#: src/m4.c:150
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "×ñ̃óç: %s [ÅĐÉËÏĂÇ]... [ÁÑ×ÅÉÏ]...\n"
-
-#: src/m4.c:151
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Ơđï÷ñåùôéêÜ ̃ đñïáéñåôéêÜ ïñßó́áôá óå ́áêñỰ åđéëïăỰ åßíáé ơđï÷ñåùôéêÜ ̃ "
-"đñïáéñåôéêÜ\n"
-"êáé ăéá ôç̣ óưíôḯạ̊ åđéëïăỰ åđßóåẹ́.\n"
-"\n"
-"ÊáôáóôÜóåẹ́ ëåéôïơñăßạ́:\n"
-" --help ǻöÜíéóç áơộ̃ ôç̣ âï̃èåéạ́ êáé Ưîïäị̈\n"
-" --version ǻöÜíéóç đëçñïöïñé₫í Ưêäïóç̣ êáé Ưîïäị̈\n"
-" -e, --interactive Ưîïäị̈ ÷ùñß̣ åíôá́éåơỗ, áăíüçóç äéáêïđ₫í\n"
-" -E, --fatal-warnings äéáêïđ̃ åêôƯëåóç̣ ́åôÜ áđü ôç đñ₫ôç "
-"đñïåéäïđïßçóç\n"
-" -Q, --quiet, --silent áđüêñơøç ́åñéê₫í đñïåéäïđïé̃óåùí óôá "
-"åóùäḯḉƯíá\n"
-" -P, --prefix-builtins åđéâïë̃ đñïèỨáôị̈ `m4_' óå üëá ôá "
-"åóùäḯḉƯíá\n"
-
-#: src/m4.c:164
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr ""
-" -W --word-regexp=ÊÁÍÅÊÖ ÷ñ̃óç ÊÁÍïíéệ̃ ¸ÊÖñáóç̣ óôï óơíôáêôéêü ôç̣ "
-"́áêñïåíôïẹ̈̃\n"
-
-#: src/m4.c:169
-msgid ""
-"\n"
-"Dynamic loading features:\n"
-" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
-" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
-msgstr ""
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"×áñáêôçñéóôéêÜ đñïåđåîåñăáóỗ:\n"
-" -I, --include=ÊÁÔÁËÏĂÏÓ øÜîé́ï ́åôÜ êáé óôï êáôÜëïăï áơôü ăéá "
-"đåñéëá́âáíǘåíá\n"
-" -D, --define=ÏÍÏ̀Á[=ÔÉ̀Ç] åéóáăùẵ Ïͼ́áôị̈ ́å ÔÉ̀Ç, ̃ êåíü\n"
-" -U, --undefine=ÏÍÏ̀Á äéáăñáö̃ åóùäḯḉƯíïơ Ïͼ̀Áôị̈\n"
-" -s, --synclines äḉéïơñăßá ăñá́́₫í `#line ÁÑÉÈ̀ÏÓ "
-"\"ÁÑ×ÅÉÏ\"'\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"¸ëåă÷ị̈ đåñéïñéó́₫í:\n"
-" -G, --traditional áđüêñơøç üëùí ôùí åđåêôÜóåùí GNU\n"
-" -H, --hashsize=ĐÑÙÔÏÓ ïñéó́ụ̈ ́åăƯèïợ đßíáêá áíáæ̃ôçóç̣ óớâüëïơ\n"
-" -L, --nesting-limit=ÁÑÉÈ̀ÏÓ áëëáẵ ôå÷íçôïư ïñßïơ öùëéáó́₫í\n"
-
-#: src/m4.c:191
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Áñ÷åßá đáăù́Ưíç̣ êáôÜóôáóç̣:\n"
-" -F, --freeze-state=ARXEIO äḉéïơñăßá đáăù́Ưíç̣ êáôÜóôáóç̣ óôï ÁÑ×ÅÉÏ "
-"óôï ôƯëị̈\n"
-" -R, --reload-state=ARXEIO öüñôù́á îáíÜ đáăù́Ưíç̣ êáôÜóôáóç̣ áđü ÁÑ×ÅÉÏ "
-"óôçí åêêßíçóç\n"
-
-#: src/m4.c:197
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Åêóöáë́Üôùóç:\n"
-" -d, --debug=[ÓÇ̀ÁÉÅÓ] ïñéó́ụ̈ åđéđƯäïơ åêóöáë́Üôùóç̣ (÷ùñß̣ ÓÇ̀ÁÉÅÓ "
-"ơđïíïåß `aeq')\n"
-" -t, --trace=ONOMA áíß÷íåơóç Ïͼ̀Áôị̈ üôáí áơôü èá ïñéóôåß\n"
-" -l, --arglength=ÁÑÉÈ̀ đåñéïñéó́ụ̈ ́åăƯèïợ áíß÷íåơóç̣ ́áêñïåíôïẹ̈̃\n"
-" -o, --error-output=ÁÑ×ÅÉÏ åđáíáêáôåưèơíóç åîüäïơ åêóöáë́Üôùóç̣ êáé "
-"áíß÷íåơóç̣\n"
-
-#: src/m4.c:205
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"ÓÇ̀ÁÉÅÓ ́đïñåß íá åßíáé ïđïéä̃đïôå áđü:\n"
-" t áíß÷íåơóç üëùí ôùí êë̃óåùí ôùí ́áêñïåíôïë₫í, ü÷é ́üíï áơôỰ đïơ Ư÷ïơí "
-"ïñéóôåß\n"
-" a ǻöÜíéóç đñáắáôéê₫í ïñéó́Üôùí\n"
-" e ǻöÜíéóç áíÜđôơîç̣\n"
-" q đáñÜèåóå ôé́Ự üđụ̀ ÷ñåéÜæåôáé, ́å ôẹ́ óḉáßạ̊ a ̃ e\n"
-" c ǻöÜíéóç đñéí ôç óơëëïẵ, ́åôÜ ôç óơëëïẵ êáé ́åôÜ ôç êë̃óç\n"
-" x đñüóèåóç ́ïíáäéệ̃ ôáơôüôçôạ́ êë̃óç̣ ́áêñïåíôïẹ̈̃, ÷ñ̃óé́ï ́å ôç "
-"óḉáßá c\n"
-" f ǻöÜíéóç ôñƯ÷ïíôị̈ ïíǘáôị̈ áñ÷åßïơ åéóüäïơ\n"
-" l ǻöÜíéóç áñéè́ü ôñå÷ïưóç̣ ăñạ́́́̃ åéóüäïơ\n"
-" p ǻöÜíéóç áđïôåëåó́Üôùí áđü Ưñåơíạ̊ óôï ́ïíïđÜôé\n"
-" i ǻöÜíéóç áëëáă₫í óôá áñ÷åßá åéóüäïơ\n"
-" V óơíôḯïăñáößá ăéá üëạ̊ ôẹ́ đáñáđÜíù óḉáßạ̊\n"
-
-#: src/m4.c:220
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"×ùñß̣ ÁÑ×ÅÉÏ, ̃ üôáí ôï áñ÷åßï åßíáé ôï -, áíÜăíùóç áđü ôçí êáíïíéễ "
-"åßóïäï.\n"
-
-#: src/m4.c:225
-msgid ""
-"\n"
-"Report bugs to <bug-m4@gnu.org>.\n"
-msgstr ""
-"\n"
-"ÁíáöƯñáôå óöÜë́áôá óôï <bug-m4@gnu.org>.\n"
-
-#: src/m4.c:414
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "ËÜèị̈ óḉáßạ̊ åêóöáë́Üôùóç̣: `%s'"
-
-#: src/m4.c:436
-#, c-format
-msgid "ERROR: failed to add search directory `%s'"
-msgstr ""
-
-#: src/m4.c:440
-#, c-format
-msgid "ERROR: failed to add search directory `%s': %s"
-msgstr ""
-
-#: src/m4.c:460
-msgid " (options:"
-msgstr " (åđéëïăỰ:"
-
-#: src/m4.c:542
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ êùäéêụ̈ óôá áíáöåñǘåíá ïñßó́áôá"
-
-#: src/macro.c:97
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ åßäị̈ áíôéêåé́Ưíïơ óôï expand_token ()"
-
-#: src/macro.c:163
-msgid "ERROR: EOF in argument list"
-msgstr "ÓÖÁË̀Á: EOF óôç ëßóôá ïñéó́Üôùí"
-
-#: src/macro.c:182
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ åßäị̈ áíôéêåé́Ưíïơ óôï expand_argument ()"
-
-#: src/macro.c:259
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: ËÜèị̈ åßäị̈ óớâüëïơ óôï call_macro ()"
-
-#: src/macro.c:288
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr ""
-"ÓÖÁË̀Á: Ôï üñéï áíáäñị̈́̃ %d îåđåñÜóôçêå, êÜíôå ÷ñ̃óç ôïơ -L<N> ăéá íá ôï "
-"áëëÜîåôå"
-
-#: src/module.c:123
-#, fuzzy, c-format
-msgid "ERROR: failed to initialise modules: %s"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s': %s"
-
-#: src/module.c:221
-#, fuzzy, c-format
-msgid "ERROR: cannot find module: `%s'"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s'"
-
-#: src/module.c:224
-#, fuzzy, c-format
-msgid "ERROR: cannot find module: `%s': %s"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s': %s"
-
-#: src/module.c:274
-#, fuzzy
-msgid "ERROR: cannot close modules"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s'"
-
-#: src/module.c:277
-#, fuzzy, c-format
-msgid "ERROR: cannot cannot close modules: %s"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s': %s"
-
-#: src/module.c:284
-#, fuzzy, c-format
-msgid "ERROR: cannot close module: `%s'"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s'"
-
-#: src/module.c:288
-#, fuzzy, c-format
-msgid "ERROR: cannot cannot close module: `%s': %s"
-msgstr "ÓÖÁË̀Á: áäơíá́ßá åưñåóç̣ Üñèñùóç̣ `%s': %s"
-
-#: src/output.c:262
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "ÓÖÁË̀Á: Áäơíá́ßá äḉéïơñăßạ́ đñïóùñéíïư áñ÷åßïơ ăéá áëëáẵ"
-
-#: src/output.c:272
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "ÓÖÁË̀Á: Áäơíá́ßá áđïóôïẹ̈̃ áëëáặ̃ óôï đñïóùñéíü áñ÷åßï"
-
-#: src/output.c:356
-msgid "ERROR: Copying inserted file"
-msgstr "ÓÖÁË̀Á: Áíôéăñáẵ åéóåñ÷ḯƯíïơ áñ÷åßïơ"
-
-#: src/output.c:537
-msgid "ERROR: Reading inserted file"
-msgstr "ÓÖÁË̀Á: ÁíÜăíùóç åéóåñ÷ḯƯíïơ áñ÷åßïơ"
-
-#: src/output.c:636
-msgid "Cannot stat diversion"
-msgstr "Áäơíá́ßá đñïóđƯëáóç̣ ôïơ áñ÷åßïơ ôç̣ áëëáặ̃"
-
-#: src/output.c:639
-msgid "Diversion too large"
-msgstr ""
-
-#: src/path.c:157
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "Ï Ưëåă÷ị̈ ́ïíïđáôéïư ăéá ôï `%s' âñ̃êå `%s'"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:175
-msgid "VMEM limit exceeded?\n"
-msgstr "Ôï üñéï ôç̣ åéêïíéễ ́í̃́ç̣ åîáíôë̃èçêå;\n"
-
-#: src/stackovf.c:197
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Åíôïđßóôçêå đáñÜâáóç ôùí ïñßùí ́í̃́ç̣ (SIGSEGV). Åßôå Ưăéíå ơđƯñâáóç "
-"óôïßâạ́\n"
-"åßôå ơđÜñ÷åé óöÜë́á đñïăñǗ́áôị̈ óôï "
-
-#: src/stackovf.c:202
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". ÅëƯăîáôå ăéá đéèáí̃ åđ'Üđåéñï áíáäñḯ̃.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "ÅÓÙÔÅÑÉÊÏ ÓÖÁË̀Á: Áíôéêáíïíéễ êáôÜóôáóç óôï symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Ôï üíḯá `%s' åßíáé Üăíùóôï\n"
-
-#~ msgid "Undefined macro `%s'"
-#~ msgstr "̀ç ïñéó́Ưíç ́áêñïåíôïë̃ `%s'"
-
-#~ msgid "Module search for `%s' found `%s'"
-#~ msgstr "Ç Ưñåơíá Üñèñùóç̣ ăéá `%s' âñ̃êå `%s'"
diff --git a/po/fr.gmo b/po/fr.gmo
deleted file mode 100644
index 8707d3ea..00000000
--- a/po/fr.gmo
+++ /dev/null
Binary files differ
diff --git a/po/fr.po b/po/fr.po
deleted file mode 100644
index 85b66092..00000000
--- a/po/fr.po
+++ /dev/null
@@ -1,468 +0,0 @@
-# French messages for GNU m4.
-# Copyright (C) 1998 Free Software Foundation, Inc.
-# Erick Branderhorst <Erick.Branderhorst@asml.nl>, 1998,
-# created this file based on fr.msg, which was created by:
-# Franc,ois Pinard <pinard@iro.umontreal.ca> 199(4-7).
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4d\n"
-"POT-Creation-Date: 1998-05-25 12:26+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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: src/builtin.c:272
-#, 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
-#, 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
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Argument non-numérique pour «%s» prédéfini"
-
-#: src/builtin.c:438
-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
-#, c-format
-msgid "Undefined name %s"
-msgstr "Nom «%s» non-défini"
-
-#: src/builtin.c:636
-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
-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
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "Macro «%s» non-défini"
-
-#: src/builtin.c:735
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "ERREUR INTERNE: Mauvais type de symbole dans m4_defn ()"
-
-#: src/builtin.c:772
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Incapable d'ouvrir un «pipe» pour la commande «%s»"
-
-#: src/builtin.c:811
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Base hors intervalle dans «eval» (base = %d)"
-
-#: src/builtin.c:820
-msgid "Negative width to eval"
-msgstr "Largeur négative dans «eval»"
-
-#: src/builtin.c:925
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Argument non-numérique pour %s"
-
-#: src/builtin.c:937
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Incapble de ramener la diversion %s"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "Incapable d'ouvrir %s"
-
-#: src/builtin.c:1248
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Debugmode: mauvais indicateurs de mise-au-point: «%s»"
-
-#: src/builtin.c:1284
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Incapable de préparer le fichier d'erreurs: %s"
-
-#: src/builtin.c:1501
-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
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "Mauvaise expression régulière «%s»: %s"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Erreur d'appariement pour l'expressio régulière «%s»"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"ERREUR INTERNE: Prédéfini introuvable dans la table des prédéfinis! "
-"(trace_pre ())"
-
-#: src/debug.c:387
-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
-#, 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
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "Mauvaise expression dans «eval»: %s"
-
-#: src/eval.c:288
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "Mauvaise expression dans «eval» (mauvaise entrée): %s"
-
-#: src/eval.c:293
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "Mauvaise expression dans «eval» (entrée superflue): %s"
-
-#: src/eval.c:298
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Division par zéro dans «eval»: %s"
-
-#: src/eval.c:303
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Module par zéro dans «eval»: %s"
-
-#: src/eval.c:308
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "ERREUR INTERNE: Mauvais code d'erreur dans evaluate ()"
-
-#: src/eval.c:547
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "ERREUR INTERNE: Mauvais opérateur de comparaison dans cmp_term ()"
-
-#: src/eval.c:590
-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
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "ERREUR INTERNE: Mauvais opérateur dans mult_term ()"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "ERREUR INTERNE: Prédéfini introuvable dans la table des prédéfinis!"
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr ""
-"ERREUR INTERNE: Mauvais type de donnée pour lexème dans freeze_one_symbol ()"
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "Fin-de-ligne attendue du fichier figé"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Caractère «%c» attendu du fichier figé"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "Fichier figé difforme"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "Fin prématurée de fichier figé"
-
-#: src/freeze.c:323
-#, c-format
-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
-#, c-format
-msgid "Input read from %s"
-msgstr "Entrée lue de %s"
-
-#: src/input.c:231
-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
-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
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "ERREUR INTERNE: Pile d'entrée douteuse dans next_char ()"
-
-#: src/input.c:550
-msgid "NONE"
-msgstr "AUCUN"
-
-#: src/input.c:777
-msgid "ERROR: EOF in string"
-msgstr "ERREUR: Fin-de-fichier dans la chaîne"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "ERREUR INTERNE: Mauvais type de lexème dans expand_token ()"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Pour plus d'information, essayez «%s --help».\\n\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "Usage: %s [OPTION]... [FICHIER]...\\n\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Les arguments obligatoires ou optionnels pour la forme longue des\n"
-"options sont aussi obligatoires ou optionnels pour les formes courtes\n"
-"qui leur correspondent.\n"
-"\n"
-"Modes d'opération:\n"
-" --help fournir ce message d'aide, puis terminer\n"
-" --version identifier le programme, puis terminer\n"
-" -e, --interactive ne pas tamponner, ignorer les interruptions\n"
-" -E, --fatal-warnings terminer l'exécution après le moindre "
-"message\n"
-" -Q, --quiet, --silent inhiber certains diagnostics prédéfinis\n"
-" -P, --prefix-builtins préfixer tous les prédéfinis par «m4_»\n"
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr ""
-" -W, --word-regexp=REGEXP utiliser REGEXP pour les noms de macro\n"
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"Capacités de préprocesseur:\n"
-" -I, --include=REPERTOIRE ensuite fouiller ce répertoire d'inclusions\n"
-" -D, --define=NOM[=VALEUR] définir NOM comme ayant VALEUR (ou vide)\n"
-" -U, --undefine=NOM éliminer le NOM prédéfini\n"
-" -s, --synclines engendrer des lignes «#line NNN "
-"\\\"FICHIER\\\"»\n"
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"Contrôle des limites:\n"
-" -G, --traditional inhiber toutes les extensions GNU\n"
-" -H, --hashsize=PREMIER choisir la grandeur de la table de symboles\n"
-" -L, --nesting-limit=NOMBRE modifier la limite artificielle "
-"d'imbrication\n"
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Fichiers d'état figé:\n"
-" -F, --freeze-state=FICHIER produire un FICHIER figé à la fin\n"
-" -R, --reload-state=FICHIER recharger un FICHIER figé au départ\n"
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Mise-au-point:\n"
-" -d, --debug=[INDICS] niveau de mise-au-point (implicitement "
-"«aeq»)\n"
-" -t, --trace=NOM tracer NOM lorsqu'il sera défini\n"
-" -l, --arglength=NOMBRE restreindre la grandeur de trace des macros\n"
-" -o, --error-output=FICHIER rediriger la sortie de trace et "
-"mise-au-point\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"INDICS est une combinaison de:\n"
-" t tracer tous les appels de macro, pas uniquement les «traceon»\n"
-" a afficher les arguments véritables\n"
-" e afficher le résultat de l'expension\n"
-" q mettre entre guillemets lorsque necessaire, avec indics «a» ou «e»\n"
-" c afficher avant et après la collecte, puis après l'appel\n"
-" x ajouter une identification unique, utile avec l'indicateur «c»\n"
-" f donner le nom courant du fichier d'entrée\n"
-" l donner le numéro de la ligne d'entrée\n"
-" p afficher les résultats des fouilles de chemin\n"
-" i afficher les modifications dans les fichiers d'entrée\n"
-" V abbréviation commode pour toutes les options précédentes à la fois\n"
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"Si aucun FICHIER ou si FICHIER vaut «-», lit l'entrée standard.\n"
-
-#: src/m4.c:355
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "Mauvais indicateurs de mise-au-point: «%s»"
-
-#: src/m4.c:434
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "ERREUR INTERNE: Mauvais code dans les arguments différés"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "ERREUR: Débordement de pile. (Récursion hors contrôle sur «define»?)"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "ERREUR: Fin-de-fichier dans la liste d'arguments"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr ""
-"ERREUR INTERNE: Mauvais type de données pour lexème dans expand_argument ()"
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "ERREUR INTERNE: Mauvais type de symbole dans call_macro ()"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr "ERREUR: Limite de récursion %d dépassée, la changer par -L<N>"
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "ERREUR: Incapable de créer un fichier temporaire pour la diversion"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "ERREUR: Incapable de vider la diversion sur un fichier temporaire"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "ERREUR: Pendant la copie du fichier inséré"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "ERREUR: Pendant la lecture d'un fichier inséré"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr "Incapable d'opérer «stat» pour la diversion"
-
-#: src/path.c:131
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "La fouille du chemin pour «%s» trouve «%s»"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "Limit VMEM outrepassée?\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Les violations de mémoire sont détectées (SIGSEGV). Ou bien la pile a\n"
-"débordé, ou bien il y a un problème dans "
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Vérifier une récursion hors contrôle.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "ERREUR INTERNE: Mode illégal dans symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Le nom «%s» est inconnu\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Mauvaise expression régulière: «%s»: %s"
diff --git a/po/it.gmo b/po/it.gmo
deleted file mode 100644
index 106f8cc8..00000000
--- a/po/it.gmo
+++ /dev/null
Binary files differ
diff --git a/po/it.po b/po/it.po
deleted file mode 100644
index cbc04699..00000000
--- a/po/it.po
+++ /dev/null
@@ -1,406 +0,0 @@
-msgid ""
-msgstr ""
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
-"Version: \n"
-"Date: 1995-06-30 21:00:12+0200\n"
-"From: Ulrich Drepper <drepper@myware>\n"
-"Xgettext-Options: --default-domain=m4 --output-dir=. --add-comments "
-"--keyword=_\n"
-"Files: ../src/builtin.c ../src/debug.c ../src/eval.c ../src/freeze.c\n"
-"Files: ../src/input.c ../src/m4.c ../src/macro.c ../src/output.c\n"
-"Files: ../src/path.c ../src/stackovf.c ../src/symtab.c ../lib/getopt.c\n"
-"Files: ../lib/regex.c ../lib/xmalloc.c\n"
-"Update on Fri Jun 30 21:00:27 MET 1995 \n"
-
-#: src/builtin.c:272
-#, 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
-#, 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
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Argumento non numerico a funzione predefinita `%s'"
-
-#: src/builtin.c:438
-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
-#, c-format
-msgid "Undefined name %s"
-msgstr "Nome `%s' non definito"
-
-#: src/builtin.c:636
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr ""
-
-#: src/builtin.c:644
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr ""
-
-#: src/builtin.c:695
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "Macro `%s' non definita"
-
-#: src/builtin.c:735
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "ERRORE INTERNO: Tipo simbolo errato in m4_defn ()"
-
-#: src/builtin.c:772
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Impossibile aprire una `pipe' per il comando `%s'"
-
-#: src/builtin.c:811
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Base fuori intervallo in `eval' (base = %d)"
-
-#: src/builtin.c:820
-msgid "Negative width to eval"
-msgstr "Larghezza negativa in `eval'"
-
-#: src/builtin.c:925
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Argumento non numerico a %s"
-
-#: src/builtin.c:937
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Impossibile ripristinare la deviazione %s"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "Impossibile aprire %s"
-
-#: src/builtin.c:1248
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Modalità di debug: indicatori di debug errati: `%s'"
-
-#: src/builtin.c:1284
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Impossibile aprire l' archivio di errore: %s"
-
-#: src/builtin.c:1501
-msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
-msgstr ""
-
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "Espressione regolare errata `%s': %s"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Errore nel confronto dell' espressione regolare `%s'"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-
-#: src/debug.c:387
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr ""
-
-#: src/eval.c:277
-#, 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
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "Espressione errata in `eval': %s"
-
-#: src/eval.c:288
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "Espressione errata in `eval' (testo errato): %s"
-
-#: src/eval.c:293
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "Espressione errata in `eval' (testo in eccesso): %s"
-
-#: src/eval.c:298
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Divisione per zero in `eval': %s"
-
-#: src/eval.c:303
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Modulo zero in `eval': %s"
-
-#: src/eval.c:308
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "ERRORE INTERNO: Code di errore errato in evaluate ()"
-
-#: src/eval.c:547
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr ""
-
-#: src/eval.c:590
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr ""
-
-#: src/eval.c:674
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "ERRORE INTERNO: Operatore errato in mult_term ()"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr ""
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr ""
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "Atteso il carattere di fine linea in archivio congelato"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Atteso il carattere `%c' in archivio congelato"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "Archivio congelato malformato"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "Fine prematura dell' archivio congelato"
-
-#: src/freeze.c:323
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr ""
-
-#: src/input.c:174
-#, c-format
-msgid "Input read from %s"
-msgstr "Errore di lettura da %s"
-
-#: src/input.c:231
-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
-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
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "ERRORE INTERNO: Stack di ingresso corrotto in next_char ()"
-
-#: src/input.c:550
-msgid "NONE"
-msgstr "NESSUNO"
-
-#: src/input.c:777
-msgid "ERROR: EOF in string"
-msgstr "ERRORE: Fine prematura di una stringa"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "ERRORE: Stack overflow. (Ricorsione infinita in `define'?)"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Per ulteriori informazioni provare `%s --help'.\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "Usage: %s [OPZIONE]... [ARCHIVIO]...\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr ""
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-
-#: src/m4.c:358
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "Indicatori di debug errati: `%s'"
-
-#: src/m4.c:437
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "ERRORE INTERNO: Codice errato in argomenti differiti"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "ERRORE INTERNO: Tipo `token' errato in expand_token ()"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "ERRORE: Fine prematura della lista di argomenti"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr ""
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "ERRORE INTERNO: Tipo simbolo errato in call_macro ()"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr ""
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "ERRORE: Impossibile creare un archivio temporaneo per la deviazione"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "ERRORE: Impossibile terminare la deviazione su file temporaneo"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "ERRORE: Copiando archivio inserito"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "ERRORE: Leggendo archivio inserito"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr "Impossibile effettuare la `stat' per la deviazione"
-
-#: src/path.c:131
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "La ricerca del percorso per `%s' ha trovato `%s'"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "Limite di VMEM superato?\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Controllare una possibile ricorsione infinita.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "ERRORE INTERNO: Modo illegale in symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Il nome `%s' è sconosciuto\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Espressione regolare errata: `%s': %s"
diff --git a/po/ja.gmo b/po/ja.gmo
deleted file mode 100644
index da665805..00000000
--- a/po/ja.gmo
+++ /dev/null
Binary files differ
diff --git a/po/ja.po b/po/ja.po
deleted file mode 100644
index f5bf54dd..00000000
--- a/po/ja.po
+++ /dev/null
@@ -1,515 +0,0 @@
-# Japanese messages for GNU m4.
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Akiko Matsushita <matusita@sra.co.jp>, 1996.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=EUC\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: src/builtin.c:272
-#, c-format
-msgid "Warning: Too few arguments to built-in `%s'"
-msgstr "·Ù¹đ¡§%s ¤Ø¤Î°ú¿ô¤¬ÉÔ­¤·¤Æ¤¤¤̃¤¹¡£"
-
-#: src/builtin.c:278
-#, c-format
-msgid "Warning: Excess arguments to built-in `%s' ignored"
-msgstr "·Ù¹đ¡§%s ¤Ø¤Î°ú¿ô¤¬Â¿²á¤®¤̃¤¹ (Ķ¤¨¤¿Ê¬¤Ï̀µ»ë¤µ¤́¤̃¤¹)¡£"
-
-#: src/builtin.c:298
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "`%s' ¤Ë¿ô»ú¤Ç¤Ê¤¤°ú¿ô¤¬ÅϤµ¤́¤Æ¤¤¤̃¤¹¡£"
-
-#: src/builtin.c:438
-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
-#, c-format
-msgid "Undefined name %s"
-msgstr "`%s' ¤ÏÄêµÁ¤µ¤́¤Æ¤¤¤̃¤»¤ó¡£"
-
-#: src/builtin.c:636
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "ÆâÉô¥¨¥é¡¼¡§`Built-in' ¤È¤¤¤¦¥Ó¥ë¥È¥¤¥ó¥̃¥¯¥í¤Ï¤¢¤ê¤̃¤»¤ó¡£"
-
-#: src/builtin.c:644
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô m4_dumpdef () ¤Î¥È¡¼¥¯¥ó¥Ç¡¼¥¿¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-
-#: src/builtin.c:695
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "¥̃¥¯¥í `%s' ¤ÏÄêµÁ¤µ¤́¤Æ¤¤¤̃¤»¤ó¡£"
-
-#: src/builtin.c:735
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô m4_defn () Æâ¤Î¥·¥ó¥Ü¥ë¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-
-#: src/builtin.c:772
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "¥³¥̃¥ó¥É `%s' ¤Ø¤Î¥Ñ¥¤¥×¤¬¥ª¡¼¥×¥ó¤Ç¤­¤̃¤»¤ó¡£"
-
-#: src/builtin.c:811
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "eval ¤Î´đ¿ô ( %d ¿ÊË¡) ¤Î·å¿ô¤¬µöÍÆÈϰϳ°¤Ë¤¢¤ê¤̃¤¹¡£"
-
-#: src/builtin.c:820
-msgid "Negative width to eval"
-msgstr "eval ¤Î½ĐÎÏ·å¿ô¤¬Éé¿ô¤Ë¤Ê¤Ă¤Æ¤¤¤̃¤¹¡£"
-
-#: src/builtin.c:925
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "`%s' ¤Ë¿ô»ú¤Ç¤Ê¤¤°ú¿ô¤¬ÅϤµ¤́¤Æ¤¤¤̃¤¹¡£"
-
-#: src/builtin.c:937
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "`%s' ¤̣ undivert ¤Ç¤­¤̃¤»¤ó¡£"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "`%s' ¤̣¥ª¡¼¥×¥ó¤Ç¤­¤̃¤»¤ó¡£"
-
-#: src/builtin.c:1248
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "debugmode ¥̃¥¯¥í¤Ë¤ª¤¤¤Æ %s ¤ÏÉÔÀµ¤Ê¥Ç¥Đ¥Ă¥°¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£"
-
-#: src/builtin.c:1284
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "`%s' ¤̣¥¨¥é¡¼¥í¥°¥Ơ¥¡¥¤¥ë¤È¤·¤Æ¥»¥Ă¥È¤Ç¤­¤̃¤»¤ó¡£"
-
-#: src/builtin.c:1501
-msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
-msgstr "·Ù¹đ¡§\\0 ¤Ïµ́¼°¤ÎÍÑË¡¤Ç¤¹¡£\\& ¤̣Âå¤ï¤ê¤Ë»È¤Ă¤Æ²¼¤µ¤¤¡£"
-
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "`%s' : %s ¤Ï¡¢ÉÔÀµ¤ÊÀµµ¬É½¸½¤Ç¤¹¡£"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Àµµ¬É½¸½ %s ¤Î¥̃¥Ă¥Á¥ó¥°¤Ë¼ºÇÔ¤·¤̃¤·¤¿¡£"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"ÆâÉô¥¨¥é¡¼¡§`Builtin' ¤È¤¤¤¦¥Ó¥ë¥È¥¤¥ó¥̃¥¯¥í¤Ï¤¢¤ê¤̃¤»¤ó¡£\n"
-" (´Ø¿ô trace_pre () ¤¬¤³¤Î¥¨¥é¡¼¥á¥Ă¥»¡¼¥¸¤̣½Đ¤·¤Æ¤¤¤̃¤¹¡£) "
-
-#: src/debug.c:387
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr ""
-"ÆâÉô¥¨¥é¡¼¡§¥È¡¼¥¯¥ó¥Ç¡¼¥¿¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£\n"
-" (´Ø¿ô trace_pre () ¤¬¤³¤Î¥¨¥é¡¼¥á¥Ă¥»¡¼¥¸¤̣½Đ¤·¤Æ¤¤¤̃¤¹¡£)"
-
-#: src/eval.c:277
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "eval ¤Ç %s ¤È¤¤¤¦ÉÔÀµ¤Êɽ¸½¤¬ÍѤ¤¤é¤́¤Æ¤¤¤̃¤¹ (ÊĤ¸³ç¸̀¤¬¤¢¤ê¤̃¤»¤ó)¡£"
-
-#: src/eval.c:283
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "eval ¤Ç %s ¤È¤¤¤¦ÉÔÀµ¤Ê¼°¤¬ÍѤ¤¤é¤́¤Æ¤¤¤̃¤¹¡£"
-
-#: src/eval.c:288
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr ""
-"eval ¤Ç `%s' ¤È¤¤¤¦ÉÔÀµ¤Êɽ¸½¤¬ÍѤ¤¤é¤́¤Æ¤¤¤̃¤¹ \n"
-" (Æ₫Îϥǡ¼¥¿¤¬Àµ¤·¤¯¤¢¤ê¤̃¤»¤ó)¡£"
-
-#: src/eval.c:293
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "eval ¤Ç %s ¤È¤¤¤¦ÉÔÀµ¤Ê¼°¤¬ÍѤ¤¤é¤́¤Æ¤¤¤̃¤¹ (Æ₫Îϥǡ¼¥¿¤¬Â¿²á¤®¤̃¤¹)¡£"
-
-#: src/eval.c:298
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "`%s' ¤È¤¤¤¦É½¸½¤Ç¡¢0 ¤Ë¤è¤ë³ä»»¤¬¹Ô¤ï¤́¤Æ¤¤¤̃¤¹¡£"
-
-#: src/eval.c:303
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "`%s' ¤È¤¤¤¦ eval ¤Ç¡¢´đ¿ô¤¬ 0 ¤Ë¤Ê¤Ă¤Æ¤¤¤̃¤¹¡£"
-
-#: src/eval.c:308
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô evaluate () Æâ¤Î¥¨¥é¡¼¥³¡¼¥É¤¬ÉÔÀµ¤Ç¤¹¡£"
-
-#: src/eval.c:547
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô cmp_term () ¤ÎÈæ³Ó±é»»»̉¤¬ÉÔÀµ¤Ç¤¹¡£"
-
-#: src/eval.c:590
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§shift_term () ¤Î¥·¥Ơ¥È±é»»»̉¤¬ÉÔÀµ¤Ç¤¹¡£"
-
-#: src/eval.c:674
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô mult_term () Æâ¤Î±é»»»̉¤¬ÉÔÀµ¤Ç¤¹¡£"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "ÆâÉô¥¨¥é¡¼¡§`Built-in' ¤È¤¤¤¦¥Ó¥ë¥È¥¤¥ó¥̃¥¯¥í¤Ï¤¢¤ê¤̃¤»¤ó¡£"
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr ""
-"ÆâÉô¥¨¥é¡¼¡§´Ø¿ô freeze_one_symbol () ¤Î¥È¡¼¥¯¥ó¥Ç¡¼¥¿¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "Åà·ë¥Ơ¥¡¥¤¥ëÆâ¤Ç²₫¹Ô¥³¡¼¥É¤̣´üÂÔ¤·¤Æ¤¤¤̃¤¹¡£"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Åà·ë¥Ơ¥¡¥¤¥ëÆâ¤Çʸ»ú `%c' ¤̣´üÂÔ¤·¤Æ¤¤¤̃¤¹¡£"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "ÆâÉô¥¨¥é¡¼¡§Åà·ë¥Ơ¥¡¥¤¥ë¤Î¥Ơ¥©¡¼¥̃¥Ă¥È¤¬ÉÔÀµ¤Ç¤¹¡£"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "Åà·ë¥Ơ¥¡¥¤¥ë¤Î EOF ¤¬Á᤯Íè²á¤®¤Æ¤¤¤̃¤¹¡£"
-
-#: src/freeze.c:323
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr "Åà·ë¥Ơ¥¡¥¤¥ë¤Î %s ¤Ï¥Ó¥ë¥È¥¤¥ó¥³¥̃¥ó¥É¤Î¥Æ¡¼¥Ö¥ë¤Ë¤Ï¤¢¤ê¤̃¤»¤ó¡£"
-
-#: src/input.c:174
-#, c-format
-msgid "Input read from %s"
-msgstr "%s ¤«¤é¤ÎÆ₫ÎϤ̣Æɤ߹₫¤ß¤̃¤¹¡£"
-
-#: src/input.c:231
-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
-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
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô next_char () Æâ¤Ç¥¹¥¿¥Ă¥¯¤ÎÆ₫ÎϤ˼ºÇÔ¤·¤Æ¤¤¤̃¤¹¡£"
-
-#: src/input.c:550
-msgid "NONE"
-msgstr "¤Ê¤·"
-
-#: src/input.c:777
-msgid "ERROR: EOF in string"
-msgstr "¥¨¥é¡¼: ʸ»úÎóÆâ¤Ë¥Ơ¥¡¥¤¥ë¤Î½ªĂ¼µ­¹æ¤¬¤¢¤ê¤̃¤¹¡£"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr ""
-"¥¨¥é¡¼: ¥¹¥¿¥Ă¥¯¤¬¥ª¡¼¥Đ¡¼¥Ơ¥í¡¼¤̣µ¯¤³¤·¤Æ¤¤¤̃¤¹¡£\n"
-" (̀µ¸Â¤ËºÆµ¢ÅªÄêµÁ¤̣¤·¤Æ¤¤¤̃¤»¤ó¤«¡©)"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "¾Ü¤·¤¯¤Ï `%s --help' ¤Î½ĐÎϤ̣¸æÍ÷²¼¤µ¤¤¡£\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "»ÈÍÑÊưË¡: %s [¥ª¥×¥·¥ç¥ó]...[¥Ơ¥¡¥¤¥ë̀¾]\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Ť¤¥ª¥×¥·¥ç¥ó¤¬¼è¤ëɬ¿Ü°ú¿ô¤ª¤è¤ÓÁªẬ²Äǽ¤Ê°ú¿ô¤Ï\n"
-"Ă»¤¤¥ª¥×¥·¥ç¥ó¤Î¾́¹ç¤Ë¤âɬÍפǤ¹¡£\n"
-"Operation modes:\n"
-" --help ¥ª¥×¥·¥ç¥ó¤Î°́Í÷¤̣½ĐÎϤ·¡¢½ªÎ»¤·¤̃¤¹¡£\n"
-" --version ¥Đ¡¼¥¸¥ç¥ó¾đÊó¤̣½ĐÎϤ·¡¢½ªÎ»¤·¤̃¤¹¡£\n"
-" -e, --interactive "
-"½ĐÎϤ̣¥Đ¥Ă¥Ơ¥¡¥ê¥ó¥°¤»¤º¡¢³ä¤ê¹₫¤ß¤̣̀µ»ë¤·¤̃¤¹¡£\n"
-" -E, --fatal-warnings ·Ù¹đ¤¬½Đ¤µ¤́¤ë¤È¼Â¹Ô¤̣Ăæ»ß¤·¤̃¤¹¡£\n"
-" -Q, --quiet, --silent "
-"¤¤¤¯¤Ä¤«¤Î¥Ó¥ë¥È¥¤¥ó¥³¥̃¥ó¥É¤Î·Ù¹đ¤̣Í̃À©¤·¤̃¤¹¡£\n"
-" -P, --prefix-builtins Á´¤Æ¤Î¥Ó¥ë¥È¥¤¥ó¥̃¥¯¥í¤Ë `m4_' ¤È¤¤¤¦ÀÜƬ¼­¤̣ "
-" ¶¯À©Åª¤ËÄÉ²Ă¤·¤̃¤¹¡£\n"
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr ""
-"-W, --word-regexp=REGEXP ¥̃¥¯¥í̀¾¤Î¥·¥ó¥¿¥Ă¥¯¥¹¤Ë REGEXP ¤̣ "
-" Àµµ¬É½¸½¤È¤·¤ÆÍѤ¤¤̃¤¹¡£\n"
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"¥×¥ê¥×¥í¥»¥Ă¥µµ¡Ç½:\n"
-" -I, --include=DIRECTORY ¥«¥́¥ó¥È¥Ç¥£¥́¥¯¥È¥ê¤Î¼¡¤Ë¤³¤Î¥Ç¥£¥́¥¯¥È¥ê\n"
-" ¤«¤é¥¤¥ó¥¯¥ë¡¼¥É¥Ơ¥¡¥¤¥ë¤̣¥µ¡¼¥Á¤·¤̃¤¹¡£\n"
-" -D, --define=NAME[=VALUE] NAME ¤̣ VALUE ¤ËÄêµÁ¤·¤̃¤¹¡£\n"
-" (VALUE ¤Ï¾Êά²Äǽ¤Ç¡¢¤³¤Î¾́¹ç¤Ï NAME ¤Ï "
-" ¶ơ¤Îʸ»úÎó¤ËÄêµÁ¤µ¤́¤̃¤¹¡£)\n"
-" -U, --undefine=NAME NAME ¤ÎÄêµÁ¤̣¼è¤ê¾Ă¤·¤̃¤¹¡£\n"
-" -s, --synclines ¹ÔÈÖ¹æ¤È¥Ơ¥¡¥¤¥ë̀¾¤Î¹Ô¤̣À¸À®¤·¤̃¤¹¡£\n"
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"¸Â³¦ĂͤΥ³¥ó¥È¥í¡¼¥ë:\n"
-" -G, --traditional GNU ÈǤËÆĂÍ­¤Î³ÈÄ¥¤̣Í̃À©¤·¤̃¤¹¡£\n"
-" -H, --hashsize=PRIME ¥·¥ó¥Ü¥ë¸¡º÷¥Ï¥Ă¥·¥å¥Æ¡¼¥Ö¥ë¤Î¥µ¥¤¥º¤̣\n"
-" ¥»¥Ă¥È¤·¤̃¤¹¡£\n"
-" -L, --nesting-limit=NUNBER "
-"¥̃¥¯¥í¤Î¥Í¥¹¥È²ó¿ô¤Î¾å¸ÂẶͤ¿Í°ÙŪ¤ËÊѹ¹¤·¤̃¤¹¡£\n"
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Åà·ë¾ơÂ֤ΥƠ¥¡¥¤¥ë: -F, --freeze-state=FILE ºÇ¸å¤Ë»ØÄꤵ¤́¤¿ FILE "
-"¤̣Åà·ë¾ơÂ֤ˤ·¤̃¤¹¡£\n"
-" -R, --reload-state=FILE ºÇ½é¤Ë»ØÄꤵ¤́¤¿ FILE ¤«¤é\n"
-" Åà·ë¤µ¤́¤¿ÄêµÁ¤̣¥í¡¼¥É¤·¤̃¤¹\n"
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-" ¥Ç¥Đ¥Ă¥®¥ó¥°:\n"
-" -d, --debug=[FLAGS] ¥Ç¥Đ¥Ă¥°¥́¥Ù¥ë¤̣¥»¥Ă¥È¤·¤̃¤¹¡£\n"
-" (`aeq' ¤Ï FLAGS ¤Ë´̃¤̃¤́¤̃¤»¤ó¡£)\n"
-" -t, --trace=NAME NAME ¤¬ÄêµÁ¤µ¤́¤ë¤È¤½¤́¤̣¥È¥́¡¼¥¹¤·¤̃¤¹¡£\n"
-" -l, --arglength=NUM ¥̃¥¯¥í¥È¥́¡¼¥¹¤Î¥µ¥¤¥º¤̣ NUM ¤ËÀ©¸Â¤·¤̃¤¹¡£\n"
-" -o, --error-output=FILE ¥Ç¥Đ¥Ă¥°¤È¥È¥́¡¼¥¹¤Î½ĐÎϤ̣ FILE ¤Ë\n"
-" ¥ê¥À¥¤¥́¥¯¥È¤·¤̃¤¹¡£\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"FLAG ¤Ï°Ê²¼¤Î¤¤¤º¤́¤«¤Ç¤¹:\n"
-" t Á´¤Æ¤Î¥̃¥¯¥í¸Æ¤Ó¤À¤·¤̣¥È¥́¡¼¥¹¤·¤̃¤¹\n"
-" (traceon ¤Ë¤è¤ë¤â¤Î¤Ë¸ÂÄꤷ¤̃¤»¤ó)\n"
-" a ¸½ºß¤Î°ú¿ô¤̣ɽ¼¨¤·¤̃¤¹\n"
-" e Ÿ³«¤µ¤́¤¿¤â¤Î¤̣ɽ¼¨¤·¤̃¤¹\n"
-" q `a' ¤̃¤¿¤Ï `e' ¤È¶¦¤ËÍѤ¤¡¢É¬Íפ˱₫¤¸¤ÆẶͤ°úÍÑÉä¤Ç°Ï¤ß¤̃¤¹¡£\n"
-" c ÄûÀµÁ°¤ÈÄûÀµ¸å¡¢¸Æ½Đ¸å¤Ëɽ¼¨¤·¤̃¤¹\n"
-" x ¤½¤Î¥̃¥¯¥í¥³¡¼¥ë¤Ë¸ÇÍ­¤Î ID ¤̣ÄÉ²Ă¤·¤̃¤¹¡£\n"
-" `c' ¤ÈÁȤ߹ç¤ï¤»¤ë¤ÈÊØÍø¤Ç¤¹¡£\n"
-" f ¤½¤Î»₫ÅÀ¤ÇÆ₫ÎϤ·¤Æ¤¤¤ë¥Ơ¥¡¥¤¥ë̀¾¤̣ɽ¼¨¤·¤̃¤¹¡£\n"
-" l ¤½¤Î»₫ÅÀ¤ÇÆ₫ÎϤ·¤Æ¤¤¤ë¹ÔÈÖ¹æ¤̣ɽ¼¨¤·¤̃¤¹¡£\n"
-" p ¥Ñ¥¹¤̣¸¡º÷¤·¤¿·ë²̀¤̣ɽ¼¨¤·¤̃¤¹¡£\n"
-" i Æ₫ÎÏ¥Ơ¥¡¥¤¥ë¤ËÀ¸¤¸¤¿ÊѲ½¤̣ɽ¼¨¤·¤̃¤¹¡£\n"
-" V ¾åµ­¤ÎÁ´¤Æ¤Î FLAG ¤̣»ØÄꤹ¤ë¤³¤È¤̣°Ờ£¤·¤̃¤¹¡£\n"
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"FILE ¤¬»ØÄꤵ¤́¤Æ¤¤¤Ê¤¤¾́¹ç¤ª¤è¤Ó»ØÄꤵ¤́¤¿¥Ơ¥¡¥¤¥ë¤¬ `-' ¤Î¾́¹ç¤Ï\n"
-" ɸ½àÆ₫ÎϤ¬Æɤ߹₫¤̃¤́¤̃¤¹¡£\n"
-
-#: src/m4.c:358
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "`%s' ¤ÏÉÔÀµ¤Ê¥Ç¥Đ¥Ă¥°¥ª¥×¥·¥ç¥ó°ú¿ô¤Ç¤¹¡£"
-
-#: src/m4.c:437
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "ÆâÉô¥¨¥é¡¼¡§¥ª¥×¥·¥ç¥ó¤Î¸å½èÍư¤Ç¡¢ÉÔÀµ¥³¡¼¥É¤¬¸¡½Đ¤µ¤́¤̃¤·¤¿¡£"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô expand_token () Æâ¤Î¥È¡¼¥¯¥ó¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "¥¨¥é¡¼: °ú¿ô¥ê¥¹¥ÈÆâ¤Ë¥Ơ¥¡¥¤¥ë¤Î½ªĂ¼µ­¹æ¤¬¤¢¤ê¤̃¤¹¡£"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô expand_argument () ¤Î¥È¡¼¥¯¥ó¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô call_macro () Æâ¤Î¥·¥ó¥Ü¥ë¤Î¼ïÎबÉÔÀµ¤Ç¤¹¡£"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr ""
-"¥¨¥é¡¼¡§ºÆµ¢ÅªÄêµÁ¤Î¥Í¥¹¥È¤¬»ØÄꤵ¤́¤¿ĂÍ %d ¤̣Ķ¤¨¤Æ¤¤¤̃¤¹¡£\n"
-" -L<¿ô»ú> ¥ª¥×¥·¥ç¥ó¤̣ÍѤ¤¤Æ¥Í¥¹¥È¿ô¤Î¾å¸Â¤̣Áư¤ä¤·¤Æ²¼¤µ¤¤¡£"
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "¥¨¥é¡¼: divert ¤Î¤¿¤á¤Î¥Æ¥ó¥Ư¥é¥ê¥Ơ¥¡¥¤¥ë¤¬ºîÀ®¤Ç¤­¤̃¤»¤ó¡£"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "¥¨¥é¡¼: ¥Æ¥ó¥Ư¥é¥ê¥Ơ¥¡¥¤¥ë¤Ë divert ¤¹¤Ù¤­ÆâÍƤ̣ write ¤Ç¤­¤̃¤»¤ó¡£"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "¥¨¥é¡¼: Á̃Æ₫¤µ¤́¤ë¤Ù¤­¥Ơ¥¡¥¤¥ë¤̣¥³¥Ô¡¼Ăæ¤Ç¤¹¡£"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "¥¨¥é¡¼: Á̃Æ₫¤µ¤́¤ë¤Ù¤­¥Ơ¥¡¥¤¥ë¤̣¥ê¡¼¥ÉĂæ¤Ç¤¹¡£"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr ""
-"divert ¤Î¤¿¤á¤Î¥Ơ¥¡¥¤¥ë¤Î¥¹¥Æ¡¼¥¿¥¹¤̣ÆÀ¤ë¤³¤È¤¬¤Ç¤­¤̃¤»¤ó¡£\n"
-" (stat ¤Ç¤­¤̃¤»¤ó¡£)"
-
-#: src/path.c:131
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "`%s' ¤È¤¤¤¦¥Ç¥£¥́¥¯¥È¥ê¤«¤é `%s' ¤È¤¤¤¦¥Ơ¥¡¥¤¥ë¤̣¸«¤Ä¤±¤̃¤·¤¿¡£"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "¥ê¥½¡¼¥¹ĂÍ RLIMIT_VMEM ¤̣Ķ¤¨¤Æ¤¤¤̃¤»¤ó¤«¡©\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"¥á¥â¥ê (¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó°ăÈ¿) ¤¬¸¡½Đ¤µ¤́¤̃¤·¤¿¡£\n"
-" ¥¹¥¿¥Ă¥¯¤¬¥ª¡¼¥Đ¡¼¥Ơ¥í¡¼¤·¤Æ¤¤¤ë¡¢¤¢¤ë¤¤¤Ï¥Đ¥°¤¬Â¸ºß¤¹¤ë\n"
-" ²ÄǽÀ­¤¬¤¢¤ê¤̃¤¹¡£"
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". ̀µ¸Â¤ÎºÆµ¢¸Æ¤Ó½Đ¤·¤¬¹Ô¤ï¤́¤Æ¤¤¤Ê¤¤¤«¤É¤¦¤«¥Á¥§¥Ă¥¯¤·¤Æ²¼¤µ¤¤¡£\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "ÆâÉô¥¨¥é¡¼¡§´Ø¿ô symbol_lookup () ¤Ø¤Î°ú¿ô mode ¤¬ÉÔÀµ¤Ç¤¹¡£"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "`%s' ¤ÏÄêµÁ¤µ¤́¤Æ¤¤¤̃¤»¤ó¡£\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "`%s' : %s ¤Ï¡¢ÉÔÀµ¤ÊÀµµ¬É½¸½¤Ç¤¹¡£"
-
-#~ msgid "%s: option `%s' is ambiguous\n"
-#~ msgstr "%s: `%s' ¤ÏÉỒÀÎƤʥª¥×¥·¥ç¥ó̀¾¤Ç¤¹¡£\n"
-
-#~ msgid "%s: option `--%s' doesn't allow an argument\n"
-#~ msgstr "%s: ¥ª¥×¥·¥ç¥ó `--%s' ¤Ï°ú¿ô¤̣¼è¤ë¤³¤È¤¬¤Ç¤­¤̃¤»¤ó¡£\n"
-
-#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
-#~ msgstr "%s: ¥ª¥×¥·¥ç¥ó `%c%s' ¤Ï°ú¿ô¤̣¼è¤ë¤³¤È¤¬¤Ç¤­¤̃¤»¤ó¡£\n"
-
-#~ msgid "%s: option `%s' requires an argument\n"
-#~ msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤Ï°ú¿ô¤̣ɬÍפȤ·¤̃¤¹¡£\n"
-
-#~ msgid "%s: unrecognized option `--%s'\n"
-#~ msgstr "%s: --%s ¤Ïǧ¼±¤µ¤́¤Ê¤¤¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£\n"
-
-#~ msgid "%s: unrecognized option `%c%s'\n"
-#~ msgstr "%s: %c%s ¤Ïǧ¼±¤µ¤́¤Ê¤¤¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£\n"
-
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: %c ¤ÏÉÔÀµ¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£\n"
-
-#~ msgid "%s: invalid option -- %c\n"
-#~ msgstr "%s: %c ¤Ï̀µ¸ú¤Ê¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£\n"
-
-#~ msgid "%s: option requires an argument -- %c\n"
-#~ msgstr "%s: %c ¥ª¥×¥·¥ç¥ó¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹¡£\n"
-
-#~ msgid "No previous regular expression"
-#~ msgstr "Àµµ¬É½¸½¤¬ÄêµÁ¤µ¤́¤Æ¤¤¤̃¤»¤ó¡£"
-
-#~ msgid "Memory exhausted"
-#~ msgstr "¥á¥â¥ê¤¬»Ä¤Ă¤Æ¤¤¤̃¤»¤ó¡£"
diff --git a/po/nl.gmo b/po/nl.gmo
deleted file mode 100644
index 1452272f..00000000
--- a/po/nl.gmo
+++ /dev/null
Binary files differ
diff --git a/po/nl.po b/po/nl.po
deleted file mode 100644
index fd69a4ff..00000000
--- a/po/nl.po
+++ /dev/null
@@ -1,464 +0,0 @@
-# Dutch messages for GNU m4.
-# Copyright (C) 1998 Free Software Foundation, Inc.
-# Erick Branderhorst <Erick.Branderhorst@asml.nl>, 1998.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4d\n"
-"POT-Creation-Date: 1998-05-25 12:26+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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: src/builtin.c:272
-#, 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
-#, 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
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Niet numeriek argument voor ingebouwde functie `%s'"
-
-#: src/builtin.c:438
-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
-#, c-format
-msgid "Undefined name %s"
-msgstr "Ongedefinieerde naam %s"
-
-#: src/builtin.c:636
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "INTERNE FOUT: Ingebouwde functie niet gevonden in functie tabel!"
-
-#: src/builtin.c:644
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "INTERNE FOUT: Onjuist teken data type in m4_dumpdef ()"
-
-#: src/builtin.c:695
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "Ongedefinieerde macro `%s'"
-
-#: src/builtin.c:735
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "INTERNE FOUT: Onjuist symbool type in m4_defn ()"
-
-#: src/builtin.c:772
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Kan geen pijp openen voor commando `%s'"
-
-#: src/builtin.c:811
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Radix in evaluatie buiten bereik (radix = %d)"
-
-#: src/builtin.c:820
-msgid "Negative width to eval"
-msgstr "Negatieve breedte te evalueren"
-
-#: src/builtin.c:925
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Niet numeriek argument voor %s"
-
-#: src/builtin.c:937
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Cannot undivert %s"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "Kan %s niet openen"
-
-#: src/builtin.c:1248
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Debugmode: onjuiste debug vlaggen: `%s'"
-
-#: src/builtin.c:1284
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Kan fout bestand niet instellen: %s"
-
-#: src/builtin.c:1501
-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
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "Onjuiste reguliere expressie `%s': %s"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Fout overeenkomen reguliere expressies `%s'"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"INTERNE FOUT: Ingebouwde functie niet gevonden in functie tabel! (trace_pre "
-"())"
-
-#: src/debug.c:387
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "INTERNE FOUT: Onjuiste teken data type (trace_pre ())"
-
-#: src/eval.c:277
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "Onjuiste expressie in evaluatie (ontbrekend rechter haakje): %s"
-
-#: src/eval.c:283
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "Onjuist expressie in evaluatie: %s"
-
-#: src/eval.c:288
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "Onjuist expressie in evaluatie (onjuiste invoer): %s"
-
-#: src/eval.c:293
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "Onjuist expressie in evaluatie (te veel invoer): %s"
-
-#: src/eval.c:298
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Delen door nul in evaluatie: %s"
-
-#: src/eval.c:303
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Modulo door nul in evaluatie: %s"
-
-#: src/eval.c:308
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "INTERNE FOUT: Onjuiste fout code in evaluate ()"
-
-#: src/eval.c:547
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "INTERNE FOUT: Onjuiste vergelijkings operator in cmp_term ()"
-
-#: src/eval.c:590
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "INTERNE FOUT: Onjuiste schuif operator in shift_term ()"
-
-#: src/eval.c:674
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "INTERNE FOUT: Onjuiste operator in mult_term ()"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "INTERNE FOUT: Ingebouwde functie niet gevonden in functie tabel!"
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr "INTERNE FOUT: Onjuist teken data type in freeze_one_symbol ()"
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "Verwacht nieuwe regel in gefixeerd bestand"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Verwacht karakter `%c' in gefixeerd bestand"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "Slecht geformateerd gefixeerd bestand"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "Voorbarig einde van gefixeerd bestand"
-
-#: src/freeze.c:323
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr "`%s' van gefixeerd bestand niet gevonden in functie tabel!"
-
-#: src/input.c:174
-#, c-format
-msgid "Input read from %s"
-msgstr "Invoer gelezen vanuit %s"
-
-#: src/input.c:231
-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
-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
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "INTERNE FOUT: Invoer stapel botch in next_char ()"
-
-#: src/input.c:550
-msgid "NONE"
-msgstr "GEEN"
-
-#: src/input.c:777
-msgid "ERROR: EOF in string"
-msgstr "FOUT: Einde van bestand teken in string"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "FOUT: Stapel overflow. (Infinite define recursion?)"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Probeer `%s --help' voor meer informatie.\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "Gebruik: %s [OPTIE]... [BESTAND]...\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Verplichte of optionele argumenten voor lange opties zijn ook verplicht of\n"
-"optioneel voor korte opties.\n"
-"\n"
-"Operatie modi:\n"
-" --help toon help tekst en beëindig programma\n"
-" --version toon versie informatie en beeindig programma\n"
-" -e, --interactive unbuffer output, negeer interrupts\n"
-" -E, --fatal-warnings stop uitvoering na eerste waarschuwing\n"
-" -Q, --quiet, --silent onderdruk sommige waarschuwingen voor\n"
-" ingebouwde functies\n"
-" -P, --prefix-builtins forceer een `m4_' voorvoegsel voor alle \n"
-" ingebouwde functies\n"
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr " -W, --word-regexp=REGEXP gebruik REGEXP voor macro naam syntax\n"
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"Voorbewerkings features:\n"
-" -I, --include=DIRECTORY zoek in tweede instantie in deze directory "
-"voor\n"
-" inclusies\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME verwijder ingebouwde functie NAME\n"
-" -s, --synclines genereer `#line NO \"FILE\"' regel\n"
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"Limieten controlle:\n"
-" -G, --traditional onderdruk alle GNU uitbreidingen\n"
-" -H, --hashsize=PRIME stel symbolen opzoek hash tabel grootte\n"
-" -L, --nesting-limit=NUMBER verander kunstmatige nesting limiet\n"
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Gefixeerd staat bestanden:\n"
-" -F, --freeze-state=FILE produceerd een gefixeerd staat van BESTAND\n"
-" aan het einde\n"
-" -R, --reload-state=FILE herlaad een gefixeerde staat van BESTAND\n"
-" aan het begin\n"
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[VLAGGEN] stel debug nivo in (geen VLAGGEN \n"
-" impliceert `aeq')\n"
-" -t, --trace=NAAM traceer NAAM wanneer het wordt gedefinieerd\n"
-" -l, --arglength=NUM restrict macro traceer grootte\n"
-" -o, --error-output=FILE redirect debug en traceer uitvoer\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"Als geen BESTAND of als BESTAND `-' is, standaard invoer wordt gelezen.\n"
-
-#: src/m4.c:355
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "Onjuiste debug vlaggen: `%s'"
-
-#: src/m4.c:434
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "INTERNE FOUT: Onjuiste code in afgeleide argumenten"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "INTERNE FOUT: Onjuist teken type in expand_token ()"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "FOUT: Einde van bestand teken in argumentenlijst"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "INTERNE FOUT: Onjuist teken type in expand_argument ()"
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "INTERNE FOUT: Onjuist symbool type in call_macro ()"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr ""
-"FOUT: Recursie limiet of %d overschreden, gebruik -L<N> om dit te wijzigen"
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "FOUT: Kan geen tijdelijk bestand aanmaken voor diversion"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "FOUT: Kan diversion niet flushen naar tijdelijk bestand"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "FOUT: Kopieren ingevoegde bestanden"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "FOUT: Lezen ingevoegd bestand"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr "Cannot stat diversion"
-
-#: src/path.c:131
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "Zoeken naar `%s' via PATH levert `%s'"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "VMEM limiet overschreden?\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Geheugen bounds violation gedetecteerd (SIGSEGV). Een stack overflow \n"
-"is opgetreden, of er is een fout in "
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Kontroleer voor mogelijk oneindige recusie.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "INTERNE FOUT: Ongeldige mode voor symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Naam `%s' is niet bekend\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Onjuiste reguliere expressie: `%s': %s"
diff --git a/po/pl.gmo b/po/pl.gmo
deleted file mode 100644
index 4bb38992..00000000
--- a/po/pl.gmo
+++ /dev/null
Binary files differ
diff --git a/po/pl.po b/po/pl.po
deleted file mode 100644
index 8cdf9481..00000000
--- a/po/pl.po
+++ /dev/null
@@ -1,500 +0,0 @@
-# Polish translations for the GNU m4 messages.
-# Copyright (C) 1998 Free Software Foundation, Inc.
-# Rafa³ Maszkowski <rzm@icm.edu.pl>, 1998.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-10-04 01:31+0200\n"
-"PO-Revision-Date: 1998-08-05 17:30+0200\n"
-"Last-Translator: Rafa³ Maszkowski <rzm@icm.edu.pl>\n"
-"Language-Team: Polish <pl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: src/builtin.c:317
-#, c-format
-msgid "Warning: Too few arguments to built-in `%s'"
-msgstr "Uwaga: Za ma³o argumentów dla wbodowanego `%s'"
-
-#: src/builtin.c:323
-#, c-format
-msgid "Warning: Excess arguments to built-in `%s' ignored"
-msgstr "Uwaga: Nadmiarowe argumenty do built-in `%s' zosta³y zignorowane"
-
-#: src/builtin.c:351
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Nienumeryczny argument do built-in `%s'"
-
-#: src/builtin.c:450
-msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
-msgstr "B£¡D WEWNÊTRZNY: Z³y typ danych tokenu w define_macro ()"
-
-#: src/builtin.c:645 src/builtin.c:708 src/builtin.c:1331 src/builtin.c:1355
-#, c-format
-msgid "Undefined name %s"
-msgstr "Niezdefiniowana nazwa %s"
-
-#: src/builtin.c:673
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "B£¡D WEWNÊTRZNY: Wbudowane nie znalezione w tablicy wbudowanych!"
-
-#: src/builtin.c:681
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "B£¡D WEWNÊTRZNY: Z³y typ danych tokenu w m4_dumpref ()"
-
-#: src/builtin.c:732
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "Niezdefiniowane makro `%s'"
-
-#: src/builtin.c:772
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "B£¡D WEWNETRZNY: Z³y typ symbolu w m4_defn ()"
-
-#: src/builtin.c:838
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Nie mogê otworzyæ potoku do komendy `%s'"
-
-#: src/builtin.c:875
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Baza w eval poza zakresem (radix = %d)"
-
-#: src/builtin.c:884
-msgid "Negative width to eval"
-msgstr "Ujemna d³ugo¶æ w eval"
-
-#: src/builtin.c:976
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Nienumeryczny argument dla %s"
-
-#: src/builtin.c:988
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "Nie mogê przetowrzyæ z powrotem %s"
-
-#: src/builtin.c:1132
-#, fuzzy, c-format
-msgid "Undefined syntax code %c"
-msgstr "Niezdefiniowana nazwa %s"
-
-#: src/builtin.c:1182 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "Nie mogê otworzyæ %s"
-
-#: src/builtin.c:1391
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Tryb debugowania: z³e flagi debugowania: `%s'"
-
-#: src/builtin.c:1427
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "Nie mogê ustawiæ pliku b³êdów: %s"
-
-#: src/builtin.c:1644
-msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
-msgstr "UWAGA: \\0 zniknie, w podstawieniach u¿yj zamiast tego \\&"
-
-#: src/builtin.c:1705 src/builtin.c:1765 src/input.c:979
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "B³êdne wyra¿enie regularne `%s': %s"
-
-#: src/builtin.c:1716 src/builtin.c:1789
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "B³±d dopasowania do wyra¿enia regularnego `%s'"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr ""
-"B£¡D WEWNÊTRZNY: Wbudowane nie znalezione w tablicy wbudowanych! (trace_pre "
-"())"
-
-#: src/debug.c:387
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "B£¡D WEWNÊTRZNY: Z³y typ danych tokenu (trace_pre ())"
-
-#: src/eval.c:297
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "B³êdne wyra¿enie w eval (brakuj±cy prawy nawias): %s"
-
-#: src/eval.c:303
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "B³êdne wyra¿enie w eval: %s"
-
-#: src/eval.c:308
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "B³êdne wyra¿enie w eval (z³e dane wej¶ciowe): %s"
-
-#: src/eval.c:313
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "B³êdne wyra¿enie w eval (nadmiarowe dane): %s"
-
-#: src/eval.c:318
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Dzielenie przez zero w eval: %s"
-
-#: src/eval.c:323
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Modulo zero w eval: %s"
-
-#: src/eval.c:328
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny kod b³êdu w evaluate ()"
-
-#: src/eval.c:582
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny operator porównania w cmp_term ()"
-
-#: src/eval.c:627
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny operator przesuniêcia w shift_term ()"
-
-#: src/eval.c:726
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny opertaotr w mult_term ()"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "B£¡D WEWNÊTRZNY: Wbudowane nie znalezione w tablicy wbudowanych!"
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny typ danych tokenu w freeze_one_symbol ()"
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "Oczekiwany line fedd w pliku zamro¿onym"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Oczekiwany znak `%c' w pliku zamro¿onym"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "¬le sformatowy plik zamro¿ony"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "Przedwczesny koniec pliku zamro¿onego"
-
-#: src/freeze.c:323
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr "`%s' z pliku zamro¿onego nie znalezione w tablicy wbudowanych!"
-
-#: src/input.c:306
-#, c-format
-msgid "Input reverted to %s, line %d"
-msgstr "Dane wej¶ciowe wycofane do %s, linia %d"
-
-#: src/input.c:334
-#, c-format
-msgid "Input read from %s"
-msgstr "Dane wej¶ciowe przeczytane z %s"
-
-#: src/input.c:494
-msgid "INTERNAL ERROR: Recursive push_string!"
-msgstr "B£¡D WEWNÊTRZNY: Rekursywny push_string!"
-
-#: src/input.c:611
-msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdne wywo³anie init_macro_token ()"
-
-#: src/input.c:651
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "B£¡D WEWNÊTRZNY: B³±d stosu wej¶ciowego w next_char ()"
-
-#: src/input.c:688
-msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
-msgstr "B£¡D WEWNÊTRZNY: B³±d stosu wej¶ciowego w peek_input ()"
-
-#: src/input.c:791
-msgid "NONE"
-msgstr "¯ADEN"
-
-#: src/input.c:1130 src/input.c:1157
-msgid "ERROR: EOF in string"
-msgstr "B£¡D: EOF w ³añcuchu"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "B£¡D: Przepe³nienie stosu. (Nieskoñczona rekursja definicji?)"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Spróbuj `%s --help' ¿eby dowiedzieæ siê wiêcej.\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "U¿ycie: %s [OPCJA]... [PLIK]...\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Argumenty obowi±zkowe lub opcjonalne dla opcji d³ugich s± obowi±zkowe lub\n"
-"opcjonalne równie¿ dla krótkich.\n"
-"\n"
-"Tryby pracy:\n"
-" --help wy¶wietl ten opis i zakoñcz\n"
-" --version wy¶wietl informacjê o wersji i zakoñcz\n"
-" -e, --intercative nie buforuj wyj¶cia, ignoruj przerwania\n"
-" -E, --fatal-warnings zatrzymaj siê po pierwszym ostrz¿eniu\n"
-" -Q, --quiet, --silent nie pokazuj niektórych ostrze¿eñ dla "
-"wbudowanych\n"
-" -P, --prefix-builtins dodaj zawsze `m4_' przez wszystkimi "
-"wbudowanymi\n"
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr " -W, --word-regexp=WYR_REGUL u¿yj WYR_REGUL w sk³adni nazw makr\n"
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"W³a¶ciwo¶ci preprocesora:\n"
-" -I, --include=KATALOG szukaj includes w tym KATALOGu\n"
-" -D, --define=NAZWA[=WARTO¦Æ] wprowad¼ NAZWÊ z WARTO¦CI¡ lub pust±\n"
-" -U, --undefine=NAZWA skasuj wbudowan± NAZWÊ\n"
-" -s, --synclines generuj linie `#line NR \"PLIK\"\n"
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"Sterowanie ograniczeniami:\n"
-" -G, --traditional wy³±cz wszystkie rozszrzenia GNU\n"
-" -H, --hashzize=PIERWSZA ustaw rozmiar tablicy mieszaj±cej dla "
-"symboli\n"
-" -L, --nesting-limit=LICZBA zmieñ sztuczny limit zag³ebieñ\n"
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Zamro¿one pliki stanu:\n"
-" -F, --freeze-state=PLIK zapisz zamro¿ony PLIK stanu na koñcu\n"
-" -R, --reload-state=PLIK za³aduj zamro¿ony PLIK stanu na pocz±tku\n"
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Debugowanie:\n"
-" -d, --debug=[FLAGI] ustaw poziom debugowania (bez FLAG: `aeg')\n"
-" -t, --trace=NAZWA ¶led¼ NAZWÊ, kiedy bêdzie zdefiniowana\n"
-" -l, --arglength=ILE ogranicz rozmiar ¶ledzenia makr\n"
-" -o, --error-output=PLIK przekieruj wyniki debugowania i ¶ledzenia\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"FLAGI mog± byæ nastêpuj±ce:\n"
-" t ¶led¼ wszystkie wywo³ania makr, nie tylko te z traceon\n"
-" a poka¿ w³a¶ciwe argumenty\n"
-" e poka¿ rozwiniêcie\n"
-" q zabezpiecz znaki specjalne, z flag± a lub e\n"
-" c poka¿ przez zebraniem, po zebraniu i po wywo³aniu\n"
-" x dodaj unikalny identfikator wywo³ania makra, po¿yteczne z flag± c\n"
-" f podaj nazwê bie¿±cego pliku wej¶ciowego\n"
-" l podaj numer bie¿±cej linii\n"
-" p poka¿ wyniki przeszukiwañ ¶cie¿ek\n"
-" i poka¿ zmiany plików wej¶ciowych\n"
-" V skrót do wszystkich powy¿szych flag\n"
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"Je¿eli brak PLIKu lub PLIK to `-', czytane jest std. wej¶cie.\n"
-
-#: src/m4.c:365
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "B³êdne flagi debugowania: `%s'"
-
-#: src/m4.c:444
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny kod w od³o¿onych argumentach"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny typ tokena w expand_token ()"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "B£¡D: EOF w li¶cie argumentów"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny typ tokena w expand_argument ()"
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "B£¡D WEWNÊTRZNY: B³êdny symbol w call_macro ()"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr "B£¡D: Osi±gniêty limit rekursji %d, u¿yj -L<N> ¿eby go zmieniæ"
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "B£¡D: Nie mogê utworzyæ plików tymczasowych dla przetwarzania"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "B£¡D: Nie mogê zapisac zmian przetwarzania do pliku tymczasowego"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "B£¡D: Kopiowanie w³o¿onego pliku"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "B£¡D: Czytanie w³o¿onego pliku"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr "Nie mogê zrobiæ stat na danych przetwarzanych"
-
-#: src/path.c:162
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "Przeszukanie ¶cie¿ki dla `%s' znalaz³o `%s'"
-
-#: src/path.c:239
-#, fuzzy, c-format
-msgid "Module search for `%s' found `%s'"
-msgstr "Przeszukanie ¶cie¿ki dla `%s' znalaz³o `%s'"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "przekroczony limit VMEM\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Wykryto pogwa³cenie ograniczeñ adresów pamiêci (SIGSEGV). Albo dosz³o do\n"
-"przepe³nienia stosu albo jest b³±d w "
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Sprawd¼ czy nie dosz³o do nieskoñczonej rekursji.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "B£¡D WEWNÊTRZNY: Nielegalny tryb w symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Nazwa `%s' jest nieznana\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Z³e wyra¿enie regularne: `%s': %s"
-
-#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
-#~ msgstr "B£¡D WEWNÊTRZNY: B³±d stosu wej¶ciowego w pop_input ()"
-
-#~ msgid "%s: option `%s' is ambiguous\n"
-#~ msgstr "%s: opcja `%s' jest niejednoznaczna\n"
-
-#~ msgid "%s: option `--%s' doesn't allow an argument\n"
-#~ msgstr "%s: opcja `--%s' nie mo¿e mieæ argumentu\n"
-
-#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
-#~ msgstr "%s: opcja `%c%s' nie mo¿e mieæ argumentu\n"
-
-#~ msgid "%s: option `%s' requires an argument\n"
-#~ msgstr "%s: opcja `%s' wymaga argumentu\n"
-
-#~ msgid "%s: unrecognized option `--%s'\n"
-#~ msgstr "%s: nierozpoznana opcja --%s'\n"
-
-#~ msgid "%s: unrecognized option `%c%s'\n"
-#~ msgstr "%s: nierozpoznana opcja %c%s'\n"
-
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: nielegalna opcja -- %c\n"
-
-#~ msgid "%s: invalid option -- %c\n"
-#~ msgstr "%s: b³êdna opcja -- %c\n"
-
-#~ msgid "%s: option requires an argument -- %c\n"
-#~ msgstr "%s: opcja wymaga argumentu -- %c\n"
-
-#~ msgid "No previous regular expression"
-#~ msgstr "Brak uprzedniego wyra¿enia regularnego"
-
-#~ msgid "Memory exhausted"
-#~ msgstr "Pamiêæ wyczerpana"
diff --git a/po/ru.gmo b/po/ru.gmo
deleted file mode 100644
index bd27331a..00000000
--- a/po/ru.gmo
+++ /dev/null
Binary files differ
diff --git a/po/ru.po b/po/ru.po
deleted file mode 100644
index 1f847158..00000000
--- a/po/ru.po
+++ /dev/null
@@ -1,498 +0,0 @@
-# ́ÏËÁ̀ÉÚÁĂÉÑ m4-1.4.3
-# Copyright (C) 1997 Free Software Foundation, Inc.
-# Denis Y. Pershin <dyp@siblug.org>, 1997.
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+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"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=koi8-r\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: src/builtin.c:272
-#, c-format
-msgid "Warning: Too few arguments to built-in `%s'"
-msgstr "đ̉ÅÄƠĐ̉ÅÖÄÅÎÉÅ: ó̀ÉÛËÏÍ ÍÁ̀Ï Á̉ÇƠÍÅÎÔÏ× Ä̀Ñ ×ÓỔÏÅÎÎÏÊ ̀ÅËÓÅÍÙ '%s'"
-
-#: src/builtin.c:278
-#, c-format
-msgid "Warning: Excess arguments to built-in `%s' ignored"
-msgstr ""
-"đ̉ÅÄƠĐ̉ÅÖÄÅÎÉÅ: éÚÂÙÔÏ̃ÎÙÅ Á̉ÇƠÍÅÎÔÙ Ä̀Ñ ×ÓỔÏÅÎÎÏÊ ̀ÅËÓÅÍÙ '%s' "
-"Đ̉ÏÉÇÎÏ̉É̉Ï×ÁÎÙ"
-
-#: src/builtin.c:298
-#, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "îÅ ̃ÉÓ̀Ï×ÏÊ Á̉ÇƠÍÅÎÔ Ä̀Ñ ×ÓỔÏÅÎÎÏÊ ̀ÅËÓÅÍÙ '%s'"
-
-#: src/builtin.c:438
-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
-#, c-format
-msgid "Undefined name %s"
-msgstr "éÍÑ %s ÎÅÏĐ̉ÅÄÅ̀ÅÎÏ"
-
-#: src/builtin.c:636
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "÷îơộåîîññ ïûéâëá: ÷ÓỔÏÅÎÎÁÑ ̀ÅËÓÅÍÁ ÎÅ ÎÁÊÄÅÎÁ!"
-
-#: src/builtin.c:644
-msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ̀ÅËÓÅÍÙ × m4_dumpdef ()"
-
-#: src/builtin.c:695
-#, c-format
-msgid "Undefined macro `%s'"
-msgstr "îÅÏĐ̉ÅÄÅ̀ÅÎÎÙÊ ÍÁË̉ÏÓ '%s'"
-
-#: src/builtin.c:735
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ÓÉÍ×Ï̀Á × m4_defn ()"
-
-#: src/builtin.c:772
-#, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔË̉ÙÔØ ËÁÎÁ̀ Ä̀Ñ ËÏÍÍÁÎÄÙ '%s'"
-
-#: src/builtin.c:811
-#, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "̣ÁÄÉËÓ × ×Ù̉ÁÖÅÎÉÉ ×ÙÈÏÄÉÔ ÚÁ Đ̉ÅÄÅ̀Ù (radix = %d)"
-
-#: src/builtin.c:820
-msgid "Negative width to eval"
-msgstr "ïỔÉĂÁÔÅ̀ØÎÁÑ ÛÉ̉ÉÎÁ"
-
-#: src/builtin.c:925
-#, c-format
-msgid "Non-numeric argument to %s"
-msgstr "îÅ ̃ÉÓ̀Ï×ÏÊ Á̉ÇƠÍÅÎÔ Ä̀Ñ %s"
-
-#: src/builtin.c:937
-#, c-format
-msgid "Cannot undivert %s"
-msgstr "îÅ×ÏÚÍÏÖÎÏ ×Å̉ÎƠÔØ ×Ù×ÏÄ ÉÚ %s"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, c-format
-msgid "Cannot open %s"
-msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔË̉ÙÔØ %s"
-
-#: src/builtin.c:1248
-#, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "̣ÅÖÉÍ ÏỒÁÄËÉ: ÎÅ×Å̉ÎÙÊ Æ̀ÁÇ ÏỒÁÄËÉ: '%s'"
-
-#: src/builtin.c:1284
-#, c-format
-msgid "Cannot set error file: %s"
-msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÚÎÁ̃ÉÔØ ÆÁỀ ÏÛÉÂÏË %s"
-
-#: src/builtin.c:1501
-msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
-msgstr "đ̣åäơđ̣åöäåîéå: \\0 ÉÓ̃ÅÚÎÅÔ, ÉÓĐÏ̀ØÚƠÊÔÅ \\& × ÚÁÍÅÎÁÈ"
-
-#: src/builtin.c:1562 src/builtin.c:1622 src/input.c:637
-#, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "îÅ×Å̉ÎÏÅ ̉ÅÇỜÑ̉ÎÏÅ ×Ù̉ÁÖÅÎÉÅ: '%s': %s"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "ïÛÉÂËÁ ÓÏĐÏÓÔÁ×̀ÅÎÉÑ ̉ÅÇỜÑ̉ÎÏÇÏ ×Ù̉ÁÖÅÎÉÑ '%s'"
-
-#: src/debug.c:379
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr "÷îơộåîîññ ïûéâëá: ÷ÓỔÏÅÎÎÁÑ ̀ÅËÓÅÍÁ ÎÅ ÎÁÊÄÅÎÁ! (trace_pre ())"
-
-#: src/debug.c:387
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ̀ÅËÓÅÍÙ (trace_pre ())"
-
-#: src/eval.c:277
-#, c-format
-msgid "Bad expression in eval (missing right parenthesis): %s"
-msgstr "îÅ×Å̉ÎÏÅ ×Ù̉ÁÖÅÎÉÅ (ÏÔÓƠÔÓÔ×ƠÅÔ Đ̉Á×ÙÅ ÓËÏÂËÉ): %s"
-
-#: src/eval.c:283
-#, c-format
-msgid "Bad expression in eval: %s"
-msgstr "îÅ×Å̉ÎÏÅ ×Ù̉ÁÖÅÎÉÅ: %s"
-
-#: src/eval.c:288
-#, c-format
-msgid "Bad expression in eval (bad input): %s"
-msgstr "îÅ×Å̉ÎÏÅ ×Ù̉ÁÖÅÎÉÅ (bad input): %s"
-
-#: src/eval.c:293
-#, c-format
-msgid "Bad expression in eval (excess input): %s"
-msgstr "îÅ×Å̉ÎÏÅ ×Ù̉ÁÖÅÎÉÅ (excess input): %s"
-
-#: src/eval.c:298
-#, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "äÅ̀ÅÎÉÅ ÎÁ ÎÏ̀Ø × ×Ù̉ÁÖÅÎÉÉ: %s"
-
-#: src/eval.c:303
-#, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "íÏÄỜØÎÏÅ ÄÅ̀ÅÎÉÅ ÎÁ ÎÏ̀Ø × ×Ù̉ÁÖÅÎÉÉ: %s"
-
-#: src/eval.c:308
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ËÏÄ ÏÛÉÂËÉ × evaluate ()"
-
-#: src/eval.c:547
-msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÏÅ Ó̉Á×ÎÅÎÉÅ × cmp_term ()"
-
-#: src/eval.c:590
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÏĐÅ̉ÁÔÏ̉ ÓÄ×ÉÇÁ × shift_term ()"
-
-#: src/eval.c:674
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÏĐÅ̉ÁÔÏ̉ × mult_term ()"
-
-#: src/freeze.c:115
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "÷îơộåîîññ ïûéâëá: ÷ÓỔÏÅÎÎÁÑ ̀ÅËÓÅÍÁ ÎÅ ÎÁÊÄÅÎÁ!"
-
-#: src/freeze.c:128
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ̀ÅËÓÅÍÙ × freeze_one_symbol ()"
-
-#: src/freeze.c:159
-msgid "Expecting line feed in frozen file"
-msgstr "ïÖÉÄÁÅÔÓÑ ĐÅ̉Å×ÏÄ ÓỔÏËÉ × ÆÁỀÅ-ÏẨÁÚÅ ĐÁÍÑÔÉ"
-
-#: src/freeze.c:161
-#, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "ïÖÉÄÁÅÔÓÑ ÓÉÍ×Ï̀ '%c' × ÆÁỀÅ-ÏẨÁÚÅ ĐÁÍÑÔÉ"
-
-#: src/freeze.c:218
-msgid "Ill-formated frozen file"
-msgstr "îÅ×Å̉ÎÙÊ ÆÏ̉ÍÁÔ ÆÁỀÁ-ÏẨÁÚÁ ĐÁÍÑÔÉ"
-
-#: src/freeze.c:273 src/freeze.c:289
-msgid "Premature end of frozen file"
-msgstr "đ̉ÅÖÄÅ×̉ÅÍÅÎÎÙÊ ËÏÎÅĂ ÆÁỀÁ-ÏẨÁÚÁ ĐÁÍÑÔÉ"
-
-#: src/freeze.c:323
-#, c-format
-msgid "`%s' from frozen file not found in builtin table!"
-msgstr "'%s' ÉÚ ÆÁỀÁ-ÏẨÁÚÁ ĐÁÍÑÔÉ ÎÅ ÎÁÊÄÅÎÁ ×Ï ×ÓỔÏÅÎÎÏÊ ÔÁẦÉĂÅ!"
-
-#: src/input.c:174
-#, c-format
-msgid "Input read from %s"
-msgstr "÷×ÏÄ ÉÚ %s"
-
-#: src/input.c:231
-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
-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
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "÷îơộåîîññ ïûéâëá: ïÛÉÂËÁ ×ÈÏÄÎÏÇÏ ÓÔÅËÁ × next_char ()"
-
-#: src/input.c:550
-msgid "NONE"
-msgstr "îé₫åçï"
-
-#: src/input.c:777
-msgid "ERROR: EOF in string"
-msgstr "ïûéâëá: ëÏÎÅĂ ÆÁỀÁ × ÓỔÏËÅ"
-
-#: src/m4.c:106
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "ïûéâëá: đÅ̉ÅĐÏ̀ÎÅÎÉÅ ÓÔÅËÁ. (âÅÓËÏÎÅ̃ÎÏÅ ̉ÅËỞÓÉ×ÎÏÅ ÏĐ̉ÅÄÅ̀ÅÎÉÅ?)"
-
-#: src/m4.c:133
-#, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "đÏĐ̉ÏÂƠÊÔÅ '%s --help' Ä̀Ñ ÉÎÆÏ̉ÍÁĂÉÉ.\n"
-
-#: src/m4.c:137
-#, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "éÓĐÏ̀ØÚÏ×ÁÎÉÅ: %s [OPTION]... [FILE]...\n"
-
-#: src/m4.c:138
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"ïÂÑÚÁÔÅ̀ØÎÙÅ É̀É ÎÅÏÂÑÚÁÔÅ̀ØÎÙÅ Á̉ÇƠÍÅÎÔÙ Ä̀Ñ Ä̀ÉÎÎÙÈ ÏĐĂÉÉ ÔÁËÏ×Ù É Ä̀Ñ "
-"ËÏ̉ÏÔËÉÈ\n"
-"\n"
-"̣ÅÖÉÍÙ ̉ÁÂÏÔÙ:\n"
-" --help ĐÏËÁÚÁÔØ ĐÏÍÏƯØ É ×ÙÊÔÉ\n"
-" --version ×Ù×ÅÓÔÉ ÉÎÆÏ̉ÍÁĂÉÀ Ï ×Å̉ÓÉÉ É ×ÙÊÔÉ\n"
-" -e, --interactive ÎÅÂƠÆÅ̉ÉÚÏ×ÁÎÎÙÊ ×Ù×ÏÄ, ÉÇÎÏ̉É̉Ï×ÁÔØ "
-"Đ̉Å̉Ù×ÁÎÉÑ\n"
-" -E, --fatal-warnings ÏÓÔÁÎÏ×ÉÔØÓÑ ĐÏÓ̀Å ĐÅ̉×ÏÇÏ Đ̉ÅÄƠĐ̉ÅÖÄÅÎÉÑ\n"
-" -Q, --quiet, --silent ĐÏÄÁ×̀ÑÔØ Đ̉ÅÄƠĐ̉ÅÖÄÅÎÉÑ Ä̀Ñ ×ÓỔÏÅÎÎÙÈ "
-"ÆƠÎËĂÉÊ\n"
-" -P, --prefix-builtins ÄÏÂÁ×̀ÑÔØ Đ̉ÅÆÉËÓ `m4_' Ä̀Ñ ×ÓÅÈ ×ÓỔÏÅÎÎÙÈ "
-"ÆƠÎËĂÉÊ\n"
-
-#: src/m4.c:151
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr ""
-" -W, --word-regexp=REGEXP ÉÓĐÏ̀ØÚÏ×ÁÔØ REGEXP Ä̀Ñ ÓÉÎÔÁËÓÉÓÁ ÉÍÅÎ "
-"ÍÁË̉ÏÓÏ×\n"
-
-#: src/m4.c:155
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"ïĐĂÉÉ Đ̉ÅĐ̉ÏĂÅÓÓÏ̉Á:\n"
-" -I, --include=DIRECTORY ÉÓËÁÔØ × ĐÏÄËÁÔÁ̀ÏÇÅ ×Ë̀À̃ÁÅÍÙÅ ÆÁỀÙ\n"
-" -D, --define=NAME[=VALUE] ÏĐ̉ÅÄÅ̀ÉÔØ, ̃ÔÏ NAME ÉÍÅÅÔ VALUE, É̀É ĐƠÓÔ\n"
-" -U, --undefine=NAME ƠÄÁ̀ÉÔØ ×ÓỔÏÅÎÎƠÀ ÆƠÎËĂÉÀ NAME\n"
-" -s, --synclines ÇÅÎÅ̉É̉Ï×ÁÔØ ÓỔÏËÉ `#line NO \"FILE\"'\n"
-
-#: src/m4.c:163
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"ïÇ̉ÁÎÉ̃ÅÎÉÑ:\n"
-" -G, --traditional ĐÏÄÁ×̀ÑÔØ ×ÓÅ GNU ̉ÁÓÛÉ̉ÅÎÉÑ\n"
-" -H, --hashsize=PRIME ƠÓÔÁÎÏ×ÉÔØ ̉ÁÚÍÅ̉ ÈÜÛ-ÔÁẦÉĂÙ Ä̀Ñ ĐÏÉÓËÁ "
-"ÓÉÍ×Ï̀Ï×\n"
-" -L, --nesting-limit=NUMBER ÉÚÍÅÎÉÔØ Đ̉ÅÄÅ̀ Ç̀ƠÂÉÎÙ ÉÎÔÅ̀ÅËÔƠÁ̀ØÎÏÇÏ "
-"ĐÏÉÓËÁ\n"
-
-#: src/m4.c:170
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"ầÏËÉ̉Ï×ÁÎÎÙÅ ÆÁỀÙ:\n"
-" -F, --freeze-state=FILE × ËÏÎĂÅ ÓÏÚÄÁÔØ ÏẨÁÚ ĐÁÍÑÔÉ Ä̀Ñ FILE\n"
-" -R, --reload-state=FILE × ÎÁ̃Á̀Å ÚÁÇ̉ƠÖÁÔØ ÏẨÁÚ ĐÁÍÑÔÉ Ä̀Ñ FILE\n"
-
-#: src/m4.c:176
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"ïỒÁÄËÁ:\n"
-" -d, --debug=[FLAGS] ƠÓÔÁÎÏ×ÉÔØ ỞÏ×ÅÎØ ÏỒÁÄËÉ (ĐÏ ƠÍÏ̀̃ÁÎÉÀ "
-"FLAGS=`aeq')\n"
-" -t, --trace=NAME ỔÁÓÓÉ̉Ï×ÁÔØ NAME ËÏÇÄÁ ÏÎÏ ÂƠÄÅÔ ÏĐ̉ÅÄÅ̀ÅÎÏ\n"
-" -l, --arglength=NUM ƠÓÔÁÎÏ×ÉÔØ ̉ÁÚÍÅ̉ ỔÁÓÓÉ̉Ï×ËÉ Ä̀Ñ ÍÁË̉ÏÓÁ\n"
-" -o, --error-output=FILE ĐÅ̉ÅÎÁĐ̉Á×ÉÔØ ÏỒÁÄÏ̃ÎÙÊ É ỔÁÓÓÉ̉Ï×Ï̃ÎÙÊ "
-"×Ù×ÏÄ × ÆÁỀ FILE\n"
-
-#: src/m4.c:184
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"FLAGS is any of:\n"
-" t ỔÁÓÓÉ̉Ï×ÁÔØ ×ÓÅ ×ÙÚÏ×Ù ÍÁË̉ÏÓÏ×\n"
-" a ĐÏËÁÚÁÔØ ÔÅËƠƯÉÅ Á̉ÇƠÍÅÎÔÙ\n"
-" e ĐÏËÁÚÙ×ÁÔØ ÍÁË̉Ï̉ÁÓÛÉ̉ÅÎÉÅ\n"
-" q ÚÁË̀À̃ÁÔØ ÚÎÁ̃ÅÎÉÑ × ËÁ×Ù̃ËÉ ĐÏ ÎÅÏÂÈÏÄÉÍÏÓÔÉ, Ó a É̀É e Æ̀ÁÇÁÍÉ\n"
-" c ĐÏËÁÚÙ×ÁÔØ ĐÅ̉ÅÄ ÓÂÏ̉ÏÍ , ĐÏÓ̀Å ÓÂÏ̉Á É ĐÏÓ̀Å ×ÙÚÏ×Á\n"
-" x ÄÏÂÁ×̀ÑÔØ ƠÎÉËÁ̀ØÎÙÊ ÉÄÅÎÔÉÆÉËÁÔÏ̉ ×ÙÚÏ×Á ÍÁË̉ÏÓÁ, ÉÓĐÏ̀ØÚƠÅÔÓÑ ×ÍÅÓÔÅ "
-"Ó Æ̀ÁÇÏÍ c\n"
-" f ×Ù×ÏÄÉÔØ ÔÅËƠƯÅÅ ÉÍÑ ×ÈÏÄÎÏÇÏ ÆÁỀÁ\n"
-" l ×Ù×ÏÄÉÔØ ÎÏÍÅ̉ ÔÅËƠƯÅÊ ÓỔÏ̃ËÉ\n"
-" p ĐÏËÁÚÙ×ÁÔØ ̉ÅÚỜØÔÁÔÙ ĐÏÉÓËÁ ĐÏ ĐƠÔÑÍ\n"
-" i ĐÏËÁÚÙ×ÁÔØ ÉÚÍÅÎÅÎÉÑ ×Ï ×ÈÏÄÎÙÈ ÆÁỀÁÈ\n"
-" V ÓÏË̉ÁƯÅÎÉÅ Ä̀Ñ ×ÓÅÈ Æ̀ÁÇÏ× ×ÍÅÓÔÅ\n"
-
-#: src/m4.c:199
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"åÓ̀É FILE ÎÅ ÓƠƯÅÓÔ×ƠÅÔ É̀É FILE ÜÔÏ `-', ÉÓĐÏ̀ØÚƠÅÔÓÑ ÓÔÁÎÄÁ̉ÔÎÙÊ ×ÈÏÄ.\n"
-
-#: src/m4.c:358
-#, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "îÅ×Å̉ÎÙÊ Æ̀ÁÇ ÏỒÁÄËÉ: '%s'"
-
-#: src/m4.c:437
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ËÏÄ × ËÏÓ×ÅÎÎÙÈ Á̉ÇƠÍÅÎÔÁÈ"
-
-#: src/macro.c:92
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ̀ÅËÓÅÍÙ × expand_token ()"
-
-#: src/macro.c:158
-msgid "ERROR: EOF in argument list"
-msgstr "ïûéâëá: ëÏÎÅĂ ÆÁỀÁ × ÓĐÉÓËÅ Á̉ÇƠÍÅÎÔÏ×"
-
-#: src/macro.c:176
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ̀ÅËÓÅÍÙ × expand_argument ()"
-
-#: src/macro.c:253
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "÷îơộåîîññ ïûéâëá: îÅ×Å̉ÎÙÊ ÔÉĐ ÓÉÍ×Ï̀Á × call_macro ()"
-
-#: src/macro.c:282
-#, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr ""
-"ïûéâëá: ́ÉÍÉÔ ̉ÅËỞÓÉÉ %d ÉÓ̃Å̉ĐÁÎ, ÉÓĐÏ̀ØÚƠÊÔÅ -L<N> ̃ÔÏÂÙ ÉÚÍÅÎÉÔØ ÅÇÏ"
-
-#: src/output.c:198
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "ïûéâëá: îÅ ÍÏÇƠ ÓÏÚÄÁÔØ ×̉ÅÍÅÎÎÙÊ ÆÁỀ Ä̀Ñ ̉ÁÚ×ÅÔ×̀ÅÎÉÑ ÍÁË̉ÏÏẨÁÂÏÔËÉ"
-
-#: src/output.c:208
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "ïûéâëá: îÅ ÍÏÇƠ ÚÁĐÉÓÁÔØ ̉ÁÚ×ÅÔ×̀ÅÎÉÅ ×Ï ×̉ÅÍÅÎÎÙÊ ÆÁỀ"
-
-#: src/output.c:292
-msgid "ERROR: Copying inserted file"
-msgstr "ïûéâëá: ëÏĐÉ̉ƠÀ ×ÓÔÁ×̀ÅÎÎÙÊ ÆÁỀ"
-
-#: src/output.c:473
-msgid "ERROR: Reading inserted file"
-msgstr "ïûéâëá: ₫ÉÔÁÀ ×ÓÔÁ×̀ÅÎÎÙÊ ÆÁỀ"
-
-#: src/output.c:572
-msgid "Cannot stat diversion"
-msgstr "îÅ×ÏÚÍÏÖÎÏ ĐÏÄÓ̃ÉÔÁÔØ ̉ÁÚ×ÅÔ×̀ÅÎÉÅ"
-
-#: src/path.c:131
-#, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "đƠÔØ ĐÏÉÓËÁ Ä̀Ñ `%s' ÎÁÊÄÅÎ `%s'"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-msgid "VMEM limit exceeded?\n"
-msgstr "ëÏÎ̃É̀ÁÓØ ×É̉ÔƠÁ̀ØÎÁÑ ĐÁÍÑÔØ?\n"
-
-#: src/stackovf.c:190
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"ïÂÎÁ̉ƠÖÅÎ ×ÙÈÏÄ ÚÁ Ç̉ÁÎÉĂƠ ĐÁÍÑÔÉ (SIGSEGV). üÔÏ ̀ÉÂÏ ĐÅ̉ÅĐÏ̀ÎÅÎÉÅ ÓÔÅËÁ\n"
-"É̀É ÏÛÉÂËÁ × "
-
-#: src/stackovf.c:195
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". đ̉Ï×Å̉ËÁ ÎÁ ×ÏÚÍÏÖÎƠÀ ÂÅÓËÏÎÅ̃ÎƠÀ ̉ÅËỞÓÉÀ.\n"
-
-#: src/symtab.c:190
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "÷îơộåîîññ ïûéâëá: ÎÅ×Å̉ÎÙÊ ̉ÅÖÉÍ Ä̀Ñ symbol_lookup ()"
-
-#: src/symtab.c:243
-#, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "éÍÑ `%s' ÎÅÉÚ×ÅÓÔÎÏ\n"
-
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "îÅ×Å̉ÎÏÅ ̉ÅÇỜÑ̉ÎÏÅ ×Ù̉ÁÖÅÎÉÅ: '%s': %s"
-
-#~ msgid "%s: option `%s' is ambiguous\n"
-#~ msgstr "%s: ÏĐĂÉÑ `%s' ÎÅÏÄÎÏÚÎÁ̃ÎÁ\n"
-
-#~ msgid "%s: option `--%s' doesn't allow an argument\n"
-#~ msgstr "%s: Ơ ÏĐĂÉÉ `--%s' ÎÅ ÄÏ̀ÖÎÏ ÂÙÔØ Á̉ÇƠÍÅÎÔÏ×\n"
-
-#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
-#~ msgstr "%s: Ơ ÏĐĂÉÉ `%c%s' ÎÅ ÄÏ̀ÖÎÏ ÂÙÔØ Á̉ÇƠÍÅÎÔÏ×\n"
-
-#~ msgid "%s: option `%s' requires an argument\n"
-#~ msgstr "%s: Ơ ÏĐĂÉÉ `%s' ÄÏ̀ÖÅÎ ÂÙÔØ Á̉ÇƠÍÅÎÔ\n"
-
-#~ msgid "%s: unrecognized option `--%s'\n"
-#~ msgstr "%s: ÎÅÉÚ×ÅÓÔÎÁÑ ÏĐĂÉÑ `--%s'\n"
-
-#~ msgid "%s: unrecognized option `%c%s'\n"
-#~ msgstr "%s: ÎÅÉÚ×ÅÓÔÎÁÑ ÏĐĂÉÑ '%c%s'\n"
-
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: ÚÁĐ̉ÅƯÅÎÎÁÑ ÏĐĂÉÑ -- %c\n"
-
-#~ msgid "%s: invalid option -- %c\n"
-#~ msgstr "%s: ÎÅ×Å̉ÎÁÑ ÏĐĂÉÑ -- %c\n"
-
-#~ msgid "%s: option requires an argument -- %c\n"
-#~ msgstr "%s: ÏĐĂÉÉ ÎÅÏÂÈÏÄÉÍ Á̉ÇƠÍÅÎÔ -- %c\n"
-
-#~ msgid "No previous regular expression"
-#~ msgstr "îÅÔ Đ̉ÅÄÛÅÄÓÔ×ƠÀƯÅÇÏ ̉ÅÇỜÑ̉ÎÏÇÏ ×Ù̉ÁÖÅÎÉÑ"
-
-#~ msgid "Memory exhausted"
-#~ msgstr "đÁÍÑÔØ ÉÓ̃Å̉ĐÁÎÁ"
diff --git a/po/sv.gmo b/po/sv.gmo
deleted file mode 100644
index 2cebf070..00000000
--- a/po/sv.gmo
+++ /dev/null
Binary files differ
diff --git a/po/sv.po b/po/sv.po
deleted file mode 100644
index 73ef692a..00000000
--- a/po/sv.po
+++ /dev/null
@@ -1,549 +0,0 @@
-# Swedish messages for m4
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# <Jan.Djarv@mbox200.swipnet.se>, 1996.
-# $Revision$
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: m4 1.4.3\n"
-"POT-Creation-Date: 1998-08-03 17:14+0200\n"
-"PO-Revision-Date: $Date$\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
-#, 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
-#, fuzzy, c-format
-msgid "Warning: Excess arguments to built-in `%s' ignored"
-msgstr "Varning: Överskottsargument till inbyggt makro \"%s\" ignorerade"
-
-#: src/builtin.c:298
-#, fuzzy, c-format
-msgid "Non-numeric argument to built-in `%s'"
-msgstr "Ickenumeriskt argument till inbyggt makro \"%s\""
-
-#: src/builtin.c:438
-#, 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
-#, fuzzy, c-format
-msgid "Undefined name %s"
-msgstr "Odefinierat namn \"%s\""
-
-#: src/builtin.c:636
-#, fuzzy
-msgid "INTERNAL ERROR: Builtin not found in builtin table!"
-msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
-
-#: src/builtin.c:644
-#, 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
-#, fuzzy, c-format
-msgid "Undefined macro `%s'"
-msgstr "Odefinierat makro \"%s\""
-
-#: src/builtin.c:735
-#, fuzzy
-msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
-msgstr "INTERNT FEL: Otillåten symboltyp i m4_defn ()"
-
-#: src/builtin.c:772
-#, fuzzy, c-format
-msgid "Cannot open pipe to command `%s'"
-msgstr "Kan inte skapa rör till kommandot \"%s\""
-
-#: src/builtin.c:811
-#, fuzzy, c-format
-msgid "Radix in eval out of range (radix = %d)"
-msgstr "Otillåten bas i \"eval\" (bas = %d)"
-
-#: src/builtin.c:820
-#, fuzzy
-msgid "Negative width to eval"
-msgstr "Negativ bredd till \"eval\""
-
-#: src/builtin.c:925
-#, fuzzy, c-format
-msgid "Non-numeric argument to %s"
-msgstr "Ickenumeriskt argument till %s"
-
-#: src/builtin.c:937
-#, fuzzy, c-format
-msgid "Cannot undivert %s"
-msgstr "Kan inte återleda %s"
-
-#: src/builtin.c:1043 src/freeze.c:207
-#, fuzzy, c-format
-msgid "Cannot open %s"
-msgstr "Kan inte öppna %s"
-
-#: src/builtin.c:1248
-#, fuzzy, c-format
-msgid "Debugmode: bad debug flags: `%s'"
-msgstr "Felsökningsläge: okänd flagga: \"%s\""
-
-#: src/builtin.c:1284
-#, fuzzy, c-format
-msgid "Cannot set error file: %s"
-msgstr "Kan inte sätta felutskriftsfil: %s"
-
-#: src/builtin.c:1501
-#, 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
-#, fuzzy, c-format
-msgid "Bad regular expression `%s': %s"
-msgstr "Otillåtet reguljäruttryck \"%s\": %s"
-
-#: src/builtin.c:1573 src/builtin.c:1646
-#, fuzzy, c-format
-msgid "Error matching regular expression `%s'"
-msgstr "Reguljäruttrycket \"%s\" matchar inte"
-
-#: src/debug.c:379
-#, fuzzy
-msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
-msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen (trace_pre ())"
-
-#: src/debug.c:387
-#, fuzzy
-msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
-msgstr "INTERNT FEL: Otillåten lexikalisk datatyp (trace_pre ())"
-
-#: src/eval.c:277
-#, 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
-#, fuzzy, c-format
-msgid "Bad expression in eval: %s"
-msgstr "Otillåtet uttryck i \"eval\": %s"
-
-#: src/eval.c:288
-#, 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
-#, 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
-#, fuzzy, c-format
-msgid "Divide by zero in eval: %s"
-msgstr "Division med noll i \"eval\": %s"
-
-#: src/eval.c:303
-#, fuzzy, c-format
-msgid "Modulo by zero in eval: %s"
-msgstr "Modulo med noll i \"eval\": %s"
-
-#: src/eval.c:308
-#, fuzzy
-msgid "INTERNAL ERROR: Bad error code in evaluate ()"
-msgstr "INTERNT FEL: Otillåten felkod i evaluate ()"
-
-#: src/eval.c:547
-#, 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
-#, fuzzy
-msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
-msgstr "INTERNT FEL: Otillåten skiftoperator i shift_term ()"
-
-#: src/eval.c:674
-#, fuzzy
-msgid "INTERNAL ERROR: Bad operator in mult_term ()"
-msgstr "INTERNT FEL: Otillåten operator i mult_term ()"
-
-#: src/freeze.c:115
-#, fuzzy
-msgid "INTERNAL ERROR: Built-in not found in builtin table!"
-msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
-
-#: src/freeze.c:128
-#, fuzzy
-msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
-msgstr "INTERNT FEL: Otillåten lexikalisk datatyp i freeze_one_symbol ()"
-
-#: src/freeze.c:159
-#, fuzzy
-msgid "Expecting line feed in frozen file"
-msgstr "Förväntar nyrad i fryst fil"
-
-#: src/freeze.c:161
-#, fuzzy, c-format
-msgid "Expecting character `%c' in frozen file"
-msgstr "Förväntar tecknet \"%c\" i fryst fil"
-
-#: src/freeze.c:218
-#, fuzzy
-msgid "Ill-formated frozen file"
-msgstr "Korrupt fryst fil"
-
-#: src/freeze.c:273 src/freeze.c:289
-#, fuzzy
-msgid "Premature end of frozen file"
-msgstr "För tidigt filslut i fryst fil"
-
-#: src/freeze.c:323
-#, fuzzy, c-format
-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
-#, fuzzy, c-format
-msgid "Input read from %s"
-msgstr "Indata läses från %s"
-
-#: src/input.c:231
-#, 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
-#, 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
-#, fuzzy
-msgid "INTERNAL ERROR: Input stack botch in next_char ()"
-msgstr "INTERNT FEL: Instacken havererade i next_char ()"
-
-#: src/input.c:550
-#, fuzzy
-msgid "NONE"
-msgstr "INGET"
-
-#: src/input.c:777
-#, fuzzy
-msgid "ERROR: EOF in string"
-msgstr "FEL: Filslut i sträng"
-
-#: src/m4.c:106
-#, fuzzy
-msgid "ERROR: Stack overflow. (Infinite define recursion?)"
-msgstr "FEL: Stacken flödar över. (Oändlig rekursion?)"
-
-#: src/m4.c:133
-#, fuzzy, c-format
-msgid "Try `%s --help' for more information.\n"
-msgstr "Försök med \"%s --help\" för mer information.\n"
-
-#: src/m4.c:137
-#, fuzzy, c-format
-msgid "Usage: %s [OPTION]... [FILE]...\n"
-msgstr "Användning: %s [FLAGGA]... [FIL]...\n"
-
-#: src/m4.c:138
-#, fuzzy
-msgid ""
-"Mandatory or optional arguments to long options are mandatory or optional\n"
-"for short options too.\n"
-"\n"
-"Operation modes:\n"
-" --help display this help and exit\n"
-" --version output version information and exit\n"
-" -e, --interactive unbuffer output, ignore interrupts\n"
-" -E, --fatal-warnings stop execution after first warning\n"
-" -Q, --quiet, --silent suppress some warnings for builtins\n"
-" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
-msgstr ""
-"Obligatoriska respektive valfria argument för långa flaggor är\n"
-"obligatoriska respektive valfria även för korta flaggor.\n"
-"\n"
-"Körlägen:\n"
-" --help visa denna hjälptext och avsluta\n"
-" --version visa versionsinformation och avsluta\n"
-" -e, --interactive obuffrad utskrift, ignorera avbrott\n"
-" -E, --fatal-warnings avsluta exekvering efter första varningen\n"
-" -Q, --quiet, --silent undertryck vissa varningar för inbyggda "
-"makron\n"
-" -P, --prefix-builtins alla inbyggda makron börjar med `m4_'\n"
-
-#: src/m4.c:151
-#, fuzzy
-msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
-msgstr " -W, --word-regexp=REGEXP använd REGEXP som makronamnsyntax\n"
-
-#: src/m4.c:155
-#, fuzzy
-msgid ""
-"\n"
-"Preprocessor features:\n"
-" -I, --include=DIRECTORY search this directory second for includes\n"
-" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
-" -U, --undefine=NAME delete builtin NAME\n"
-" -s, --synclines generate `#line NO \"FILE\"' lines\n"
-msgstr ""
-"\n"
-"Förprocessorstyrning:\n"
-" -I, --include=KATALOG sök i katalog efter inkluderade filer\n"
-" -D, --define=NAMN[=VÄRDE] definiera NAMN som VÄRDE, eller tomt\n"
-" -U, --undefine=NAMN ta bort inbyggt makro\n"
-" -s, --synclines generera `#line NNN \"FIL\"' rader\n"
-
-#: src/m4.c:163
-#, fuzzy
-msgid ""
-"\n"
-"Limits control:\n"
-" -G, --traditional suppress all GNU extensions\n"
-" -H, --hashsize=PRIME set symbol lookup hash table size\n"
-" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
-msgstr ""
-"\n"
-"Begränsningskontroll:\n"
-" -G, --traditional undertryck alla extra GNU tillägg\n"
-" -H, --hashsize=PRIMTAL sätt storlek på symboltabellen\n"
-" -L, --nesting-limit=NUMMER ändra artificiell nästningsnivå\n"
-
-#: src/m4.c:170
-#, fuzzy
-msgid ""
-"\n"
-"Frozen state files:\n"
-" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
-" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
-msgstr ""
-"\n"
-"Frysta tillståndsfiler:\n"
-" -F, --freeze-state=FIL spara fryst tillstånd i FIL i slutet\n"
-" -R, --reload-state=FIL läs fryst tillstånd från FIL i början\n"
-
-#: src/m4.c:176
-#, fuzzy
-msgid ""
-"\n"
-"Debugging:\n"
-" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
-" -t, --trace=NAME trace NAME when it will be defined\n"
-" -l, --arglength=NUM restrict macro tracing size\n"
-" -o, --error-output=FILE redirect debug and trace output\n"
-msgstr ""
-"\n"
-"Felsökning:\n"
-" -d, --debug=[FLAGGOR] sätt felsökningsnivå\n"
-" (inga FLAGGOR tolkas som \"aeq\")\n"
-" -t, --trace=NAMN spåra NAMN när den blir definierad\n"
-" -l, --arglength=NUMMER begränsa makrospårningsstorleken\n"
-" -o, --error-output=FIL avled felsöknings och spårutskrifter till "
-"FIL\n"
-
-#: src/m4.c:184
-#, fuzzy
-msgid ""
-"\n"
-"FLAGS is any of:\n"
-" t trace for all macro calls, not only traceon'ed\n"
-" a show actual arguments\n"
-" e show expansion\n"
-" q quote values as necessary, with a or e flag\n"
-" c show before collect, after collect and after call\n"
-" x add a unique macro call id, useful with c flag\n"
-" f say current input file name\n"
-" l say current input line number\n"
-" p show results of path searches\n"
-" i show changes in input files\n"
-" V shorthand for all of the above flags\n"
-msgstr ""
-"\n"
-"FLAGGOR kan vara en eller flera av:\n"
-" t spåra alla makroanrop, inte bara de som spåras med \"traceon\"\n"
-" a visa aktuella argument\n"
-" e visa expansioner\n"
-" q sätt citationstecken där det behövs, gäller \"a\" och \"e\"\n"
-" c visa före insamling, efter insamling och efter anrop\n"
-" x lägg till en unik identifierare för makroanrop, användbart med \"c\"\n"
-" f visa namnet på aktuell infil\n"
-" l visa raden i aktuell infil\n"
-" p visa resultatet av sökvägssökningar\n"
-" i visa byten av infil\n"
-" V förkortning för alla ovanstående flaggor\n"
-
-#: src/m4.c:199
-#, fuzzy
-msgid ""
-"\n"
-"If no FILE or if FILE is `-', standard input is read.\n"
-msgstr ""
-"\n"
-"Om ingen FIL anges eller om FIL är `-', så läses standard in.\n"
-
-#: src/m4.c:358
-#, fuzzy, c-format
-msgid "Bad debug flags: `%s'"
-msgstr "Okänd felsökningsflagga \"%s\""
-
-#: src/m4.c:437
-#, fuzzy
-msgid "INTERNAL ERROR: Bad code in deferred arguments"
-msgstr "INTERNT FEL: Otillåten kod i argument"
-
-#: src/macro.c:92
-#, fuzzy
-msgid "INTERNAL ERROR: Bad token type in expand_token ()"
-msgstr "INTERNT FEL: Otillåten lexikalisk datatyp i expand_token ()"
-
-#: src/macro.c:158
-#, fuzzy
-msgid "ERROR: EOF in argument list"
-msgstr "FEL: Filslut i argumentlistan"
-
-#: src/macro.c:176
-#, fuzzy
-msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
-msgstr "INTERNT FEL: Otillåten lexikalisk datatyp i expand_argument ()"
-
-#: src/macro.c:253
-#, fuzzy
-msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
-msgstr "INTERNT FEL: Otillåten symboltyp i call_macro ()"
-
-#: src/macro.c:282
-#, fuzzy, c-format
-msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
-msgstr "FEL: Rekursionsgräns %d överskriden, använd -L<N> för att ändra"
-
-#: src/output.c:198
-#, fuzzy
-msgid "ERROR: Cannot create temporary file for diversion"
-msgstr "FEL: Kan inte skapa temporär fil för avledning"
-
-#: src/output.c:208
-#, fuzzy
-msgid "ERROR: Cannot flush diversion to temporary file"
-msgstr "FEL: Kan inte skriva avledningen till temporär fil"
-
-#: src/output.c:292
-#, fuzzy
-msgid "ERROR: Copying inserted file"
-msgstr "FEL: Kopiering av insatt fil"
-
-#: src/output.c:473
-#, fuzzy
-msgid "ERROR: Reading inserted file"
-msgstr "FEL: Läsning av insatt fil"
-
-#: src/output.c:572
-#, fuzzy
-msgid "Cannot stat diversion"
-msgstr "Kan inte ta status på avledningen"
-
-#: src/path.c:131
-#, fuzzy, c-format
-msgid "Path search for `%s' found `%s'"
-msgstr "\"%s\" hittades som \"%s\" i sökvägen"
-
-#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
-#. if the stack limit has not been reached.
-#: src/stackovf.c:168
-#, fuzzy
-msgid "VMEM limit exceeded?\n"
-msgstr "VMEM begränsning överskriden?\n"
-
-#: src/stackovf.c:190
-#, fuzzy
-msgid ""
-"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
-"occurred, or there is a bug in "
-msgstr ""
-"Otillåten referens utanför minnesgränserna har upptäckts (SIGSEGV).\n"
-"Antingen flödade stacken över eller så är det ett fel i "
-
-#: src/stackovf.c:195
-#, fuzzy
-msgid ". Check for possible infinite recursion.\n"
-msgstr ". Kontrollera om oändlig rekursion förekommer.\n"
-
-#: src/symtab.c:190
-#, fuzzy
-msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
-msgstr "INTERNT FEL: Otillåtet läge till symbol_lookup ()"
-
-#: src/symtab.c:243
-#, fuzzy, c-format
-msgid "Name `%s' is unknown\n"
-msgstr "Namnet \"%s\" är okänt\n"
-
-#, fuzzy
-#~ msgid "Bad regular expression: `%s': %s"
-#~ msgstr "Otillåtet reguljäruttryck \"%s\": %s"
-
-#, fuzzy
-#~ msgid "%s: option `%s' is ambiguous\n"
-#~ msgstr "%s: flaggan \"%s\" är tvetydig\n"
-
-#, fuzzy
-#~ msgid "%s: option `--%s' doesn't allow an argument\n"
-#~ msgstr "%s: flaggan \"--%s\" tar inget argument\n"
-
-#, fuzzy
-#~ msgid "%s: option `%c%s' doesn't allow an argument\n"
-#~ msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
-
-#, fuzzy
-#~ msgid "%s: option `%s' requires an argument\n"
-#~ msgstr "%s: flaggan \"%s\" behöver ett argument\n"
-
-#, fuzzy
-#~ msgid "%s: unrecognized option `--%s'\n"
-#~ msgstr "%s: okänd flagga \"--%s\"\n"
-
-#, fuzzy
-#~ msgid "%s: unrecognized option `%c%s'\n"
-#~ msgstr "%s: okänd flagga \"%c%s\"\n"
-
-#, fuzzy
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: otillåten flagga -- %c\n"
-
-#, fuzzy
-#~ msgid "%s: invalid option -- %c\n"
-#~ msgstr "%s: ogiltig flagga -- %c\n"
-
-#, fuzzy
-#~ msgid "%s: option requires an argument -- %c\n"
-#~ msgstr "%s: flaggan behöver ett argument -- %c\n"
-
-#, fuzzy
-#~ msgid "No previous regular expression"
-#~ msgstr "Inget föregående reguljäruttryck"
-
-#, fuzzy
-#~ msgid "Memory exhausted"
-#~ msgstr "Minnet slut"
diff --git a/src/Makefile.in b/src/Makefile.in
index eb20b843..a4d02a6d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,122 +1,385 @@
-# Makefile for GNU m4 sources.
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.3 from Makefile.am
-# 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.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# 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.
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# 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.
-
-PRODUCT = @PRODUCT@
-VERSION = @VERSION@
SHELL = /bin/sh
+
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DISTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-CC = @CC@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LDFLAGS = @LDFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AWK = @AWK@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+DATADIRNAME = @DATADIRNAME@
+GENCAT = @GENCAT@
+GLOCALE = @GLOCALE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NM = @NM@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+U = @U@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+l = @l@
+
+AUTOMAKE_OPTIONS = ansi2knr
+CATALOGS = fr.msg
LIBS = @LIBS@
STACKOVF = @STACKOVF@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-transform = @program_transform_name@
-bindir = $(exec_prefix)/bin
+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
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(CC) $(LDFLAGS) -o $@
+m4_LDADD = ../lib/libm4.a @INTLLIBS@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+
+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 \
+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
+m4_LDFLAGS =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP = --best
+SOURCES = $(m4_SOURCES)
+OBJECTS = $(m4_OBJECTS)
+
+all: Makefile $(ANSI2KNR) $(PROGRAMS)
.SUFFIXES:
-.SUFFIXES: .c .o
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+
.c.o:
- $(COMPILE) $<
+ $(COMPILE) -c $<
-ANSI2KNR = @ANSI2KNR@
-O = .@U@o
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
-.SUFFIXES: ._c ._o
-.c._c:
- ./ansi2knr --varargs $< > $@
-._c._o:
- @echo $(COMPILE) $<
- @rm -f _$*.c
- @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
-.c._o:
- ./ansi2knr --varargs $< > $*._c
- @echo $(COMPILE) $*._c
- @rm -f _$*.c
- @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+clean-compile:
-INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/../lib
+distclean-compile:
+ -rm -f *.tab.c
-HEADERS = m4.h
-SOURCES = m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
-macro.c output.c path.c stackovf.c symtab.c
-OBJECTS = m4$O builtin$O debug$O eval$O format$O freeze$O input$O \
-macro$O output$O path$O $(STACKOVF) symtab$O
+maintainer-clean-compile:
-DISTFILES = Makefile.in ansi2knr.c ansi2knr.1 $(HEADERS) $(SOURCES) \
-TAGS
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-all: m4
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-m4: $(OBJECTS) ../lib/libm4.a
- $(LINK) $(OBJECTS) ../lib/libm4.a $(LIBS)
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-$(OBJECTS): $(ANSI2KNR) ../config.h m4.h ../lib/obstack.h
-builtin$O: ../lib/regex.h
+mostlyclean-libtool:
+ -rm -f *.lo
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+mostlyclean-krextra:
+
+clean-krextra:
+ -rm -f ansi2knr
+
+distclean-krextra:
+
+maintainer-clean-krextra:
ansi2knr: ansi2knr.o
$(LINK) ansi2knr.o $(LIBS)
+ansi2knr.o: $(CONFIG_HEADER)
+
+
+mostlyclean-kr:
+ -rm -f *_.c
+
+clean-kr:
-install: all
- $(srcdir)/../mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) m4 $(bindir)/`echo m4 | sed '$(transform)'`
+distclean-kr:
-uninstall:
- rm -f $(bindir)/`echo m4 | sed '$(transform)'`
+maintainer-clean-kr:
+
+m4: $(m4_OBJECTS) $(m4_DEPENDENCIES)
+ @rm -f m4
+ $(LINK) $(m4_LDFLAGS) $(m4_OBJECTS) $(m4_LDADD) $(LIBS)
+builtin_.c: builtin.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/builtin.c; then echo $(srcdir)/builtin.c; else echo builtin.c; fi` | $(ANSI2KNR) builtin_.c
+debug_.c: debug.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/debug.c; then echo $(srcdir)/debug.c; else echo debug.c; fi` | $(ANSI2KNR) debug_.c
+eval_.c: eval.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/eval.c; then echo $(srcdir)/eval.c; else echo eval.c; fi` | $(ANSI2KNR) eval_.c
+format_.c: format.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/format.c; then echo $(srcdir)/format.c; else echo format.c; fi` | $(ANSI2KNR) format_.c
+freeze_.c: freeze.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/freeze.c; then echo $(srcdir)/freeze.c; else echo freeze.c; fi` | $(ANSI2KNR) freeze_.c
+input_.c: input.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/input.c; then echo $(srcdir)/input.c; else echo input.c; fi` | $(ANSI2KNR) input_.c
+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
+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)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/path.c; then echo $(srcdir)/path.c; else echo path.c; fi` | $(ANSI2KNR) path_.c
+stackovf_.c: stackovf.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/stackovf.c; then echo $(srcdir)/stackovf.c; else echo stackovf.c; fi` | $(ANSI2KNR) stackovf_.c
+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 builtin_.lo debug_.o debug_.lo eval_.o eval_.lo format_.o \
+format_.lo freeze_.o freeze_.lo input_.o input_.lo m4_.o m4_.lo \
+macro_.o macro_.lo output_.o output_.lo path_.o path_.lo stackovf_.o \
+stackovf_.lo symtab_.o symtab_.lo : $(ANSI2KNR)
tags: TAGS
-TAGS: $(HEADERS) $(SOURCES)
- cd $(srcdir) && etags -i ../lib/TAGS $(HEADERS) $(SOURCES)
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
-mostlyclean:
- rm -f *.o *._c *._o core core.*
+clean-tags:
-clean: mostlyclean
- rm -f m4
+distclean-tags:
+ -rm -f TAGS ID
-distclean: clean
- rm -f Makefile ansi2knr
+maintainer-clean-tags:
-realclean: distclean
- rm -f TAGS
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-dist: $(DISTFILES)
- @echo "Copying distribution files"
+subdir = src
+
+distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
- ln $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/src 2> /dev/null \
- || cp -p $(srcdir)/$$file ../$(PRODUCT)-$(VERSION)/src; \
+ d=$(srcdir); \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
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
+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
+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
+symtab.o: symtab.c m4.h ../config.h ../lib/obstack.h
+
+info:
+dvi:
+check: all
+ $(MAKE)
+installcheck:
+install-exec: install-binPROGRAMS
+ @$(NORMAL_INSTALL)
+
+install-data:
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall: uninstall-binPROGRAMS
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+ $(mkinstalldirs) $(DATADIR)$(bindir)
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-krextra mostlyclean-kr \
+ mostlyclean-tags mostlyclean-generic
+
+clean: clean-binPROGRAMS clean-compile clean-libtool clean-krextra \
+ clean-kr clean-tags clean-generic mostlyclean
+
+distclean: distclean-binPROGRAMS distclean-compile distclean-libtool \
+ distclean-krextra distclean-kr distclean-tags \
+ distclean-generic clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-binPROGRAMS maintainer-clean-compile \
+ maintainer-clean-libtool maintainer-clean-krextra \
+ maintainer-clean-kr maintainer-clean-tags \
+ maintainer-clean-generic distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool mostlyclean-krextra \
+distclean-krextra clean-krextra maintainer-clean-krextra mostlyclean-kr \
+distclean-kr clean-kr maintainer-clean-kr tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
+installcheck install-exec install-data install uninstall all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=src/$@ CONFIG_HEADERS= ./config.status
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/src/ansi2knr.1 b/src/ansi2knr.1
index 434ce8f0..f9ee5a63 100644
--- a/src/ansi2knr.1
+++ b/src/ansi2knr.1
@@ -1,19 +1,36 @@
-.TH ANSI2KNR 1 "31 December 1990"
+.TH ANSI2KNR 1 "19 Jan 1996"
.SH NAME
ansi2knr \- convert ANSI C to Kernighan & Ritchie C
.SH SYNOPSIS
.I ansi2knr
-input_file output_file
+[--varargs] input_file [output_file]
.SH DESCRIPTION
If no output_file is supplied, output goes to stdout.
.br
There are no error messages.
.sp
.I ansi2knr
-recognizes functions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a right parenthesis as the last character on the line. It will recognize a multi-line header if the last character on each line but the last is a left parenthesis or comma. These algorithms ignore whitespace and comments, except that the function name must be the first thing on the line.
+recognizes function definitions by seeing a non-keyword identifier at the left
+margin, followed by a left parenthesis, with a right parenthesis as the last
+character on the line, and with a left brace as the first token on the
+following line (ignoring possible intervening comments). It will recognize a
+multi-line header provided that no intervening line ends with a left or right
+brace or a semicolon. These algorithms ignore whitespace and comments, except
+that the function name must be the first thing on the line.
.sp
The following constructs will confuse it:
.br
- - Any other construct that starts at the left margin and follows the above syntax (such as a macro or function call).
+ - Any other construct that starts at the left margin and follows the
+above syntax (such as a macro or function call).
.br
- - Macros that tinker with the syntax of the function header.
+ - Some macros that tinker with the syntax of the function header.
+.sp
+The --varargs switch is obsolete, and is recognized only for
+backwards compatibility. The present version of
+.I ansi2knr
+will always attempt to convert a ... argument to va_alist and va_dcl.
+.SH AUTHOR
+L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
+continues to maintain the current version; most of the code in the current
+version is his work. ansi2knr also includes contributions by Francois
+Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/src/ansi2knr.c b/src/ansi2knr.c
index 9bcc4adb..64a4578a 100644
--- a/src/ansi2knr.c
+++ b/src/ansi2knr.c
@@ -1,52 +1,71 @@
-/* Copyright (C) 1989, 1991, 1993, 1994 Aladdin Enterprises. All rights reserved. */
-
/* ansi2knr.c */
-/* Convert ANSI function declarations to K&R syntax */
+/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
/*
-ansi2knr is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
-to anyone for the consequences of using it or for whether it serves any
-particular purpose or works at all, unless he says so in writing. Refer
-to the GNU General Public License for full details.
+ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY. No author or distributor accepts responsibility to anyone for the
+consequences of using it or for whether it serves any particular purpose or
+works at all, unless he says so in writing. Refer to the GNU General Public
+License (the "GPL") for full details.
+
+Everyone is granted permission to copy, modify and redistribute ansi2knr,
+but only under the conditions described in the GPL. A copy of this license
+is supposed to have been given to you along with ansi2knr so you can know
+your rights and responsibilities. It should be in a file named COPYLEFT.
+Among other things, the copyright notice and this notice must be preserved
+on all copies.
-Everyone is granted permission to copy, modify and redistribute
-ansi2knr, but only under the conditions described in the GNU
-General Public License. A copy of this license is supposed to have been
-given to you along with ansi2knr so you can know your rights and
-responsibilities. It should be in a file named COPYLEFT. Among other
-things, the copyright notice and this notice must be preserved on all
-copies.
+We explicitly state here what we believe is already implied by the GPL: if
+the ansi2knr program is distributed as a separate set of sources and a
+separate executable file which are aggregated on a storage medium together
+with another program, this in itself does not bring the other program under
+the GPL, nor does the mere fact that such a program or the procedures for
+constructing it invoke the ansi2knr executable bring any other part of the
+program under the GPL.
*/
/*
* Usage:
- ansi2knr [--varargs] input_file [output_file]
+ ansi2knr input_file [output_file]
* If no output_file is supplied, output goes to stdout.
* There are no error messages.
*
* ansi2knr recognizes function definitions by seeing a non-keyword
* identifier at the left margin, followed by a left parenthesis,
- * with a right parenthesis as the last character on the line.
- * It will recognize a multi-line header provided that the last character
- * of the last line of the header is a right parenthesis,
- * and no intervening line ends with a left brace or a semicolon.
+ * with a right parenthesis as the last character on the line,
+ * and with a left brace as the first token on the following line
+ * (ignoring possible intervening comments).
+ * It will recognize a multi-line header provided that no intervening
+ * line ends with a left or right brace or a semicolon.
* These algorithms ignore whitespace and comments, except that
* the function name must be the first thing on the line.
* The following constructs will confuse it:
* - Any other construct that starts at the left margin and
* follows the above syntax (such as a macro or function call).
- * - Macros that tinker with the syntax of the function header.
- *
- * If the --varargs switch is supplied, ansi2knr will attempt to
- * convert a ... argument to va_alist and va_dcl. If this switch is not
- * supplied, ansi2knr will simply drop any such arguments.
+ * - Some macros that tinker with the syntax of the function header.
*/
/*
* The original and principal author of ansi2knr is L. Peter Deutsch
* <ghost@aladdin.com>. Other authors are noted in the change history
* that follows (in reverse chronological order):
+ lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with
+ compilers that don't understand void, as suggested by
+ Tom Lane
+ lpd 96-01-15 changed to require that the first non-comment token
+ on the line following a function header be a left brace,
+ to reduce sensitivity to macros, as suggested by Tom Lane
+ <tgl@sss.pgh.pa.us>
+ lpd 95-06-22 removed #ifndefs whose sole purpose was to define
+ undefined preprocessor symbols as 0; changed all #ifdefs
+ for configuration symbols to #ifs
+ lpd 95-04-05 changed copyright notice to make it clear that
+ including ansi2knr in a program does not bring the entire
+ program under the GPL
+ lpd 94-12-18 added conditionals for systems where ctype macros
+ don't handle 8-bit characters properly, suggested by
+ Francois Pinard <pinard@iro.umontreal.ca>;
+ removed --varargs switch (this is now the default)
lpd 94-10-10 removed CONFIG_BROKETS conditional
lpd 94-07-16 added some conditionals to help GNU `configure',
suggested by Francois Pinard <pinard@iro.umontreal.ca>;
@@ -57,16 +76,16 @@ copies.
*/
/* Most of the conditionals here are to make ansi2knr work with */
-/* the GNU configure machinery. */
+/* or without the GNU configure machinery. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <ctype.h>
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
/*
For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
@@ -81,33 +100,67 @@ copies.
#else /* not HAVE_CONFIG_H */
-/*
- Without AC_CONFIG_HEADER, merely use <string.h> as in the original
- Ghostscript distribution. This loses on older BSD systems.
- */
+/* Otherwise do it the hard way */
-# include <string.h>
+# ifdef BSD
+# include <strings.h>
+# else
+# ifdef VMS
+ extern int strlen(), strncmp();
+# else
+# include <string.h>
+# endif
+# endif
#endif /* not HAVE_CONFIG_H */
-#ifdef STDC_HEADERS
+#if STDC_HEADERS
# include <stdlib.h>
#else
/*
malloc and free should be declared in stdlib.h,
but if you've got a K&R compiler, they probably aren't.
*/
-char *malloc();
-void free();
+# ifdef MSDOS
+# include <malloc.h>
+# else
+# ifdef VMS
+ extern char *malloc();
+ extern void free();
+# else
+ extern char *malloc();
+ extern int free();
+# endif
+# endif
+
+#endif
+
+/*
+ * The ctype macros don't always handle 8-bit characters correctly.
+ * Compensate for this here.
+ */
+#ifdef isascii
+# undef HAVE_ISASCII /* just in case */
+# define HAVE_ISASCII 1
+#else
+#endif
+#if STDC_HEADERS || !HAVE_ISASCII
+# define is_ascii(c) 1
+#else
+# define is_ascii(c) isascii(c)
#endif
+#define is_space(c) (is_ascii(c) && isspace(c))
+#define is_alpha(c) (is_ascii(c) && isalpha(c))
+#define is_alnum(c) (is_ascii(c) && isalnum(c))
+
/* Scanning macros */
-#define isidchar(ch) (isalnum(ch) || (ch) == '_')
-#define isidfirstchar(ch) (isalpha(ch) || (ch) == '_')
+#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
+#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
/* Forward references */
char *skipspace();
-void writeblanks();
+int writeblanks();
int test1();
int convert1();
@@ -120,7 +173,17 @@ main(argc, argv)
#define bufsize 5000 /* arbitrary size */
char *buf;
char *line;
- int convert_varargs = 0;
+ char *more;
+ /*
+ * In previous versions, ansi2knr recognized a --varargs switch.
+ * If this switch was supplied, ansi2knr would attempt to convert
+ * a ... argument to va_alist and va_dcl; if this switch was not
+ * supplied, ansi2knr would simply drop any such arguments.
+ * Now, ansi2knr always does this conversion, and we only
+ * check for this switch for backward compatibility.
+ */
+ int convert_varargs = 1;
+
if ( argc > 1 && argv[1][0] == '-' )
{ if ( !strcmp(argv[1], "--varargs") )
{ convert_varargs = 1;
@@ -135,7 +198,7 @@ main(argc, argv)
switch ( argc )
{
default:
- printf("Usage: ansi2knr [--varargs] input_file [output_file]\n");
+ printf("Usage: ansi2knr input_file [output_file]\n");
exit(0);
case 2:
out = stdout;
@@ -156,26 +219,53 @@ main(argc, argv)
buf = malloc(bufsize);
line = buf;
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
- { switch ( test1(buf) )
+ {
+test: line += strlen(line);
+ switch ( test1(buf) )
{
case 2: /* a function header */
convert1(buf, out, 1, convert_varargs);
break;
case 1: /* a function */
- convert1(buf, out, 0, convert_varargs);
+ /* Check for a { at the start of the next line. */
+ more = ++line;
+f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
+ goto wl;
+ if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
+ goto wl;
+ switch ( *skipspace(more, 1) )
+ {
+ case '{':
+ /* Definitely a function header. */
+ convert1(buf, out, 0, convert_varargs);
+ fputs(more, out);
+ break;
+ case 0:
+ /* The next line was blank or a comment: */
+ /* keep scanning for a non-comment. */
+ line += strlen(line);
+ goto f;
+ default:
+ /* buf isn't a function header, but */
+ /* more might be. */
+ fputs(buf, out);
+ strcpy(buf, more);
+ line = buf;
+ goto test;
+ }
break;
case -1: /* maybe the start of a function */
- line = buf + strlen(buf);
if ( line != buf + (bufsize - 1) ) /* overflow check */
- continue;
+ continue;
/* falls through */
default: /* not a function */
- fputs(buf, out);
+wl: fputs(buf, out);
break;
}
line = buf;
}
- if ( line != buf ) fputs(buf, out);
+ if ( line != buf )
+ fputs(buf, out);
free(buf);
fclose(out);
fclose(in);
@@ -188,11 +278,14 @@ skipspace(p, dir)
register char *p;
register int dir; /* 1 for forward, -1 for backward */
{ for ( ; ; )
- { while ( isspace(*p) ) p += dir;
- if ( !(*p == '/' && p[dir] == '*') ) break;
+ { while ( is_space(*p) )
+ p += dir;
+ if ( !(*p == '/' && p[dir] == '*') )
+ break;
p += dir; p += dir;
while ( !(*p == '*' && p[dir] == '/') )
- { if ( *p == 0 ) return p; /* multi-line comment?? */
+ { if ( *p == 0 )
+ return p; /* multi-line comment?? */
p += dir;
}
p += dir; p += dir;
@@ -204,13 +297,15 @@ skipspace(p, dir)
* Write blanks over part of a string.
* Don't overwrite end-of-line characters.
*/
-void
+int
writeblanks(start, end)
char *start;
char *end;
{ char *p;
for ( p = start; p < end; p++ )
- if ( *p != '\r' && *p != '\n' ) *p = ' ';
+ if ( *p != '\r' && *p != '\n' )
+ *p = ' ';
+ return 0;
}
/*
@@ -233,24 +328,27 @@ test1(buf)
char *bend;
char *endfn;
int contin;
+
if ( !isidfirstchar(*p) )
- return 0; /* no name at left margin */
+ return 0; /* no name at left margin */
bend = skipspace(buf + strlen(buf) - 1, -1);
switch ( *bend )
{
- case ';': contin = 0 /*2*/; break;
- case ')': contin = 1; break;
- case '{': return 0; /* not a function */
- default: contin = -1;
+ case ';': contin = 0 /*2*/; break;
+ case ')': contin = 1; break;
+ case '{': return 0; /* not a function */
+ case '}': return 0; /* not a function */
+ default: contin = -1;
}
- while ( isidchar(*p) ) p++;
+ while ( isidchar(*p) )
+ p++;
endfn = p;
p = skipspace(p, 1);
if ( *p++ != '(' )
- return 0; /* not a function */
+ return 0; /* not a function */
p = skipspace(p, 1);
if ( *p == ')' )
- return 0; /* no parameters */
+ return 0; /* no parameters */
/* Check that the apparent function name isn't a keyword. */
/* We only need to check for keywords that could be followed */
/* by a left parenthesis (which, unfortunately, is most of them). */
@@ -264,9 +362,10 @@ test1(buf)
char **key = words;
char *kp;
int len = endfn - buf;
+
while ( (kp = *key) != 0 )
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
- return 0; /* name is a keyword */
+ return 0; /* name is a keyword */
key++;
}
}
@@ -282,15 +381,21 @@ convert1(buf, out, header, convert_varargs)
int convert_varargs; /* Boolean */
{ char *endfn;
register char *p;
+ /*
+ * The breaks table contains pointers to the beginning and end
+ * of each argument.
+ */
char **breaks;
unsigned num_breaks = 2; /* for testing */
char **btop;
char **bp;
char **ap;
char *vararg = 0;
+
/* Pre-ANSI implementations don't agree on whether strchr */
/* is called strchr or index, so we open-code it here. */
- for ( endfn = buf; *(endfn++) != '('; ) ;
+ for ( endfn = buf; *(endfn++) != '('; )
+ ;
top: p = endfn;
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
if ( breaks == 0 )
@@ -307,6 +412,7 @@ top: p = endfn;
char *lp = NULL;
char *rp;
char *end = NULL;
+
if ( bp >= btop )
{ /* Filled up break table. */
/* Allocate a bigger one and start over. */
@@ -319,21 +425,21 @@ top: p = endfn;
for ( ; end == NULL; p++ )
{ switch(*p)
{
- case ',':
+ case ',':
if ( !level ) end = p;
break;
- case '(':
+ case '(':
if ( !level ) lp = p;
level++;
break;
- case ')':
+ case ')':
if ( --level < 0 ) end = p;
else rp = p;
break;
- case '/':
+ case '/':
p = skipspace(p, 1) - 1;
break;
- default:
+ default:
;
}
}
@@ -348,26 +454,27 @@ top: p = endfn;
{ p = skipspace(p - 1, -1);
switch ( *p )
{
- case ']': /* skip array dimension(s) */
- case ')': /* skip procedure args OR name */
+ case ']': /* skip array dimension(s) */
+ case ')': /* skip procedure args OR name */
{ int level = 1;
while ( level )
switch ( *--p )
{
- case ']': case ')': level++; break;
- case '[': case '(': level--; break;
- case '/': p = skipspace(p, -1) + 1; break;
- default: ;
+ case ']': case ')': level++; break;
+ case '[': case '(': level--; break;
+ case '/': p = skipspace(p, -1) + 1; break;
+ default: ;
}
}
if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
{ /* We found the name being declared */
while ( !isidfirstchar(*p) )
- p = skipspace(p, 1) + 1;
+ p = skipspace(p, 1) + 1;
goto found;
}
break;
- default: goto found;
+ default:
+ goto found;
}
}
found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
diff --git a/src/builtin.c b/src/builtin.c
index 47506018..5a310ed2 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -32,7 +32,7 @@ extern FILE *popen ();
builtin. */
#define DECLARE(name) \
- static void name _((struct obstack *, int, token_data **))
+ static void name __P ((struct obstack *, int, token_data **))
DECLARE (m4___file__);
DECLARE (m4___line__);
@@ -269,13 +269,13 @@ bad_argc (token_data *name, int argc, int min, int max)
{
if (!suppress_warnings)
M4ERROR ((warning_status, 0,
- "Warning: Too few arguments to built-in `%s'",
+ _("Warning: Too few arguments to built-in `%s'"),
TOKEN_DATA_TEXT (name)));
isbad = TRUE;
}
else if (max > 0 && argc > max && !suppress_warnings)
M4ERROR ((warning_status, 0,
- "Warning: Excess arguments to built-in `%s' ignored",
+ _("Warning: Excess arguments to built-in `%s' ignored"),
TOKEN_DATA_TEXT (name)));
return isbad;
@@ -295,7 +295,7 @@ numeric_arg (token_data *macro, const char *arg, int *valuep)
if (*arg == 0 || (*valuep = strtol (arg, &endp, 10), *endp != 0))
{
M4ERROR ((warning_status, 0,
- "Non-numeric argument to built-in `%s'",
+ _("Non-numeric argument to built-in `%s'"),
TOKEN_DATA_TEXT (macro)));
return FALSE;
}
@@ -435,7 +435,7 @@ define_macro (int argc, token_data **argv, symbol_lookup mode)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad token data type in define_macro ()"));
+ _("INTERNAL ERROR: Bad token data type in define_macro ()")));
abort ();
}
return;
@@ -605,7 +605,7 @@ m4_dumpdef (struct obstack *obs, int argc, token_data **argv)
dump_symbol (s, &data);
else
M4ERROR ((warning_status, 0,
- "Undefined name %s", TOKEN_DATA_TEXT (argv[i])));
+ _("Undefined name %s"), TOKEN_DATA_TEXT (argv[i])));
}
}
@@ -633,16 +633,16 @@ m4_dumpdef (struct obstack *obs, int argc, token_data **argv)
bp = find_builtin_by_addr (SYMBOL_FUNC (data.base[0]));
if (bp == NULL)
{
- M4ERROR ((warning_status, 0, "\
-INTERNAL ERROR: Builtin not found in builtin table!"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Builtin not found in builtin table!")));
abort ();
}
DEBUG_PRINT1 ("<%s>\n", bp->name);
break;
default:
- M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Bad token data type in m4_dumpdef ()")));
abort ();
break;
}
@@ -668,7 +668,7 @@ m4_builtin (struct obstack *obs, int argc, token_data **argv)
bp = find_builtin_by_name (name);
if (bp == NULL)
M4ERROR ((warning_status, 0,
- "Undefined name %s", name));
+ _("Undefined name %s"), name));
else
(*bp->func) (obs, argc - 1, argv + 1);
}
@@ -692,7 +692,7 @@ m4_indir (struct obstack *obs, int argc, token_data **argv)
s = lookup_symbol (name, SYMBOL_LOOKUP);
if (s == NULL)
M4ERROR ((warning_status, 0,
- "Undefined macro `%s'", name));
+ _("Undefined macro `%s'"), name));
else
call_macro (s, argc - 1, argv + 1, obs);
}
@@ -732,7 +732,7 @@ m4_defn (struct obstack *obs, int argc, token_data **argv)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad symbol type in m4_defn ()"));
+ _("INTERNAL ERROR: Bad symbol type in m4_defn ()")));
abort ();
}
}
@@ -769,7 +769,7 @@ m4_esyscmd (struct obstack *obs, int argc, token_data **argv)
if (pin == NULL)
{
M4ERROR ((warning_status, errno,
- "Cannot open pipe to command \"%s\"", ARG (1)));
+ _("Cannot open pipe to command `%s'"), ARG (1)));
sysval = 0xff << 8;
}
else
@@ -808,7 +808,7 @@ m4_eval (struct obstack *obs, int argc, token_data **argv)
if (radix <= 1 || radix > (int) strlen (digits))
{
M4ERROR ((warning_status, 0,
- "Radix in eval out of range (radix = %d)", radix));
+ _("Radix in eval out of range (radix = %d)"), radix));
return;
}
@@ -817,7 +817,7 @@ m4_eval (struct obstack *obs, int argc, token_data **argv)
if (min <= 0)
{
M4ERROR ((warning_status, 0,
- "Negative width to eval"));
+ _("Negative width to eval")));
return;
}
@@ -922,7 +922,8 @@ m4_undivert (struct obstack *obs, int argc, token_data **argv)
insert_diversion (file);
else if (no_gnu_extensions)
M4ERROR ((warning_status, 0,
- "Non-numeric argument to %s", TOKEN_DATA_TEXT (argv[0])));
+ _("Non-numeric argument to %s"),
+ TOKEN_DATA_TEXT (argv[0])));
else
{
fp = path_search (ARG (i));
@@ -933,7 +934,7 @@ m4_undivert (struct obstack *obs, int argc, token_data **argv)
}
else
M4ERROR ((warning_status, errno,
- "Cannot undivert %s", ARG (i)));
+ _("Cannot undivert %s"), ARG (i)));
}
}
}
@@ -1039,7 +1040,7 @@ include (int argc, token_data **argv, boolean silent)
{
if (!silent)
M4ERROR ((warning_status, errno,
- "Cannot open %s", ARG (1)));
+ _("Cannot open %s"), ARG (1)));
return;
}
@@ -1184,7 +1185,7 @@ m4_traceon (struct obstack *obs, int argc, token_data **argv)
set_trace (s, (char *) obs);
else
M4ERROR ((warning_status, 0,
- "Undefined name %s", TOKEN_DATA_TEXT (argv[i])));
+ _("Undefined name %s"), TOKEN_DATA_TEXT (argv[i])));
}
}
@@ -1208,7 +1209,7 @@ m4_traceoff (struct obstack *obs, int argc, token_data **argv)
set_trace (s, NULL);
else
M4ERROR ((warning_status, 0,
- "Undefined name %s", TOKEN_DATA_TEXT (argv[i])));
+ _("Undefined name %s"), TOKEN_DATA_TEXT (argv[i])));
}
}
@@ -1244,7 +1245,7 @@ m4_debugmode (struct obstack *obs, int argc, token_data **argv)
if (new_debug_level < 0)
M4ERROR ((warning_status, 0,
- "Debugmode: bad debug flags: `%s'", ARG (1)));
+ _("Debugmode: bad debug flags: `%s'"), ARG (1)));
else
{
switch (change_flag)
@@ -1280,7 +1281,7 @@ m4_debugfile (struct obstack *obs, int argc, token_data **argv)
debug_set_output (NULL);
else if (!debug_set_output (ARG (1)))
M4ERROR ((warning_status, errno,
- "Cannot set error file: %s", ARG (1)));
+ _("Cannot set error file: %s"), ARG (1)));
}
/* This section contains text processing macros: "len", "index",
@@ -1497,8 +1498,8 @@ substitute (struct obstack *obs, const char *victim, const char *repl,
case '0':
if (!substitute_warned)
{
- M4ERROR ((warning_status, 0, "\
-WARNING: \\0 will disappear, use \\& instead in replacements"));
+ M4ERROR ((warning_status, 0, _("\
+WARNING: \\0 will disappear, use \\& instead in replacements")));
substitute_warned = 1;
}
/* Fall through. */
@@ -1558,7 +1559,7 @@ m4_regexp (struct obstack *obs, int argc, token_data **argv)
if (msg != NULL)
{
M4ERROR ((warning_status, 0,
- "Bad regular expression: `%s': %s", regexp, msg));
+ _("Bad regular expression: `%s': %s"), regexp, msg));
return;
}
@@ -1569,7 +1570,7 @@ m4_regexp (struct obstack *obs, int argc, token_data **argv)
if (startpos == -2)
{
M4ERROR ((warning_status, 0,
- "Error matching regular expression \"%s\"", regexp));
+ _("Error matching regular expression `%s'"), regexp));
return;
}
@@ -1618,7 +1619,7 @@ m4_patsubst (struct obstack *obs, int argc, token_data **argv)
if (msg != NULL)
{
M4ERROR ((warning_status, 0,
- "Bad regular expression `%s': %s", regexp, msg));
+ _("Bad regular expression `%s': %s"), regexp, msg));
if (buf.buffer != NULL)
xfree (buf.buffer);
return;
@@ -1642,7 +1643,7 @@ m4_patsubst (struct obstack *obs, int argc, token_data **argv)
if (matchpos == -2)
M4ERROR ((warning_status, 0,
- "Error matching regular expression \"%s\"", regexp));
+ _("Error matching regular expression `%s'"), regexp));
else if (offset < length)
obstack_grow (obs, victim + offset, length - offset);
break;
diff --git a/src/builtin.h b/src/builtin.h
deleted file mode 100644
index 89088513..00000000
--- a/src/builtin.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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.
-*/
-
-/* Declarations for builtin macros. */
-
-#ifndef BUILTIN_H
-#define BUILTIN_H 1
-
-#include <m4.h>
-
-#define ARG(i) (argc > (i) ? TOKEN_DATA_TEXT (argv[i]) : "")
-
-#define DECLARE(name) \
- static void name __P ((struct obstack *, int, token_data **))
-
-
-
-boolean bad_argc (token_data *name, int argc, int min, int max);
-const char *skip_space (const char *arg);
-
-boolean numeric_arg (token_data *macro, const char *arg, int *valuep);
-void shipout_int (struct obstack *obs, int val);
-
-#endif /* BUILTIN_H */
diff --git a/src/debug.c b/src/debug.c
index ad1988d1..e4df8d65 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -34,7 +34,7 @@ static struct obstack trace;
extern int expansion_level;
-static void debug_set_file _((FILE *));
+static void debug_set_file __P ((FILE *));
/*----------------------------------.
| Initialise the debugging module. |
@@ -376,16 +376,16 @@ trace_pre (const char *name, int id, int argc, token_data **argv)
bp = find_builtin_by_addr (TOKEN_DATA_FUNC (argv[i]));
if (bp == NULL)
{
- M4ERROR ((warning_status, 0, "\
-INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())")));
abort ();
}
trace_format ("<%s>", bp->name);
break;
default:
- M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad token data type (trace_pre ())"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Bad token data type (trace_pre ())")));
abort ();
}
diff --git a/src/eval.c b/src/eval.c
index c6dc85f4..cc89c545 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -54,20 +54,20 @@ typedef enum eval_error
}
eval_error;
-static eval_error logical_or_term _((eval_token, eval_t *));
-static eval_error logical_and_term _((eval_token, eval_t *));
-static eval_error or_term _((eval_token, eval_t *));
-static eval_error xor_term _((eval_token, eval_t *));
-static eval_error and_term _((eval_token, eval_t *));
-static eval_error not_term _((eval_token, eval_t *));
-static eval_error logical_not_term _((eval_token, eval_t *));
-static eval_error cmp_term _((eval_token, eval_t *));
-static eval_error shift_term _((eval_token, eval_t *));
-static eval_error add_term _((eval_token, eval_t *));
-static eval_error mult_term _((eval_token, eval_t *));
-static eval_error exp_term _((eval_token, eval_t *));
-static eval_error unary_term _((eval_token, eval_t *));
-static eval_error simple_term _((eval_token, eval_t *));
+static eval_error logical_or_term __P ((eval_token, eval_t *));
+static eval_error logical_and_term __P ((eval_token, eval_t *));
+static eval_error or_term __P ((eval_token, eval_t *));
+static eval_error xor_term __P ((eval_token, eval_t *));
+static eval_error and_term __P ((eval_token, eval_t *));
+static eval_error not_term __P ((eval_token, eval_t *));
+static eval_error logical_not_term __P ((eval_token, eval_t *));
+static eval_error cmp_term __P ((eval_token, eval_t *));
+static eval_error shift_term __P ((eval_token, eval_t *));
+static eval_error add_term __P ((eval_token, eval_t *));
+static eval_error mult_term __P ((eval_token, eval_t *));
+static eval_error exp_term __P ((eval_token, eval_t *));
+static eval_error unary_term __P ((eval_token, eval_t *));
+static eval_error simple_term __P ((eval_token, eval_t *));
/*--------------------.
| Lexical functions. |
@@ -274,38 +274,38 @@ evaluate (const char *expr, eval_t *val)
case MISSING_RIGHT:
M4ERROR ((warning_status, 0,
- "Bad expression in eval (missing right parenthesis): %s",
+ _("Bad expression in eval (missing right parenthesis): %s"),
expr));
break;
case SYNTAX_ERROR:
M4ERROR ((warning_status, 0,
- "Bad expression in eval: %s", expr));
+ _("Bad expression in eval: %s"), expr));
break;
case UNKNOWN_INPUT:
M4ERROR ((warning_status, 0,
- "Bad expression in eval (bad input): %s", expr));
+ _("Bad expression in eval (bad input): %s"), expr));
break;
case EXCESS_INPUT:
M4ERROR ((warning_status, 0,
- "Bad expression in eval (excess input): %s", expr));
+ _("Bad expression in eval (excess input): %s"), expr));
break;
case DIVIDE_ZERO:
M4ERROR ((warning_status, 0,
- "Divide by zero in eval: %s", expr));
+ _("Divide by zero in eval: %s"), expr));
break;
case MODULO_ZERO:
M4ERROR ((warning_status, 0,
- "Modulo by zero in eval: %s", expr));
+ _("Modulo by zero in eval: %s"), expr));
break;
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad error code in evaluate ()"));
+ _("INTERNAL ERROR: Bad error code in evaluate ()")));
abort ();
}
@@ -544,8 +544,8 @@ cmp_term (eval_token et, eval_t *v1)
break;
default:
- M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad comparison operator in cmp_term ()"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Bad comparison operator in cmp_term ()")));
abort ();
}
}
@@ -587,8 +587,8 @@ shift_term (eval_token et, eval_t *v1)
break;
default:
- M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad shift operator in shift_term ()"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Bad shift operator in shift_term ()")));
abort ();
}
}
@@ -671,7 +671,7 @@ mult_term (eval_token et, eval_t *v1)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad operator in mult_term ()"));
+ _("INTERNAL ERROR: Bad operator in mult_term ()")));
abort ();
}
}
diff --git a/src/evalmp.c b/src/evalmp.c
deleted file mode 100644
index 5c48b8db..00000000
--- a/src/evalmp.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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 is used to compile the gmp aware version of eval() */
-
-#include "m4.h"
-
-#ifdef WITH_GMP
-#define USE_GMP
-
-#include "eval.c"
-#endif
diff --git a/src/freeze.c b/src/freeze.c
index f17baff9..76524ba1 100644
--- a/src/freeze.c
+++ b/src/freeze.c
@@ -62,7 +62,7 @@ produce_frozen_state (const char *name)
/* Write a recognizable header. */
fprintf (file, "# This is a frozen state file generated by GNU %s %s\n",
- PRODUCT, VERSION);
+ PACKAGE, VERSION);
fprintf (file, "V1\n");
/* Dump quote delimiters. */
@@ -112,8 +112,8 @@ produce_frozen_state (const char *name)
bp = find_builtin_by_addr (SYMBOL_FUNC (sym));
if (bp == NULL)
{
- M4ERROR ((warning_status, 0, "\
-INTERNAL ERROR: Built-in not found in builtin table!"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Built-in not found in builtin table!")));
abort ();
}
fprintf (file, "F%d,%d\n",
@@ -125,8 +125,8 @@ INTERNAL ERROR: Built-in not found in builtin table!"));
break;
default:
- M4ERROR ((warning_status, 0, "\
-INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Bad token data type in freeze_one_symbol ()")));
abort ();
break;
}
@@ -156,9 +156,9 @@ static void
issue_expect_message (int expected)
{
if (expected == '\n')
- M4ERROR ((EXIT_FAILURE, 0, "Expecting line feed in frozen file"));
+ M4ERROR ((EXIT_FAILURE, 0, _("Expecting line feed in frozen file")));
else
- M4ERROR ((EXIT_FAILURE, 0, "Expecting character `%c' in frozen file",
+ M4ERROR ((EXIT_FAILURE, 0, _("Expecting character `%c' in frozen file"),
expected));
}
@@ -204,7 +204,7 @@ reload_frozen_state (const char *name)
file = path_search (name);
if (file == NULL)
- M4ERROR ((EXIT_FAILURE, errno, "Cannot open %s", name));
+ M4ERROR ((EXIT_FAILURE, errno, _("Cannot open %s"), name));
allocated[0] = 100;
string[0] = xmalloc ((size_t) allocated[0]);
@@ -215,7 +215,7 @@ reload_frozen_state (const char *name)
switch (character)
{
default:
- M4ERROR ((EXIT_FAILURE, 0, "Ill-formated frozen file"));
+ M4ERROR ((EXIT_FAILURE, 0, _("Ill-formated frozen file")));
case '\n':
@@ -270,7 +270,7 @@ reload_frozen_state (const char *name)
if (number[0] > 0)
if (!fread (string[0], (size_t) number[0], 1, file))
- M4ERROR ((EXIT_FAILURE, 0, "Premature end of frozen file"));
+ M4ERROR ((EXIT_FAILURE, 0, _("Premature end of frozen file")));
string[0][number[0]] = '\0';
}
@@ -286,7 +286,7 @@ reload_frozen_state (const char *name)
if (number[1] > 0)
if (!fread (string[1], (size_t) number[1], 1, file))
- M4ERROR ((EXIT_FAILURE, 0, "Premature end of frozen file"));
+ M4ERROR ((EXIT_FAILURE, 0, _("Premature end of frozen file")));
string[1][number[1]] = '\0';
GET_CHARACTER;
@@ -320,8 +320,8 @@ reload_frozen_state (const char *name)
if (bp)
define_builtin (string[0], bp, SYMBOL_PUSHDEF, 0);
else
- M4ERROR ((warning_status, 0, "\
-`%s' from frozen file not found in builtin table!",
+ M4ERROR ((warning_status, 0, _("\
+`%s' from frozen file not found in builtin table!"),
string[0]));
break;
diff --git a/src/getopt.c b/src/getopt.c
deleted file mode 100644
index efd82235..00000000
--- a/src/getopt.c
+++ /dev/null
@@ -1,1051 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper@gnu.org
- before changing it!
-
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
- Free Software Foundation, Inc.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-# ifndef const
-# define const
-# endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-# include <stdlib.h>
-# include <unistd.h>
-#endif /* GNU C library. */
-
-#ifdef VMS
-# include <unixlib.h>
-# if HAVE_STRING_H - 0
-# include <string.h>
-# endif
-#endif
-
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
-# ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid) gettext (msgid)
-# else
-# define _(msgid) (msgid)
-# endif
-#endif
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As `getopt' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* 1003.2 says this must be 1 before any call. */
-int optind = 1;
-
-/* Formerly, initialization of getopt depended on optind==0, which
- causes problems with re-calling getopt as programs generally don't
- know that. */
-
-int __getopt_initialized;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
-
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
-
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-# include <string.h>
-# define my_index strchr
-#else
-
-# if HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
-extern char *getenv ();
-#endif
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-# if (!defined __STDC__ || !__STDC__) && !defined strlen
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-# endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
-#ifdef _LIBC
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
-
-static int original_argc;
-static char *const *original_argv;
-
-/* Make sure the environment variable bash 2.0 puts in the environment
- is valid for the getopt call we must make sure that the ARGV passed
- to getopt is that one passed to the process. */
-static void
-__attribute__ ((unused))
-store_args_and_env (int argc, char *const *argv)
-{
- /* XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
- original_argc = argc;
- original_argv = argv;
-}
-# ifdef text_set_element
-text_set_element (__libc_subinit, store_args_and_env);
-# endif /* text_set_element */
-
-# define SWAP_FLAGS(ch1, ch2) \
- if (nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-#if defined __STDC__ && __STDC__
-static void exchange (char **);
-#endif
-
-static void
-exchange (argv)
- char **argv;
-{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
-#ifdef _LIBC
- /* First make sure the handling of the `__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- nonoption_flags_len = nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-#if defined __STDC__ && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
-#endif
-static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- first_nonopt = last_nonopt = optind;
-
- nextchar = NULL;
-
- posixly_correct = getenv ("POSIXLY_CORRECT");
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (posixly_correct != NULL)
- ordering = REQUIRE_ORDER;
- else
- ordering = PERMUTE;
-
-#ifdef _LIBC
- if (posixly_correct == NULL
- && argc == original_argc && argv == original_argv)
- {
- if (nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
- if (nonoption_flags_max_len < argc)
- nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
- }
- }
- nonoption_flags_len = nonoption_flags_max_len;
- }
- else
- nonoption_flags_len = 0;
-#endif
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
-{
- optarg = NULL;
-
- if (optind == 0 || !__getopt_initialized)
- {
- if (optind == 0)
- optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring);
- __getopt_initialized = 1;
- }
-
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#ifdef _LIBC
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
-#else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
-#endif
-
- if (nextchar == NULL || *nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
- if (last_nonopt > optind)
- last_nonopt = optind;
- if (first_nonopt > optind)
- first_nonopt = optind;
-
- if (ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (optind < argc && NONOPTION_P)
- optind++;
- last_nonopt = optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (optind != argc && !strcmp (argv[optind], "--"))
- {
- optind++;
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
-
- optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
- return -1;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if (NONOPTION_P)
- {
- if (ordering == REQUIRE_ORDER)
- return -1;
- optarg = argv[optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar)
- == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (opterr)
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- optopt = 0;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (opterr)
- {
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- _("%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- _("%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
- }
-
- nextchar += strlen (nextchar);
-
- optopt = pfound->val;
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (opterr)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
- {
- if (opterr)
- {
- if (argv[optind][1] == '-')
- /* --option */
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
- else
- /* +option or -option */
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
- }
- nextchar = (char *) "";
- optind++;
- optopt = 0;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
-
- if (temp == NULL || c == ':')
- {
- if (opterr)
- {
- if (posixly_correct)
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: illegal option -- %c\n"),
- argv[0], c);
- else
- fprintf (stderr, _("%s: invalid option -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- return '?';
- }
- /* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (opterr)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (opterr)
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (opterr)
- fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-
- nextchar += strlen (nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (opterr)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
- nextchar = NULL;
- return 'W'; /* Let the application handle it. */
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- optind++;
- }
- else
- optarg = NULL;
- nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (opterr)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
-}
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == -1)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/src/getopt.h b/src/getopt.h
deleted file mode 100644
index 12b7ad56..00000000
--- a/src/getopt.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _GETOPT_H
-
-#ifndef __need_getopt
-# define _GETOPT_H 1
-#endif
-
-/* If __GNU_LIBRARY__ is not already defined, either we are being used
- standalone, or this is the first header included in the source file.
- If we are being used with glibc, we need to include <features.h>, but
- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
- not defined, include <ctype.h>, which will pull in <features.h> for us
- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
- doesn't flood the namespace with stuff the way some other headers do.) */
-#if !defined __GNU_LIBRARY__
-# include <ctype.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-#ifndef __need_getopt
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-# if defined __STDC__ && __STDC__
- const char *name;
-# else
- char *name;
-# endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-# define no_argument 0
-# define required_argument 1
-# define optional_argument 2
-#endif /* need getopt */
-
-
-/* Get definitions and prototypes for functions to process the
- arguments in ARGV (ARGC of them, minus the program name) for
- options given in OPTS.
-
- Return the option character from OPTS just read. Return -1 when
- there are no more options. For unrecognized options, or options
- missing arguments, `optopt' is set to the option letter, and '?' is
- returned.
-
- The OPTS string is a list of characters which are recognized option
- letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in `optarg'.
-
- If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU `getopt'.
-
- The argument `--' causes premature termination of argument
- scanning, explicitly telling `getopt' that there are no more
- options.
-
- If OPTS begins with `--', then non-option arguments are treated as
- arguments to the option '\0'. This behavior is specific to the GNU
- `getopt'. */
-
-#if defined __STDC__ && __STDC__
-# ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
-# else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-# endif /* __GNU_LIBRARY__ */
-
-# ifndef __need_getopt
-extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
- const struct option *__longopts, int *__longind);
-extern int getopt_long_only (int __argc, char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int __argc, char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only);
-# endif
-#else /* not __STDC__ */
-extern int getopt ();
-# ifndef __need_getopt
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-# endif
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Make sure we later can get all the definitions and declarations. */
-#undef __need_getopt
-
-#endif /* getopt.h */
diff --git a/src/getopt1.c b/src/getopt1.c
deleted file mode 100644
index 3d264f2d..00000000
--- a/src/getopt1.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "getopt.h"
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/src/input.c b/src/input.c
index 8916fd3f..6a295755 100644
--- a/src/input.c
+++ b/src/input.c
@@ -171,7 +171,7 @@ push_file (FILE *fp, const char *title)
}
if (debug_level & DEBUG_TRACE_INPUT)
- DEBUG_MESSAGE1 ("input read from %s", title);
+ DEBUG_MESSAGE1 (_("Input read from %s"), title);
i = (input_block *) obstack_alloc (current_input,
sizeof (struct input_block));
@@ -228,7 +228,7 @@ push_string_init (void)
if (next != NULL)
{
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Recursive push_string!"));
+ _("INTERNAL ERROR: Recursive push_string!")));
abort ();
}
@@ -308,7 +308,7 @@ pop_input (void)
case INPUT_FILE:
if (debug_level & DEBUG_TRACE_INPUT)
- DEBUG_MESSAGE2 ("input reverted to %s, line %d",
+ DEBUG_MESSAGE2 (_("Input reverted to %s, line %d"),
isp->u.u_f.name, isp->u.u_f.lineno);
fclose (isp->u.u_f.file);
@@ -322,7 +322,7 @@ pop_input (void)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Input stack botch in pop_input ()"));
+ _("INTERNAL ERROR: Input stack botch in pop_input ()")));
abort ();
}
obstack_free (current_input, isp);
@@ -361,7 +361,7 @@ init_macro_token (token_data *td)
if (isp->type != INPUT_MACRO)
{
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad call to init_macro_token ()"));
+ _("INTERNAL ERROR: Bad call to init_macro_token ()")));
abort ();
}
@@ -410,7 +410,7 @@ peek_input (void)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Input stack botch in peek_input ()"));
+ _("INTERNAL ERROR: Input stack botch in peek_input ()")));
abort ();
}
/* End of input source --- pop one level. */
@@ -467,7 +467,7 @@ next_char (void)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Input stack botch in next_char ()"));
+ _("INTERNAL ERROR: Input stack botch in next_char ()")));
abort ();
}
@@ -547,7 +547,7 @@ match_input (const char *s)
void
input_init (void)
{
- current_file = "NONE";
+ current_file = _("NONE");
current_line = 0;
obstack_init (&token_stack);
@@ -634,7 +634,7 @@ set_word_regexp (const char *regexp)
if (msg != NULL)
{
M4ERROR ((warning_status, 0,
- "Bad regular expression `%s': %s", regexp, msg));
+ _("Bad regular expression `%s': %s"), regexp, msg));
return;
}
@@ -774,7 +774,7 @@ next_token (token_data *td)
ch = next_char ();
if (ch == CHAR_EOF)
M4ERROR ((EXIT_FAILURE, 0,
- "ERROR: EOF in string"));
+ _("ERROR: EOF in string")));
if (MATCH (ch, rquote.string))
{
diff --git a/src/ltdl.c b/src/ltdl.c
deleted file mode 100644
index 9cb5887e..00000000
--- a/src/ltdl.c
+++ /dev/null
@@ -1,1691 +0,0 @@
-/* ltdl.c -- system independent dlopen wrapper
- Copyright (C) 1998-2000 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Library General Public License,
-if you distribute this file as part of a program that uses GNU libtool
-to create libraries and programs, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA
-*/
-
-#define _LTDL_COMPILE_
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#if HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
-#if HAVE_MEMORY_H
-#include <memory.h>
-#endif
-
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "ltdl.h"
-
-#ifdef DLL_EXPORT
-# define LTDL_GLOBAL_DATA __declspec(dllexport)
-#else
-# define LTDL_GLOBAL_DATA
-#endif
-
-/* max. filename length */
-#ifndef LTDL_FILENAME_MAX
-#define LTDL_FILENAME_MAX 1024
-#endif
-
-#undef LTDL_READTEXT_MODE
-/* fopen() mode flags for reading a text file */
-#ifdef _WIN32
-#define LTDL_READTEXT_MODE "rt"
-#else
-#define LTDL_READTEXT_MODE "r"
-#endif
-
-#undef LTDL_SYMBOL_LENGTH
-/* This is the maximum symbol size that won't require malloc/free */
-#define LTDL_SYMBOL_LENGTH 128
-
-#undef LTDL_SYMBOL_OVERHEAD
-/* This accounts for the _LTX_ separator */
-#define LTDL_SYMBOL_OVERHEAD 5
-
-static const char objdir[] = LTDL_OBJDIR;
-#ifdef LTDL_SHLIB_EXT
-static const char shlib_ext[] = LTDL_SHLIB_EXT;
-#endif
-
-static const char unknown_error[] = "unknown error";
-static const char dlopen_not_supported_error[] = "dlopen support not available";
-static const char file_not_found_error[] = "file not found";
-static const char no_symbols_error[] = "no symbols defined";
-static const char cannot_open_error[] = "can't open the module";
-static const char cannot_close_error[] = "can't close the module";
-static const char symbol_error[] = "symbol not found";
-static const char memory_error[] = "not enough memory";
-static const char invalid_handle_error[] = "invalid handle";
-static const char buffer_overflow_error[] = "internal buffer overflow";
-static const char shutdown_error[] = "library already shutdown";
-
-#ifndef HAVE_PRELOADED_SYMBOLS
-/* If libtool won't define it, we'd better do */
-LTDL_GLOBAL_DATA const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
-#endif
-
-static const char *last_error = 0;
-
-LTDL_GLOBAL_DATA lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
-LTDL_GLOBAL_DATA void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
-
-typedef struct lt_dltype_t {
- struct lt_dltype_t *next;
- const char *sym_prefix; /* prefix for symbols */
- int (*mod_init) LTDL_PARAMS((void));
- int (*mod_exit) LTDL_PARAMS((void));
- int (*lib_open) LTDL_PARAMS((lt_dlhandle handle, const char *filename));
- int (*lib_close) LTDL_PARAMS((lt_dlhandle handle));
- lt_ptr_t (*find_sym) LTDL_PARAMS((lt_dlhandle handle, const char *symbol));
-} lt_dltype_t;
-
-#define LTDL_TYPE_TOP 0
-
-typedef struct lt_dlhandle_t {
- struct lt_dlhandle_t *next;
- lt_dltype_t *type; /* dlopening interface */
- lt_dlinfo info;
- int depcount; /* number of dependencies */
- lt_dlhandle *deplibs; /* dependencies */
- lt_ptr_t handle; /* system handle */
- lt_ptr_t system; /* system specific data */
- lt_ptr_t app_private; /* application private data */
-} lt_dlhandle_t;
-
-#undef strdup
-#define strdup xstrdup
-
-static inline char *
-strdup(str)
- const char *str;
-{
- char *tmp;
-
- if (!str)
- return 0;
- tmp = (char*) lt_dlmalloc(strlen(str)+1);
- if (tmp)
- strcpy(tmp, str);
- return tmp;
-}
-
-#if ! HAVE_STRCHR
-
-# if HAVE_INDEX
-
-# define strchr index
-
-# else
-
-# define strchr xstrchr
-
-static inline const char*
-strchr(str, ch)
- const char *str;
- int ch;
-{
- const char *p;
-
- for (p = str; *p != (char)ch && *p != '\0'; p++)
- /*NOWORK*/;
-
- return (*p == (char)ch) ? p : 0;
-}
-
-# endif
-
-#endif
-
-#if ! HAVE_STRRCHR
-
-# if HAVE_RINDEX
-
-# define strrchr rindex
-
-# else
-
-# define strrchr xstrrchr
-
-static inline const char*
-strrchr(str, ch)
- const char *str;
- int ch;
-{
- const char *p;
-
- for (p = str; *p != '\0'; p++)
- /*NOWORK*/;
-
- while (*p != (char)ch && p >= str)
- p--;
-
- return (*p == (char)ch) ? p : 0;
-}
-
-# endif
-
-#endif
-
-#if HAVE_LIBDL
-
-/* dynamic linking with dlopen/dlsym */
-
-#if HAVE_DLFCN_H
-# include <dlfcn.h>
-#endif
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-static int
-sys_dl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW);
- if (!handle->handle) {
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = cannot_open_error;
-#endif
- return 1;
- }
- return 0;
-}
-
-static int
-sys_dl_close (handle)
- lt_dlhandle handle;
-{
- if (dlclose(handle->handle) != 0) {
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = cannot_close_error;
-#endif
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_dl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = dlsym(handle->handle, symbol);
-
- if (!address)
-#if HAVE_DLERROR
- last_error = dlerror();
-#else
- last_error = symbol_error;
-#endif
- return address;
-}
-
-static
-lt_dltype_t
-#ifdef NEED_USCORE
-sys_dl = { LTDL_TYPE_TOP, "_", sys_dl_init, sys_dl_exit,
- sys_dl_open, sys_dl_close, sys_dl_sym };
-#else
-sys_dl = { LTDL_TYPE_TOP, 0, sys_dl_init, sys_dl_exit,
- sys_dl_open, sys_dl_close, sys_dl_sym };
-#endif
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_dl
-
-#endif
-
-#if HAVE_SHL_LOAD
-
-/* dynamic linking with shl_load (HP-UX) (comments from gmodule) */
-
-#ifdef HAVE_DL_H
-#include <dl.h>
-#endif
-
-/* some flags are missing on some systems, so we provide
- * harmless defaults.
- *
- * Mandatory:
- * BIND_IMMEDIATE - Resolve symbol references when the library is loaded.
- * BIND_DEFERRED - Delay code symbol resolution until actual reference.
- *
- * Optionally:
- * BIND_FIRST - Place the library at the head of the symbol search order.
- * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied
- * symbols as fatal. This flag allows binding of unsatisfied code
- * symbols to be deferred until use.
- * [Perl: For certain libraries, like DCE, deferred binding often
- * causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE
- * still allows unresolved references in situations like this.]
- * BIND_NOSTART - Do not call the initializer for the shared library when the
- * library is loaded, nor on a future call to shl_unload().
- * BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols.
- *
- * hp9000s700/hp9000s800:
- * BIND_RESTRICTED - Restrict symbols visible by the library to those present at
- * library load time.
- * DYNAMIC_PATH - Allow the loader to dynamically search for the library specified
- * by the path argument.
- */
-
-#ifndef DYNAMIC_PATH
-#define DYNAMIC_PATH 0
-#endif /* DYNAMIC_PATH */
-#ifndef BIND_RESTRICTED
-#define BIND_RESTRICTED 0
-#endif /* BIND_RESTRICTED */
-
-#define LTDL_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH)
-
-static int
-sys_shl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_shl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_shl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = shl_load(filename, LTDL_BIND_FLAGS, 0L);
- if (!handle->handle) {
- last_error = cannot_open_error;
- return 1;
- }
- return 0;
-}
-
-static int
-sys_shl_close (handle)
- lt_dlhandle handle;
-{
- if (shl_unload((shl_t) (handle->handle)) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_shl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address;
-
- if (handle->handle && shl_findsym((shl_t*) &(handle->handle),
- symbol, TYPE_UNDEFINED, &address) == 0)
- if (address)
- return address;
- last_error = symbol_error;
- return 0;
-}
-
-static
-lt_dltype_t
-sys_shl = { LTDL_TYPE_TOP, 0, sys_shl_init, sys_shl_exit,
- sys_shl_open, sys_shl_close, sys_shl_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_shl
-
-#endif
-
-#if HAVE_DLD
-
-/* dynamic linking with dld */
-
-#if HAVE_DLD_H
-#include <dld.h>
-#endif
-
-static int
-sys_dld_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dld_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_dld_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- handle->handle = strdup(filename);
- if (!handle->handle) {
- last_error = memory_error;
- return 1;
- }
- if (dld_link(filename) != 0) {
- last_error = cannot_open_error;
- lt_dlfree(handle->handle);
- return 1;
- }
- return 0;
-}
-
-static int
-sys_dld_close (handle)
- lt_dlhandle handle;
-{
- if (dld_unlink_by_file((char*)(handle->handle), 1) != 0) {
- last_error = cannot_close_error;
- return 1;
- }
- lt_dlfree(handle->filename);
- return 0;
-}
-
-static lt_ptr_t
-sys_dld_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = dld_get_func(symbol);
-
- if (!address)
- last_error = symbol_error;
- return address;
-}
-
-static
-lt_dltype_t
-sys_dld = { LTDL_TYPE_TOP, 0, sys_dld_init, sys_dld_exit,
- sys_dld_open, sys_dld_close, sys_dld_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_dld
-
-#endif
-
-#ifdef _WIN32
-
-/* dynamic linking for Win32 */
-
-#include <windows.h>
-
-static int
-sys_wll_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_wll_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-/* Forward declaration; required to implement handle search below. */
-static lt_dlhandle handles;
-
-static int
-sys_wll_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- lt_dlhandle cur;
- char *searchname = NULL;
- char *ext = strrchr(filename, '.');
-
- if (ext) {
- /* FILENAME already has an extension. */
- searchname = strdup(filename);
- } else {
- /* Append a `.' to stop Windows from adding an
- implicit `.dll' extension. */
- searchname = (char*)lt_dlmalloc(2+ strlen(filename));
- strcpy(searchname, filename);
- strcat(searchname, ".");
- }
-
- handle->handle = LoadLibrary(searchname);
- lt_dlfree(searchname);
-
- /* libltdl expects this function to fail if it is unable
- to physically load the library. Sadly, LoadLibrary
- will search the loaded libraries for a match and return
- one of them if the path search load fails.
-
- We check whether LoadLibrary is returning a handle to
- an already loaded module, and simulate failure if we
- find one. */
- cur = handles;
- while (cur) {
- if (!cur->handle) {
- cur = 0;
- break;
- }
- if (cur->handle == handle->handle)
- break;
- cur = cur->next;
- }
-
- if (cur || !handle->handle) {
- last_error = cannot_open_error;
- return 1;
- }
-
- return 0;
-}
-
-static int
-sys_wll_close (handle)
- lt_dlhandle handle;
-{
- if (FreeLibrary(handle->handle) == 0) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_wll_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = GetProcAddress(handle->handle, symbol);
-
- if (!address)
- last_error = symbol_error;
- return address;
-}
-
-static
-lt_dltype_t
-sys_wll = { LTDL_TYPE_TOP, 0, sys_wll_init, sys_wll_exit,
- sys_wll_open, sys_wll_close, sys_wll_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_wll
-
-#endif
-
-#ifdef __BEOS__
-
-/* dynamic linking for BeOS */
-
-#include <kernel/image.h>
-
-static int
-sys_bedl_init LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_bedl_exit LTDL_PARAMS((void))
-{
- return 0;
-}
-
-static int
-sys_bedl_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- image_id image = 0;
-
- if (filename) {
- image = load_add_on(filename);
- } else {
- image_info info;
- int32 cookie = 0;
- if (get_next_image_info(0, &cookie, &info) == B_OK)
- image = load_add_on(info.name);
- }
- if (image <= 0) {
- last_error = cannot_open_error;
- return 1;
- }
- handle->handle = (void*) image;
- return 0;
-}
-
-static int
-sys_bedl_close (handle)
- lt_dlhandle handle;
-{
- if (unload_add_on((image_id)handle->handle) != B_OK) {
- last_error = cannot_close_error;
- return 1;
- }
- return 0;
-}
-
-static lt_ptr_t
-sys_bedl_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_ptr_t address = 0;
- image_id image = (image_id)handle->handle;
-
- if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY,
- &address) != B_OK) {
- last_error = symbol_error;
- return 0;
- }
- return address;
-}
-
-static
-lt_dltype_t
-sys_bedl = { LTDL_TYPE_TOP, 0, sys_bedl_init, sys_bedl_exit,
- sys_bedl_open, sys_bedl_close, sys_bedl_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &sys_bedl
-
-#endif
-
-/* emulate dynamic linking using preloaded_symbols */
-
-typedef struct lt_dlsymlists_t {
- struct lt_dlsymlists_t *next;
- const lt_dlsymlist *syms;
-} lt_dlsymlists_t;
-
-static const lt_dlsymlist *default_preloaded_symbols = 0;
-static lt_dlsymlists_t *preloaded_symbols = 0;
-
-static int
-presym_init LTDL_PARAMS((void))
-{
- preloaded_symbols = 0;
- if (default_preloaded_symbols)
- return lt_dlpreload(default_preloaded_symbols);
- return 0;
-}
-
-static int
-presym_free_symlists LTDL_PARAMS((void))
-{
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- while (lists) {
- lt_dlsymlists_t *tmp = lists;
-
- lists = lists->next;
- lt_dlfree(tmp);
- }
- preloaded_symbols = 0;
- return 0;
-}
-
-static int
-presym_exit LTDL_PARAMS((void))
-{
- presym_free_symlists();
- return 0;
-}
-
-static int
-presym_add_symlist (preloaded)
- const lt_dlsymlist *preloaded;
-{
- lt_dlsymlists_t *tmp;
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- while (lists) {
- if (lists->syms == preloaded)
- return 0;
- lists = lists->next;
- }
-
- tmp = (lt_dlsymlists_t*) lt_dlmalloc(sizeof(lt_dlsymlists_t));
- if (!tmp) {
- last_error = memory_error;
- return 1;
- }
- tmp->syms = preloaded;
- tmp->next = 0;
- if (!preloaded_symbols)
- preloaded_symbols = tmp;
- else {
- /* append to the end */
- lists = preloaded_symbols;
- while (lists->next)
- lists = lists->next;
- lists->next = tmp;
- }
- return 0;
-}
-
-static int
-presym_open (handle, filename)
- lt_dlhandle handle;
- const char *filename;
-{
- lt_dlsymlists_t *lists = preloaded_symbols;
-
- if (!lists) {
- last_error = no_symbols_error;
- return 1;
- }
- if (!filename)
- filename = "@PROGRAM@";
- while (lists) {
- const lt_dlsymlist *syms = lists->syms;
-
- while (syms->name) {
- if (!syms->address &&
- strcmp(syms->name, filename) == 0) {
- handle->handle = (lt_ptr_t) syms;
- return 0;
- }
- syms++;
- }
- lists = lists->next;
- }
- last_error = file_not_found_error;
- return 1;
-}
-
-static int
-presym_close (handle)
- lt_dlhandle handle;
-{
- /* Just to silence gcc -Wall */
- handle = 0;
- return 0;
-}
-
-static lt_ptr_t
-presym_sym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- lt_dlsymlist *syms = (lt_dlsymlist*)(handle->handle);
-
- syms++;
- while (syms->address) {
- if (strcmp(syms->name, symbol) == 0)
- return syms->address;
- syms++;
- }
- last_error = symbol_error;
- return 0;
-}
-
-static
-lt_dltype_t
-presym = { LTDL_TYPE_TOP, 0, presym_init, presym_exit,
- presym_open, presym_close, presym_sym };
-
-#undef LTDL_TYPE_TOP
-#define LTDL_TYPE_TOP &presym
-
-static char *user_search_path = 0;
-static lt_dlhandle handles = 0;
-static int initialized = 0;
-
-static lt_dltype_t *types = LTDL_TYPE_TOP;
-#undef LTDL_TYPE_TOP
-
-int
-lt_dlinit LTDL_PARAMS((void))
-{
- /* initialize libltdl */
- lt_dltype_t **type = &types;
- int typecount = 0;
-
- if (initialized) { /* Initialize only at first call. */
- initialized++;
- return 0;
- }
- handles = 0;
- user_search_path = 0; /* empty search path */
-
- while (*type) {
- if ((*type)->mod_init())
- *type = (*type)->next; /* Remove it from the list */
- else {
- type = &(*type)->next; /* Keep it */
- typecount++;
- }
- }
- if (typecount == 0) {
- last_error = dlopen_not_supported_error;
- return 1;
- }
- last_error = 0;
- initialized = 1;
- return 0;
-}
-
-int
-lt_dlpreload (preloaded)
- const lt_dlsymlist *preloaded;
-{
- if (preloaded)
- return presym_add_symlist(preloaded);
- presym_free_symlists();
- if (default_preloaded_symbols)
- return lt_dlpreload(default_preloaded_symbols);
- return 0;
-}
-
-int
-lt_dlpreload_default (preloaded)
- const lt_dlsymlist *preloaded;
-{
- default_preloaded_symbols = preloaded;
- return 0;
-}
-
-int
-lt_dlexit LTDL_PARAMS((void))
-{
- /* shut down libltdl */
- lt_dltype_t *type = types;
- int errors;
-
- if (!initialized) {
- last_error = shutdown_error;
- return 1;
- }
- if (initialized != 1) { /* shut down only at last call. */
- initialized--;
- return 0;
- }
- /* close all modules */
- errors = 0;
- while (handles) {
- /* FIXME: what if a module depends on another one? */
- if (lt_dlclose(handles))
- errors++;
- }
- initialized = 0;
- while (type) {
- if (type->mod_exit())
- errors++;
- type = type->next;
- }
- return errors;
-}
-
-static int
-tryall_dlopen (handle, filename)
- lt_dlhandle *handle;
- const char *filename;
-{
- lt_dlhandle cur;
- lt_dltype_t *type = types;
- const char *saved_error = last_error;
-
- /* check whether the module was already opened */
- cur = handles;
- while (cur) {
- /* try to dlopen the program itself? */
- if (!cur->info.filename && !filename)
- break;
- if (cur->info.filename && filename &&
- strcmp(cur->info.filename, filename) == 0)
- break;
- cur = cur->next;
- }
- if (cur) {
- cur->info.ref_count++;
- *handle = cur;
- return 0;
- }
-
- cur = *handle;
- if (filename) {
- cur->info.filename = strdup(filename);
- if (!cur->info.filename) {
- last_error = memory_error;
- return 1;
- }
- } else
- cur->info.filename = 0;
- while (type) {
- if (type->lib_open(cur, filename) == 0)
- break;
- type = type->next;
- }
- if (!type) {
- if (cur->info.filename)
- lt_dlfree(cur->info.filename);
- return 1;
- }
- cur->type = type;
- last_error = saved_error;
- return 0;
-}
-
-static int
-find_module (handle, dir, libdir, dlname, old_name, installed)
- lt_dlhandle *handle;
- const char *dir;
- const char *libdir;
- const char *dlname;
- const char *old_name;
- int installed;
-{
- int error;
- char *filename;
- /* try to open the old library first; if it was dlpreopened,
- we want the preopened version of it, even if a dlopenable
- module is available */
- if (old_name && tryall_dlopen(handle, old_name) == 0)
- return 0;
- /* try to open the dynamic library */
- if (dlname) {
- /* try to open the installed module */
- if (installed && libdir) {
- filename = (char*)
- lt_dlmalloc(strlen(libdir)+1+strlen(dlname)+1);
- if (!filename) {
- last_error = memory_error;
- return 1;
- }
- sprintf (filename, "%s/%s", libdir, dlname);
- error = tryall_dlopen(handle, filename) != 0;
- lt_dlfree(filename);
- if (!error)
- return 0;
- }
- /* try to open the not-installed module */
- if (!installed) {
- filename = (char*)
- lt_dlmalloc((dir ? strlen(dir) : 0)
- + strlen(objdir) + strlen(dlname) + 1);
- if (!filename) {
- last_error = memory_error;
- return 1;
- }
- if (dir)
- strcpy(filename, dir);
- else
- *filename = 0;
- strcat(filename, objdir);
- strcat(filename, dlname);
-
- error = tryall_dlopen(handle, filename) != 0;
- lt_dlfree(filename);
- if (!error)
- return 0;
- }
- /* maybe it was moved to another directory */
- {
- filename = (char*)
- lt_dlmalloc((dir ? strlen(dir) : 0)
- + strlen(dlname) + 1);
- if (dir)
- strcpy(filename, dir);
- else
- *filename = 0;
- strcat(filename, dlname);
- error = tryall_dlopen(handle, filename) != 0;
- lt_dlfree(filename);
- if (!error)
- return 0;
- }
- }
- last_error = file_not_found_error;
- return 1;
-}
-
-static char*
-canonicalize_path (path)
- const char *path;
-{
- char *canonical = NULL;
-
- if (path && *path) {
- char *ptr = strdup (path);
- canonical = ptr;
-#ifdef LTDL_DIRSEP_CHAR
- /* Avoid this overhead where '/' is the only separator. */
- while (ptr = strchr (ptr, LTDL_DIRSEP_CHAR))
- *ptr++ = '/';
-#endif
- }
-
- return canonical;
-}
-
-static lt_ptr_t
-find_file (basename, search_path, pdir, handle)
- const char *basename;
- const char *search_path;
- char **pdir;
- lt_dlhandle *handle;
-{
- /* when handle != NULL search a library, otherwise a file */
- /* return NULL on failure, otherwise the file/handle */
-
- lt_ptr_t result = 0;
- char *filename = 0;
- int filenamesize = 0;
- int lenbase = strlen(basename);
- char *next = 0;
-
- if (!search_path || !*search_path) {
- last_error = file_not_found_error;
- return 0;
- }
- next = canonicalize_path (search_path);
- if (!next) {
- last_error = memory_error;
- goto cleanup;
- }
- while (next) {
- int lendir;
- char *cur = next;
-
- next = strchr(cur, LTDL_PATHSEP_CHAR);
- if (!next)
- next = cur + strlen(cur);
- lendir = next - cur;
- if (*next == LTDL_PATHSEP_CHAR)
- ++next;
- else
- next = 0;
- if (lendir == 0)
- continue;
- if (lendir + 1 + lenbase >= filenamesize) {
- if (filename)
- lt_dlfree(filename);
- filenamesize = lendir + 1 + lenbase + 1;
- filename = (char*) lt_dlmalloc(filenamesize);
- if (!filename) {
- last_error = memory_error;
- goto cleanup;
- }
- }
- strncpy(filename, cur, lendir);
- if (filename[lendir-1] != '/')
- filename[lendir++] = '/';
- strcpy(filename+lendir, basename);
- if (handle) {
- if (tryall_dlopen(handle, filename) == 0) {
- result = (lt_ptr_t) handle;
- goto cleanup;
- }
- } else {
- FILE *file = fopen(filename, LTDL_READTEXT_MODE);
- if (file) {
- if (*pdir)
- lt_dlfree(*pdir);
- filename[lendir] = '\0';
- *pdir = strdup(filename);
- if (!*pdir) {
- /* We could have even avoided the
- strdup, but there would be some
- memory overhead. */
- *pdir = filename;
- } else
- filename = NULL;
- result = (lt_ptr_t) file;
- goto cleanup;
- }
- }
- }
- last_error = file_not_found_error;
-cleanup:
- if (filename)
- lt_dlfree(filename);
- lt_dlfree(next);
- return result;
-}
-
-static int
-load_deplibs(handle, deplibs)
- lt_dlhandle handle;
- const char *deplibs;
-{
- /* FIXME: load deplibs */
- handle->depcount = 0;
- handle->deplibs = 0;
- /* Just to silence gcc -Wall */
- deplibs = 0;
- return 0;
-}
-
-static int
-unload_deplibs(handle)
- lt_dlhandle handle;
-{
- /* FIXME: unload deplibs */
- /* Just to silence gcc -Wall */
- handle = 0;
- return 0;
-}
-
-static inline int
-trim (dest, str)
- char **dest;
- const char *str;
-{
- /* remove the leading and trailing "'" from str
- and store the result in dest */
- char *tmp;
- const char *end = strrchr(str, '\'');
- int len = strlen(str);
-
- if (*dest)
- lt_dlfree(*dest);
- if (len > 3 && str[0] == '\'') {
- tmp = (char*) lt_dlmalloc(end - str);
- if (!tmp) {
- last_error = memory_error;
- return 1;
- }
- strncpy(tmp, &str[1], (end - str) - 1);
- tmp[len-3] = '\0';
- *dest = tmp;
- } else
- *dest = 0;
- return 0;
-}
-
-static inline int
-free_vars( dlname, oldname, libdir, deplibs)
- char *dlname;
- char *oldname;
- char *libdir;
- char *deplibs;
-{
- if (dlname)
- lt_dlfree(dlname);
- if (oldname)
- lt_dlfree(oldname);
- if (libdir)
- lt_dlfree(libdir);
- if (deplibs)
- lt_dlfree(deplibs);
- return 0;
-}
-
-lt_dlhandle
-lt_dlopen (filename)
- const char *filename;
-{
- lt_dlhandle handle = 0, newhandle;
- const char *ext;
- const char *saved_error = last_error;
- char *canonical = 0, *basename = 0, *dir = 0, *name = 0;
-
- if (!filename) {
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle) {
- last_error = memory_error;
- return 0;
- }
- handle->info.ref_count = 0;
- handle->depcount = 0;
- handle->deplibs = 0;
- newhandle = handle;
- if (tryall_dlopen(&newhandle, 0) != 0) {
- lt_dlfree(handle);
- return 0;
- }
- goto register_handle;
- }
- canonical = canonicalize_path (filename);
- if (!canonical) {
- last_error = memory_error;
- if (handle)
- lt_dlfree(handle);
- return 0;
- }
- basename = strrchr(canonical, '/');
- if (basename) {
- basename++;
- dir = (char*) lt_dlmalloc(basename - canonical + 1);
- if (!dir) {
- last_error = memory_error;
- handle = 0;
- goto cleanup;
- }
- strncpy(dir, canonical, basename - canonical);
- dir[basename - canonical] = '\0';
- } else
- basename = canonical;
- /* check whether we open a libtool module (.la extension) */
- ext = strrchr(basename, '.');
- if (ext && strcmp(ext, ".la") == 0) {
- /* this seems to be a libtool module */
- FILE *file;
- int i;
- char *dlname = 0, *old_name = 0;
- char *libdir = 0, *deplibs = 0;
- char *line;
- int error = 0;
- /* if we can't find the installed flag, it is probably an
- installed libtool archive, produced with an old version
- of libtool */
- int installed = 1;
-
- /* extract the module name from the file name */
- name = (char*) lt_dlmalloc(ext - basename + 1);
- if (!name) {
- last_error = memory_error;
- handle = 0;
- goto cleanup;
- }
- /* canonicalize the module name */
- for (i = 0; i < ext - basename; i++)
- if (isalnum((int)(basename[i])))
- name[i] = basename[i];
- else
- name[i] = '_';
- name[ext - basename] = '\0';
- /* now try to open the .la file */
- file = fopen(filename, LTDL_READTEXT_MODE);
- if (!file)
- last_error = file_not_found_error;
- if (!file && !dir) {
- /* try other directories */
- file = (FILE*) find_file(basename,
- user_search_path,
- &dir, 0);
- if (!file)
- file = (FILE*) find_file(basename,
- getenv("LTDL_LIBRARY_PATH"),
- &dir, 0);
-#ifdef LTDL_SHLIBPATH_VAR
- if (!file)
- file = (FILE*) find_file(basename,
- getenv(LTDL_SHLIBPATH_VAR),
- &dir, 0);
-#endif
- }
- if (!file) {
- handle = 0;
- goto cleanup;
- }
- line = (char*) lt_dlmalloc(LTDL_FILENAME_MAX);
- if (!line) {
- fclose(file);
- last_error = memory_error;
- handle = 0;
- goto cleanup;
- }
- /* read the .la file */
- while (!feof(file)) {
- if (!fgets(line, LTDL_FILENAME_MAX, file))
- break;
- if (line[0] == '\n' || line[0] == '#')
- continue;
-# undef STR_DLNAME
-# define STR_DLNAME "dlname="
- if (strncmp(line, STR_DLNAME,
- sizeof(STR_DLNAME) - 1) == 0)
- error = trim(&dlname,
- &line[sizeof(STR_DLNAME) - 1]);
- else
-# undef STR_OLD_LIBRARY
-# define STR_OLD_LIBRARY "old_library="
- if (strncmp(line, STR_OLD_LIBRARY,
- sizeof(STR_OLD_LIBRARY) - 1) == 0)
- error = trim(&old_name,
- &line[sizeof(STR_OLD_LIBRARY) - 1]);
- else
-# undef STR_LIBDIR
-# define STR_LIBDIR "libdir="
- if (strncmp(line, STR_LIBDIR,
- sizeof(STR_LIBDIR) - 1) == 0)
- error = trim(&libdir,
- &line[sizeof(STR_LIBDIR) - 1]);
- else
-# undef STR_DL_DEPLIBS
-# define STR_DL_DEPLIBS "dl_dependency_libs="
- if (strncmp(line, STR_DL_DEPLIBS,
- sizeof(STR_DL_DEPLIBS) - 1) == 0)
- error = trim(&deplibs,
- &line[sizeof(STR_DL_DEPLIBS) - 1]);
- else
- if (strcmp(line, "installed=yes\n") == 0)
- installed = 1;
- else
- if (strcmp(line, "installed=no\n") == 0)
- installed = 0;
- if (error)
- break;
- }
- fclose(file);
- lt_dlfree(line);
- /* allocate the handle */
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle || error) {
- if (handle)
- lt_dlfree(handle);
- if (!error)
- last_error = memory_error;
- free_vars(dlname, old_name, libdir, deplibs);
- /* handle is already set to 0 */
- goto cleanup;
- }
- handle->info.ref_count = 0;
- if (load_deplibs(handle, deplibs) == 0) {
- newhandle = handle;
- /* find_module may replace newhandle */
- if (find_module(&newhandle, dir, libdir,
- dlname, old_name, installed)) {
- unload_deplibs(handle);
- error = 1;
- }
- } else
- error = 1;
- free_vars(dlname, old_name, libdir, deplibs);
- if (error) {
- lt_dlfree(handle);
- handle = 0;
- goto cleanup;
- }
- if (handle != newhandle)
- unload_deplibs(handle);
- } else {
- /* not a libtool module */
- handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
- if (!handle) {
- last_error = memory_error;
- /* handle is already set to 0 */
- goto cleanup;
- }
- handle->info.ref_count = 0;
- /* non-libtool modules don't have dependencies */
- handle->depcount = 0;
- handle->deplibs = 0;
- newhandle = handle;
- if (tryall_dlopen(&newhandle, filename)
- && (dir
- || (!find_file(basename, user_search_path,
- 0, &newhandle)
- && !find_file(basename,
- getenv("LTDL_LIBRARY_PATH"),
- 0, &newhandle)
-#ifdef LTDL_SHLIBPATH_VAR
- && !find_file(basename,
- getenv(LTDL_SHLIBPATH_VAR),
- 0, &newhandle)
-#endif
- ))) {
- lt_dlfree(handle);
- handle = 0;
- goto cleanup;
- }
- }
-register_handle:
- if (newhandle != handle) {
- lt_dlfree(handle);
- handle = newhandle;
- }
- if (!handle->info.ref_count) {
- handle->info.ref_count = 1;
- handle->app_private = 0;
- handle->info.name = name;
- handle->next = handles;
- handles = handle;
- name = 0; /* don't free this during `cleanup' */
- }
- last_error = saved_error;
-cleanup:
- if (dir)
- lt_dlfree(dir);
- if (name)
- lt_dlfree(name);
- if (canonical)
- lt_dlfree(canonical);
- return handle;
-}
-
-lt_dlhandle
-lt_dlopenext (filename)
- const char *filename;
-{
- lt_dlhandle handle;
- char *tmp;
- int len;
- const char *saved_error = last_error;
-
- if (!filename)
- return lt_dlopen(filename);
- len = strlen(filename);
- if (!len) {
- last_error = file_not_found_error;
- return 0;
- }
- /* try the normal file name */
- handle = lt_dlopen(filename);
- if (handle)
- return handle;
- /* try "filename.la" */
- tmp = (char*) lt_dlmalloc(len+4);
- if (!tmp) {
- last_error = memory_error;
- return 0;
- }
- strcpy(tmp, filename);
- strcat(tmp, ".la");
- handle = lt_dlopen(tmp);
- if (handle) {
- last_error = saved_error;
- lt_dlfree(tmp);
- return handle;
- }
-#ifdef LTDL_SHLIB_EXT
- /* try "filename.EXT" */
- if (strlen(shlib_ext) > 3) {
- lt_dlfree(tmp);
- tmp = (char*) lt_dlmalloc(len + strlen(shlib_ext) + 1);
- if (!tmp) {
- last_error = memory_error;
- return 0;
- }
- strcpy(tmp, filename);
- } else
- tmp[len] = '\0';
- strcat(tmp, shlib_ext);
- handle = lt_dlopen(tmp);
- if (handle) {
- last_error = saved_error;
- lt_dlfree(tmp);
- return handle;
- }
-#endif
- last_error = file_not_found_error;
- lt_dlfree(tmp);
- return 0;
-}
-
-int
-lt_dlclose (handle)
- lt_dlhandle handle;
-{
- lt_dlhandle cur, last;
-
- /* check whether the handle is valid */
- last = cur = handles;
- while (cur && handle != cur) {
- last = cur;
- cur = cur->next;
- }
- if (!cur) {
- last_error = invalid_handle_error;
- return 1;
- }
- handle->info.ref_count--;
- if (!handle->info.ref_count) {
- int error;
-
- if (handle != handles)
- last->next = handle->next;
- else
- handles = handle->next;
- error = handle->type->lib_close(handle);
- error += unload_deplibs(handle);
- if (handle->info.filename)
- lt_dlfree(handle->info.filename);
- if (handle->info.name)
- lt_dlfree(handle->info.name);
- lt_dlfree(handle);
- return error;
- }
- return 0;
-}
-
-lt_ptr_t
-lt_dlsym (handle, symbol)
- lt_dlhandle handle;
- const char *symbol;
-{
- int lensym;
- char lsym[LTDL_SYMBOL_LENGTH];
- char *sym;
- lt_ptr_t address;
-
- if (!handle) {
- last_error = invalid_handle_error;
- return 0;
- }
- if (!symbol) {
- last_error = symbol_error;
- return 0;
- }
- lensym = strlen(symbol);
- if (handle->type->sym_prefix)
- lensym += strlen(handle->type->sym_prefix);
- if (handle->info.name)
- lensym += strlen(handle->info.name);
- if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH)
- sym = lsym;
- else
- sym = (char*) lt_dlmalloc(lensym + LTDL_SYMBOL_OVERHEAD + 1);
- if (!sym) {
- last_error = buffer_overflow_error;
- return 0;
- }
- if (handle->info.name) {
- const char *saved_error = last_error;
-
- /* this is a libtool module */
- if (handle->type->sym_prefix) {
- strcpy(sym, handle->type->sym_prefix);
- strcat(sym, handle->info.name);
- } else
- strcpy(sym, handle->info.name);
- strcat(sym, "_LTX_");
- strcat(sym, symbol);
- /* try "modulename_LTX_symbol" */
- address = handle->type->find_sym(handle, sym);
- if (address) {
- if (sym != lsym)
- lt_dlfree(sym);
- return address;
- }
- last_error = saved_error;
- }
- /* otherwise try "symbol" */
- if (handle->type->sym_prefix) {
- strcpy(sym, handle->type->sym_prefix);
- strcat(sym, symbol);
- } else
- strcpy(sym, symbol);
- address = handle->type->find_sym(handle, sym);
- if (sym != lsym)
- lt_dlfree(sym);
- return address;
-}
-
-const char *
-lt_dlerror LTDL_PARAMS((void))
-{
- const char *error = last_error;
-
- last_error = 0;
- return error;
-}
-
-int
-lt_dladdsearchdir (search_dir)
- const char *search_dir;
-{
- if (!search_dir || !strlen(search_dir))
- return 0;
- if (!user_search_path) {
- user_search_path = strdup(search_dir);
- if (!user_search_path) {
- last_error = memory_error;
- return 1;
- }
- } else {
- char *new_search_path = (char*)
- lt_dlmalloc(strlen(user_search_path) +
- strlen(search_dir) + 2); /* ':' + '\0' == 2 */
- if (!new_search_path) {
- last_error = memory_error;
- return 1;
- }
- sprintf (new_search_path, "%s%c%s", user_search_path,
- LTDL_PATHSEP_CHAR, search_dir);
- lt_dlfree(user_search_path);
- user_search_path = new_search_path;
- }
- return 0;
-}
-
-int
-lt_dlsetsearchpath (search_path)
- const char *search_path;
-{
- if (user_search_path)
- lt_dlfree(user_search_path);
- user_search_path = 0; /* reset the search path */
- if (!search_path || !strlen(search_path))
- return 0;
- user_search_path = strdup(search_path);
- if (!user_search_path)
- return 1;
- return 0;
-}
-
-const char *
-lt_dlgetsearchpath LTDL_PARAMS((void))
-{
- return user_search_path;
-}
-
-int
-lt_dlsetdata (handle, data)
- lt_dlhandle handle;
- lt_ptr_t data;
-{
- if (!handle) {
- last_error = invalid_handle_error;
- return 1;
- }
- handle->app_private = data;
- return 0;
-}
-
-lt_ptr_t
-lt_dlgetdata (handle)
- lt_dlhandle handle;
-{
- if (!handle) {
- last_error = invalid_handle_error;
- return 0;
- }
- return handle->app_private;
-}
-
-const lt_dlinfo *
-lt_dlgetinfo (handle)
- lt_dlhandle handle;
-{
- if (!handle) {
- last_error = invalid_handle_error;
- return 0;
- }
- return &(handle->info);
-}
diff --git a/src/ltdl.h b/src/ltdl.h
deleted file mode 100644
index 0fafa207..00000000
--- a/src/ltdl.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* ltdl.h -- generic dlopen functions
- Copyright (C) 1998-2000 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Library General Public License,
-if you distribute this file as part of a program that uses GNU libtool
-to create libraries and programs, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free
-Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA
-*/
-
-/* Only include this header file once. */
-#ifndef _LTDL_H_
-#define _LTDL_H_ 1
-
-/* Canonicalise Windows and Cygwin recognition macros. */
-#ifdef __CYGWIN32__
-# ifndef __CYGWIN__
-# define __CYGWIN__ __CYGWIN32__
-# endif
-#endif
-#ifdef _WIN32
-# ifndef WIN32
-# define WIN32 _WIN32
-# endif
-#endif
-
-/* __BEGIN_DECLS should be used at the beginning of your declarations,
- so that C++ compilers don't mangle their names. Use __END_DECLS at
- the end of C declarations. */
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
-/* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
- that don't understand ANSI C prototypes still work, and ANSI C
- compilers can issue warnings about type mismatches. */
-#undef LTDL_PARAMS
-#undef lt_ptr_t
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
-# define LTDL_PARAMS(protos) protos
-# define lt_ptr_t void*
-#else
-# define LTDL_PARAMS(protos) ()
-# define lt_ptr_t char*
-#endif
-
-#ifdef WIN32
-# ifndef __CYGWIN__
-/* LTDL_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
- separator when it is set. */
-# define LTDL_DIRSEP_CHAR '\\'
-# define LTDL_PATHSEP_CHAR ';'
-# endif
-#endif
-#ifndef LTDL_PATHSEP_CHAR
-# define LTDL_PATHSEP_CHAR ':'
-#endif
-
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. */
-#ifndef LTDL_SCOPE
-# ifdef _WIN32
-# ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define LTDL_SCOPE __declspec(dllexport)
-# endif
-# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
-# define LTDL_SCOPE extern __declspec(dllimport)
-# endif
-# endif
-# ifndef LTDL_SCOPE /* static linking or !_WIN32 */
-# define LTDL_SCOPE extern
-# endif
-#endif
-
-#include <stdlib.h>
-
-#ifdef _LTDL_COMPILE_
-typedef struct lt_dlhandle_t *lt_dlhandle;
-#else
-typedef lt_ptr_t lt_dlhandle;
-#endif
-
-typedef struct {
- const char *name;
- lt_ptr_t address;
-} lt_dlsymlist;
-
-typedef struct {
- char *filename; /* file name */
- char *name; /* module name */
- int ref_count; /* reference count */
-} lt_dlinfo;
-
-__BEGIN_DECLS
-extern int lt_dlinit LTDL_PARAMS((void));
-extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlpreload_default LTDL_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlexit LTDL_PARAMS((void));
-extern lt_dlhandle lt_dlopen LTDL_PARAMS((const char *filename));
-extern lt_dlhandle lt_dlopenext LTDL_PARAMS((const char *filename));
-extern int lt_dlclose LTDL_PARAMS((lt_dlhandle handle));
-extern lt_ptr_t lt_dlsym LTDL_PARAMS((lt_dlhandle handle, const char *name));
-extern const char *lt_dlerror LTDL_PARAMS((void));
-extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
-extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
-extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
-extern int lt_dlsetdata LTDL_PARAMS((lt_dlhandle handle, lt_ptr_t data));
-extern lt_ptr_t lt_dlgetdata LTDL_PARAMS((lt_dlhandle handle));
-extern const lt_dlinfo *lt_dlgetinfo LTDL_PARAMS((lt_dlhandle handle));
-
-LTDL_SCOPE const lt_dlsymlist lt_preloaded_symbols[];
-#define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
-
-LTDL_SCOPE lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
-LTDL_SCOPE void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
-
-__END_DECLS
-
-#endif /* !_LTDL_H_ */
diff --git a/src/m4.c b/src/m4.c
index cdb1b74c..c340656b 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -21,8 +21,6 @@
#include <getopt.h>
#include <sys/signal.h>
-static void usage _((int));
-
/* Operate interactively (-e). */
static int interactive = 0;
@@ -105,7 +103,7 @@ static void
stackovf_handler (void)
{
M4ERROR ((EXIT_FAILURE, 0,
- "ERROR: Stack overflow. (Infinite define recursion?)"));
+ _("ERROR: Stack overflow. (Infinite define recursion?)")));
}
#endif /* USE_STACKOV */
@@ -132,11 +130,12 @@ static void
usage (int status)
{
if (status != EXIT_SUCCESS)
- fprintf (stderr, "Try `%s --help' for more information.\n", program_name);
+ fprintf (stderr, _("Try `%s --help' for more information.\n"),
+ program_name);
else
{
- printf ("Usage: %s [OPTION]... [FILE]...\n", program_name);
- fputs ("\
+ printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name);
+ fputs (_("\
Mandatory or optional arguments to long options are mandatory or optional\n\
for short options too.\n\
\n\
@@ -146,43 +145,43 @@ Operation modes:\n\
-e, --interactive unbuffer output, ignore interrupts\n\
-E, --fatal-warnings stop execution after first warning\n\
-Q, --quiet, --silent suppress some warnings for builtins\n\
- -P, --prefix-builtins force a `m4_' prefix to all builtins\n",
+ -P, --prefix-builtins force a `m4_' prefix to all builtins\n"),
stdout);
#ifdef ENABLE_CHANGEWORD
- fputs ("\
- -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n",
+ fputs (_("\
+ -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"),
stdout);
#endif
- fputs ("\
+ fputs (_("\
\n\
Preprocessor features:\n\
-I, --include=DIRECTORY search this directory second for includes\n\
-D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n\
-U, --undefine=NAME delete builtin NAME\n\
- -s, --synclines generate `#line NO \"FILE\"' lines\n",
+ -s, --synclines generate `#line NO \"FILE\"' lines\n"),
stdout);
- fputs ("\
+ fputs (_("\
\n\
Limits control:\n\
-G, --traditional suppress all GNU extensions\n\
-H, --hashsize=PRIME set symbol lookup hash table size\n\
- -L, --nesting-limit=NUMBER change artificial nesting limit\n",
+ -L, --nesting-limit=NUMBER change artificial nesting limit\n"),
stdout);
- fputs ("\
+ fputs (_("\
\n\
Frozen state files:\n\
-F, --freeze-state=FILE produce a frozen state on FILE at end\n\
- -R, --reload-state=FILE reload a frozen state from FILE at start\n",
+ -R, --reload-state=FILE reload a frozen state from FILE at start\n"),
stdout);
- fputs ("\
+ fputs (_("\
\n\
Debugging:\n\
-d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n\
-t, --trace=NAME trace NAME when it will be defined\n\
-l, --arglength=NUM restrict macro tracing size\n\
- -o, --error-output=FILE redirect debug and trace output\n",
+ -o, --error-output=FILE redirect debug and trace output\n"),
stdout);
- fputs ("\
+ fputs (_("\
\n\
FLAGS is any of:\n\
t trace for all macro calls, not only traceon'ed\n\
@@ -195,11 +194,11 @@ FLAGS is any of:\n\
l say current input line number\n\
p show results of path searches\n\
i show changes in input files\n\
- V shorthand for all of the above flags\n",
+ V shorthand for all of the above flags\n"),
stdout);
- fputs ("\
+ fputs (_("\
\n\
-If no FILE or if FILE is `-', standard input is read.\n",
+If no FILE or if FILE is `-', standard input is read.\n"),
stdout);
}
exit (status);
@@ -258,6 +257,7 @@ main (int argc, char *const *argv, char *const *envp)
FILE *fp;
program_name = argv[0];
+ setlocale (LC_ALL, "");
include_init ();
debug_init ();
@@ -352,7 +352,7 @@ main (int argc, char *const *argv, char *const *envp)
debug_level = debug_decode (optarg);
if (debug_level < 0)
{
- error (0, 0, "bad debug flags: `%s'", optarg);
+ error (0, 0, _("Bad debug flags: `%s'"), optarg);
debug_level = 0;
}
break;
@@ -379,7 +379,7 @@ main (int argc, char *const *argv, char *const *envp)
if (show_version)
{
- printf ("GNU %s %s\n", PRODUCT, VERSION);
+ printf ("GNU %s %s\n", PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}
@@ -431,7 +431,7 @@ main (int argc, char *const *argv, char *const *envp)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad code in deferred arguments"));
+ _("INTERNAL ERROR: Bad code in deferred arguments")));
abort ();
}
diff --git a/src/m4.h b/src/m4.h
index feb37573..d154e0a9 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -16,10 +16,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* We use <config.h> instead of "config.h" so that a compilation
- using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
- (which it would do because it found this file in $srcdir). */
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -32,12 +28,6 @@
# define voidstar char *
#endif
-#ifdef PROTOTYPES
-# define _(Args) Args
-#else
-# define _(Args) ()
-#endif
-
#include <stdio.h>
#include <ctype.h>
@@ -109,6 +99,23 @@ typedef int boolean;
#endif
char *mktemp ();
+
+#ifndef __P
+# ifdef PROTOTYPES
+# define __P(Args) Args
+# else
+# define __P(Args) ()
+# endif
+#endif
+
+#if HAVE_LOCALE_H
+# include <locale.h>
+#else
+# define setlocale(Category, Locale)
+#endif
+
+#include <libintl.h>
+#define _(Text) gettext ((Text))
/* Various declarations. */
@@ -120,15 +127,15 @@ struct string
typedef struct string STRING;
/* Memory allocation. */
-voidstar xmalloc _((unsigned int));
-voidstar xrealloc _((voidstar , unsigned int));
-void xfree _((voidstar));
-char *xstrdup _((const char *));
+voidstar xmalloc __P ((unsigned int));
+voidstar xrealloc __P ((voidstar , unsigned int));
+void xfree __P ((voidstar));
+char *xstrdup __P ((const char *));
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free xfree
/* Other library routines. */
-void error _((int, int, const char *, ...));
+void error __P ((int, int, const char *, ...));
/* Those must come first. */
typedef void builtin_func ();
@@ -154,11 +161,11 @@ extern const char *user_word_regexp; /* -W */
#define M4ERROR(Arglist) \
(reference_error (), error Arglist)
-void reference_error _((void));
+void reference_error __P ((void));
#ifdef USE_STACKOVF
-void setup_stackovf_trap _((char *const *, char *const *,
- void (*handler) (void)));
+void setup_stackovf_trap __P ((char *const *, char *const *,
+ void (*handler) (void)));
#endif
/* File: debug.c --- debugging and tracing function. */
@@ -245,15 +252,15 @@ extern FILE *debug;
} \
while (0)
-void debug_init _((void));
-int debug_decode _((const char *));
-void debug_flush_files _((void));
-boolean debug_set_output _((const char *));
-void debug_message_prefix _((void));
+void debug_init __P ((void));
+int debug_decode __P ((const char *));
+void debug_flush_files __P ((void));
+boolean debug_set_output __P ((const char *));
+void debug_message_prefix __P ((void));
-void trace_prepre _((const char *, int));
-void trace_pre _((const char *, int, int, token_data **));
-void trace_post _((const char *, int, int, token_data **, const char *));
+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. */
@@ -309,18 +316,18 @@ struct token_data
typedef enum token_type token_type;
typedef enum token_data_type token_data_type;
-void input_init _((void));
-int peek_input _((void));
-token_type next_token _((token_data *));
-void skip_line _((void));
+void input_init __P ((void));
+int peek_input __P ((void));
+token_type next_token __P ((token_data *));
+void skip_line __P ((void));
/* push back input */
-void push_file _((FILE *, const char *));
-void push_macro _((builtin_func *, boolean));
-struct obstack *push_string_init _((void));
-const char *push_string_finish _((void));
-void push_wrapup _((const char *));
-boolean pop_wrapup _((void));
+void push_file __P ((FILE *, const char *));
+void push_macro __P ((builtin_func *, boolean));
+struct obstack *push_string_init __P ((void));
+const char *push_string_finish __P ((void));
+void push_wrapup __P ((const char *));
+boolean pop_wrapup __P ((void));
/* current input file, and line */
extern const char *current_file;
@@ -335,22 +342,22 @@ extern STRING lquote, rquote;
#define DEF_BCOMM "#"
#define DEF_ECOMM "\n"
-void set_quotes _((const char *, const char *));
-void set_comment _((const char *, const char *));
+void set_quotes __P ((const char *, const char *));
+void set_comment __P ((const char *, const char *));
#ifdef ENABLE_CHANGEWORD
-void set_word_regexp _((const char *));
+void set_word_regexp __P ((const char *));
#endif
/* File: output.c --- output functions. */
extern int current_diversion;
extern int output_current_line;
-void output_init _((void));
-void shipout_text _((struct obstack *, const char *, int));
-void make_diversion _((int));
-void insert_diversion _((int));
-void insert_file _((FILE *));
-void freeze_diversions _((FILE *));
+void output_init __P ((void));
+void shipout_text __P ((struct obstack *, const char *, int));
+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. */
@@ -395,14 +402,14 @@ typedef void hack_symbol ();
extern symbol **symtab;
-void symtab_init _((void));
-symbol *lookup_symbol _((const char *, symbol_lookup));
-void hack_all_symbols _((hack_symbol *, const char *));
+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 _((void));
-void call_macro _((symbol *, int, token_data **, struct obstack *));
+void expand_input __P ((void));
+void call_macro __P ((symbol *, int, token_data **, struct obstack *));
/* File: builtin.c --- builtins. */
@@ -425,21 +432,22 @@ struct predefined
typedef struct builtin builtin;
typedef struct predefined predefined;
-void builtin_init _((void));
-void define_builtin _((const char *, const builtin *, symbol_lookup, boolean));
-void define_user_macro _((const char *, const char *, symbol_lookup));
-void undivert_all _((void));
-void expand_user_macro _((struct obstack *, symbol *, int, token_data **));
+void builtin_init __P ((void));
+void define_builtin __P ((const char *, const builtin *, symbol_lookup,
+ boolean));
+void define_user_macro __P ((const char *, const char *, symbol_lookup));
+void undivert_all __P ((void));
+void expand_user_macro __P ((struct obstack *, symbol *, int, token_data **));
-const builtin *find_builtin_by_addr _((builtin_func *));
-const builtin *find_builtin_by_name _((const char *));
+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. */
-void include_init _((void));
-void include_env_init _((void));
-void add_include_directory _((const char *));
-FILE *path_search _((const char *));
+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. */
@@ -447,16 +455,16 @@ FILE *path_search _((const char *));
typedef int eval_t;
typedef unsigned int unsigned_eval_t;
-boolean evaluate _((const char *, eval_t *));
+boolean evaluate __P ((const char *, eval_t *));
/* File: format.c --- printf like formatting. */
-void format _((struct obstack *, int, token_data **));
+void format __P ((struct obstack *, int, token_data **));
/* File: freeze.c --- frozen state files. */
-void produce_frozen_state _((const char *));
-void reload_frozen_state _((const char *));
+void produce_frozen_state __P ((const char *));
+void reload_frozen_state __P ((const char *));
/* Debugging the memory allocator. */
diff --git a/src/macro.c b/src/macro.c
index 16cfa6cf..03a0de3c 100644
--- a/src/macro.c
+++ b/src/macro.c
@@ -21,8 +21,8 @@
#include "m4.h"
-static void expand_macro _((symbol *));
-static void expand_token _((struct obstack *, token_type, token_data *));
+static void expand_macro __P ((symbol *));
+static void expand_token __P ((struct obstack *, token_type, token_data *));
/* Current recursion level in expand_macro (). */
int expansion_level = 0;
@@ -89,7 +89,7 @@ expand_token (struct obstack *obs, token_type t, token_data *td)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad token type in expand_token ()"));
+ _("INTERNAL ERROR: Bad token type in expand_token ()")));
abort ();
}
}
@@ -155,7 +155,7 @@ expand_argument (struct obstack *obs, token_data *argp)
case TOKEN_EOF:
M4ERROR ((EXIT_FAILURE, 0,
- "ERROR: EOF in argument list"));
+ _("ERROR: EOF in argument list")));
break;
case TOKEN_WORD:
@@ -173,8 +173,8 @@ expand_argument (struct obstack *obs, token_data *argp)
break;
default:
- M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad token type in expand_argument ()"));
+ M4ERROR ((warning_status, 0, _("\
+INTERNAL ERROR: Bad token type in expand_argument ()")));
abort ();
}
@@ -250,7 +250,7 @@ call_macro (symbol *sym, int argc, token_data **argv,
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Bad symbol type in call_macro ()"));
+ _("INTERNAL ERROR: Bad symbol type in call_macro ()")));
abort ();
}
}
@@ -279,8 +279,8 @@ expand_macro (symbol *sym)
expansion_level++;
if (expansion_level > nesting_limit)
- M4ERROR ((EXIT_FAILURE, 0,
- "ERROR: Recursion limit of %d exceeded, use -L<N> to change it",
+ M4ERROR ((EXIT_FAILURE, 0, _("\
+ERROR: Recursion limit of %d exceeded, use -L<N> to change it"),
nesting_limit));
macro_call_id++;
diff --git a/src/module.c b/src/module.c
deleted file mode 100644
index fb42884c..00000000
--- a/src/module.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* GNU m4 -- A simple macro processor
- Copyright (C) 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.
-*/
-
-#include "m4.h"
-
-#ifdef WITH_MODULES
-
-#define DEBUG_MODULES
-#undef DEBUG_MODULES
-
-/*
- * This file implements dynamic modules in GNU m4. A module is a
- * compiled shared object, that can be linked into GNU m4 at run
- * time. Information about creating modules is in ../modules/README.
- *
- * The current implementation uses dlopen(3). To enable this
- * experimental feature give configure the `--with-modules' switch.
- * This implementation is only tested on Linux.
- *
- * A m4 module need only define one external symbol, called
- * `m4_macro_table'. This symbol should point to a table of `struct
- * builtin' exactly as the one in builtin.c. This table is pushed on a
- * list of builtin tables and each definition therein is added to the
- * symbol table.
- *
- * The code implementing loadable modules is modest. It is divided
- * between the files path.c (search in module path), builtin.c (user
- * interface and support for multiple builtin tables) and this file (OS
- * dependant routines).
- *
- * To load a module, use `loadmodule(modulename.so)', where .so is the
- * normal extention for shared object files. The function
- * `m4_loadmodule' calls module_load() in this file, which uses
- * module_search() in path.c to find the module in the module search
- * path. This path is initialised from the environment variable
- * M4MODPATH, and cannot be modified in any way. Module_search()
- * constructs absolute file names and calls module_try_load() in this
- * file. This function returns NULL on failure and a non-NULL void* on
- * success. If succesful module_search() returns the value of this
- * void*, which is a handle for the vm segment mapped. Module_load()
- * checks to see if the module is alreay loaded, and if not, retrives
- * the symbol `m4_macro_table' and returns it's value to
- * m4_loadmodule(). This pointer should be a builtin*, which is
- * installed using install_builtin_table().
- *
- * When a module is loaded, the function "void m4_init_module(struct
- * obstack *obs)" is called, if defined. Any non NULL return value of
- * this function will be the expansion of "loadmodule". Before program
- * exit, all modules are unloaded and the function "void
- * m4_finish_module(void)" is called, if defined.
- *
- * There is no way to unload a module unless at program exit. It is
- * safe to load the same module several times, it has no effect.
- **/
-
-#include <dlfcn.h>
-
-/* This list is used to check for repeated loading of the same modules. */
-
-struct module_list {
- struct module_list *next;
- char *modname;
- void *handle;
-};
-
-typedef struct module_list module_list;
-
-static module_list *modules;
-
-/*
- * Initialisation. Currently the module search path in path.c is
- * initialised from M4MODPATH. Only absolute path names are accepted to
- * prevent the path search of the dlopen library from finding wrong
- * files.
- */
-void
-module_init (void)
-{
- module_env_init ();
-}
-
-/*
- * Attempt to load a module with a absolute file name. It is used as a
- * callback from module_search() in path.c.
- */
-voidstar
-module_try_load (const char *modname)
-{
- return dlopen (modname, RTLD_NOW);
-}
-
-
-/*
- * Load a module. Modname can be a absolute file name or, if relative,
- * is is searched in the module path. Return value is the value of the
- * symbol `m4_macro_table' in the module. The module is unloaded in
- * case of error. The builtins from the module are installed in the
- * symbol table by the caller, m4_loadmodule() in builtin.c.
- */
-
-struct builtin *
-module_load (const char *modname, struct obstack *obs)
-{
- void *handle;
- struct module_list *list;
-
- builtin *btab;
- module_init_t *init_func;
-
- handle = module_search(modname, module_try_load);
- if (handle == NULL)
- {
- M4ERROR ((1, 0, _("Error: cannot find module `%s'"), modname));
- }
-
- for (list = modules; list != NULL; list = list->next)
- if (list->handle == handle)
- {
-#ifdef DEBUG_MODULES
- DEBUG_MESSAGE1("module %s handle already seen", modname);
-#endif /* DEBUG_MODULES */
- dlclose(handle);
- return NULL;
- }
-
- btab = (builtin *) dlsym (handle, "m4_macro_table");
- if (btab == NULL) {
-#ifdef DEBUG_MODULES
- DEBUG_MESSAGE1("module %s no symbol m4_macro_table", modname);
-#endif /* DEBUG_MODULES */
- dlclose(handle);
- return NULL;
- }
-
- list = xmalloc (sizeof (struct module_list));
- list->next = modules;
- list->modname = xstrdup(modname);
- list->handle = handle;
- modules = list;
-
-#ifdef DEBUG_MODULES
- DEBUG_MESSAGE1("module %s loaded ok", modname);
-#endif /* DEBUG_MODULES */
-
- init_func = (module_init_t *) dlsym (handle, "m4_init_module");
- if (init_func != NULL)
- {
- (*init_func)(obs);
-
-#ifdef DEBUG_MODULES
- DEBUG_MESSAGE1("module %s init hook called", modname);
-#endif /* DEBUG_MODULES */
- }
-
- return btab;
-}
-
-void
-module_unload_all(void)
-{
- struct module_list *next;
- module_finish_t *finish_func;
-
- while (modules != NULL)
- {
- finish_func = (module_finish_t *) dlsym (modules->handle,
- "m4_finish_module");
- if (finish_func != NULL)
- {
- (*finish_func)();
-
-#ifdef DEBUG_MODULES
- DEBUG_MESSAGE1("module %s finish hook called", modules->modname);
-#endif /* DEBUG_MODULES */
- }
-
- dlclose(modules->handle);
-
-#ifdef DEBUG_MODULES
- DEBUG_MESSAGE1("module %s unloaded", modules->modname);
-#endif /* DEBUG_MODULES */
-
- next = modules->next;
- xfree(modules);
- modules = next;
- }
-}
-
-
-
-#endif /* WITH_MODULES */
diff --git a/src/numb.c b/src/numb.c
deleted file mode 100644
index 8dfa077e..00000000
--- a/src/numb.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/* 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
deleted file mode 100644
index 2fa02a58..00000000
--- a/src/numb.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* 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/output.c b/src/output.c
index fdf8795b..ed8f9a74 100644
--- a/src/output.c
+++ b/src/output.c
@@ -195,7 +195,7 @@ make_room_for (int length)
selected_diversion->file = tmpfile ();
if (selected_diversion->file == NULL)
M4ERROR ((EXIT_FAILURE, errno,
- "ERROR: Cannot create temporary file for diversion"));
+ _("ERROR: Cannot create temporary file for diversion")));
if (selected_diversion->used > 0)
{
@@ -205,7 +205,7 @@ make_room_for (int length)
selected_diversion->file);
if (count != 1)
M4ERROR ((EXIT_FAILURE, errno,
- "ERROR: Cannot flush diversion to temporary file"));
+ _("ERROR: Cannot flush diversion to temporary file")));
}
/* Reclaim the buffer space for other diversions. */
@@ -289,7 +289,7 @@ output_text (const char *text, int length)
{
count = fwrite (text, length, 1, output_file);
if (count != 1)
- M4ERROR ((EXIT_FAILURE, errno, "ERROR: Copying inserted file"));
+ M4ERROR ((EXIT_FAILURE, errno, _("ERROR: Copying inserted file")));
}
else
{
@@ -470,7 +470,7 @@ insert_file (FILE *file)
while (length = read (fileno (file), buffer, COPY_BUFFER_SIZE),
length != 0)
if (length == (size_t) -1)
- M4ERROR ((EXIT_FAILURE, errno, "ERROR: Reading inserted file"));
+ M4ERROR ((EXIT_FAILURE, errno, _("ERROR: Reading inserted file")));
else
output_text (buffer, length);
}
@@ -569,7 +569,7 @@ freeze_diversions (FILE *file)
{
fflush (diversion->file);
if (fstat (fileno (diversion->file), &file_stat) < 0)
- M4ERROR ((EXIT_FAILURE, errno, "Cannot stat diversion"));
+ M4ERROR ((EXIT_FAILURE, errno, _("Cannot stat diversion")));
fprintf (file, "D%d,%d", divnum, (int) file_stat.st_size);
}
else
diff --git a/src/path.c b/src/path.c
index 90bdc6de..ebadf734 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_MESSAGE ((_("Path search for `%s' found `%s'"), dir, name));
break;
}
}
diff --git a/src/stackovf.c b/src/stackovf.c
index 10d3851e..ec8078ae 100644
--- a/src/stackovf.c
+++ b/src/stackovf.c
@@ -76,8 +76,11 @@
#define DEBUG_STACKOVF
+
#include "m4.h" /* stdlib.h, xmalloc() */
+#ifdef USE_STACKOVF
+
#include <assert.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -105,7 +108,7 @@
#endif
/* Giving a hand to ansi2knr... */
-typedef void (*handler_t) _((void));
+typedef void (*handler_t) __P ((void));
static const char *stackbot;
static const char *stackend;
@@ -162,7 +165,7 @@ process_sigsegv (int signo, const char *p)
/* sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
if the stack limit has not been reached. */
- write (2, "VMEM limit exceeded?\n", 21);
+ write (2, _("VMEM limit exceeded?\n"), 21);
p = PARAM_STACKOVF;
}
if (diff >= -STACKOVF_DETECT && diff <= STACKOVF_DETECT)
@@ -184,12 +187,12 @@ process_sigsegv (int signo, const char *p)
{
const char *cp;
- cp = "\
+ cp = _("\
Memory bounds violation detected (SIGSEGV). Either a stack overflow\n\
-occurred, or there is a bug in ";
+occurred, or there is a bug in ");
write (2, cp, strlen (cp));
write (2, arg0, strlen (arg0));
- cp = ". Check for possible infinite recursion.\n";
+ cp = _(". Check for possible infinite recursion.\n");
write (2, cp, strlen (cp));
}
@@ -356,7 +359,7 @@ Error - Do not know how to set up stack-ovf trap handler...
#if HAVE_SIGACTION && defined(SA_ONSTACK)
sigaction (SIGSEGV, NULL, &act);
- act.sa_handler = (RETSIGTYPE (*) _((int))) sigsegv_handler;
+ act.sa_handler = (RETSIGTYPE (*) __P ((int))) sigsegv_handler;
sigemptyset (&act.sa_mask);
act.sa_flags = (SA_ONSTACK
#ifdef SA_RESETHAND
@@ -390,3 +393,5 @@ Error - Do not know how to catch signals on an alternate stack...
#endif /* HAVE_SIGALTSTACK && defined(SA_ONSTACK) */
}
+
+#endif /* USE_STACKOVF */
diff --git a/src/symtab.c b/src/symtab.c
index 150a84bf..380632e0 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -187,7 +187,7 @@ lookup_symbol (const char *name, symbol_lookup mode)
default:
M4ERROR ((warning_status, 0,
- "INTERNAL ERROR: Illegal mode to symbol_lookup ()"));
+ _("INTERNAL ERROR: Illegal mode to symbol_lookup ()")));
abort ();
}
}
@@ -240,7 +240,7 @@ symtab_debug (void)
s = lookup_symbol (text, SYMBOL_LOOKUP);
if (s == NULL)
- printf ("Name `%s' is unknown\n", text);
+ printf (_("Name `%s' is unknown\n"), text);
if (delete)
(void) lookup_symbol (text, SYMBOL_DELETE);
diff --git a/stamp-h.in b/stamp-h.in
index aa5b9250..9788f702 100644
--- a/stamp-h.in
+++ b/stamp-h.in
@@ -1 +1 @@
-Sat Nov 5 22:45:51 EST 1994
+timestamp
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644
index 7aed6dc3..00000000
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-# The next line is needed by `./esyscmd.1.test'
-# Ty Coon, President of Vice
-# The previous line is needed by `./esyscmd.1.test'
-
-EXTRA_DIST = get-them foo incl.m4 stamp-TESTS $(TESTS) defs m4wrap.1.test
-
-TESTS = $(OTHER_TESTS) $(GENERATED_TESTS)
-
-GENERATED_TESTS = \
- argument.1.test argument.2.test argument.3.test argument.4.test \
- changeco.1.test changeco.2.test changequ.1.test changequ.2.test \
- changequ.3.test changesy.1.test changesy.2.test changesy.3.test \
- changesy.4.test changesy.5.test changesy.6.test changesy.7.test \
- cleardiv.1.test cleardiv.2.test define.1.test define.2.test \
- defn.1.test defn.2.test divert.1.test divert.2.test divnum.1.test \
- dnl.1.test dumpdef.1.test errprint.1.test errprint.2.test \
- esyscmd.1.test eval.1.test eval.2.test format.1.test ifdef.1.test \
- ifelse.1.test ifelse.2.test include.1.test include.2.test \
- include.3.test incr.1.test index.1.test indir.1.test len.1.test \
- loops.1.test loops.2.test m4exit.1.test patsubst.1.test \
- patsubst.2.test pseudoar.1.test pseudoar.2.test pseudoar.3.test \
- pseudoar.4.test pseudoar.5.test pushdef.1.test pushdef.2.test \
- regexp.1.test regexp.2.test substr.1.test sysval.1.test trace.1.test \
- translit.1.test undefine.1.test undivert.1.test undivert.2.test \
- undivert.3.test
-
-OTHER_TESTS =
-
-all: stamp-TESTS
-
-stamp-TESTS: $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo
- cd $(srcdir) \
- && rm -f *.[0-9].test \
- && AWK=$(AWK) $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo \
- && > $@
diff --git a/tests/Makefile.in b/tests/Makefile.in
deleted file mode 100644
index e8f24129..00000000
--- a/tests/Makefile.in
+++ /dev/null
@@ -1,235 +0,0 @@
-# Makefile.in generated automatically by automake 1.3b from Makefile.am
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# The next line is needed by `./esyscmd.1.test'
-# Ty Coon, President of Vice
-# The previous line is needed by `./esyscmd.1.test'
-
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-AWK = @AWK@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CPP = @CPP@
-DATADIRNAME = @DATADIRNAME@
-GENCAT = @GENCAT@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
-INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
-PACKAGE = @PACKAGE@
-PERL = @PERL@
-POFILES = @POFILES@
-POSUB = @POSUB@
-RANLIB = @RANLIB@
-STACKOVF = @STACKOVF@
-U = @U@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-l = @l@
-
-EXTRA_DIST = get-them foo incl.m4 stamp-TESTS $(TESTS) defs m4wrap.1.test
-
-TESTS = $(OTHER_TESTS) $(GENERATED_TESTS)
-
-GENERATED_TESTS = \
- argument.1.test argument.2.test argument.3.test argument.4.test \
- changeco.1.test changeco.2.test changequ.1.test changequ.2.test \
- changequ.3.test changesy.1.test changesy.2.test changesy.3.test \
- changesy.4.test changesy.5.test changesy.6.test changesy.7.test \
- cleardiv.1.test cleardiv.2.test define.1.test define.2.test \
- defn.1.test defn.2.test divert.1.test divert.2.test divnum.1.test \
- dnl.1.test dumpdef.1.test errprint.1.test errprint.2.test \
- esyscmd.1.test eval.1.test eval.2.test format.1.test ifdef.1.test \
- ifelse.1.test ifelse.2.test include.1.test include.2.test \
- include.3.test incr.1.test index.1.test indir.1.test len.1.test \
- loops.1.test loops.2.test m4exit.1.test patsubst.1.test \
- patsubst.2.test pseudoar.1.test pseudoar.2.test pseudoar.3.test \
- pseudoar.4.test pseudoar.5.test pushdef.1.test pushdef.2.test \
- regexp.1.test regexp.2.test substr.1.test sysval.1.test trace.1.test \
- translit.1.test undefine.1.test undivert.1.test undivert.2.test \
- undivert.3.test
-
-OTHER_TESTS =
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP = --best
-all: Makefile
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps tests/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-tags: TAGS
-TAGS:
-
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = tests
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done
-check-TESTS: $(TESTS)
- @failed=0; all=0; \
- srcdir=$(srcdir); export srcdir; \
- for tst in $(TESTS); do \
- if test -f $$tst; then dir=.; \
- else dir="$(srcdir)"; fi; \
- if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
- all=`expr $$all + 1`; \
- echo "PASS: $$tst"; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- failed=`expr $$failed + 1`; \
- echo "FAIL: $$tst"; \
- fi; \
- done; \
- if test "$$failed" -eq 0; then \
- banner="All $$all tests passed"; \
- else \
- banner="$$failed of $$all tests failed"; \
- fi; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"; \
- test "$$failed" -eq 0
-info:
-dvi:
-check: all
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-installcheck:
-install-exec:
- @$(NORMAL_INSTALL)
-
-install-data:
- @$(NORMAL_INSTALL)
-
-install: install-exec install-data all
- @:
-
-uninstall:
-
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean: mostlyclean-generic
-
-clean: clean-generic mostlyclean
-
-distclean: distclean-generic clean
- -rm -f config.status
-
-maintainer-clean: maintainer-clean-generic distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-.PHONY: tags distdir check-TESTS info dvi installcheck install-exec \
-install-data install uninstall all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
-
-
-all: stamp-TESTS
-
-stamp-TESTS: $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo
- cd $(srcdir) \
- && rm -f *.[0-9].test \
- && AWK=$(AWK) $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo \
- && > $@
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/tests/argument.1.test b/tests/argument.1.test
deleted file mode 100755
index 9398608f..00000000
--- a/tests/argument.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# argument.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1037
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-exch(arg1, arg2)
-EOF
-
-cat <<\EOF >ok
-
-arg2, arg1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/argument.2.test b/tests/argument.2.test
deleted file mode 100755
index abd434f3..00000000
--- a/tests/argument.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# argument.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1047
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-define(exch(``expansion text'', ``macro''))
-macro
-EOF
-
-cat <<\EOF >ok
-
-
-expansion text
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/argument.3.test b/tests/argument.3.test
deleted file mode 100755
index 0231981b..00000000
--- a/tests/argument.3.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# argument.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1067
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', ``Macro name: $0'')
-test
-EOF
-
-cat <<\EOF >ok
-
-Macro name: test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/argument.4.test b/tests/argument.4.test
deleted file mode 100755
index a0c5cbfd..00000000
--- a/tests/argument.4.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# argument.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1077
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `This is macro `foo'.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changeco.1.test b/tests/changeco.1.test
deleted file mode 100755
index d1a60b0c..00000000
--- a/tests/changeco.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# changeco.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1960
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-# A normal comment
-changecom(`/*', `*/')
-# Not a comment anymore
-But: /* this is a comment now */ while this is not a comment
-EOF
-
-cat <<\EOF >ok
-
-# A normal comment
-
-# Not a COMMENT anymore
-But: /* this is a comment now */ while this is not a COMMENT
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changeco.2.test b/tests/changeco.2.test
deleted file mode 100755
index 21854f26..00000000
--- a/tests/changeco.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# changeco.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1981
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-changecom
-# Not a comment anymore
-EOF
-
-cat <<\EOF >ok
-
-
-# Not a COMMENT anymore
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changequ.1.test b/tests/changequ.1.test
deleted file mode 100755
index 4e6f1fa6..00000000
--- a/tests/changequ.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# changequ.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1896
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([, ])
-define([foo], [Macro [foo].])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changequ.2.test b/tests/changequ.2.test
deleted file mode 100755
index 45fd0dbe..00000000
--- a/tests/changequ.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# changequ.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1908
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([[, ]])
-define([[foo]], [[Macro [[[foo]]].]])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro [foo].
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changequ.3.test b/tests/changequ.3.test
deleted file mode 100755
index d9432142..00000000
--- a/tests/changequ.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# changequ.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1920
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `FOO'.')
-changequote(, )
-foo
-`foo'
-EOF
-
-cat <<\EOF >ok
-
-
-Macro `FOO'.
-`Macro `FOO'.'
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.1.test b/tests/changesy.1.test
deleted file mode 100755
index 76512aae..00000000
--- a/tests/changesy.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# changesy.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2126
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test.1', `TEST ONE')
-__file__
-changesyntax(`O_', `W.')
-__file__
-test.1
-EOF
-
-cat <<\EOF >ok
-
-in
-
-__file__
-TEST ONE
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.2.test b/tests/changesy.2.test
deleted file mode 100755
index d34dbb29..00000000
--- a/tests/changesy.2.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# changesy.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2142
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$#')
-test(a, b, c)
-changesyntax(`(<', `,|', `)>', `O(,)')
-test(a, b, c)
-test<a|b|c>
-EOF
-
-cat <<\EOF >ok
-
-3
-
-0(a, b, c)
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.3.test b/tests/changesy.3.test
deleted file mode 100755
index 15a51f77..00000000
--- a/tests/changesy.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# changesy.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2159
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$1$2$3')
-test(a, b, c)
-changesyntax(`O ')
-test(a, b, c)
-EOF
-
-cat <<\EOF >ok
-
-abc
-
-a b c
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.4.test b/tests/changesy.4.test
deleted file mode 100755
index 5dcde934..00000000
--- a/tests/changesy.4.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# changesy.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2178
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`@', `TEST')
-@
-changesyntax(`A@')
-@
-EOF
-
-cat <<\EOF >ok
-
-@
-
-TEST
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.5.test b/tests/changesy.5.test
deleted file mode 100755
index 1156668f..00000000
--- a/tests/changesy.5.test
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# changesy.5.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2202
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `TEST')
-changesyntax(`L<', `R>')
-<test>
-`test>
-changequote(<[>, `]')
-<test>
-[test]
-EOF
-
-cat <<\EOF >ok
-
-
-test
-test
-
-<TEST>
-test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.6.test b/tests/changesy.6.test
deleted file mode 100755
index cae2ee23..00000000
--- a/tests/changesy.6.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# changesy.6.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2224
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changesyntax(`({<', `)}>', `,;:', `O(,)')
-eval{2**4-1; 2 : 8>
-EOF
-
-cat <<\EOF >ok
-
-00001111
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/changesy.7.test b/tests/changesy.7.test
deleted file mode 100755
index 9d4b4b08..00000000
--- a/tests/changesy.7.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# changesy.7.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2235
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `==$1==')
-changequote(`<<', `>>')
-changesyntax(<<L[>>, <<R]>>)
-test(<<testing]>>)
-test([testing>>])
-test([<<testing>>])
-EOF
-
-cat <<\EOF >ok
-
-
-
-==testing]==
-==testing>>==
-==<<testing>>==
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/cleardiv.1.test b/tests/cleardiv.1.test
deleted file mode 100755
index 40f09405..00000000
--- a/tests/cleardiv.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# cleardiv.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2739
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert(-1)
-undivert
-EOF
-
-cat <<\EOF >ok
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/cleardiv.2.test b/tests/cleardiv.2.test
deleted file mode 100755
index 1f5df3ac..00000000
--- a/tests/cleardiv.2.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# cleardiv.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2754
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleardivert',
-`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/define.1.test b/tests/define.1.test
deleted file mode 100755
index cffdbacb..00000000
--- a/tests/define.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# define.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 988
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Hello world.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/define.2.test b/tests/define.2.test
deleted file mode 100755
index e4df34eb..00000000
--- a/tests/define.2.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# define.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1008
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-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(eval(10+7))
-EOF
-
-cat <<\EOF >ok
-
-
-
-
-array element no. 4
-array element no. 17
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/defn.1.test b/tests/defn.1.test
deleted file mode 100755
index bf54769c..00000000
--- a/tests/defn.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# defn.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1231
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`zap', defn(`undefine'))
-zap(`undefine')
-undefine(`zap')
-EOF
-
-cat <<\EOF >ok
-
-
-undefine(zap)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/defn.2.test b/tests/defn.2.test
deleted file mode 100755
index 33ea48bd..00000000
--- a/tests/defn.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# defn.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1251
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`string', `The macro dnl is very useful
-')
-string
-defn(`string')
-EOF
-
-cat <<\EOF >ok
-
-The macro
-The macro dnl is very useful
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/defs b/tests/defs
deleted file mode 100644
index cf97e3b3..00000000
--- a/tests/defs
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- ksh -*-
-# Defines for GNU m4 testing environment.
-# Erick Branderhorst <Erick.Branderhorst@asml.nl>
-
-# Ensure $srcdir set correctly.
-test -f ${srcdir}/defs || {
- echo "defs: installation error" 1>&2
- exit 1
-}
-
-# If srcdir is relative, we need to modify it.
-case "$srcdir" in
- /*)
- ;;
-
- *)
- srcdir="../$srcdir"
- ;;
-esac
-
-rm -rf testSubDir > /dev/null 2>&1
-mkdir testSubDir
-cd testSubDir
-
-# Build appropriate environment in test directory. Eg create
-# configure.in, touch all necessary files, etc.
-
-# nothing yet
-
-# See how redirections should work. User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
- exec > /dev/null 2>&1
-}
-
-# User can set MAKE to choose which make to use. Must use GNU make.
-test -z "$MAKE" && MAKE=make
-
-echo "=== Running test $0"
-
-# See how GNU m4 should be run. No options as default.
-test -z "$M4" && M4=../../src/m4
-
-# See how cmp should be run.
-test -z "$CMP" && CMP=cmp
-
-# Setting nls related vars. Override them in the test when needed.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
diff --git a/tests/divert.1.test b/tests/divert.1.test
deleted file mode 100755
index 3a2a82ac..00000000
--- a/tests/divert.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# divert.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2581
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/divert.2.test b/tests/divert.2.test
deleted file mode 100755
index 2f22d845..00000000
--- a/tests/divert.2.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# divert.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2601
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(-1)
-define(`foo', `Macro `foo'.')
-define(`bar', `Macro `bar'.')
-divert
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/divnum.1.test b/tests/divnum.1.test
deleted file mode 100755
index c1c2638d..00000000
--- a/tests/divnum.1.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# divnum.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2708
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-Initial divnum
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert
-EOF
-
-cat <<\EOF >ok
-Initial 0
-
-
-Diversion one: 1
-
-Diversion two: 2
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/dnl.1.test b/tests/dnl.1.test
deleted file mode 100755
index ecfa0077..00000000
--- a/tests/dnl.1.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# dnl.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1858
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
-foo
-EOF
-
-cat <<\EOF >ok
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/dumpdef.1.test b/tests/dumpdef.1.test
deleted file mode 100755
index 45a21ddd..00000000
--- a/tests/dumpdef.1.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# dumpdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1661
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-dumpdef(`foo')
-dumpdef(`define')
-EOF
-
-cat <<\EOF >ok
-
-
-
-EOF
-
-cat <<\EOF >okerr
-foo: `Hello world.'
-define: <define>
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/errprint.1.test b/tests/errprint.1.test
deleted file mode 100755
index b1d6145c..00000000
--- a/tests/errprint.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# errprint.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3427
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`Illegal arguments to forloop
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-Illegal arguments to forloop
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/errprint.2.test b/tests/errprint.2.test
deleted file mode 100755
index 8f44ca0a..00000000
--- a/tests/errprint.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# errprint.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3452
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`m4:'__file__:__line__: `Input error
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4:in:1: Input error
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/esyscmd.1.test b/tests/esyscmd.1.test
deleted file mode 100755
index b32c6ced..00000000
--- a/tests/esyscmd.1.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# esyscmd.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3316
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`vice', `esyscmd(grep Vice ../Makefile)')
-vice
-EOF
-
-cat <<\EOF >ok
-
-# Ty Coon, President of Vice
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/eval.1.test b/tests/eval.1.test
deleted file mode 100755
index ef9a3ca3..00000000
--- a/tests/eval.1.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# eval.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3200
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(-3 * 5)
-eval(index(`Hello world', `llo') >= 0)
-define(`square', `eval(($1)**2)')
-square(9)
-square(square(5)+1)
-define(`foo', `666')
-eval(`foo'/6)
-eval(foo/6)
-EOF
-
-cat <<\EOF >ok
--15
-1
-
-81
-676
-
-
-111
-EOF
-
-cat <<\EOF >okerr
-in:7: m4: Bad expression in eval: foo/6
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/eval.2.test b/tests/eval.2.test
deleted file mode 100755
index 374b7039..00000000
--- a/tests/eval.2.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# eval.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3231
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(666, 10)
-eval(666, 11)
-eval(666, 6)
-eval(666, 6, 10)
-eval(-666, 6, 10)
-EOF
-
-cat <<\EOF >ok
-666
-556
-3030
-0000003030
--000003030
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/foo b/tests/foo
deleted file mode 100644
index 5716ca59..00000000
--- a/tests/foo
+++ /dev/null
@@ -1 +0,0 @@
-bar
diff --git a/tests/format.1.test b/tests/format.1.test
deleted file mode 100755
index 0434ff23..00000000
--- a/tests/format.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# format.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3036
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `The brown fox jumped over the lazy dog')
-format(`The string "%s" is %d characters long', foo, len(foo))
-EOF
-
-cat <<\EOF >ok
-
-The string "The brown fox jumped over the lazy dog" is 38 characters long
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/argument.1.test b/tests/generated-tests/argument.1.test
deleted file mode 100755
index 25b1d819..00000000
--- a/tests/generated-tests/argument.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/argument.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1030
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-exch(arg1, arg2)
-EOF
-
-cat <<\EOF >ok
-
-arg2, arg1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/argument.2.test b/tests/generated-tests/argument.2.test
deleted file mode 100755
index c077ec2a..00000000
--- a/tests/generated-tests/argument.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/argument.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1040
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-define(exch(``expansion text'', ``macro''))
-macro
-EOF
-
-cat <<\EOF >ok
-
-
-expansion text
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/argument.3.test b/tests/generated-tests/argument.3.test
deleted file mode 100755
index 2a514172..00000000
--- a/tests/generated-tests/argument.3.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/argument.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1060
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', ``Macro name: $0'')
-test
-EOF
-
-cat <<\EOF >ok
-
-Macro name: test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/argument.4.test b/tests/generated-tests/argument.4.test
deleted file mode 100755
index 2459f966..00000000
--- a/tests/generated-tests/argument.4.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/argument.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1070
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `This is macro `foo'.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changeco.1.test b/tests/generated-tests/changeco.1.test
deleted file mode 100755
index cc95cdbc..00000000
--- a/tests/generated-tests/changeco.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changeco.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1953
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-# A normal comment
-changecom(`/*', `*/')
-# Not a comment anymore
-But: /* this is a comment now */ while this is not a comment
-EOF
-
-cat <<\EOF >ok
-
-# A normal comment
-
-# Not a COMMENT anymore
-But: /* this is a comment now */ while this is not a COMMENT
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changeco.2.test b/tests/generated-tests/changeco.2.test
deleted file mode 100755
index 4e4fc01b..00000000
--- a/tests/generated-tests/changeco.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changeco.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1974
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-changecom
-# Not a comment anymore
-EOF
-
-cat <<\EOF >ok
-
-
-# Not a COMMENT anymore
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changequ.1.test b/tests/generated-tests/changequ.1.test
deleted file mode 100755
index b66db9cf..00000000
--- a/tests/generated-tests/changequ.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changequ.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1889
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([, ])
-define([foo], [Macro [foo].])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changequ.2.test b/tests/generated-tests/changequ.2.test
deleted file mode 100755
index 6ae416a9..00000000
--- a/tests/generated-tests/changequ.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changequ.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1901
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([[, ]])
-define([[foo]], [[Macro [[[foo]]].]])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro [foo].
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changequ.3.test b/tests/generated-tests/changequ.3.test
deleted file mode 100755
index baed4cdb..00000000
--- a/tests/generated-tests/changequ.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changequ.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1913
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `FOO'.')
-changequote(, )
-foo
-`foo'
-EOF
-
-cat <<\EOF >ok
-
-
-Macro `FOO'.
-`Macro `FOO'.'
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.1.test b/tests/generated-tests/changesy.1.test
deleted file mode 100755
index 7e925d10..00000000
--- a/tests/generated-tests/changesy.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2119
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test.1', `TEST ONE')
-__file__
-changesyntax(`O_', `W.')
-__file__
-test.1
-EOF
-
-cat <<\EOF >ok
-
-in
-
-__file__
-TEST ONE
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.2.test b/tests/generated-tests/changesy.2.test
deleted file mode 100755
index af4aa27c..00000000
--- a/tests/generated-tests/changesy.2.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2135
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$#')
-test(a, b, c)
-changesyntax(`(<', `,|', `)>', `O(,)')
-test(a, b, c)
-test<a|b|c>
-EOF
-
-cat <<\EOF >ok
-
-3
-
-0(a, b, c)
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.3.test b/tests/generated-tests/changesy.3.test
deleted file mode 100755
index 6229d772..00000000
--- a/tests/generated-tests/changesy.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2152
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$1$2$3')
-test(a, b, c)
-changesyntax(`O ')
-test(a, b, c)
-EOF
-
-cat <<\EOF >ok
-
-abc
-
-a b c
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.4.test b/tests/generated-tests/changesy.4.test
deleted file mode 100755
index 64572a97..00000000
--- a/tests/generated-tests/changesy.4.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2171
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`@', `TEST')
-@
-changesyntax(`A@')
-@
-EOF
-
-cat <<\EOF >ok
-
-@
-
-TEST
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.5.test b/tests/generated-tests/changesy.5.test
deleted file mode 100755
index 83608521..00000000
--- a/tests/generated-tests/changesy.5.test
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.5.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2195
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `TEST')
-changesyntax(`L<', `R>')
-<test>
-`test>
-changequote(<[>, `]')
-<test>
-[test]
-EOF
-
-cat <<\EOF >ok
-
-
-test
-test
-
-<TEST>
-test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.6.test b/tests/generated-tests/changesy.6.test
deleted file mode 100755
index 14066fec..00000000
--- a/tests/generated-tests/changesy.6.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.6.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2217
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changesyntax(`({<', `)}>', `,;:', `O(,)')
-eval{2**4-1; 2 : 8>
-EOF
-
-cat <<\EOF >ok
-
-00001111
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.7.test b/tests/generated-tests/changesy.7.test
deleted file mode 100755
index 9e70c202..00000000
--- a/tests/generated-tests/changesy.7.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.7.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2228
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `==$1==')
-changequote(`<<', `>>')
-changesyntax(<<L[>>, <<R]>>)
-test(<<testing]>>)
-test([testing>>])
-test([<<testing>>])
-EOF
-
-cat <<\EOF >ok
-
-
-
-==testing]==
-==testing>>==
-==testing==
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/changesy.8.test b/tests/generated-tests/changesy.8.test
deleted file mode 100755
index a087f85a..00000000
--- a/tests/generated-tests/changesy.8.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# generated-tests/changesy.8.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2282
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `==$1==')
-changequote(`<<', `>>')
-changesyntax(<<L[>>, <<R]>>)
-test(<<testing]>>)
-test([testing>>])
-test([<<testing>>])
-EOF
-
-cat <<\EOF >ok
-
-
-
-==testing]==
-==testing>>==
-==testing==
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/cleardiv.1.test b/tests/generated-tests/cleardiv.1.test
deleted file mode 100755
index c7dc0655..00000000
--- a/tests/generated-tests/cleardiv.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/cleardiv.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2732
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert(-1)
-undivert
-EOF
-
-cat <<\EOF >ok
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/cleardiv.2.test b/tests/generated-tests/cleardiv.2.test
deleted file mode 100755
index 23324698..00000000
--- a/tests/generated-tests/cleardiv.2.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# generated-tests/cleardiv.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2747
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleardivert',
-`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/define.1.test b/tests/generated-tests/define.1.test
deleted file mode 100755
index eefece84..00000000
--- a/tests/generated-tests/define.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/define.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 981
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Hello world.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/define.2.test b/tests/generated-tests/define.2.test
deleted file mode 100755
index 1b18fe06..00000000
--- a/tests/generated-tests/define.2.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# generated-tests/define.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1001
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-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(eval(10+7))
-EOF
-
-cat <<\EOF >ok
-
-
-
-
-array element no. 4
-array element no. 17
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/defn.1.test b/tests/generated-tests/defn.1.test
deleted file mode 100755
index 1922b358..00000000
--- a/tests/generated-tests/defn.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/defn.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1224
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`zap', defn(`undefine'))
-zap(`undefine')
-undefine(`zap')
-EOF
-
-cat <<\EOF >ok
-
-
-undefine(zap)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/defn.2.test b/tests/generated-tests/defn.2.test
deleted file mode 100755
index 0cac7363..00000000
--- a/tests/generated-tests/defn.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/defn.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1244
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`string', `The macro dnl is very useful
-')
-string
-defn(`string')
-EOF
-
-cat <<\EOF >ok
-
-The macro
-The macro dnl is very useful
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/divert.1.test b/tests/generated-tests/divert.1.test
deleted file mode 100755
index 83d5d9a2..00000000
--- a/tests/generated-tests/divert.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/divert.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2574
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/divert.2.test b/tests/generated-tests/divert.2.test
deleted file mode 100755
index f5cd9f8c..00000000
--- a/tests/generated-tests/divert.2.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# generated-tests/divert.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2594
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(-1)
-define(`foo', `Macro `foo'.')
-define(`bar', `Macro `bar'.')
-divert
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/divnum.1.test b/tests/generated-tests/divnum.1.test
deleted file mode 100755
index ddcb689e..00000000
--- a/tests/generated-tests/divnum.1.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# generated-tests/divnum.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2701
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-Initial divnum
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert
-EOF
-
-cat <<\EOF >ok
-Initial 0
-
-
-Diversion one: 1
-
-Diversion two: 2
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/dnl.1.test b/tests/generated-tests/dnl.1.test
deleted file mode 100755
index b80528d5..00000000
--- a/tests/generated-tests/dnl.1.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# generated-tests/dnl.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1851
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
-foo
-EOF
-
-cat <<\EOF >ok
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/dumpdef.1.test b/tests/generated-tests/dumpdef.1.test
deleted file mode 100755
index 677a5974..00000000
--- a/tests/generated-tests/dumpdef.1.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# generated-tests/dumpdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1654
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-dumpdef(`foo')
-dumpdef(`define')
-EOF
-
-cat <<\EOF >ok
-
-
-
-EOF
-
-cat <<\EOF >okerr
-foo: `Hello world.'
-define: <define>
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/errprint.1.test b/tests/generated-tests/errprint.1.test
deleted file mode 100755
index d89d95b8..00000000
--- a/tests/generated-tests/errprint.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/errprint.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3420
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`Illegal arguments to forloop
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-Illegal arguments to forloop
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/errprint.2.test b/tests/generated-tests/errprint.2.test
deleted file mode 100755
index e7e6946b..00000000
--- a/tests/generated-tests/errprint.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/errprint.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3445
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`m4:'__file__:__line__: `Input error
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4:in:1: Input error
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/esyscmd.1.test b/tests/generated-tests/esyscmd.1.test
deleted file mode 100755
index 0f4135d5..00000000
--- a/tests/generated-tests/esyscmd.1.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# generated-tests/esyscmd.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3309
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`vice', `esyscmd(grep Vice ../Makefile)')
-vice
-EOF
-
-cat <<\EOF >ok
-
-# Ty Coon, President of Vice
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/eval.1.test b/tests/generated-tests/eval.1.test
deleted file mode 100755
index 73fd306b..00000000
--- a/tests/generated-tests/eval.1.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# generated-tests/eval.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3193
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(-3 * 5)
-eval(index(`Hello world', `llo') >= 0)
-define(`square', `eval(($1)**2)')
-square(9)
-square(square(5)+1)
-define(`foo', `666')
-eval(`foo'/6)
-eval(foo/6)
-EOF
-
-cat <<\EOF >ok
--15
-1
-
-81
-676
-
-
-111
-EOF
-
-cat <<\EOF >okerr
-in:7: m4: Bad expression in eval: foo/6
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/eval.2.test b/tests/generated-tests/eval.2.test
deleted file mode 100755
index 443672d1..00000000
--- a/tests/generated-tests/eval.2.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/eval.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3224
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(666, 10)
-eval(666, 11)
-eval(666, 6)
-eval(666, 6, 10)
-eval(-666, 6, 10)
-EOF
-
-cat <<\EOF >ok
-666
-556
-3030
-0000003030
--000003030
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/format.1.test b/tests/generated-tests/format.1.test
deleted file mode 100755
index 52fc5029..00000000
--- a/tests/generated-tests/format.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/format.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3029
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `The brown fox jumped over the lazy dog')
-format(`The string "%s" is %d characters long', foo, len(foo))
-EOF
-
-cat <<\EOF >ok
-
-The string "The brown fox jumped over the lazy dog" is 38 characters long
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/ifdef.1.test b/tests/generated-tests/ifdef.1.test
deleted file mode 100755
index 559745fa..00000000
--- a/tests/generated-tests/ifdef.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/ifdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1434
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-define(`foo', `')
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-EOF
-
-cat <<\EOF >ok
-foo is not defined
-
-foo is defined
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/ifelse.1.test b/tests/generated-tests/ifelse.1.test
deleted file mode 100755
index 82b2770c..00000000
--- a/tests/generated-tests/ifelse.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/ifelse.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1472
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(`foo', `bar', `true')
-ifelse(`foo', `foo', `true')
-ifelse(`foo', `bar', `true', `false')
-ifelse(`foo', `foo', `true', `false')
-EOF
-
-cat <<\EOF >ok
-
-true
-false
-true
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/ifelse.2.test b/tests/generated-tests/ifelse.2.test
deleted file mode 100755
index 9181abd0..00000000
--- a/tests/generated-tests/ifelse.2.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# generated-tests/ifelse.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1491
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
-EOF
-
-cat <<\EOF >ok
-seventh
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/include.1.test b/tests/generated-tests/include.1.test
deleted file mode 100755
index cd8274bd..00000000
--- a/tests/generated-tests/include.1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# generated-tests/include.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2448
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(`no-such-file')
-sinclude(`no-such-file')
-EOF
-
-cat <<\EOF >ok
-
-
-EOF
-
-cat <<\EOF >okerr
-in:1: m4: Cannot open no-such-file: No such file or directory
-EOF
-
-M4PATH=$srcdir $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/include.2.test b/tests/generated-tests/include.2.test
deleted file mode 100755
index 94446fd7..00000000
--- a/tests/generated-tests/include.2.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# generated-tests/include.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2468
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `FOO')
-include(`incl.m4')
-EOF
-
-cat <<\EOF >ok
-
-Include file start
-FOO
-Include file end
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/include.3.test b/tests/generated-tests/include.3.test
deleted file mode 100755
index 1cb768d9..00000000
--- a/tests/generated-tests/include.3.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# generated-tests/include.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2483
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', include(`incl.m4'))
-This is `bar': >>>bar<<<
-EOF
-
-cat <<\EOF >ok
-
-This is bar: >>>Include file start
-foo
-Include file end
-<<<
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/incr.1.test b/tests/generated-tests/incr.1.test
deleted file mode 100755
index f07ddf7c..00000000
--- a/tests/generated-tests/incr.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/incr.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3099
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-incr(4)
-decr(7)
-EOF
-
-cat <<\EOF >ok
-5
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/index.1.test b/tests/generated-tests/index.1.test
deleted file mode 100755
index 11768455..00000000
--- a/tests/generated-tests/index.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/index.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2815
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-index(`gnus, gnats, and armadillos', `nat')
-index(`gnus, gnats, and armadillos', `dag')
-EOF
-
-cat <<\EOF >ok
-7
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/indir.1.test b/tests/generated-tests/indir.1.test
deleted file mode 100755
index c37cc49b..00000000
--- a/tests/generated-tests/indir.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/indir.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1363
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`$$internal$macro', `Internal macro (name `$0')')
-$$internal$macro
-indir(`$$internal$macro')
-EOF
-
-cat <<\EOF >ok
-
-$$internal$macro
-Internal macro (name $$internal$macro)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/len.1.test b/tests/generated-tests/len.1.test
deleted file mode 100755
index dac41506..00000000
--- a/tests/generated-tests/len.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/len.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2789
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-len()
-len(`abcdef')
-EOF
-
-cat <<\EOF >ok
-0
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/loops.1.test b/tests/generated-tests/loops.1.test
deleted file mode 100755
index 880f95d9..00000000
--- a/tests/generated-tests/loops.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/loops.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1528
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-shift
-shift(bar)
-shift(foo, bar, baz)
-EOF
-
-cat <<\EOF >ok
-
-
-bar,baz
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/loops.2.test b/tests/generated-tests/loops.2.test
deleted file mode 100755
index 7b537032..00000000
--- a/tests/generated-tests/loops.2.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# generated-tests/loops.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1540
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
- `reverse(shift($@)), `$1'')')
-reverse
-reverse(foo)
-reverse(foo, bar, gnats, and gnus)
-EOF
-
-cat <<\EOF >ok
-
-
-foo
-and gnus, gnats, bar, foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/m4exit.1.test b/tests/generated-tests/m4exit.1.test
deleted file mode 100755
index 78aba0fd..00000000
--- a/tests/generated-tests/m4exit.1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# generated-tests/m4exit.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3468
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
-')m4exit(1)')
-fatal_error(`This is a BAD one, buster')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4: in: 3: fatal error: This is a BAD one, buster
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/m4wrap.1.test b/tests/generated-tests/m4wrap.1.test
deleted file mode 100755
index 0f9419dd..00000000
--- a/tests/generated-tests/m4wrap.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/m4wrap.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2389
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleanup', `This is the `cleanup' actions.
-')
-m4wrap(`cleanup')
-This is the first and last normal input line.
-EOF
-
-cat <<\EOF >ok
-
-
-This is the first and last normal input line.
-This is the cleanup actions.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/patsubst.1.test b/tests/generated-tests/patsubst.1.test
deleted file mode 100755
index 4f04ac25..00000000
--- a/tests/generated-tests/patsubst.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/patsubst.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2977
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-patsubst(`GNUs not Unix', `^', `OBS: ')
-patsubst(`GNUs not Unix', `\<', `OBS: ')
-patsubst(`GNUs not Unix', `\w*', `(\&)')
-patsubst(`GNUs not Unix', `\w+', `(\&)')
-patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-EOF
-
-cat <<\EOF >ok
-OBS: GNUs not Unix
-OBS: GNUs OBS: not OBS: Unix
-(GNUs)() (not)() (Unix)
-(GNUs) (not) (Unix)
-GN not
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/patsubst.2.test b/tests/generated-tests/patsubst.2.test
deleted file mode 100755
index d651a184..00000000
--- a/tests/generated-tests/patsubst.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/patsubst.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2994
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl
-define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
-define(`capitalize1',
- `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')dnl
-define(`capitalize',
- `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
-capitalize(`GNUs not Unix')
-EOF
-
-cat <<\EOF >ok
-Gnus Not Unix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pseudoar.1.test b/tests/generated-tests/pseudoar.1.test
deleted file mode 100755
index de5cabc2..00000000
--- a/tests/generated-tests/pseudoar.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pseudoar.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1094
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`nargs', `$#')
-nargs
-nargs()
-nargs(arg1, arg2, arg3)
-EOF
-
-cat <<\EOF >ok
-
-0
-1
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pseudoar.2.test b/tests/generated-tests/pseudoar.2.test
deleted file mode 100755
index b8418771..00000000
--- a/tests/generated-tests/pseudoar.2.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pseudoar.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1108
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$*')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pseudoar.3.test b/tests/generated-tests/pseudoar.3.test
deleted file mode 100755
index 26f6ebb3..00000000
--- a/tests/generated-tests/pseudoar.3.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pseudoar.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1119
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$@')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pseudoar.4.test b/tests/generated-tests/pseudoar.4.test
deleted file mode 100755
index 8622426f..00000000
--- a/tests/generated-tests/pseudoar.4.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pseudoar.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1129
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo1', `$*')
-define(`echo2', `$@')
-define(`foo', `This is macro `foo'.')
-echo1(foo)
-echo2(foo)
-EOF
-
-cat <<\EOF >ok
-
-
-
-This is macro This is macro foo..
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pseudoar.5.test b/tests/generated-tests/pseudoar.5.test
deleted file mode 100755
index 1ed05635..00000000
--- a/tests/generated-tests/pseudoar.5.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pseudoar.5.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1149
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `$$$ hello $$$')
-foo
-EOF
-
-cat <<\EOF >ok
-
-$$$ hello $$$
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pushdef.1.test b/tests/generated-tests/pushdef.1.test
deleted file mode 100755
index 09d5f945..00000000
--- a/tests/generated-tests/pushdef.1.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pushdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1288
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-popdef(`foo')
-foo
-popdef(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Expansion one.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/pushdef.2.test b/tests/generated-tests/pushdef.2.test
deleted file mode 100755
index 091c27e1..00000000
--- a/tests/generated-tests/pushdef.2.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# generated-tests/pushdef.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1312
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-define(`foo', `Second expansion two.')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Second expansion two.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/regexp.1.test b/tests/generated-tests/regexp.1.test
deleted file mode 100755
index df471907..00000000
--- a/tests/generated-tests/regexp.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/regexp.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2847
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\<[a-z]\w+')
-regexp(`GNUs not Unix', `\<Q\w*')
-EOF
-
-cat <<\EOF >ok
-5
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/regexp.2.test b/tests/generated-tests/regexp.2.test
deleted file mode 100755
index 22cb99c6..00000000
--- a/tests/generated-tests/regexp.2.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# generated-tests/regexp.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2859
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
-EOF
-
-cat <<\EOF >ok
-*** Unix *** nix ***
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/substr.1.test b/tests/generated-tests/substr.1.test
deleted file mode 100755
index 4ad45539..00000000
--- a/tests/generated-tests/substr.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# generated-tests/substr.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2885
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-substr(`gnus, gnats, and armadillos', 6)
-substr(`gnus, gnats, and armadillos', 6, 5)
-EOF
-
-cat <<\EOF >ok
-gnats, and armadillos
-gnats
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/symbols.1.test b/tests/generated-tests/symbols.1.test
deleted file mode 100755
index 4414ee13..00000000
--- a/tests/generated-tests/symbols.1.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# generated-tests/symbols.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1442
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-symbols(`ifndef', `ifdef', `define', `undef')
-EOF
-
-cat <<\EOF >ok
-define,ifdef
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/sysval.1.test b/tests/generated-tests/sysval.1.test
deleted file mode 100755
index 5cb177f1..00000000
--- a/tests/generated-tests/sysval.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/sysval.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3340
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-syscmd(`false')
-ifelse(sysval, 0, zero, nonzero)
-syscmd(`true')
-sysval
-EOF
-
-cat <<\EOF >ok
-
-nonzero
-
-0
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/trace.1.test b/tests/generated-tests/trace.1.test
deleted file mode 100755
index 9acf3a12..00000000
--- a/tests/generated-tests/trace.1.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# generated-tests/trace.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1699
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello World.')
-define(`echo', `$@')
-traceon(`foo', `echo')
-foo
-echo(gnus, and gnats)
-EOF
-
-cat <<\EOF >ok
-
-
-
-Hello World.
-gnus,and gnats
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- foo -> `Hello World.'
-m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/generated-tests/translit.1.test b/tests/generated-tests/translit.1.test
deleted file mode 100755
index da6710c7..00000000
--- a/tests/generated-tests/translit.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# generated-tests/translit.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2926
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-translit(`GNUs not Unix', `A-Z')
-translit(`GNUs not Unix', `a-z', `A-Z')
-translit(`GNUs not Unix', `A-Z', `z-a')
-EOF
-
-cat <<\EOF >ok
-s not nix
-GNUS NOT UNIX
-tmfs not fnix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/undefine.1.test b/tests/generated-tests/undefine.1.test
deleted file mode 100755
index bac0cd29..00000000
--- a/tests/generated-tests/undefine.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/undefine.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1180
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-foo
-define(`foo', `expansion text')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-foo
-
-expansion text
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/undivert.1.test b/tests/generated-tests/undivert.1.test
deleted file mode 100755
index 18c904ba..00000000
--- a/tests/generated-tests/undivert.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# generated-tests/undivert.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2625
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-undivert(1)
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/undivert.2.test b/tests/generated-tests/undivert.2.test
deleted file mode 100755
index 44485600..00000000
--- a/tests/generated-tests/undivert.2.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# generated-tests/undivert.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2649
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted first.
-divert(0)undivert(1)dnl
-undivert(1)
-divert(1)
-This text is also diverted but not appended.
-divert(0)undivert(1)dnl
-EOF
-
-cat <<\EOF >ok
-
-This text is diverted first.
-
-
-This text is also diverted but not appended.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/generated-tests/undivert.3.test b/tests/generated-tests/undivert.3.test
deleted file mode 100755
index a85a9d0c..00000000
--- a/tests/generated-tests/undivert.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# generated-tests/undivert.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2675
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', `BAR')
-undivert(`foo')
-include(`foo')
-EOF
-
-cat <<\EOF >ok
-
-bar
-
-BAR
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.1.m4 b/tests/gentest/argument.1.m4
deleted file mode 100755
index 04909dc9..00000000
--- a/tests/gentest/argument.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1036
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-exch(arg1, arg2)
-EOF
-
-cat <<\EOF >ok
-
-arg2, arg1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.1.test b/tests/gentest/argument.1.test
deleted file mode 100755
index e8f48197..00000000
--- a/tests/gentest/argument.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1036
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-exch(arg1, arg2)
-EOF
-
-cat <<\EOF >ok
-
-arg2, arg1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.2.m4 b/tests/gentest/argument.2.m4
deleted file mode 100755
index 59814143..00000000
--- a/tests/gentest/argument.2.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1046
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-define(exch(``expansion text'', ``macro''))
-macro
-EOF
-
-cat <<\EOF >ok
-
-
-expansion text
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.2.test b/tests/gentest/argument.2.test
deleted file mode 100755
index 3e2149b5..00000000
--- a/tests/gentest/argument.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1046
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`exch', `$2, $1')
-define(exch(``expansion text'', ``macro''))
-macro
-EOF
-
-cat <<\EOF >ok
-
-
-expansion text
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.3.m4 b/tests/gentest/argument.3.m4
deleted file mode 100755
index 3dae6ca9..00000000
--- a/tests/gentest/argument.3.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.3.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1066
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', ``Macro name: $0'')
-test
-EOF
-
-cat <<\EOF >ok
-
-Macro name: test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.3.test b/tests/gentest/argument.3.test
deleted file mode 100755
index 5ffdafd4..00000000
--- a/tests/gentest/argument.3.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1066
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', ``Macro name: $0'')
-test
-EOF
-
-cat <<\EOF >ok
-
-Macro name: test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.4.m4 b/tests/gentest/argument.4.m4
deleted file mode 100755
index 39389759..00000000
--- a/tests/gentest/argument.4.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.4.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1076
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `This is macro `foo'.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/argument.4.test b/tests/gentest/argument.4.test
deleted file mode 100755
index b28f5638..00000000
--- a/tests/gentest/argument.4.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/argument.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1076
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `This is macro `foo'.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changeco.1.m4 b/tests/gentest/changeco.1.m4
deleted file mode 100755
index 533b931b..00000000
--- a/tests/gentest/changeco.1.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/changeco.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1959
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-# A normal comment
-changecom(`/*', `*/')
-# Not a comment anymore
-But: /* this is a comment now */ while this is not a comment
-EOF
-
-cat <<\EOF >ok
-
-# A normal comment
-
-# Not a COMMENT anymore
-But: /* this is a comment now */ while this is not a COMMENT
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changeco.1.test b/tests/gentest/changeco.1.test
deleted file mode 100755
index 08ad873d..00000000
--- a/tests/gentest/changeco.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/changeco.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1959
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-# A normal comment
-changecom(`/*', `*/')
-# Not a comment anymore
-But: /* this is a comment now */ while this is not a comment
-EOF
-
-cat <<\EOF >ok
-
-# A normal comment
-
-# Not a COMMENT anymore
-But: /* this is a comment now */ while this is not a COMMENT
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changeco.2.m4 b/tests/gentest/changeco.2.m4
deleted file mode 100755
index dfd0aa1d..00000000
--- a/tests/gentest/changeco.2.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/changeco.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1980
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-changecom
-# Not a comment anymore
-EOF
-
-cat <<\EOF >ok
-
-
-# Not a COMMENT anymore
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changeco.2.test b/tests/gentest/changeco.2.test
deleted file mode 100755
index c265d1f5..00000000
--- a/tests/gentest/changeco.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/changeco.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1980
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`comment', `COMMENT')
-changecom
-# Not a comment anymore
-EOF
-
-cat <<\EOF >ok
-
-
-# Not a COMMENT anymore
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changequ.1.m4 b/tests/gentest/changequ.1.m4
deleted file mode 100755
index 7022cec9..00000000
--- a/tests/gentest/changequ.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/changequ.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1895
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([, ])
-define([foo], [Macro [foo].])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changequ.1.test b/tests/gentest/changequ.1.test
deleted file mode 100755
index f0f64f69..00000000
--- a/tests/gentest/changequ.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/changequ.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1895
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([, ])
-define([foo], [Macro [foo].])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changequ.2.m4 b/tests/gentest/changequ.2.m4
deleted file mode 100755
index 5eba166b..00000000
--- a/tests/gentest/changequ.2.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/changequ.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1907
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([[, ]])
-define([[foo]], [[Macro [[[foo]]].]])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro [foo].
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changequ.2.test b/tests/gentest/changequ.2.test
deleted file mode 100755
index 0ec4ad14..00000000
--- a/tests/gentest/changequ.2.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/changequ.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1907
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changequote([[, ]])
-define([[foo]], [[Macro [[[foo]]].]])
-foo
-EOF
-
-cat <<\EOF >ok
-
-
-Macro [foo].
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changequ.3.m4 b/tests/gentest/changequ.3.m4
deleted file mode 100755
index 6174e994..00000000
--- a/tests/gentest/changequ.3.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/changequ.3.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1919
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `FOO'.')
-changequote(, )
-foo
-`foo'
-EOF
-
-cat <<\EOF >ok
-
-
-Macro `FOO'.
-`Macro `FOO'.'
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changequ.3.test b/tests/gentest/changequ.3.test
deleted file mode 100755
index 83a8544f..00000000
--- a/tests/gentest/changequ.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/changequ.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1919
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `FOO'.')
-changequote(, )
-foo
-`foo'
-EOF
-
-cat <<\EOF >ok
-
-
-Macro `FOO'.
-`Macro `FOO'.'
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.1.m4 b/tests/gentest/changesy.1.m4
deleted file mode 100755
index c608a21f..00000000
--- a/tests/gentest/changesy.1.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2125
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test.1', `TEST ONE')
-__file__
-changesyntax(`O_', `W.')
-__file__
-test.1
-EOF
-
-cat <<\EOF >ok
-
-in
-
-__file__
-TEST ONE
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.1.test b/tests/gentest/changesy.1.test
deleted file mode 100755
index 344bf506..00000000
--- a/tests/gentest/changesy.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2125
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test.1', `TEST ONE')
-__file__
-changesyntax(`O_', `W.')
-__file__
-test.1
-EOF
-
-cat <<\EOF >ok
-
-in
-
-__file__
-TEST ONE
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.2.m4 b/tests/gentest/changesy.2.m4
deleted file mode 100755
index 55a99375..00000000
--- a/tests/gentest/changesy.2.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2141
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$#')
-test(a, b, c)
-changesyntax(`(<', `,|', `)>', `O(,)')
-test(a, b, c)
-test<a|b|c>
-EOF
-
-cat <<\EOF >ok
-
-3
-
-0(a, b, c)
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.2.test b/tests/gentest/changesy.2.test
deleted file mode 100755
index 544a8753..00000000
--- a/tests/gentest/changesy.2.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2141
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$#')
-test(a, b, c)
-changesyntax(`(<', `,|', `)>', `O(,)')
-test(a, b, c)
-test<a|b|c>
-EOF
-
-cat <<\EOF >ok
-
-3
-
-0(a, b, c)
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.3.m4 b/tests/gentest/changesy.3.m4
deleted file mode 100755
index 8f86a03a..00000000
--- a/tests/gentest/changesy.3.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.3.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2158
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$1$2$3')
-test(a, b, c)
-changesyntax(`O ')
-test(a, b, c)
-EOF
-
-cat <<\EOF >ok
-
-abc
-
-a b c
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.3.test b/tests/gentest/changesy.3.test
deleted file mode 100755
index 79030e78..00000000
--- a/tests/gentest/changesy.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2158
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `$1$2$3')
-test(a, b, c)
-changesyntax(`O ')
-test(a, b, c)
-EOF
-
-cat <<\EOF >ok
-
-abc
-
-a b c
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.4.m4 b/tests/gentest/changesy.4.m4
deleted file mode 100755
index 9ee5b7d1..00000000
--- a/tests/gentest/changesy.4.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.4.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2177
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`@', `TEST')
-@
-changesyntax(`A@')
-@
-EOF
-
-cat <<\EOF >ok
-
-@
-
-TEST
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.4.test b/tests/gentest/changesy.4.test
deleted file mode 100755
index 7df01f9e..00000000
--- a/tests/gentest/changesy.4.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2177
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`@', `TEST')
-@
-changesyntax(`A@')
-@
-EOF
-
-cat <<\EOF >ok
-
-@
-
-TEST
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.5.m4 b/tests/gentest/changesy.5.m4
deleted file mode 100755
index 2035d2b9..00000000
--- a/tests/gentest/changesy.5.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.5.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2201
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `TEST')
-changesyntax(`L<', `R>')
-<test>
-`test>
-changequote(<[>, `]')
-<test>
-[test]
-EOF
-
-cat <<\EOF >ok
-
-
-test
-test
-
-<TEST>
-test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.5.test b/tests/gentest/changesy.5.test
deleted file mode 100755
index 25640e31..00000000
--- a/tests/gentest/changesy.5.test
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.5.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2201
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `TEST')
-changesyntax(`L<', `R>')
-<test>
-`test>
-changequote(<[>, `]')
-<test>
-[test]
-EOF
-
-cat <<\EOF >ok
-
-
-test
-test
-
-<TEST>
-test
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.6.m4 b/tests/gentest/changesy.6.m4
deleted file mode 100755
index 88cac7a4..00000000
--- a/tests/gentest/changesy.6.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.6.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2223
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changesyntax(`({<', `)}>', `,;:', `O(,)')
-eval{2**4-1; 2 : 8>
-EOF
-
-cat <<\EOF >ok
-
-00001111
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.6.test b/tests/gentest/changesy.6.test
deleted file mode 100755
index 91cfc80a..00000000
--- a/tests/gentest/changesy.6.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.6.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2223
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-changesyntax(`({<', `)}>', `,;:', `O(,)')
-eval{2**4-1; 2 : 8>
-EOF
-
-cat <<\EOF >ok
-
-00001111
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.7.m4 b/tests/gentest/changesy.7.m4
deleted file mode 100755
index 7a366945..00000000
--- a/tests/gentest/changesy.7.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.7.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2234
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `==$1==')
-changequote(`<<', `>>')
-changesyntax(<<L[>>, <<R]>>)
-test(<<testing]>>)
-test([testing>>])
-test([<<testing>>])
-EOF
-
-cat <<\EOF >ok
-
-
-
-==testing]==
-==testing>>==
-==<<testing>>==
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/changesy.7.test b/tests/gentest/changesy.7.test
deleted file mode 100755
index 014c152f..00000000
--- a/tests/gentest/changesy.7.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/changesy.7.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2234
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`test', `==$1==')
-changequote(`<<', `>>')
-changesyntax(<<L[>>, <<R]>>)
-test(<<testing]>>)
-test([testing>>])
-test([<<testing>>])
-EOF
-
-cat <<\EOF >ok
-
-
-
-==testing]==
-==testing>>==
-==testing==
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/cleardiv.1.m4 b/tests/gentest/cleardiv.1.m4
deleted file mode 100755
index 36cba76a..00000000
--- a/tests/gentest/cleardiv.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/cleardiv.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2738
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert(-1)
-undivert
-EOF
-
-cat <<\EOF >ok
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/cleardiv.1.test b/tests/gentest/cleardiv.1.test
deleted file mode 100755
index d9883e43..00000000
--- a/tests/gentest/cleardiv.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/cleardiv.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2738
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert(-1)
-undivert
-EOF
-
-cat <<\EOF >ok
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/cleardiv.2.m4 b/tests/gentest/cleardiv.2.m4
deleted file mode 100755
index e44667a9..00000000
--- a/tests/gentest/cleardiv.2.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# gentest/cleardiv.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2753
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleardivert',
-`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/cleardiv.2.test b/tests/gentest/cleardiv.2.test
deleted file mode 100755
index 7e78d8a4..00000000
--- a/tests/gentest/cleardiv.2.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# gentest/cleardiv.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2753
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleardivert',
-`pushdef(`_num', divnum)divert(-1)undivert($@)divert(_num)popdef(`_num')')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/define.1.m4 b/tests/gentest/define.1.m4
deleted file mode 100755
index 17f30775..00000000
--- a/tests/gentest/define.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/define.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 987
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Hello world.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/define.1.test b/tests/gentest/define.1.test
deleted file mode 100755
index fb364668..00000000
--- a/tests/gentest/define.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/define.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 987
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Hello world.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/define.2.m4 b/tests/gentest/define.2.m4
deleted file mode 100755
index 62e2ea0e..00000000
--- a/tests/gentest/define.2.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/define.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1007
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-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(eval(10+7))
-EOF
-
-cat <<\EOF >ok
-
-
-
-
-array element no. 4
-array element no. 17
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/define.2.test b/tests/gentest/define.2.test
deleted file mode 100755
index 028642c3..00000000
--- a/tests/gentest/define.2.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/define.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1007
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-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(eval(10+7))
-EOF
-
-cat <<\EOF >ok
-
-
-
-
-array element no. 4
-array element no. 17
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/defn.1.m4 b/tests/gentest/defn.1.m4
deleted file mode 100755
index c3f06939..00000000
--- a/tests/gentest/defn.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/defn.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1230
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`zap', defn(`undefine'))
-zap(`undefine')
-undefine(`zap')
-EOF
-
-cat <<\EOF >ok
-
-
-undefine(zap)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/defn.1.test b/tests/gentest/defn.1.test
deleted file mode 100755
index 868dc07e..00000000
--- a/tests/gentest/defn.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/defn.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1230
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`zap', defn(`undefine'))
-zap(`undefine')
-undefine(`zap')
-EOF
-
-cat <<\EOF >ok
-
-
-undefine(zap)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/defn.2.m4 b/tests/gentest/defn.2.m4
deleted file mode 100755
index 0422980b..00000000
--- a/tests/gentest/defn.2.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/defn.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1250
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`string', `The macro dnl is very useful
-')
-string
-defn(`string')
-EOF
-
-cat <<\EOF >ok
-
-The macro
-The macro dnl is very useful
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/defn.2.test b/tests/gentest/defn.2.test
deleted file mode 100755
index df1925d4..00000000
--- a/tests/gentest/defn.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/defn.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1250
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`string', `The macro dnl is very useful
-')
-string
-defn(`string')
-EOF
-
-cat <<\EOF >ok
-
-The macro
-The macro dnl is very useful
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/divert.1.m4 b/tests/gentest/divert.1.m4
deleted file mode 100755
index acfc17d7..00000000
--- a/tests/gentest/divert.1.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/divert.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2580
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/divert.1.test b/tests/gentest/divert.1.test
deleted file mode 100755
index f675ba00..00000000
--- a/tests/gentest/divert.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/divert.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2580
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/divert.2.m4 b/tests/gentest/divert.2.m4
deleted file mode 100755
index 13075ff7..00000000
--- a/tests/gentest/divert.2.m4
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# gentest/divert.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2600
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(-1)
-define(`foo', `Macro `foo'.')
-define(`bar', `Macro `bar'.')
-divert
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/divert.2.test b/tests/gentest/divert.2.test
deleted file mode 100755
index 87f745d7..00000000
--- a/tests/gentest/divert.2.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# gentest/divert.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2600
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(-1)
-define(`foo', `Macro `foo'.')
-define(`bar', `Macro `bar'.')
-divert
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/divnum.1.m4 b/tests/gentest/divnum.1.m4
deleted file mode 100755
index 4f49f918..00000000
--- a/tests/gentest/divnum.1.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/divnum.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2707
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-Initial divnum
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert
-EOF
-
-cat <<\EOF >ok
-Initial 0
-
-
-Diversion one: 1
-
-Diversion two: 2
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/divnum.1.test b/tests/gentest/divnum.1.test
deleted file mode 100755
index b1866d7b..00000000
--- a/tests/gentest/divnum.1.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/divnum.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2707
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-Initial divnum
-divert(1)
-Diversion one: divnum
-divert(2)
-Diversion two: divnum
-divert
-EOF
-
-cat <<\EOF >ok
-Initial 0
-
-
-Diversion one: 1
-
-Diversion two: 2
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/dnl.1.m4 b/tests/gentest/dnl.1.m4
deleted file mode 100755
index 5d0d7632..00000000
--- a/tests/gentest/dnl.1.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# gentest/dnl.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1857
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
-foo
-EOF
-
-cat <<\EOF >ok
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/dnl.1.test b/tests/gentest/dnl.1.test
deleted file mode 100755
index f27916b3..00000000
--- a/tests/gentest/dnl.1.test
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# gentest/dnl.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1857
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
-foo
-EOF
-
-cat <<\EOF >ok
-Macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/dumpdef.1.m4 b/tests/gentest/dumpdef.1.m4
deleted file mode 100755
index bc31e1df..00000000
--- a/tests/gentest/dumpdef.1.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/dumpdef.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1660
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-dumpdef(`foo')
-dumpdef(`define')
-EOF
-
-cat <<\EOF >ok
-
-
-
-EOF
-
-cat <<\EOF >okerr
-foo: `Hello world.'
-define: <define>
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/dumpdef.1.test b/tests/gentest/dumpdef.1.test
deleted file mode 100755
index c2a00ded..00000000
--- a/tests/gentest/dumpdef.1.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/dumpdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1660
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello world.')
-dumpdef(`foo')
-dumpdef(`define')
-EOF
-
-cat <<\EOF >ok
-
-
-
-EOF
-
-cat <<\EOF >okerr
-foo: `Hello world.'
-define: <define>
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/errprint.1.m4 b/tests/gentest/errprint.1.m4
deleted file mode 100755
index 107ef789..00000000
--- a/tests/gentest/errprint.1.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/errprint.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3426
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`Illegal arguments to forloop
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-Illegal arguments to forloop
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/errprint.1.test b/tests/gentest/errprint.1.test
deleted file mode 100755
index b703dd30..00000000
--- a/tests/gentest/errprint.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/errprint.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3426
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`Illegal arguments to forloop
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-Illegal arguments to forloop
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/errprint.2.m4 b/tests/gentest/errprint.2.m4
deleted file mode 100755
index 5259782d..00000000
--- a/tests/gentest/errprint.2.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/errprint.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3451
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`m4:'__file__:__line__: `Input error
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4:in:1: Input error
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/errprint.2.test b/tests/gentest/errprint.2.test
deleted file mode 100755
index 4ca64136..00000000
--- a/tests/gentest/errprint.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/errprint.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3451
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-errprint(`m4:'__file__:__line__: `Input error
-')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4:in:1: Input error
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/esyscmd.1.m4 b/tests/gentest/esyscmd.1.m4
deleted file mode 100755
index 856620e4..00000000
--- a/tests/gentest/esyscmd.1.m4
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# gentest/esyscmd.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3315
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`vice', `esyscmd(grep Vice ../Makefile)')
-vice
-EOF
-
-cat <<\EOF >ok
-
-# Ty Coon, President of Vice
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/esyscmd.1.test b/tests/gentest/esyscmd.1.test
deleted file mode 100755
index 8d609baf..00000000
--- a/tests/gentest/esyscmd.1.test
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# gentest/esyscmd.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3315
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`vice', `esyscmd(grep Vice ../Makefile)')
-vice
-EOF
-
-cat <<\EOF >ok
-
-# Ty Coon, President of Vice
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/eval.1.m4 b/tests/gentest/eval.1.m4
deleted file mode 100755
index b3d38cc3..00000000
--- a/tests/gentest/eval.1.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# gentest/eval.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3199
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(-3 * 5)
-eval(index(`Hello world', `llo') >= 0)
-define(`square', `eval(($1)**2)')
-square(9)
-square(square(5)+1)
-define(`foo', `666')
-eval(`foo'/6)
-eval(foo/6)
-EOF
-
-cat <<\EOF >ok
--15
-1
-
-81
-676
-
-
-111
-EOF
-
-cat <<\EOF >okerr
-in:7: m4: Bad expression in eval: foo/6
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/eval.1.test b/tests/gentest/eval.1.test
deleted file mode 100755
index 56f916c2..00000000
--- a/tests/gentest/eval.1.test
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# gentest/eval.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3199
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(-3 * 5)
-eval(index(`Hello world', `llo') >= 0)
-define(`square', `eval(($1)**2)')
-square(9)
-square(square(5)+1)
-define(`foo', `666')
-eval(`foo'/6)
-eval(foo/6)
-EOF
-
-cat <<\EOF >ok
--15
-1
-
-81
-676
-
-
-111
-EOF
-
-cat <<\EOF >okerr
-in:7: m4: Bad expression in eval: foo/6
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/eval.2.m4 b/tests/gentest/eval.2.m4
deleted file mode 100755
index bd394eb4..00000000
--- a/tests/gentest/eval.2.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/eval.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3230
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(666, 10)
-eval(666, 11)
-eval(666, 6)
-eval(666, 6, 10)
-eval(-666, 6, 10)
-EOF
-
-cat <<\EOF >ok
-666
-556
-3030
-0000003030
--000003030
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/eval.2.test b/tests/gentest/eval.2.test
deleted file mode 100755
index abc9fbb6..00000000
--- a/tests/gentest/eval.2.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/eval.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3230
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-eval(666, 10)
-eval(666, 11)
-eval(666, 6)
-eval(666, 6, 10)
-eval(-666, 6, 10)
-EOF
-
-cat <<\EOF >ok
-666
-556
-3030
-0000003030
--000003030
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/format.1.m4 b/tests/gentest/format.1.m4
deleted file mode 100755
index ddfdb7f6..00000000
--- a/tests/gentest/format.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/format.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3035
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `The brown fox jumped over the lazy dog')
-format(`The string "%s" is %d characters long', foo, len(foo))
-EOF
-
-cat <<\EOF >ok
-
-The string "The brown fox jumped over the lazy dog" is 38 characters long
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/format.1.test b/tests/gentest/format.1.test
deleted file mode 100755
index 84c50d0a..00000000
--- a/tests/gentest/format.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/format.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3035
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `The brown fox jumped over the lazy dog')
-format(`The string "%s" is %d characters long', foo, len(foo))
-EOF
-
-cat <<\EOF >ok
-
-The string "The brown fox jumped over the lazy dog" is 38 characters long
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/ifdef.1.m4 b/tests/gentest/ifdef.1.m4
deleted file mode 100755
index 721608c0..00000000
--- a/tests/gentest/ifdef.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/ifdef.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1440
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-define(`foo', `')
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-EOF
-
-cat <<\EOF >ok
-foo is not defined
-
-foo is defined
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/ifdef.1.test b/tests/gentest/ifdef.1.test
deleted file mode 100755
index fb9951c7..00000000
--- a/tests/gentest/ifdef.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/ifdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1440
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-define(`foo', `')
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-EOF
-
-cat <<\EOF >ok
-foo is not defined
-
-foo is defined
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/ifelse.1.m4 b/tests/gentest/ifelse.1.m4
deleted file mode 100755
index 0d6fbcf0..00000000
--- a/tests/gentest/ifelse.1.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/ifelse.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1478
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(`foo', `bar', `true')
-ifelse(`foo', `foo', `true')
-ifelse(`foo', `bar', `true', `false')
-ifelse(`foo', `foo', `true', `false')
-EOF
-
-cat <<\EOF >ok
-
-true
-false
-true
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/ifelse.1.test b/tests/gentest/ifelse.1.test
deleted file mode 100755
index 851c3005..00000000
--- a/tests/gentest/ifelse.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/ifelse.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1478
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(`foo', `bar', `true')
-ifelse(`foo', `foo', `true')
-ifelse(`foo', `bar', `true', `false')
-ifelse(`foo', `foo', `true', `false')
-EOF
-
-cat <<\EOF >ok
-
-true
-false
-true
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/ifelse.2.m4 b/tests/gentest/ifelse.2.m4
deleted file mode 100755
index 0cf36999..00000000
--- a/tests/gentest/ifelse.2.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# gentest/ifelse.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1497
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
-EOF
-
-cat <<\EOF >ok
-seventh
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/ifelse.2.test b/tests/gentest/ifelse.2.test
deleted file mode 100755
index 2573945b..00000000
--- a/tests/gentest/ifelse.2.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# gentest/ifelse.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1497
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
-EOF
-
-cat <<\EOF >ok
-seventh
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/include.1.m4 b/tests/gentest/include.1.m4
deleted file mode 100755
index e2912c84..00000000
--- a/tests/gentest/include.1.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# gentest/include.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2454
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(`no-such-file')
-sinclude(`no-such-file')
-EOF
-
-cat <<\EOF >ok
-
-
-EOF
-
-cat <<\EOF >okerr
-in:1: m4: Cannot open no-such-file: No such file or directory
-EOF
-
-M4PATH=$srcdir $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/include.1.test b/tests/gentest/include.1.test
deleted file mode 100755
index 55e186eb..00000000
--- a/tests/gentest/include.1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# gentest/include.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2454
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(`no-such-file')
-sinclude(`no-such-file')
-EOF
-
-cat <<\EOF >ok
-
-
-EOF
-
-cat <<\EOF >okerr
-in:1: m4: Cannot open no-such-file: No such file or directory
-EOF
-
-M4PATH=$srcdir $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/include.2.m4 b/tests/gentest/include.2.m4
deleted file mode 100755
index 15a2ea64..00000000
--- a/tests/gentest/include.2.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# gentest/include.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2474
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `FOO')
-include(`incl.m4')
-EOF
-
-cat <<\EOF >ok
-
-Include file start
-FOO
-Include file end
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/include.2.test b/tests/gentest/include.2.test
deleted file mode 100755
index 9257157c..00000000
--- a/tests/gentest/include.2.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# gentest/include.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2474
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `FOO')
-include(`incl.m4')
-EOF
-
-cat <<\EOF >ok
-
-Include file start
-FOO
-Include file end
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/include.3.m4 b/tests/gentest/include.3.m4
deleted file mode 100755
index 0f286a81..00000000
--- a/tests/gentest/include.3.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# gentest/include.3.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2489
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', include(`incl.m4'))
-This is `bar': >>>bar<<<
-EOF
-
-cat <<\EOF >ok
-
-This is bar: >>>Include file start
-foo
-Include file end
-<<<
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/include.3.test b/tests/gentest/include.3.test
deleted file mode 100755
index 19c911b2..00000000
--- a/tests/gentest/include.3.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# gentest/include.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2489
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', include(`incl.m4'))
-This is `bar': >>>bar<<<
-EOF
-
-cat <<\EOF >ok
-
-This is bar: >>>Include file start
-foo
-Include file end
-<<<
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/incr.1.m4 b/tests/gentest/incr.1.m4
deleted file mode 100755
index 16035bd3..00000000
--- a/tests/gentest/incr.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/incr.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3105
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-incr(4)
-decr(7)
-EOF
-
-cat <<\EOF >ok
-5
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/incr.1.test b/tests/gentest/incr.1.test
deleted file mode 100755
index d9da8faa..00000000
--- a/tests/gentest/incr.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/incr.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3105
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-incr(4)
-decr(7)
-EOF
-
-cat <<\EOF >ok
-5
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/index.1.m4 b/tests/gentest/index.1.m4
deleted file mode 100755
index 28771378..00000000
--- a/tests/gentest/index.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/index.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2821
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-index(`gnus, gnats, and armadillos', `nat')
-index(`gnus, gnats, and armadillos', `dag')
-EOF
-
-cat <<\EOF >ok
-7
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/index.1.test b/tests/gentest/index.1.test
deleted file mode 100755
index 2226ab97..00000000
--- a/tests/gentest/index.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/index.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2821
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-index(`gnus, gnats, and armadillos', `nat')
-index(`gnus, gnats, and armadillos', `dag')
-EOF
-
-cat <<\EOF >ok
-7
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/indir.1.m4 b/tests/gentest/indir.1.m4
deleted file mode 100755
index e1714a5b..00000000
--- a/tests/gentest/indir.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/indir.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1369
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`$$internal$macro', `Internal macro (name `$0')')
-$$internal$macro
-indir(`$$internal$macro')
-EOF
-
-cat <<\EOF >ok
-
-$$internal$macro
-Internal macro (name $$internal$macro)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/indir.1.test b/tests/gentest/indir.1.test
deleted file mode 100755
index ddb86909..00000000
--- a/tests/gentest/indir.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/indir.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1369
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`$$internal$macro', `Internal macro (name `$0')')
-$$internal$macro
-indir(`$$internal$macro')
-EOF
-
-cat <<\EOF >ok
-
-$$internal$macro
-Internal macro (name $$internal$macro)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/len.1.m4 b/tests/gentest/len.1.m4
deleted file mode 100755
index 1fa71023..00000000
--- a/tests/gentest/len.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/len.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2795
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-len()
-len(`abcdef')
-EOF
-
-cat <<\EOF >ok
-0
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/len.1.test b/tests/gentest/len.1.test
deleted file mode 100755
index 8799457a..00000000
--- a/tests/gentest/len.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/len.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2795
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-len()
-len(`abcdef')
-EOF
-
-cat <<\EOF >ok
-0
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/loops.1.m4 b/tests/gentest/loops.1.m4
deleted file mode 100755
index 791e2560..00000000
--- a/tests/gentest/loops.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/loops.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1534
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-shift
-shift(bar)
-shift(foo, bar, baz)
-EOF
-
-cat <<\EOF >ok
-
-
-bar,baz
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/loops.1.test b/tests/gentest/loops.1.test
deleted file mode 100755
index bf2b5264..00000000
--- a/tests/gentest/loops.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/loops.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1534
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-shift
-shift(bar)
-shift(foo, bar, baz)
-EOF
-
-cat <<\EOF >ok
-
-
-bar,baz
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/loops.2.m4 b/tests/gentest/loops.2.m4
deleted file mode 100755
index 88c305f5..00000000
--- a/tests/gentest/loops.2.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# gentest/loops.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1546
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
- `reverse(shift($@)), `$1'')')
-reverse
-reverse(foo)
-reverse(foo, bar, gnats, and gnus)
-EOF
-
-cat <<\EOF >ok
-
-
-foo
-and gnus, gnats, bar, foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/loops.2.test b/tests/gentest/loops.2.test
deleted file mode 100755
index 5e38e47e..00000000
--- a/tests/gentest/loops.2.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# gentest/loops.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1546
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
- `reverse(shift($@)), `$1'')')
-reverse
-reverse(foo)
-reverse(foo, bar, gnats, and gnus)
-EOF
-
-cat <<\EOF >ok
-
-
-foo
-and gnus, gnats, bar, foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/m4exit.1.m4 b/tests/gentest/m4exit.1.m4
deleted file mode 100755
index 7ba446b1..00000000
--- a/tests/gentest/m4exit.1.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# gentest/m4exit.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3474
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
-')m4exit(1)')
-fatal_error(`This is a BAD one, buster')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4: in: 3: fatal error: This is a BAD one, buster
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/m4exit.1.test b/tests/gentest/m4exit.1.test
deleted file mode 100755
index 43a4b004..00000000
--- a/tests/gentest/m4exit.1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# gentest/m4exit.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3474
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
-')m4exit(1)')
-fatal_error(`This is a BAD one, buster')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4: in: 3: fatal error: This is a BAD one, buster
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/m4wrap.1.m4 b/tests/gentest/m4wrap.1.m4
deleted file mode 100755
index a8315641..00000000
--- a/tests/gentest/m4wrap.1.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/m4wrap.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2395
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleanup', `This is the `cleanup' actions.
-')
-m4wrap(`cleanup')
-This is the first and last normal input line.
-EOF
-
-cat <<\EOF >ok
-
-
-This is the first and last normal input line.
-This is the cleanup actions.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/m4wrap.1.test b/tests/gentest/m4wrap.1.test
deleted file mode 100755
index c6327beb..00000000
--- a/tests/gentest/m4wrap.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/m4wrap.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2395
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleanup', `This is the `cleanup' actions.
-')
-m4wrap(`cleanup')
-This is the first and last normal input line.
-EOF
-
-cat <<\EOF >ok
-
-
-This is the first and last normal input line.
-This is the cleanup actions.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/patsubst.1.m4 b/tests/gentest/patsubst.1.m4
deleted file mode 100755
index 1b39ecba..00000000
--- a/tests/gentest/patsubst.1.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/patsubst.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2983
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-patsubst(`GNUs not Unix', `^', `OBS: ')
-patsubst(`GNUs not Unix', `\<', `OBS: ')
-patsubst(`GNUs not Unix', `\w*', `(\&)')
-patsubst(`GNUs not Unix', `\w+', `(\&)')
-patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-EOF
-
-cat <<\EOF >ok
-OBS: GNUs not Unix
-OBS: GNUs OBS: not OBS: Unix
-(GNUs)() (not)() (Unix)
-(GNUs) (not) (Unix)
-GN not
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/patsubst.1.test b/tests/gentest/patsubst.1.test
deleted file mode 100755
index 6213ef87..00000000
--- a/tests/gentest/patsubst.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/patsubst.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2983
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-patsubst(`GNUs not Unix', `^', `OBS: ')
-patsubst(`GNUs not Unix', `\<', `OBS: ')
-patsubst(`GNUs not Unix', `\w*', `(\&)')
-patsubst(`GNUs not Unix', `\w+', `(\&)')
-patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-EOF
-
-cat <<\EOF >ok
-OBS: GNUs not Unix
-OBS: GNUs OBS: not OBS: Unix
-(GNUs)() (not)() (Unix)
-(GNUs) (not) (Unix)
-GN not
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/patsubst.2.m4 b/tests/gentest/patsubst.2.m4
deleted file mode 100755
index f8644359..00000000
--- a/tests/gentest/patsubst.2.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/patsubst.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3000
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl
-define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
-define(`capitalize1',
- `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')dnl
-define(`capitalize',
- `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
-capitalize(`GNUs not Unix')
-EOF
-
-cat <<\EOF >ok
-Gnus Not Unix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/patsubst.2.test b/tests/gentest/patsubst.2.test
deleted file mode 100755
index b31e4d80..00000000
--- a/tests/gentest/patsubst.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/patsubst.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3000
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl
-define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
-define(`capitalize1',
- `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')dnl
-define(`capitalize',
- `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
-capitalize(`GNUs not Unix')
-EOF
-
-cat <<\EOF >ok
-Gnus Not Unix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.1.m4 b/tests/gentest/pseudoar.1.m4
deleted file mode 100755
index 29721fa1..00000000
--- a/tests/gentest/pseudoar.1.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1100
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`nargs', `$#')
-nargs
-nargs()
-nargs(arg1, arg2, arg3)
-EOF
-
-cat <<\EOF >ok
-
-0
-1
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.1.test b/tests/gentest/pseudoar.1.test
deleted file mode 100755
index 50260e65..00000000
--- a/tests/gentest/pseudoar.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1100
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`nargs', `$#')
-nargs
-nargs()
-nargs(arg1, arg2, arg3)
-EOF
-
-cat <<\EOF >ok
-
-0
-1
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.2.m4 b/tests/gentest/pseudoar.2.m4
deleted file mode 100755
index 47231cf4..00000000
--- a/tests/gentest/pseudoar.2.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1114
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$*')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.2.test b/tests/gentest/pseudoar.2.test
deleted file mode 100755
index ca939b81..00000000
--- a/tests/gentest/pseudoar.2.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1114
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$*')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.3.m4 b/tests/gentest/pseudoar.3.m4
deleted file mode 100755
index 997641f3..00000000
--- a/tests/gentest/pseudoar.3.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.3.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1125
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$@')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.3.test b/tests/gentest/pseudoar.3.test
deleted file mode 100755
index b29b17fc..00000000
--- a/tests/gentest/pseudoar.3.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1125
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$@')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.4.m4 b/tests/gentest/pseudoar.4.m4
deleted file mode 100755
index 68b7b6ef..00000000
--- a/tests/gentest/pseudoar.4.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.4.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1135
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo1', `$*')
-define(`echo2', `$@')
-define(`foo', `This is macro `foo'.')
-echo1(foo)
-echo2(foo)
-EOF
-
-cat <<\EOF >ok
-
-
-
-This is macro This is macro foo..
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.4.test b/tests/gentest/pseudoar.4.test
deleted file mode 100755
index 81616f26..00000000
--- a/tests/gentest/pseudoar.4.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1135
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo1', `$*')
-define(`echo2', `$@')
-define(`foo', `This is macro `foo'.')
-echo1(foo)
-echo2(foo)
-EOF
-
-cat <<\EOF >ok
-
-
-
-This is macro This is macro foo..
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.5.m4 b/tests/gentest/pseudoar.5.m4
deleted file mode 100755
index 8c01d6f7..00000000
--- a/tests/gentest/pseudoar.5.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.5.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1155
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `$$$ hello $$$')
-foo
-EOF
-
-cat <<\EOF >ok
-
-$$$ hello $$$
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pseudoar.5.test b/tests/gentest/pseudoar.5.test
deleted file mode 100755
index e90de1fa..00000000
--- a/tests/gentest/pseudoar.5.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/pseudoar.5.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1155
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `$$$ hello $$$')
-foo
-EOF
-
-cat <<\EOF >ok
-
-$$$ hello $$$
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pushdef.1.m4 b/tests/gentest/pushdef.1.m4
deleted file mode 100755
index ac11f585..00000000
--- a/tests/gentest/pushdef.1.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# gentest/pushdef.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1294
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-popdef(`foo')
-foo
-popdef(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Expansion one.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pushdef.1.test b/tests/gentest/pushdef.1.test
deleted file mode 100755
index d934f422..00000000
--- a/tests/gentest/pushdef.1.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# gentest/pushdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1294
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-popdef(`foo')
-foo
-popdef(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Expansion one.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pushdef.2.m4 b/tests/gentest/pushdef.2.m4
deleted file mode 100755
index 07eb0c79..00000000
--- a/tests/gentest/pushdef.2.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# gentest/pushdef.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1318
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-define(`foo', `Second expansion two.')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Second expansion two.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/pushdef.2.test b/tests/gentest/pushdef.2.test
deleted file mode 100755
index 7d43770f..00000000
--- a/tests/gentest/pushdef.2.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# gentest/pushdef.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1318
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-define(`foo', `Second expansion two.')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Second expansion two.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/regexp.1.m4 b/tests/gentest/regexp.1.m4
deleted file mode 100755
index d27cf8e7..00000000
--- a/tests/gentest/regexp.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/regexp.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2853
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\<[a-z]\w+')
-regexp(`GNUs not Unix', `\<Q\w*')
-EOF
-
-cat <<\EOF >ok
-5
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/regexp.1.test b/tests/gentest/regexp.1.test
deleted file mode 100755
index 3427751e..00000000
--- a/tests/gentest/regexp.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/regexp.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2853
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\<[a-z]\w+')
-regexp(`GNUs not Unix', `\<Q\w*')
-EOF
-
-cat <<\EOF >ok
-5
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/regexp.2.m4 b/tests/gentest/regexp.2.m4
deleted file mode 100755
index a75bdc6f..00000000
--- a/tests/gentest/regexp.2.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# gentest/regexp.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2865
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
-EOF
-
-cat <<\EOF >ok
-*** Unix *** nix ***
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/regexp.2.test b/tests/gentest/regexp.2.test
deleted file mode 100755
index c3ff8894..00000000
--- a/tests/gentest/regexp.2.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# gentest/regexp.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2865
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
-EOF
-
-cat <<\EOF >ok
-*** Unix *** nix ***
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/substr.1.m4 b/tests/gentest/substr.1.m4
deleted file mode 100755
index 6354c598..00000000
--- a/tests/gentest/substr.1.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/substr.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2891
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-substr(`gnus, gnats, and armadillos', 6)
-substr(`gnus, gnats, and armadillos', 6, 5)
-EOF
-
-cat <<\EOF >ok
-gnats, and armadillos
-gnats
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/substr.1.test b/tests/gentest/substr.1.test
deleted file mode 100755
index 964ab0eb..00000000
--- a/tests/gentest/substr.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# gentest/substr.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2891
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-substr(`gnus, gnats, and armadillos', 6)
-substr(`gnus, gnats, and armadillos', 6, 5)
-EOF
-
-cat <<\EOF >ok
-gnats, and armadillos
-gnats
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/sysval.1.m4 b/tests/gentest/sysval.1.m4
deleted file mode 100755
index f1ffeb7b..00000000
--- a/tests/gentest/sysval.1.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/sysval.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3346
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-syscmd(`false')
-ifelse(sysval, 0, zero, non-zero)
-syscmd(`true')
-sysval
-EOF
-
-cat <<\EOF >ok
-
-non-zero
-
-0
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/sysval.1.test b/tests/gentest/sysval.1.test
deleted file mode 100755
index 6e101fd7..00000000
--- a/tests/gentest/sysval.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/sysval.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3346
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-syscmd(`false')
-ifelse(sysval, 0, zero, non-zero)
-syscmd(`true')
-sysval
-EOF
-
-cat <<\EOF >ok
-
-non-zero
-
-0
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/trace.1.m4 b/tests/gentest/trace.1.m4
deleted file mode 100755
index eae2a55e..00000000
--- a/tests/gentest/trace.1.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# gentest/trace.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1705
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello World.')
-define(`echo', `$@')
-traceon(`foo', `echo')
-foo
-echo(gnus, and gnats)
-EOF
-
-cat <<\EOF >ok
-
-
-
-Hello World.
-gnus,and gnats
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- foo -> `Hello World.'
-m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/trace.1.test b/tests/gentest/trace.1.test
deleted file mode 100755
index ef1cb312..00000000
--- a/tests/gentest/trace.1.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# gentest/trace.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1705
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello World.')
-define(`echo', `$@')
-traceon(`foo', `echo')
-foo
-echo(gnus, and gnats)
-EOF
-
-cat <<\EOF >ok
-
-
-
-Hello World.
-gnus,and gnats
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- foo -> `Hello World.'
-m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/gentest/translit.1.m4 b/tests/gentest/translit.1.m4
deleted file mode 100755
index 4ac2bd7a..00000000
--- a/tests/gentest/translit.1.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/translit.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2932
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-translit(`GNUs not Unix', `A-Z')
-translit(`GNUs not Unix', `a-z', `A-Z')
-translit(`GNUs not Unix', `A-Z', `z-a')
-EOF
-
-cat <<\EOF >ok
-s not nix
-GNUS NOT UNIX
-tmfs not fnix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/translit.1.test b/tests/gentest/translit.1.test
deleted file mode 100755
index e650bbdf..00000000
--- a/tests/gentest/translit.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# gentest/translit.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2932
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-translit(`GNUs not Unix', `A-Z')
-translit(`GNUs not Unix', `a-z', `A-Z')
-translit(`GNUs not Unix', `A-Z', `z-a')
-EOF
-
-cat <<\EOF >ok
-s not nix
-GNUS NOT UNIX
-tmfs not fnix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undefine.1.m4 b/tests/gentest/undefine.1.m4
deleted file mode 100755
index cd7db2ad..00000000
--- a/tests/gentest/undefine.1.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/undefine.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1186
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-foo
-define(`foo', `expansion text')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-foo
-
-expansion text
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undefine.1.test b/tests/gentest/undefine.1.test
deleted file mode 100755
index d196e530..00000000
--- a/tests/gentest/undefine.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/undefine.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1186
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-foo
-define(`foo', `expansion text')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-foo
-
-expansion text
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undivert.1.m4 b/tests/gentest/undivert.1.m4
deleted file mode 100755
index db869a32..00000000
--- a/tests/gentest/undivert.1.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/undivert.1.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2631
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-undivert(1)
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undivert.1.test b/tests/gentest/undivert.1.test
deleted file mode 100755
index 3d04dc8b..00000000
--- a/tests/gentest/undivert.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# gentest/undivert.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2631
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-undivert(1)
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undivert.2.m4 b/tests/gentest/undivert.2.m4
deleted file mode 100755
index 0663e0dd..00000000
--- a/tests/gentest/undivert.2.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/undivert.2.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2655
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted first.
-divert(0)undivert(1)dnl
-undivert(1)
-divert(1)
-This text is also diverted but not appended.
-divert(0)undivert(1)dnl
-EOF
-
-cat <<\EOF >ok
-
-This text is diverted first.
-
-
-This text is also diverted but not appended.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undivert.2.test b/tests/gentest/undivert.2.test
deleted file mode 100755
index 6a84ecc4..00000000
--- a/tests/gentest/undivert.2.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# gentest/undivert.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2655
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted first.
-divert(0)undivert(1)dnl
-undivert(1)
-divert(1)
-This text is also diverted but not appended.
-divert(0)undivert(1)dnl
-EOF
-
-cat <<\EOF >ok
-
-This text is diverted first.
-
-
-This text is also diverted but not appended.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undivert.3.m4 b/tests/gentest/undivert.3.m4
deleted file mode 100755
index d0b92cae..00000000
--- a/tests/gentest/undivert.3.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/undivert.3.m4 is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2681
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', `BAR')
-undivert(`foo')
-include(`foo')
-EOF
-
-cat <<\EOF >ok
-
-bar
-
-BAR
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/gentest/undivert.3.test b/tests/gentest/undivert.3.test
deleted file mode 100755
index f6d22551..00000000
--- a/tests/gentest/undivert.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# gentest/undivert.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2681
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', `BAR')
-undivert(`foo')
-include(`foo')
-EOF
-
-cat <<\EOF >ok
-
-bar
-
-BAR
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/get-them b/tests/get-them
deleted file mode 100755
index ca42991a..00000000
--- a/tests/get-them
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-# Extract all examples from the manual source.
-# Copyright (C) 1992 Free Software Foundation, Inc.
-
-# This script is for use with GNU awk.
-
-FILE=${1-/dev/null}
-
-${AWK-gawk} '
-
-BEGIN {
- node = "";
- seq = -1;
- count = 0;
- file = "NONE";
-}
-
-/^@node / {
- if (seq > 0)
- printf(" -- %d test%s", seq, seq == 1 ? "" : "s");
- if (seq >= 0)
- printf("\n");
-
- split($0, tmp, ",");
- Node = substr(tmp[1], 7);
- node = tolower(Node);
- gsub(" ", "", node);
- if (length(node) > 8)
- printf("Node: %s - truncated", node);
- else
- printf("Node: %s ", node);
- node = substr(node, 1, 8);
- seq = 0;
-}
-
-/^@comment ignore$/ {
- getline;
- next;
-}
-
-/^@example$/, /^@end example$/ {
- if (seq < 0)
- next;
- if ($0 ~ /^@example$/) {
- if (count > 0)
- close (file);
- seq++;
- count++;
- o = 0;
- e = 0;
- error_flag = 0;
- i = 0;
- include_flag = 0;
- file = sprintf("%s.%d.test", node, seq);
- printf ("#!/bin/sh\n\n") > file;
- printf ("# %s is part of the GNU m4 testsuite\n", file) >> file;
- printf ("# generated from example in %s line %d\n\n", FILENAME, NR) >>file;
- printf (". ${srcdir}/defs\n") >> file;
- next;
- }
- if ($0 ~ /^@end example$/) {
- printthem(input, i, "in");
- printthem(output, o, "ok");
- printthem(error, e, "okerr");
- printf ("\n") >> file;
- if (include_flag == 1) printf ("M4PATH=$srcdir ") >> file;
- printf ("$M4 -d in >out") >> file;
- if (error_flag == 1) printf (" 2>err") >> file;
- if (error_flag == 1) printf ("\nsed -e \"s, ../../src/m4:, m4:,\" err >sederr && mv sederr err") >> file;
- printf ("\n\n$CMP -s out ok") >> file;
- if (error_flag == 1) printf (" && $CMP -s err okerr") >> file;
- printf ("\n\n") >> file;
- next;
- }
- if ($0 ~ /^\^D$/)
- next;
- if ($0 ~ /^@result\{\}/) {
- gsub(/^@result\{\}/, "", $0);
- output[o++] = $0;
- }
- else if ($0 ~ /^@error\{\}/) {
- gsub(/^@error\{\}/, "", $0);
- error[e++] = $0;
- error_flag = 1;
- }
- else {
- input[i++] = $0;
- if ($0 ~ /s*include\(/) include_flag = 1;
- }
-}
-
-END {
- printf("\n");
-}
-
-function printthem(thearray, thecounter, thefile) {
- if ((thecounter>0) || (thefile=="ok")) {
- printf ("\ncat <<\\EOF >%s\n", thefile) >> file;
- for (j=0; j<thecounter; j++) {
- gsub("@{", "{", thearray[j]);
- gsub("@}", "}", thearray[j]);
- gsub("@@", "@", thearray[j]);
- gsub("@comment.*", "", thearray[j]);
- printf ("%s\n", thearray[j]) >> file;
- }
- printf ("EOF\n") >> file;
- }
-}
-
-' $FILE >/dev/null
-
-chmod +x *.[0-9].test
diff --git a/tests/ifdef.1.test b/tests/ifdef.1.test
deleted file mode 100755
index 9cb0935b..00000000
--- a/tests/ifdef.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# ifdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1441
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-define(`foo', `')
-ifdef(`foo', ``foo' is defined', ``foo' is not defined')
-EOF
-
-cat <<\EOF >ok
-foo is not defined
-
-foo is defined
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/ifelse.1.test b/tests/ifelse.1.test
deleted file mode 100755
index 7942a0c2..00000000
--- a/tests/ifelse.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# ifelse.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1479
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(`foo', `bar', `true')
-ifelse(`foo', `foo', `true')
-ifelse(`foo', `bar', `true', `false')
-ifelse(`foo', `foo', `true', `false')
-EOF
-
-cat <<\EOF >ok
-
-true
-false
-true
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/ifelse.2.test b/tests/ifelse.2.test
deleted file mode 100755
index d2049f5d..00000000
--- a/tests/ifelse.2.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# ifelse.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1498
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-ifelse(foo, bar, `third', gnu, gnats, `sixth', `seventh')
-EOF
-
-cat <<\EOF >ok
-seventh
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/incl.m4 b/tests/incl.m4
deleted file mode 100644
index ab9572eb..00000000
--- a/tests/incl.m4
+++ /dev/null
@@ -1,3 +0,0 @@
-Include file start
-foo
-Include file end
diff --git a/tests/include.1.test b/tests/include.1.test
deleted file mode 100755
index 535a1292..00000000
--- a/tests/include.1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# include.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2455
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-include(`no-such-file')
-sinclude(`no-such-file')
-EOF
-
-cat <<\EOF >ok
-
-
-EOF
-
-cat <<\EOF >okerr
-in:1: m4: Cannot open no-such-file: No such file or directory
-EOF
-
-M4PATH=$srcdir $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/include.2.test b/tests/include.2.test
deleted file mode 100755
index 1e0c428f..00000000
--- a/tests/include.2.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# include.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2475
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `FOO')
-include(`incl.m4')
-EOF
-
-cat <<\EOF >ok
-
-Include file start
-FOO
-Include file end
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/include.3.test b/tests/include.3.test
deleted file mode 100755
index edf228d0..00000000
--- a/tests/include.3.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# include.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2490
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', include(`incl.m4'))
-This is `bar': >>>bar<<<
-EOF
-
-cat <<\EOF >ok
-
-This is bar: >>>Include file start
-foo
-Include file end
-<<<
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/incr.1.test b/tests/incr.1.test
deleted file mode 100755
index d20be4df..00000000
--- a/tests/incr.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# incr.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3106
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-incr(4)
-decr(7)
-EOF
-
-cat <<\EOF >ok
-5
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/index.1.test b/tests/index.1.test
deleted file mode 100755
index 1cee65fa..00000000
--- a/tests/index.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# index.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2822
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-index(`gnus, gnats, and armadillos', `nat')
-index(`gnus, gnats, and armadillos', `dag')
-EOF
-
-cat <<\EOF >ok
-7
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/indir.1.test b/tests/indir.1.test
deleted file mode 100755
index 3cbc0511..00000000
--- a/tests/indir.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# indir.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1370
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`$$internal$macro', `Internal macro (name `$0')')
-$$internal$macro
-indir(`$$internal$macro')
-EOF
-
-cat <<\EOF >ok
-
-$$internal$macro
-Internal macro (name $$internal$macro)
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/len.1.test b/tests/len.1.test
deleted file mode 100755
index a60bb1b0..00000000
--- a/tests/len.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# len.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2796
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-len()
-len(`abcdef')
-EOF
-
-cat <<\EOF >ok
-0
-6
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/loops.1.test b/tests/loops.1.test
deleted file mode 100755
index 3a872fc9..00000000
--- a/tests/loops.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# loops.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1535
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-shift
-shift(bar)
-shift(foo, bar, baz)
-EOF
-
-cat <<\EOF >ok
-
-
-bar,baz
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/loops.2.test b/tests/loops.2.test
deleted file mode 100755
index 35e4db17..00000000
--- a/tests/loops.2.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# loops.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1547
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`reverse', `ifelse($#, 0, , $#, 1, ``$1'',
- `reverse(shift($@)), `$1'')')
-reverse
-reverse(foo)
-reverse(foo, bar, gnats, and gnus)
-EOF
-
-cat <<\EOF >ok
-
-
-foo
-and gnus, gnats, bar, foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/m4exit.1.test b/tests/m4exit.1.test
deleted file mode 100755
index c721d434..00000000
--- a/tests/m4exit.1.test
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# m4exit.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3475
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
-')m4exit(1)')
-fatal_error(`This is a BAD one, buster')
-EOF
-
-cat <<\EOF >ok
-
-EOF
-
-cat <<\EOF >okerr
-m4: in: 3: fatal error: This is a BAD one, buster
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/m4wrap.1.test b/tests/m4wrap.1.test
deleted file mode 100755
index 1a27ac3c..00000000
--- a/tests/m4wrap.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# m4wrap.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2396
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`cleanup', `This is the `cleanup' actions.
-')
-m4wrap(`cleanup')
-This is the first and last normal input line.
-EOF
-
-cat <<\EOF >ok
-
-
-This is the first and last normal input line.
-This is the cleanup actions.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/mkconfig.sh b/tests/mkconfig.sh
deleted file mode 100644
index f2ebc782..00000000
--- a/tests/mkconfig.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-env >/tmp/env
-sed -n -e '/^#define \(\(WITH\|ENABLE\)_.*\) \(.*\)$/s//define(\1, \3)dnl/p' config.h > tests/config.m4
-sed -n -e '/^#define \(\(WITH\|ENABLE\)_.*\) \(.*\)$/s//\1=\3/p' config.h > tests/config.sh
diff --git a/tests/other-tests/discard-comments.m4 b/tests/other-tests/discard-comments.m4
deleted file mode 100644
index 95aebd27..00000000
--- a/tests/other-tests/discard-comments.m4
+++ /dev/null
@@ -1,7 +0,0 @@
-This is not a comment # but this is.
-# This line should dissappear completely.
-This should not disappear.
-changecom(`<!--', `-->')
-html <!--
-comment
- --> ends.
diff --git a/tests/other-tests/discard-comments.test b/tests/other-tests/discard-comments.test
deleted file mode 100755
index 2f6a4599..00000000
--- a/tests/other-tests/discard-comments.test
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# discard-comments.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/other-tests/discard-comments.m4 >in
-
-cat <<\EOF >ok
-This is not a comment This should not disappear.
-
-html ends.
-EOF
-
-M4PATH=$srcdir:$srcdir/other-tests $M4 -c -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/tests/other-tests/gmp.m4 b/tests/other-tests/gmp.m4
deleted file mode 100644
index b916ff69..00000000
--- a/tests/other-tests/gmp.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-divert(-1)
-# forloop(i, from, to, stmt)
-
-define(`forloop', `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')
-define(`_forloop',
- `$4`'ifelse($1, `$3', ,
- `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
-divert
-forloop(`x', 1, 100, `2**x = eval(2**x)
-')
diff --git a/tests/other-tests/gmp.test b/tests/other-tests/gmp.test
deleted file mode 100755
index 9382832a..00000000
--- a/tests/other-tests/gmp.test
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/sh
-
-# gmp.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-. ${srcdir}/config.sh
-
-# cannot perform test without --with-gmp
-test -z "$WITH_GMP" && exit 77
-
-cat ${srcdir}/other-tests/gmp.m4 >in
-
-cat <<\EOF >ok
-
-2**1 = 2
-2**2 = 4
-2**3 = 8
-2**4 = 16
-2**5 = 32
-2**6 = 64
-2**7 = 128
-2**8 = 256
-2**9 = 512
-2**10 = 1024
-2**11 = 2048
-2**12 = 4096
-2**13 = 8192
-2**14 = 16384
-2**15 = 32768
-2**16 = 65536
-2**17 = 131072
-2**18 = 262144
-2**19 = 524288
-2**20 = 1048576
-2**21 = 2097152
-2**22 = 4194304
-2**23 = 8388608
-2**24 = 16777216
-2**25 = 33554432
-2**26 = 67108864
-2**27 = 134217728
-2**28 = 268435456
-2**29 = 536870912
-2**30 = 1073741824
-2**31 = 2147483648
-2**32 = 4294967296
-2**33 = 8589934592
-2**34 = 17179869184
-2**35 = 34359738368
-2**36 = 68719476736
-2**37 = 137438953472
-2**38 = 274877906944
-2**39 = 549755813888
-2**40 = 1099511627776
-2**41 = 2199023255552
-2**42 = 4398046511104
-2**43 = 8796093022208
-2**44 = 17592186044416
-2**45 = 35184372088832
-2**46 = 70368744177664
-2**47 = 140737488355328
-2**48 = 281474976710656
-2**49 = 562949953421312
-2**50 = 1125899906842624
-2**51 = 2251799813685248
-2**52 = 4503599627370496
-2**53 = 9007199254740992
-2**54 = 18014398509481984
-2**55 = 36028797018963968
-2**56 = 72057594037927936
-2**57 = 144115188075855872
-2**58 = 288230376151711744
-2**59 = 576460752303423488
-2**60 = 1152921504606846976
-2**61 = 2305843009213693952
-2**62 = 4611686018427387904
-2**63 = 9223372036854775808
-2**64 = 18446744073709551616
-2**65 = 36893488147419103232
-2**66 = 73786976294838206464
-2**67 = 147573952589676412928
-2**68 = 295147905179352825856
-2**69 = 590295810358705651712
-2**70 = 1180591620717411303424
-2**71 = 2361183241434822606848
-2**72 = 4722366482869645213696
-2**73 = 9444732965739290427392
-2**74 = 18889465931478580854784
-2**75 = 37778931862957161709568
-2**76 = 75557863725914323419136
-2**77 = 151115727451828646838272
-2**78 = 302231454903657293676544
-2**79 = 604462909807314587353088
-2**80 = 1208925819614629174706176
-2**81 = 2417851639229258349412352
-2**82 = 4835703278458516698824704
-2**83 = 9671406556917033397649408
-2**84 = 19342813113834066795298816
-2**85 = 38685626227668133590597632
-2**86 = 77371252455336267181195264
-2**87 = 154742504910672534362390528
-2**88 = 309485009821345068724781056
-2**89 = 618970019642690137449562112
-2**90 = 1237940039285380274899124224
-2**91 = 2475880078570760549798248448
-2**92 = 4951760157141521099596496896
-2**93 = 9903520314283042199192993792
-2**94 = 19807040628566084398385987584
-2**95 = 39614081257132168796771975168
-2**96 = 79228162514264337593543950336
-2**97 = 158456325028528675187087900672
-2**98 = 316912650057057350374175801344
-2**99 = 633825300114114700748351602688
-2**100 = 1267650600228229401496703205376
-
-EOF
-
-M4PATH=$srcdir:$srcdir/../tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/tests/other-tests/import-environment.m4 b/tests/other-tests/import-environment.m4
deleted file mode 100644
index f537df66..00000000
--- a/tests/other-tests/import-environment.m4
+++ /dev/null
@@ -1,4 +0,0 @@
-`TEST'=TEST
-`LANGUAGE'=LANGUAGE
-`ZAPPED'=ZAPPED
-`OVERRIDE'=OVERRIDE
diff --git a/tests/other-tests/import-environment.test b/tests/other-tests/import-environment.test
deleted file mode 100755
index 195434b5..00000000
--- a/tests/other-tests/import-environment.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# import-environment.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-TEST='This is an environment variable'
-export TEST
-
-ZAPPED='This is an environment variable which we will delete'
-export ZAPPED
-
-OVERRIDE='This is an environment variable which we will change'
-export OVERRIDE
-
-cat ${srcdir}/other-tests/import-environment.m4 >in
-
-cat <<\EOF >ok
-TEST=This is an environment variable
-LANGUAGE=C
-ZAPPED=ZAPPED
-OVERRIDE=It is changed.
-EOF
-
-M4PATH=$srcdir:$srcdir/other-tests \
-$M4 --import-environment -UZAPPED -DOVERRIDE='It is changed.' -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/tests/other-tests/iso8859.m4 b/tests/other-tests/iso8859.m4
deleted file mode 100644
index 4ac1d196..00000000
--- a/tests/other-tests/iso8859.m4
+++ /dev/null
Binary files differ
diff --git a/tests/other-tests/iso8859.test b/tests/other-tests/iso8859.test
deleted file mode 100755
index f77dbb27..00000000
--- a/tests/other-tests/iso8859.test
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# iso8859.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/other-tests/iso8859.m4 > in
-
-cat <<\EOF >ok
-# Texting quotes
-DEFINE
-CHANGEQUOTE(«,»)
-0 TEST # TEST
-1 test # test
-2 «test» # «test»
-3 ««test»» # ««test»»
-CHANGEQUOTE(«««,»»»)
-0 TEST # TEST
-1 «TEST» # «TEST»
-2 ««TEST»» # ««TEST»»
-3 test # test
-# Test use of all iso8859 characters except NUL ` '
-Length of string is: 253
-Comparing strings: MATCH
-# NUL does not pass through
-This will be seen.
-EOF
-
-M4PATH=$srcdir:$srcdir/other-tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/tests/other-tests/stackovf.test b/tests/other-tests/stackovf.test
deleted file mode 100755
index 699c5bef..00000000
--- a/tests/other-tests/stackovf.test
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-
-exit 77
-
-# Script to verify that stack overflow is diagnosed properly when
-# there is infinite macro call nesting.
-# (causes coredump in m4-1.0.3)
-
-# On some systems the ulimit command is available in ksh or bash but not sh
-(exec 2>/dev/null; ulimit -HSs 300) || {
- for altshell in bash bsh ksh ; do
- if (exec >/dev/null 2>&1; $altshell -c 'ulimit -HSs 300') &&
- test -z "$1"
- then
- echo "Using $altshell because it supports ulimit"
- exec $altshell $0 running-with-$altshell
- exit 9
- fi
- done
-}
-
-PATH=.:..:$PATH; export PATH;
-: ${M4=../../src/m4}
-type $M4
-
-tmpfile=/tmp/t.$$
-trap 'rm -f $tmpfile; exit 1' 1 2 3 15
-
-rm -f core
-perl -e '
-# Generate nested define sequence
-$max=1000000;
-for ($i=0; $i<$max; $i++) {
- print "define(X$i,\n";
-}
-for ($i=$max-1; $i>=0; $i--) {
- print "body with substance no. $i)dnl\n"
-}
-' | \
-(
-# Limit the stack size if the shell we are running permits it
-if (exec 2>/dev/null; ulimit -HSs 50)
-then
- (exec >/dev/null 2>&1; ulimit -v) && ulimitdashv=ok
- ulimit -HSs 50
- #ulimit -HSd 8000
- #test -n "$ulimitdashv" && ulimit -HSv 8000
- echo "Stack limit is `ulimit -s`K";
- echo "Heap limit is `ulimit -d`K";
- test -n "$ulimitdashv" &&
- echo "VMem limit is `ulimit -v`K";
-else
- echo "Can't reset stack limit - this may take a while..."
-fi
-strace -o /tmp/aaa $M4 -L999999999 > $tmpfile 2>&1
-)
-result=$?
-{ echo "Output from $M4:"; cat $tmpfile; }
-
-exitcode=1
-if test $result -eq 0 ; then
- echo "TEST DID NOT WORK - m4 did not abort. Output:"
-else
- # See if stack overflow was diagnosed
- case "`cat $tmpfile`" in
- *overflow*)
- echo "Test succeeded.";
- exitcode=0
- ;;
- *ut*of*emory*|*emory*xhausted)
- echo "*** Test is INCONCLUSIVE (ran out of heap before stack overflow)";
- ;;
- *) echo "*** Test FAILED. $M4 aborted unexpectedly. Output:";
- ;;
- esac
-fi
-
-if test -f core ; then
- ls -l core
- exitcode=1
-fi
-
-#(test $exitcode -ne 0) &&
- { echo "Output from $M4:"; cat $tmpfile; }
-
-exit $exitcode
diff --git a/tests/other-tests/sync-lines.m4 b/tests/other-tests/sync-lines.m4
deleted file mode 100644
index 7cad389d..00000000
--- a/tests/other-tests/sync-lines.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-syncoutput(on)dnl
-# Several input lines, expanding to one
-define(`foo', ``foo' line one.
-`foo' line two.
-`foo' line three.') xyz
-foo
-# Several input lines, expanding to none
-define(`foo', ``foo' line one.
-`foo' line two.
-`foo' line three.')dnl
-# one input line, expanding to several output lines
-foo foo
diff --git a/tests/other-tests/sync-lines.test b/tests/other-tests/sync-lines.test
deleted file mode 100755
index c151f669..00000000
--- a/tests/other-tests/sync-lines.test
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# sync-lines.test is part of the GNU m4 testsuite
-
-. ${srcdir}/defs
-
-cat ${srcdir}/other-tests/sync-lines.m4 >in
-
-cat <<\EOF >ok
-#line 2 "in"
-# Several input lines, expanding to one
-#line 5
- xyz
-foo line one.
-#line 6
-foo line two.
-#line 6
-foo line three.
-# Several input lines, expanding to none
-#line 11
-# one input line, expanding to several output lines
-foo line one.
-#line 12
-foo line two.
-#line 12
-foo line three. foo line one.
-#line 12
-foo line two.
-#line 12
-foo line three.
-EOF
-
-M4PATH=$srcdir:$srcdir/other-tests $M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-$CMP -s out ok
diff --git a/tests/patsubst.1.test b/tests/patsubst.1.test
deleted file mode 100755
index 152d961d..00000000
--- a/tests/patsubst.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# patsubst.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2984
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-patsubst(`GNUs not Unix', `^', `OBS: ')
-patsubst(`GNUs not Unix', `\<', `OBS: ')
-patsubst(`GNUs not Unix', `\w*', `(\&)')
-patsubst(`GNUs not Unix', `\w+', `(\&)')
-patsubst(`GNUs not Unix', `[A-Z][a-z]+')
-EOF
-
-cat <<\EOF >ok
-OBS: GNUs not Unix
-OBS: GNUs OBS: not OBS: Unix
-(GNUs)() (not)() (Unix)
-(GNUs) (not) (Unix)
-GN not
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/patsubst.2.test b/tests/patsubst.2.test
deleted file mode 100755
index 47ce0b77..00000000
--- a/tests/patsubst.2.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# patsubst.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3001
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl
-define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl
-define(`capitalize1',
- `regexp(`$1', `^\(\w\)\(\w*\)', `upcase(`\1')`'downcase(`\2')')')dnl
-define(`capitalize',
- `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl
-capitalize(`GNUs not Unix')
-EOF
-
-cat <<\EOF >ok
-Gnus Not Unix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pseudoar.1.test b/tests/pseudoar.1.test
deleted file mode 100755
index 060af181..00000000
--- a/tests/pseudoar.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# pseudoar.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1101
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`nargs', `$#')
-nargs
-nargs()
-nargs(arg1, arg2, arg3)
-EOF
-
-cat <<\EOF >ok
-
-0
-1
-3
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pseudoar.2.test b/tests/pseudoar.2.test
deleted file mode 100755
index 765e73b2..00000000
--- a/tests/pseudoar.2.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# pseudoar.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1115
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$*')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pseudoar.3.test b/tests/pseudoar.3.test
deleted file mode 100755
index ef7bae06..00000000
--- a/tests/pseudoar.3.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# pseudoar.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1126
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo', `$@')
-echo(arg1, arg2, arg3 , arg4)
-EOF
-
-cat <<\EOF >ok
-
-arg1,arg2,arg3 ,arg4
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pseudoar.4.test b/tests/pseudoar.4.test
deleted file mode 100755
index b95fade9..00000000
--- a/tests/pseudoar.4.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# pseudoar.4.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1136
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`echo1', `$*')
-define(`echo2', `$@')
-define(`foo', `This is macro `foo'.')
-echo1(foo)
-echo2(foo)
-EOF
-
-cat <<\EOF >ok
-
-
-
-This is macro This is macro foo..
-This is macro foo.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pseudoar.5.test b/tests/pseudoar.5.test
deleted file mode 100755
index c739ef51..00000000
--- a/tests/pseudoar.5.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# pseudoar.5.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1156
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `$$$ hello $$$')
-foo
-EOF
-
-cat <<\EOF >ok
-
-$$$ hello $$$
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pushdef.1.test b/tests/pushdef.1.test
deleted file mode 100755
index fecfa31a..00000000
--- a/tests/pushdef.1.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# pushdef.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1295
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-popdef(`foo')
-foo
-popdef(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Expansion one.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/pushdef.2.test b/tests/pushdef.2.test
deleted file mode 100755
index d391e5da..00000000
--- a/tests/pushdef.2.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# pushdef.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1319
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Expansion one.')
-foo
-pushdef(`foo', `Expansion two.')
-foo
-define(`foo', `Second expansion two.')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-
-Expansion one.
-
-Expansion two.
-
-Second expansion two.
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/regexp.1.test b/tests/regexp.1.test
deleted file mode 100755
index a83a2228..00000000
--- a/tests/regexp.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# regexp.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2854
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\<[a-z]\w+')
-regexp(`GNUs not Unix', `\<Q\w*')
-EOF
-
-cat <<\EOF >ok
-5
--1
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/regexp.2.test b/tests/regexp.2.test
deleted file mode 100755
index 6ed53dd8..00000000
--- a/tests/regexp.2.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# regexp.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2866
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-regexp(`GNUs not Unix', `\w\(\w+\)$', `*** \& *** \1 ***')
-EOF
-
-cat <<\EOF >ok
-*** Unix *** nix ***
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/run-test b/tests/run-test
deleted file mode 100755
index c5223163..00000000
--- a/tests/run-test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# Run a test manually
-# Copyright (C) 1998 Free Software Foundation, Inc.
-
-srcdir=.
-export srcdir
-
-if sh "$@"; then
- echo "Test succeeded"
-else
- echo "TEST FAILED"
-
- if cmp testSubDir/ok testSubDir/out 2>/dev/null; then
- :
- else
- echo "stdout mosmatch"
- diff -c testSubDir/ok testSubDir/out
- fi
-
- msgerr=""
- if test -e testSubDir/err; then
- if cmp testSubDir/okerr testSubDir/err 2>/dev/null; then
- :
- else
- echo "stderr mismatch"
- diff -c testSubDir/okerr testSubDir/err
- fi
- fi
-fi
diff --git a/tests/stamp-TESTS b/tests/stamp-TESTS
deleted file mode 100644
index e69de29b..00000000
--- a/tests/stamp-TESTS
+++ /dev/null
diff --git a/tests/substr.1.test b/tests/substr.1.test
deleted file mode 100755
index ebfc000f..00000000
--- a/tests/substr.1.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# substr.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2892
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-substr(`gnus, gnats, and armadillos', 6)
-substr(`gnus, gnats, and armadillos', 6, 5)
-EOF
-
-cat <<\EOF >ok
-gnats, and armadillos
-gnats
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/sysval.1.test b/tests/sysval.1.test
deleted file mode 100755
index e79a0ef5..00000000
--- a/tests/sysval.1.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# sysval.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 3347
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-syscmd(`false')
-ifelse(sysval, 0, zero, non-zero)
-syscmd(`true')
-sysval
-EOF
-
-cat <<\EOF >ok
-
-non-zero
-
-0
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/trace.1.test b/tests/trace.1.test
deleted file mode 100755
index 7d103f7f..00000000
--- a/tests/trace.1.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# trace.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1706
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`foo', `Hello World.')
-define(`echo', `$@')
-traceon(`foo', `echo')
-foo
-echo(gnus, and gnats)
-EOF
-
-cat <<\EOF >ok
-
-
-
-Hello World.
-gnus,and gnats
-EOF
-
-cat <<\EOF >okerr
-m4trace: -1- foo -> `Hello World.'
-m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
-EOF
-
-$M4 -d in >out 2>err
-sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
-
-$CMP -s out ok && $CMP -s err okerr
-
diff --git a/tests/translit.1.test b/tests/translit.1.test
deleted file mode 100755
index 51a4396a..00000000
--- a/tests/translit.1.test
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# translit.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2933
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-translit(`GNUs not Unix', `A-Z')
-translit(`GNUs not Unix', `a-z', `A-Z')
-translit(`GNUs not Unix', `A-Z', `z-a')
-EOF
-
-cat <<\EOF >ok
-s not nix
-GNUS NOT UNIX
-tmfs not fnix
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/undefine.1.test b/tests/undefine.1.test
deleted file mode 100755
index e2450f79..00000000
--- a/tests/undefine.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# undefine.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 1187
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-foo
-define(`foo', `expansion text')
-foo
-undefine(`foo')
-foo
-EOF
-
-cat <<\EOF >ok
-foo
-
-expansion text
-
-foo
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/undivert.1.test b/tests/undivert.1.test
deleted file mode 100755
index 10c6625e..00000000
--- a/tests/undivert.1.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# undivert.1.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2632
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted.
-divert
-This text is not diverted.
-undivert(1)
-EOF
-
-cat <<\EOF >ok
-
-This text is not diverted.
-
-This text is diverted.
-
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/undivert.2.test b/tests/undivert.2.test
deleted file mode 100755
index d49f7fc4..00000000
--- a/tests/undivert.2.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# undivert.2.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2656
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-divert(1)
-This text is diverted first.
-divert(0)undivert(1)dnl
-undivert(1)
-divert(1)
-This text is also diverted but not appended.
-divert(0)undivert(1)dnl
-EOF
-
-cat <<\EOF >ok
-
-This text is diverted first.
-
-
-This text is also diverted but not appended.
-EOF
-
-$M4 -d in >out
-
-$CMP -s out ok
-
diff --git a/tests/undivert.3.test b/tests/undivert.3.test
deleted file mode 100755
index 146374d9..00000000
--- a/tests/undivert.3.test
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# undivert.3.test is part of the GNU m4 testsuite
-# generated from example in ../doc/m4.texinfo line 2682
-
-. ${srcdir}/defs
-
-cat <<\EOF >in
-define(`bar', `BAR')
-undivert(`foo')
-include(`foo')
-EOF
-
-cat <<\EOF >ok
-
-bar
-
-BAR
-
-EOF
-
-M4PATH=$srcdir $M4 -d in >out
-
-$CMP -s out ok
-