From 9f5608ba2efae21382aa973dc6095686c97b6c0e Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Thu, 12 Jul 2012 14:32:18 +0000 Subject: utils/mtx: Renamed into utils/m-tx git-svn-id: svn://tug.org/texlive/trunk@27015 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/Makefile.in | 2 +- Build/source/configure | 22 +- Build/source/libs/Makefile.in | 2 +- Build/source/libs/configure | 22 +- Build/source/m4/ChangeLog | 4 + Build/source/m4/kpse-pkgs.m4 | 6 +- Build/source/texk/Makefile.in | 2 +- Build/source/texk/configure | 22 +- Build/source/utils/Makefile.in | 2 +- Build/source/utils/README | 2 +- Build/source/utils/configure | 32 +- Build/source/utils/m-tx/ChangeLog | 23 + Build/source/utils/m-tx/Makefile.am | 89 + Build/source/utils/m-tx/Makefile.in | 1300 +++++ Build/source/utils/m-tx/ac/withenable.ac | 7 + Build/source/utils/m-tx/aclocal.m4 | 1015 ++++ Build/source/utils/m-tx/configure | 6013 ++++++++++++++++++++ Build/source/utils/m-tx/configure.ac | 53 + Build/source/utils/m-tx/m-tx.1 | 106 + Build/source/utils/m-tx/m-tx.lua | 174 + Build/source/utils/m-tx/m-tx.test | 16 + .../source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog | 7 + .../source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes | 12 + .../m-tx/mtx-0.60d-PATCHES/patch-01-write-bin | 27 + Build/source/utils/m-tx/mtx-0.60d/AUTHORS | 1 + Build/source/utils/m-tx/mtx-0.60d/Bugs | 5 + Build/source/utils/m-tx/mtx-0.60d/COPYING | 340 ++ Build/source/utils/m-tx/mtx-0.60d/ChangeLog | 180 + Build/source/utils/m-tx/mtx-0.60d/INSTALL | 365 ++ Build/source/utils/m-tx/mtx-0.60d/Makefile.am | 13 + Build/source/utils/m-tx/mtx-0.60d/Makefile.orig | 40 + Build/source/utils/m-tx/mtx-0.60d/NEWS | 5 + Build/source/utils/m-tx/mtx-0.60d/README | 164 + Build/source/utils/m-tx/mtx-0.60d/README.060d | 8 + Build/source/utils/m-tx/mtx-0.60d/analyze.c | 333 ++ Build/source/utils/m-tx/mtx-0.60d/analyze.h | 33 + Build/source/utils/m-tx/mtx-0.60d/analyze.pas | 181 + Build/source/utils/m-tx/mtx-0.60d/cfuncs.c | 89 + Build/source/utils/m-tx/mtx-0.60d/cfuncs.h | 72 + Build/source/utils/m-tx/mtx-0.60d/config.h | 90 + Build/source/utils/m-tx/mtx-0.60d/config.h.in | 89 + Build/source/utils/m-tx/mtx-0.60d/configure.ac | 33 + Build/source/utils/m-tx/mtx-0.60d/control.c | 274 + Build/source/utils/m-tx/mtx-0.60d/control.h | 52 + Build/source/utils/m-tx/mtx-0.60d/control.pas | 198 + Build/source/utils/m-tx/mtx-0.60d/files.c | 379 ++ Build/source/utils/m-tx/mtx-0.60d/files.h | 38 + Build/source/utils/m-tx/mtx-0.60d/files.pas | 196 + Build/source/utils/m-tx/mtx-0.60d/globals.c | 348 ++ Build/source/utils/m-tx/mtx-0.60d/globals.h | 154 + Build/source/utils/m-tx/mtx-0.60d/globals.pas | 247 + Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING | 339 ++ Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog | 390 ++ .../source/utils/m-tx/mtx-0.60d/libp2c/Makefile.am | 2 + Build/source/utils/m-tx/mtx-0.60d/libp2c/README | 31 + Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h | 533 ++ Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c | 1117 ++++ Build/source/utils/m-tx/mtx-0.60d/lyrics.c | 869 +++ Build/source/utils/m-tx/mtx-0.60d/lyrics.h | 37 + Build/source/utils/m-tx/mtx-0.60d/lyrics.pas | 455 ++ Build/source/utils/m-tx/mtx-0.60d/mtx.c | 505 ++ Build/source/utils/m-tx/mtx-0.60d/mtx.h | 30 + Build/source/utils/m-tx/mtx-0.60d/mtx.pas | 280 + Build/source/utils/m-tx/mtx-0.60d/mtxline.c | 844 +++ Build/source/utils/m-tx/mtx-0.60d/mtxline.h | 83 + Build/source/utils/m-tx/mtx-0.60d/mtxline.pas | 447 ++ Build/source/utils/m-tx/mtx-0.60d/multfile.c | 235 + Build/source/utils/m-tx/mtx-0.60d/multfile.h | 87 + Build/source/utils/m-tx/mtx-0.60d/multfile.pas | 196 + Build/source/utils/m-tx/mtx-0.60d/notes.c | 547 ++ Build/source/utils/m-tx/mtx-0.60d/notes.h | 34 + Build/source/utils/m-tx/mtx-0.60d/notes.pas | 280 + Build/source/utils/m-tx/mtx-0.60d/preamble.c | 1134 ++++ Build/source/utils/m-tx/mtx-0.60d/preamble.h | 42 + Build/source/utils/m-tx/mtx-0.60d/preamble.pas | 624 ++ Build/source/utils/m-tx/mtx-0.60d/prepmx.c | 887 +++ Build/source/utils/m-tx/mtx-0.60d/prepmx.pas | 444 ++ Build/source/utils/m-tx/mtx-0.60d/status.c | 649 +++ Build/source/utils/m-tx/mtx-0.60d/status.h | 57 + Build/source/utils/m-tx/mtx-0.60d/status.pas | 348 ++ Build/source/utils/m-tx/mtx-0.60d/strings.h | 34 + Build/source/utils/m-tx/mtx-0.60d/uptext.c | 277 + Build/source/utils/m-tx/mtx-0.60d/uptext.h | 25 + Build/source/utils/m-tx/mtx-0.60d/uptext.pas | 119 + Build/source/utils/m-tx/mtx-0.60d/utility.c | 393 ++ Build/source/utils/m-tx/mtx-0.60d/utility.h | 41 + Build/source/utils/m-tx/mtx-0.60d/utility.pas | 194 + Build/source/utils/m-tx/prepmx.1 | 95 + Build/source/utils/m-tx/tests/mozart.mtx | 7 + Build/source/utils/m-tx/tests/mozart.pmx | 26 + Build/source/utils/m-tx/version.ac | 11 + Build/source/utils/mtx/ChangeLog | 17 - Build/source/utils/mtx/Makefile.am | 89 - Build/source/utils/mtx/Makefile.in | 1300 ----- Build/source/utils/mtx/ac/withenable.ac | 7 - Build/source/utils/mtx/aclocal.m4 | 1015 ---- Build/source/utils/mtx/configure | 6013 -------------------- Build/source/utils/mtx/configure.ac | 53 - Build/source/utils/mtx/m-tx.1 | 106 - Build/source/utils/mtx/m-tx.lua | 174 - Build/source/utils/mtx/mtx-0.60d-PATCHES/ChangeLog | 7 - .../source/utils/mtx/mtx-0.60d-PATCHES/TL-Changes | 12 - .../utils/mtx/mtx-0.60d-PATCHES/patch-01-write-bin | 27 - Build/source/utils/mtx/mtx-0.60d/AUTHORS | 1 - Build/source/utils/mtx/mtx-0.60d/Bugs | 5 - Build/source/utils/mtx/mtx-0.60d/COPYING | 340 -- Build/source/utils/mtx/mtx-0.60d/ChangeLog | 180 - Build/source/utils/mtx/mtx-0.60d/INSTALL | 365 -- Build/source/utils/mtx/mtx-0.60d/Makefile.am | 13 - Build/source/utils/mtx/mtx-0.60d/Makefile.orig | 40 - Build/source/utils/mtx/mtx-0.60d/NEWS | 5 - Build/source/utils/mtx/mtx-0.60d/README | 164 - Build/source/utils/mtx/mtx-0.60d/README.060d | 8 - Build/source/utils/mtx/mtx-0.60d/analyze.c | 333 -- Build/source/utils/mtx/mtx-0.60d/analyze.h | 33 - Build/source/utils/mtx/mtx-0.60d/analyze.pas | 181 - Build/source/utils/mtx/mtx-0.60d/cfuncs.c | 89 - Build/source/utils/mtx/mtx-0.60d/cfuncs.h | 72 - Build/source/utils/mtx/mtx-0.60d/config.h | 90 - Build/source/utils/mtx/mtx-0.60d/config.h.in | 89 - Build/source/utils/mtx/mtx-0.60d/configure.ac | 33 - Build/source/utils/mtx/mtx-0.60d/control.c | 274 - Build/source/utils/mtx/mtx-0.60d/control.h | 52 - Build/source/utils/mtx/mtx-0.60d/control.pas | 198 - Build/source/utils/mtx/mtx-0.60d/files.c | 379 -- Build/source/utils/mtx/mtx-0.60d/files.h | 38 - Build/source/utils/mtx/mtx-0.60d/files.pas | 196 - Build/source/utils/mtx/mtx-0.60d/globals.c | 348 -- Build/source/utils/mtx/mtx-0.60d/globals.h | 154 - Build/source/utils/mtx/mtx-0.60d/globals.pas | 247 - Build/source/utils/mtx/mtx-0.60d/libp2c/COPYING | 339 -- Build/source/utils/mtx/mtx-0.60d/libp2c/ChangeLog | 390 -- .../source/utils/mtx/mtx-0.60d/libp2c/Makefile.am | 2 - Build/source/utils/mtx/mtx-0.60d/libp2c/README | 31 - Build/source/utils/mtx/mtx-0.60d/libp2c/p2c.h | 533 -- Build/source/utils/mtx/mtx-0.60d/libp2c/p2clib.c | 1117 ---- Build/source/utils/mtx/mtx-0.60d/lyrics.c | 869 --- Build/source/utils/mtx/mtx-0.60d/lyrics.h | 37 - Build/source/utils/mtx/mtx-0.60d/lyrics.pas | 455 -- Build/source/utils/mtx/mtx-0.60d/mtx.c | 505 -- Build/source/utils/mtx/mtx-0.60d/mtx.h | 30 - Build/source/utils/mtx/mtx-0.60d/mtx.pas | 280 - Build/source/utils/mtx/mtx-0.60d/mtxline.c | 844 --- Build/source/utils/mtx/mtx-0.60d/mtxline.h | 83 - Build/source/utils/mtx/mtx-0.60d/mtxline.pas | 447 -- Build/source/utils/mtx/mtx-0.60d/multfile.c | 235 - Build/source/utils/mtx/mtx-0.60d/multfile.h | 87 - Build/source/utils/mtx/mtx-0.60d/multfile.pas | 196 - Build/source/utils/mtx/mtx-0.60d/notes.c | 547 -- Build/source/utils/mtx/mtx-0.60d/notes.h | 34 - Build/source/utils/mtx/mtx-0.60d/notes.pas | 280 - Build/source/utils/mtx/mtx-0.60d/preamble.c | 1134 ---- Build/source/utils/mtx/mtx-0.60d/preamble.h | 42 - Build/source/utils/mtx/mtx-0.60d/preamble.pas | 624 -- Build/source/utils/mtx/mtx-0.60d/prepmx.c | 887 --- Build/source/utils/mtx/mtx-0.60d/prepmx.pas | 444 -- Build/source/utils/mtx/mtx-0.60d/status.c | 649 --- Build/source/utils/mtx/mtx-0.60d/status.h | 57 - Build/source/utils/mtx/mtx-0.60d/status.pas | 348 -- Build/source/utils/mtx/mtx-0.60d/strings.h | 34 - Build/source/utils/mtx/mtx-0.60d/uptext.c | 277 - Build/source/utils/mtx/mtx-0.60d/uptext.h | 25 - Build/source/utils/mtx/mtx-0.60d/uptext.pas | 119 - Build/source/utils/mtx/mtx-0.60d/utility.c | 393 -- Build/source/utils/mtx/mtx-0.60d/utility.h | 41 - Build/source/utils/mtx/mtx-0.60d/utility.pas | 194 - Build/source/utils/mtx/mtx.test | 16 - Build/source/utils/mtx/prepmx.1 | 95 - Build/source/utils/mtx/tests/mozart.mtx | 7 - Build/source/utils/mtx/tests/mozart.pmx | 26 - Build/source/utils/mtx/version.ac | 11 - 171 files changed, 25577 insertions(+), 25569 deletions(-) create mode 100644 Build/source/utils/m-tx/ChangeLog create mode 100644 Build/source/utils/m-tx/Makefile.am create mode 100644 Build/source/utils/m-tx/Makefile.in create mode 100644 Build/source/utils/m-tx/ac/withenable.ac create mode 100644 Build/source/utils/m-tx/aclocal.m4 create mode 100755 Build/source/utils/m-tx/configure create mode 100644 Build/source/utils/m-tx/configure.ac create mode 100644 Build/source/utils/m-tx/m-tx.1 create mode 100755 Build/source/utils/m-tx/m-tx.lua create mode 100755 Build/source/utils/m-tx/m-tx.test create mode 100644 Build/source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog create mode 100644 Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes create mode 100644 Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-01-write-bin create mode 100644 Build/source/utils/m-tx/mtx-0.60d/AUTHORS create mode 100644 Build/source/utils/m-tx/mtx-0.60d/Bugs create mode 100644 Build/source/utils/m-tx/mtx-0.60d/COPYING create mode 100644 Build/source/utils/m-tx/mtx-0.60d/ChangeLog create mode 100644 Build/source/utils/m-tx/mtx-0.60d/INSTALL create mode 100644 Build/source/utils/m-tx/mtx-0.60d/Makefile.am create mode 100644 Build/source/utils/m-tx/mtx-0.60d/Makefile.orig create mode 100644 Build/source/utils/m-tx/mtx-0.60d/NEWS create mode 100644 Build/source/utils/m-tx/mtx-0.60d/README create mode 100644 Build/source/utils/m-tx/mtx-0.60d/README.060d create mode 100644 Build/source/utils/m-tx/mtx-0.60d/analyze.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/analyze.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/analyze.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/cfuncs.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/cfuncs.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/config.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/config.h.in create mode 100644 Build/source/utils/m-tx/mtx-0.60d/configure.ac create mode 100644 Build/source/utils/m-tx/mtx-0.60d/control.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/control.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/control.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/files.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/files.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/files.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/globals.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/globals.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/globals.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING create mode 100644 Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog create mode 100644 Build/source/utils/m-tx/mtx-0.60d/libp2c/Makefile.am create mode 100644 Build/source/utils/m-tx/mtx-0.60d/libp2c/README create mode 100644 Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/lyrics.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/lyrics.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/lyrics.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/mtx.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/mtx.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/mtx.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/mtxline.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/mtxline.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/mtxline.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/multfile.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/multfile.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/multfile.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/notes.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/notes.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/notes.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/preamble.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/preamble.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/preamble.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/prepmx.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/prepmx.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/status.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/status.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/status.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/strings.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/uptext.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/uptext.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/uptext.pas create mode 100644 Build/source/utils/m-tx/mtx-0.60d/utility.c create mode 100644 Build/source/utils/m-tx/mtx-0.60d/utility.h create mode 100644 Build/source/utils/m-tx/mtx-0.60d/utility.pas create mode 100644 Build/source/utils/m-tx/prepmx.1 create mode 100644 Build/source/utils/m-tx/tests/mozart.mtx create mode 100644 Build/source/utils/m-tx/tests/mozart.pmx create mode 100644 Build/source/utils/m-tx/version.ac delete mode 100644 Build/source/utils/mtx/ChangeLog delete mode 100644 Build/source/utils/mtx/Makefile.am delete mode 100644 Build/source/utils/mtx/Makefile.in delete mode 100644 Build/source/utils/mtx/ac/withenable.ac delete mode 100644 Build/source/utils/mtx/aclocal.m4 delete mode 100755 Build/source/utils/mtx/configure delete mode 100644 Build/source/utils/mtx/configure.ac delete mode 100644 Build/source/utils/mtx/m-tx.1 delete mode 100755 Build/source/utils/mtx/m-tx.lua delete mode 100644 Build/source/utils/mtx/mtx-0.60d-PATCHES/ChangeLog delete mode 100644 Build/source/utils/mtx/mtx-0.60d-PATCHES/TL-Changes delete mode 100644 Build/source/utils/mtx/mtx-0.60d-PATCHES/patch-01-write-bin delete mode 100644 Build/source/utils/mtx/mtx-0.60d/AUTHORS delete mode 100644 Build/source/utils/mtx/mtx-0.60d/Bugs delete mode 100644 Build/source/utils/mtx/mtx-0.60d/COPYING delete mode 100644 Build/source/utils/mtx/mtx-0.60d/ChangeLog delete mode 100644 Build/source/utils/mtx/mtx-0.60d/INSTALL delete mode 100644 Build/source/utils/mtx/mtx-0.60d/Makefile.am delete mode 100644 Build/source/utils/mtx/mtx-0.60d/Makefile.orig delete mode 100644 Build/source/utils/mtx/mtx-0.60d/NEWS delete mode 100644 Build/source/utils/mtx/mtx-0.60d/README delete mode 100644 Build/source/utils/mtx/mtx-0.60d/README.060d delete mode 100644 Build/source/utils/mtx/mtx-0.60d/analyze.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/analyze.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/analyze.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/cfuncs.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/cfuncs.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/config.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/config.h.in delete mode 100644 Build/source/utils/mtx/mtx-0.60d/configure.ac delete mode 100644 Build/source/utils/mtx/mtx-0.60d/control.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/control.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/control.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/files.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/files.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/files.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/globals.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/globals.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/globals.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/libp2c/COPYING delete mode 100644 Build/source/utils/mtx/mtx-0.60d/libp2c/ChangeLog delete mode 100644 Build/source/utils/mtx/mtx-0.60d/libp2c/Makefile.am delete mode 100644 Build/source/utils/mtx/mtx-0.60d/libp2c/README delete mode 100644 Build/source/utils/mtx/mtx-0.60d/libp2c/p2c.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/libp2c/p2clib.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/lyrics.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/lyrics.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/lyrics.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/mtx.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/mtx.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/mtx.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/mtxline.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/mtxline.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/mtxline.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/multfile.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/multfile.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/multfile.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/notes.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/notes.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/notes.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/preamble.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/preamble.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/preamble.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/prepmx.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/prepmx.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/status.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/status.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/status.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/strings.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/uptext.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/uptext.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/uptext.pas delete mode 100644 Build/source/utils/mtx/mtx-0.60d/utility.c delete mode 100644 Build/source/utils/mtx/mtx-0.60d/utility.h delete mode 100644 Build/source/utils/mtx/mtx-0.60d/utility.pas delete mode 100755 Build/source/utils/mtx/mtx.test delete mode 100644 Build/source/utils/mtx/prepmx.1 delete mode 100644 Build/source/utils/mtx/tests/mozart.mtx delete mode 100644 Build/source/utils/mtx/tests/mozart.pmx delete mode 100644 Build/source/utils/mtx/version.ac diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index ce38d7a74d7..afe27bfbadb 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -88,7 +88,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-common.m4 \ $(top_srcdir)/version.ac \ $(top_srcdir)/utils/biber/ac/withenable.ac \ $(top_srcdir)/utils/chktex/ac/withenable.ac \ - $(top_srcdir)/utils/mtx/ac/withenable.ac \ + $(top_srcdir)/utils/m-tx/ac/withenable.ac \ $(top_srcdir)/utils/pmx/ac/withenable.ac \ $(top_srcdir)/utils/ps2eps/ac/withenable.ac \ $(top_srcdir)/utils/psutils/ac/withenable.ac \ diff --git a/Build/source/configure b/Build/source/configure index 17d23f7062d..286f55ecbf1 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -782,7 +782,7 @@ enable_cxx_runtime_hack enable_libtool_hack enable_biber enable_chktex -enable_mtx +enable_m_tx enable_pmx enable_ps2eps enable_psutils @@ -1583,7 +1583,7 @@ Optional Features: --enable-libtool-hack ignore libtool dependency_libs --disable-biber do not build the biber package --disable-chktex do not build the chktex package - --disable-mtx do not build the mtx package + --disable-m-tx do not build the m-tx package --disable-pmx do not build the pmx package --disable-ps2eps do not build the ps2eps package --disable-psutils do not build the psutils package @@ -3920,21 +3920,21 @@ $as_echo "$as_me: Assuming \`--enable-chktex=$enable_chktex'" >&6;} esac -## utils/mtx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/mtx/ +## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ ## configure options and TL libraries required for mtx -# Check whether --enable-mtx was given. -if test "${enable_mtx+set}" = set; then : - enableval=$enable_mtx; +# Check whether --enable-m-tx was given. +if test "${enable_m_tx+set}" = set; then : + enableval=$enable_m_tx; fi -case $enable_mtx in #( +case $enable_m_tx in #( yes|no) : ;; #( *) : - enable_mtx=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-mtx=$enable_mtx'" >&5 -$as_echo "$as_me: Assuming \`--enable-mtx=$enable_mtx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-mtx=$enable_mtx'" + enable_m_tx=$enable_all_pkgs + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-m-tx=$enable_m_tx'" >&5 +$as_echo "$as_me: Assuming \`--enable-m-tx=$enable_m_tx'" >&6;} + ac_configure_args="$ac_configure_args '--enable-m-tx=$enable_m_tx'" ;; esac diff --git a/Build/source/libs/Makefile.in b/Build/source/libs/Makefile.in index 8dbfdbaeb43..aa375524099 100644 --- a/Build/source/libs/Makefile.in +++ b/Build/source/libs/Makefile.in @@ -85,7 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \ $(top_srcdir)/../m4/kpse-zziplib-flags.m4 \ $(top_srcdir)/../utils/biber/ac/withenable.ac \ $(top_srcdir)/../utils/chktex/ac/withenable.ac \ - $(top_srcdir)/../utils/mtx/ac/withenable.ac \ + $(top_srcdir)/../utils/m-tx/ac/withenable.ac \ $(top_srcdir)/../utils/pmx/ac/withenable.ac \ $(top_srcdir)/../utils/ps2eps/ac/withenable.ac \ $(top_srcdir)/../utils/psutils/ac/withenable.ac \ diff --git a/Build/source/libs/configure b/Build/source/libs/configure index 703576bf3d8..94daa351fe4 100755 --- a/Build/source/libs/configure +++ b/Build/source/libs/configure @@ -693,7 +693,7 @@ enable_cxx_runtime_hack enable_libtool_hack enable_biber enable_chktex -enable_mtx +enable_m_tx enable_pmx enable_ps2eps enable_psutils @@ -1483,7 +1483,7 @@ Optional Features: --enable-libtool-hack ignore libtool dependency_libs --disable-biber do not build the biber package --disable-chktex do not build the chktex package - --disable-mtx do not build the mtx package + --disable-m-tx do not build the m-tx package --disable-pmx do not build the pmx package --disable-ps2eps do not build the ps2eps package --disable-psutils do not build the psutils package @@ -3245,21 +3245,21 @@ $as_echo "$as_me: Assuming \`--enable-chktex=$enable_chktex'" >&6;} esac -## utils/mtx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/mtx/ +## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ ## configure options and TL libraries required for mtx -# Check whether --enable-mtx was given. -if test "${enable_mtx+set}" = set; then : - enableval=$enable_mtx; +# Check whether --enable-m-tx was given. +if test "${enable_m_tx+set}" = set; then : + enableval=$enable_m_tx; fi -case $enable_mtx in #( +case $enable_m_tx in #( yes|no) : ;; #( *) : - enable_mtx=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-mtx=$enable_mtx'" >&5 -$as_echo "$as_me: Assuming \`--enable-mtx=$enable_mtx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-mtx=$enable_mtx'" + enable_m_tx=$enable_all_pkgs + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-m-tx=$enable_m_tx'" >&5 +$as_echo "$as_me: Assuming \`--enable-m-tx=$enable_m_tx'" >&6;} + ac_configure_args="$ac_configure_args '--enable-m-tx=$enable_m_tx'" ;; esac diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog index 61367849e6b..d2045c28a45 100644 --- a/Build/source/m4/ChangeLog +++ b/Build/source/m4/ChangeLog @@ -1,3 +1,7 @@ +2012-07-12 Peter Breitenlohner + + * kpse-pkgs.m4 (KPSE_UTILS_PKGS): Rename mtx => m-tx. + 2012-04-24 Peter Breitenlohner * kpse-common.m4 (_KPSE_LIB_FLAGS_TL): Replace sed substitutions diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4 index ecd1f43cf30..2282688fefc 100644 --- a/Build/source/m4/kpse-pkgs.m4 +++ b/Build/source/m4/kpse-pkgs.m4 @@ -1,12 +1,10 @@ # Private macros for the TeX Live (TL) tree. -# Copyright (C) 2009, 2010, 2011 Peter Breitenlohner +# Copyright (C) 2009-2012 Peter Breitenlohner # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 0 - ## ------------------------------ ## ## Define lists of sub-packages. ## ## ------------------------------ ## @@ -75,7 +73,7 @@ AC_DEFUN([KPSE_UTILS_PKGS], [m4_define([kpse_utils_pkgs], [ biber chktex -mtx +m-tx pmx ps2eps psutils diff --git a/Build/source/texk/Makefile.in b/Build/source/texk/Makefile.in index d9bac016526..12eefde29b7 100644 --- a/Build/source/texk/Makefile.in +++ b/Build/source/texk/Makefile.in @@ -85,7 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \ $(top_srcdir)/../m4/kpse-zziplib-flags.m4 \ $(top_srcdir)/../utils/biber/ac/withenable.ac \ $(top_srcdir)/../utils/chktex/ac/withenable.ac \ - $(top_srcdir)/../utils/mtx/ac/withenable.ac \ + $(top_srcdir)/../utils/m-tx/ac/withenable.ac \ $(top_srcdir)/../utils/pmx/ac/withenable.ac \ $(top_srcdir)/../utils/ps2eps/ac/withenable.ac \ $(top_srcdir)/../utils/psutils/ac/withenable.ac \ diff --git a/Build/source/texk/configure b/Build/source/texk/configure index f43d75fbc05..ad36e695dcb 100755 --- a/Build/source/texk/configure +++ b/Build/source/texk/configure @@ -693,7 +693,7 @@ enable_cxx_runtime_hack enable_libtool_hack enable_biber enable_chktex -enable_mtx +enable_m_tx enable_pmx enable_ps2eps enable_psutils @@ -1503,7 +1503,7 @@ Optional Features: --enable-libtool-hack ignore libtool dependency_libs --disable-biber do not build the biber package --disable-chktex do not build the chktex package - --disable-mtx do not build the mtx package + --disable-m-tx do not build the m-tx package --disable-pmx do not build the pmx package --disable-ps2eps do not build the ps2eps package --disable-psutils do not build the psutils package @@ -3265,21 +3265,21 @@ $as_echo "$as_me: Assuming \`--enable-chktex=$enable_chktex'" >&6;} esac -## utils/mtx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/mtx/ +## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ ## configure options and TL libraries required for mtx -# Check whether --enable-mtx was given. -if test "${enable_mtx+set}" = set; then : - enableval=$enable_mtx; +# Check whether --enable-m-tx was given. +if test "${enable_m_tx+set}" = set; then : + enableval=$enable_m_tx; fi -case $enable_mtx in #( +case $enable_m_tx in #( yes|no) : ;; #( *) : - enable_mtx=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-mtx=$enable_mtx'" >&5 -$as_echo "$as_me: Assuming \`--enable-mtx=$enable_mtx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-mtx=$enable_mtx'" + enable_m_tx=$enable_all_pkgs + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-m-tx=$enable_m_tx'" >&5 +$as_echo "$as_me: Assuming \`--enable-m-tx=$enable_m_tx'" >&6;} + ac_configure_args="$ac_configure_args '--enable-m-tx=$enable_m_tx'" ;; esac diff --git a/Build/source/utils/Makefile.in b/Build/source/utils/Makefile.in index 5d2295d63b2..58b1ad95183 100644 --- a/Build/source/utils/Makefile.in +++ b/Build/source/utils/Makefile.in @@ -85,7 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-common.m4 \ $(top_srcdir)/../m4/kpse-zziplib-flags.m4 \ $(top_srcdir)/../utils/biber/ac/withenable.ac \ $(top_srcdir)/../utils/chktex/ac/withenable.ac \ - $(top_srcdir)/../utils/mtx/ac/withenable.ac \ + $(top_srcdir)/../utils/m-tx/ac/withenable.ac \ $(top_srcdir)/../utils/pmx/ac/withenable.ac \ $(top_srcdir)/../utils/ps2eps/ac/withenable.ac \ $(top_srcdir)/../utils/psutils/ac/withenable.ac \ diff --git a/Build/source/utils/README b/Build/source/utils/README index 8a2e5174f91..a9ae84f7029 100644 --- a/Build/source/utils/README +++ b/Build/source/utils/README @@ -13,7 +13,7 @@ chktex 1.6.6 - checked 10apr12 http://mirror.ctan.org/support/chktex/ for pdf, otherwise same as http://download.savannah.gnu.org/releases/chktex/ -mtx 0.60d - checked 16apr12 +m-tx 0.60d - checked 16apr12 http://mirror.ctan.org/support/m-tx/ pmx 2.6.18 - checked 18may12 diff --git a/Build/source/utils/configure b/Build/source/utils/configure index df8eec3d527..e13d606e08f 100755 --- a/Build/source/utils/configure +++ b/Build/source/utils/configure @@ -693,7 +693,7 @@ enable_cxx_runtime_hack enable_libtool_hack enable_biber enable_chktex -enable_mtx +enable_m_tx enable_pmx enable_ps2eps enable_psutils @@ -844,7 +844,7 @@ LIBS CPPFLAGS' ac_subdirs_all='biber chktex -mtx +m-tx pmx ps2eps psutils @@ -1481,7 +1481,7 @@ Optional Features: --enable-libtool-hack ignore libtool dependency_libs --disable-biber do not build the biber package --disable-chktex do not build the chktex package - --disable-mtx do not build the mtx package + --disable-m-tx do not build the m-tx package --disable-pmx do not build the pmx package --disable-ps2eps do not build the ps2eps package --disable-psutils do not build the psutils package @@ -3243,21 +3243,21 @@ $as_echo "$as_me: Assuming \`--enable-chktex=$enable_chktex'" >&6;} esac -## utils/mtx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/mtx/ +## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ ## configure options and TL libraries required for mtx -# Check whether --enable-mtx was given. -if test "${enable_mtx+set}" = set; then : - enableval=$enable_mtx; +# Check whether --enable-m-tx was given. +if test "${enable_m_tx+set}" = set; then : + enableval=$enable_m_tx; fi -case $enable_mtx in #( +case $enable_m_tx in #( yes|no) : ;; #( *) : - enable_mtx=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-mtx=$enable_mtx'" >&5 -$as_echo "$as_me: Assuming \`--enable-mtx=$enable_mtx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-mtx=$enable_mtx'" + enable_m_tx=$enable_all_pkgs + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-m-tx=$enable_m_tx'" >&5 +$as_echo "$as_me: Assuming \`--enable-m-tx=$enable_m_tx'" >&6;} + ac_configure_args="$ac_configure_args '--enable-m-tx=$enable_m_tx'" ;; esac @@ -5888,11 +5888,11 @@ if test -x $srcdir/chktex/configure; then fi -if test -x $srcdir/mtx/configure; then - test "x$enable_mtx" = xno || SUBUTILS="$SUBUTILS mtx" - DIST_SUBUTILS="$DIST_SUBUTILS mtx" +if test -x $srcdir/m-tx/configure; then + test "x$enable_m_tx" = xno || SUBUTILS="$SUBUTILS m-tx" + DIST_SUBUTILS="$DIST_SUBUTILS m-tx" if false; then - subdirs="$subdirs mtx" + subdirs="$subdirs m-tx" fi fi diff --git a/Build/source/utils/m-tx/ChangeLog b/Build/source/utils/m-tx/ChangeLog new file mode 100644 index 00000000000..9c326843c44 --- /dev/null +++ b/Build/source/utils/m-tx/ChangeLog @@ -0,0 +1,23 @@ +2012-07-12 Peter Breitenlohner + + This directory utils/mtx/ renamed into utils/m-tx/. + * mtx.test: Renamed into m-tx.test. + * Makefile.am, configure.ac, ac/withenable.ac: Adapted. + +2012-05-16 Peter Breitenlohner + + * Makefile.am (AM_CPPFLAGS): Add '-DNO_DECLARE_MALLOC' to avoid + a possibly conflicting redeclaration of malloc(). + From Vladimir Volovich . + +2012-04-16 Peter Breitenlohner + + Adapt mtx-0.60d to the TeX Live build system. + + * configure.ac: Do not use AC_CONFIG_HEADERS because config.h + is not included by the sources. + Do not use AC_FUNC_MALLOC because this might redefine malloc() + as rpl_malloc(). + +Copyright (C) 2012 Peter Breitenlohner +You may freely use, modify and/or distribute this file. diff --git a/Build/source/utils/m-tx/Makefile.am b/Build/source/utils/m-tx/Makefile.am new file mode 100644 index 00000000000..7cf23755866 --- /dev/null +++ b/Build/source/utils/m-tx/Makefile.am @@ -0,0 +1,89 @@ +## Makefile.am for the TeX Live subdirectory utils/m-tx/ +## +## Copyright (C) 2012 Peter Breitenlohner +## You may freely use, modify and/or distribute this file. +## +ACLOCAL_AMFLAGS = -I ../../m4 + +## We want to re-distribute the whole original mtx source tree. +EXTRA_DIST = $(MTX_TREE) +## Patches applied to the original source tree +EXTRA_DIST += $(MTX_TREE)-PATCHES + +# in case of an SVN repository +dist-hook: + rm -rf `find $(distdir) -name .svn` + +INCLUDES = -I$(srcdir)/$(MTX_TREE)/libp2c +AM_CPPFLAGS = -DNO_DECLARE_MALLOC +AM_CFLAGS = #$(WARNING_CFLAGS) + +bin_PROGRAMS = prepmx + +## prepmx_SOURCES = config.h + +prepmx_SOURCES = \ + $(MTX_TREE)/analyze.c \ + $(MTX_TREE)/analyze.h \ + $(MTX_TREE)/cfuncs.c \ + $(MTX_TREE)/cfuncs.h \ + $(MTX_TREE)/control.c \ + $(MTX_TREE)/control.h \ + $(MTX_TREE)/files.c \ + $(MTX_TREE)/files.h \ + $(MTX_TREE)/globals.c \ + $(MTX_TREE)/globals.h \ + $(MTX_TREE)/lyrics.c \ + $(MTX_TREE)/lyrics.h \ + $(MTX_TREE)/mtx.c \ + $(MTX_TREE)/mtx.h \ + $(MTX_TREE)/mtxline.c \ + $(MTX_TREE)/mtxline.h \ + $(MTX_TREE)/multfile.c \ + $(MTX_TREE)/multfile.h \ + $(MTX_TREE)/notes.c \ + $(MTX_TREE)/notes.h \ + $(MTX_TREE)/preamble.c \ + $(MTX_TREE)/preamble.h \ + $(MTX_TREE)/prepmx.c \ + $(MTX_TREE)/status.c \ + $(MTX_TREE)/status.h \ + $(MTX_TREE)/strings.h \ + $(MTX_TREE)/uptext.c \ + $(MTX_TREE)/uptext.h \ + $(MTX_TREE)/utility.c \ + $(MTX_TREE)/utility.h + +LDADD = libp2c.a + +noinst_LIBRARIES = libp2c.a + +libp2c_a_SOURCES = \ + $(MTX_TREE)/libp2c/p2c.h \ + $(MTX_TREE)/libp2c/p2clib.c + +lua_scripts = m-tx + +scriptsdir = texmf-dist/scripts/m-tx +nodist_bin_SCRIPTS = + +include $(srcdir)/../../texk/am/script_links.am + +texmfdir = $(datarootdir)/$(scriptsdir) +dist_texmf_SCRIPTS = $(lua_scripts:=.lua) + +install-data-hook: install-lua-links + +uninstall-hook: uninstall-links + +dist_man1_MANS = m-tx.1 prepmx.1 + +## Tests +## +TESTS = m-tx.test +EXTRA_DIST += $(TESTS) + +## m-tx.test +EXTRA_DIST += tests/mozart.mtx tests/mozart.pmx +DISTCLEANFILES = mozart* + diff --git a/Build/source/utils/m-tx/Makefile.in b/Build/source/utils/m-tx/Makefile.in new file mode 100644 index 00000000000..861d4523b22 --- /dev/null +++ b/Build/source/utils/m-tx/Makefile.in @@ -0,0 +1,1300 @@ +# Makefile.in generated by automake 1.12.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 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. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +bin_PROGRAMS = prepmx$(EXEEXT) +DIST_COMMON = $(am__configure_deps) $(dist_man1_MANS) \ + $(dist_texmf_SCRIPTS) $(srcdir)/../../texk/am/script_links.am \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/../../build-aux/depcomp \ + $(top_srcdir)/../../build-aux/install-sh \ + $(top_srcdir)/../../build-aux/missing $(top_srcdir)/configure \ + ../../build-aux/config.guess ../../build-aux/config.sub \ + ../../build-aux/depcomp ../../build-aux/install-sh \ + ../../build-aux/ltmain.sh ../../build-aux/missing \ + ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog +@WIN32_TRUE@@WIN32_WRAP_TRUE@am__append_1 = $(wrappers) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/../../m4/kpse-win32.m4 $(top_srcdir)/version.ac \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libp2c_a_AR = $(AR) $(ARFLAGS) +libp2c_a_LIBADD = +am_libp2c_a_OBJECTS = p2clib.$(OBJEXT) +libp2c_a_OBJECTS = $(am_libp2c_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +PROGRAMS = $(bin_PROGRAMS) +am_prepmx_OBJECTS = analyze.$(OBJEXT) cfuncs.$(OBJEXT) \ + control.$(OBJEXT) files.$(OBJEXT) globals.$(OBJEXT) \ + lyrics.$(OBJEXT) mtx.$(OBJEXT) mtxline.$(OBJEXT) \ + multfile.$(OBJEXT) notes.$(OBJEXT) preamble.$(OBJEXT) \ + prepmx.$(OBJEXT) status.$(OBJEXT) uptext.$(OBJEXT) \ + utility.$(OBJEXT) +prepmx_OBJECTS = $(am_prepmx_OBJECTS) +prepmx_LDADD = $(LDADD) +prepmx_DEPENDENCIES = libp2c.a +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +SCRIPTS = $(dist_texmf_SCRIPTS) $(nodist_bin_SCRIPTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libp2c_a_SOURCES) $(prepmx_SOURCES) +DIST_SOURCES = $(libp2c_a_SOURCES) $(prepmx_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(dist_man1_MANS) +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = $(am__tty_colors_dummy) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MTX_TREE = @MTX_TREE@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POW_LIB = @POW_LIB@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I ../../m4 +EXTRA_DIST = $(MTX_TREE) $(MTX_TREE)-PATCHES ../../build-aux/relpath \ + $(TESTS) tests/mozart.mtx tests/mozart.pmx +INCLUDES = -I$(srcdir)/$(MTX_TREE)/libp2c +AM_CPPFLAGS = -DNO_DECLARE_MALLOC +AM_CFLAGS = #$(WARNING_CFLAGS) +prepmx_SOURCES = \ + $(MTX_TREE)/analyze.c \ + $(MTX_TREE)/analyze.h \ + $(MTX_TREE)/cfuncs.c \ + $(MTX_TREE)/cfuncs.h \ + $(MTX_TREE)/control.c \ + $(MTX_TREE)/control.h \ + $(MTX_TREE)/files.c \ + $(MTX_TREE)/files.h \ + $(MTX_TREE)/globals.c \ + $(MTX_TREE)/globals.h \ + $(MTX_TREE)/lyrics.c \ + $(MTX_TREE)/lyrics.h \ + $(MTX_TREE)/mtx.c \ + $(MTX_TREE)/mtx.h \ + $(MTX_TREE)/mtxline.c \ + $(MTX_TREE)/mtxline.h \ + $(MTX_TREE)/multfile.c \ + $(MTX_TREE)/multfile.h \ + $(MTX_TREE)/notes.c \ + $(MTX_TREE)/notes.h \ + $(MTX_TREE)/preamble.c \ + $(MTX_TREE)/preamble.h \ + $(MTX_TREE)/prepmx.c \ + $(MTX_TREE)/status.c \ + $(MTX_TREE)/status.h \ + $(MTX_TREE)/strings.h \ + $(MTX_TREE)/uptext.c \ + $(MTX_TREE)/uptext.h \ + $(MTX_TREE)/utility.c \ + $(MTX_TREE)/utility.h + +LDADD = libp2c.a +noinst_LIBRARIES = libp2c.a +libp2c_a_SOURCES = \ + $(MTX_TREE)/libp2c/p2c.h \ + $(MTX_TREE)/libp2c/p2clib.c + +lua_scripts = m-tx +scriptsdir = texmf-dist/scripts/m-tx +nodist_bin_SCRIPTS = $(am__append_1) +all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts) +@WIN32_TRUE@@WIN32_WRAP_TRUE@wrappers = $(all_scripts:=.exe) +@WIN32_TRUE@@WIN32_WRAP_TRUE@runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe +texmfdir = $(datarootdir)/$(scriptsdir) +dist_texmf_SCRIPTS = $(lua_scripts:=.lua) +dist_man1_MANS = m-tx.1 prepmx.1 +TESTS = m-tx.test +DISTCLEANFILES = mozart* +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../texk/am/script_links.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../../texk/am/script_links.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libp2c.a: $(libp2c_a_OBJECTS) $(libp2c_a_DEPENDENCIES) $(EXTRA_libp2c_a_DEPENDENCIES) + -rm -f libp2c.a + $(libp2c_a_AR) libp2c.a $(libp2c_a_OBJECTS) $(libp2c_a_LIBADD) + $(RANLIB) libp2c.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +prepmx$(EXEEXT): $(prepmx_OBJECTS) $(prepmx_DEPENDENCIES) $(EXTRA_prepmx_DEPENDENCIES) + @rm -f prepmx$(EXEEXT) + $(LINK) $(prepmx_OBJECTS) $(prepmx_LDADD) $(LIBS) +install-dist_texmfSCRIPTS: $(dist_texmf_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(dist_texmf_SCRIPTS)'; test -n "$(texmfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(texmfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(texmfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(texmfdir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(texmfdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-dist_texmfSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(dist_texmf_SCRIPTS)'; test -n "$(texmfdir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(texmfdir)'; $(am__uninstall_files_from_dir) +install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-nodist_binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analyze.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfuncs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lyrics.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtxline.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p2clib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preamble.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +p2clib.o: $(MTX_TREE)/libp2c/p2clib.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT p2clib.o -MD -MP -MF $(DEPDIR)/p2clib.Tpo -c -o p2clib.o `test -f '$(MTX_TREE)/libp2c/p2clib.c' || echo '$(srcdir)/'`$(MTX_TREE)/libp2c/p2clib.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/p2clib.Tpo $(DEPDIR)/p2clib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/libp2c/p2clib.c' object='p2clib.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o p2clib.o `test -f '$(MTX_TREE)/libp2c/p2clib.c' || echo '$(srcdir)/'`$(MTX_TREE)/libp2c/p2clib.c + +p2clib.obj: $(MTX_TREE)/libp2c/p2clib.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT p2clib.obj -MD -MP -MF $(DEPDIR)/p2clib.Tpo -c -o p2clib.obj `if test -f '$(MTX_TREE)/libp2c/p2clib.c'; then $(CYGPATH_W) '$(MTX_TREE)/libp2c/p2clib.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/libp2c/p2clib.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/p2clib.Tpo $(DEPDIR)/p2clib.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/libp2c/p2clib.c' object='p2clib.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o p2clib.obj `if test -f '$(MTX_TREE)/libp2c/p2clib.c'; then $(CYGPATH_W) '$(MTX_TREE)/libp2c/p2clib.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/libp2c/p2clib.c'; fi` + +analyze.o: $(MTX_TREE)/analyze.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT analyze.o -MD -MP -MF $(DEPDIR)/analyze.Tpo -c -o analyze.o `test -f '$(MTX_TREE)/analyze.c' || echo '$(srcdir)/'`$(MTX_TREE)/analyze.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/analyze.Tpo $(DEPDIR)/analyze.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/analyze.c' object='analyze.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o analyze.o `test -f '$(MTX_TREE)/analyze.c' || echo '$(srcdir)/'`$(MTX_TREE)/analyze.c + +analyze.obj: $(MTX_TREE)/analyze.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT analyze.obj -MD -MP -MF $(DEPDIR)/analyze.Tpo -c -o analyze.obj `if test -f '$(MTX_TREE)/analyze.c'; then $(CYGPATH_W) '$(MTX_TREE)/analyze.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/analyze.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/analyze.Tpo $(DEPDIR)/analyze.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/analyze.c' object='analyze.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o analyze.obj `if test -f '$(MTX_TREE)/analyze.c'; then $(CYGPATH_W) '$(MTX_TREE)/analyze.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/analyze.c'; fi` + +cfuncs.o: $(MTX_TREE)/cfuncs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfuncs.o -MD -MP -MF $(DEPDIR)/cfuncs.Tpo -c -o cfuncs.o `test -f '$(MTX_TREE)/cfuncs.c' || echo '$(srcdir)/'`$(MTX_TREE)/cfuncs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cfuncs.Tpo $(DEPDIR)/cfuncs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/cfuncs.c' object='cfuncs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfuncs.o `test -f '$(MTX_TREE)/cfuncs.c' || echo '$(srcdir)/'`$(MTX_TREE)/cfuncs.c + +cfuncs.obj: $(MTX_TREE)/cfuncs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfuncs.obj -MD -MP -MF $(DEPDIR)/cfuncs.Tpo -c -o cfuncs.obj `if test -f '$(MTX_TREE)/cfuncs.c'; then $(CYGPATH_W) '$(MTX_TREE)/cfuncs.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/cfuncs.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cfuncs.Tpo $(DEPDIR)/cfuncs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/cfuncs.c' object='cfuncs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfuncs.obj `if test -f '$(MTX_TREE)/cfuncs.c'; then $(CYGPATH_W) '$(MTX_TREE)/cfuncs.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/cfuncs.c'; fi` + +control.o: $(MTX_TREE)/control.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control.o -MD -MP -MF $(DEPDIR)/control.Tpo -c -o control.o `test -f '$(MTX_TREE)/control.c' || echo '$(srcdir)/'`$(MTX_TREE)/control.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/control.Tpo $(DEPDIR)/control.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/control.c' object='control.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control.o `test -f '$(MTX_TREE)/control.c' || echo '$(srcdir)/'`$(MTX_TREE)/control.c + +control.obj: $(MTX_TREE)/control.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control.obj -MD -MP -MF $(DEPDIR)/control.Tpo -c -o control.obj `if test -f '$(MTX_TREE)/control.c'; then $(CYGPATH_W) '$(MTX_TREE)/control.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/control.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/control.Tpo $(DEPDIR)/control.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/control.c' object='control.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control.obj `if test -f '$(MTX_TREE)/control.c'; then $(CYGPATH_W) '$(MTX_TREE)/control.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/control.c'; fi` + +files.o: $(MTX_TREE)/files.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.o -MD -MP -MF $(DEPDIR)/files.Tpo -c -o files.o `test -f '$(MTX_TREE)/files.c' || echo '$(srcdir)/'`$(MTX_TREE)/files.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/files.Tpo $(DEPDIR)/files.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/files.c' object='files.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.o `test -f '$(MTX_TREE)/files.c' || echo '$(srcdir)/'`$(MTX_TREE)/files.c + +files.obj: $(MTX_TREE)/files.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.obj -MD -MP -MF $(DEPDIR)/files.Tpo -c -o files.obj `if test -f '$(MTX_TREE)/files.c'; then $(CYGPATH_W) '$(MTX_TREE)/files.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/files.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/files.Tpo $(DEPDIR)/files.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/files.c' object='files.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.obj `if test -f '$(MTX_TREE)/files.c'; then $(CYGPATH_W) '$(MTX_TREE)/files.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/files.c'; fi` + +globals.o: $(MTX_TREE)/globals.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT globals.o -MD -MP -MF $(DEPDIR)/globals.Tpo -c -o globals.o `test -f '$(MTX_TREE)/globals.c' || echo '$(srcdir)/'`$(MTX_TREE)/globals.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/globals.Tpo $(DEPDIR)/globals.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/globals.c' object='globals.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o globals.o `test -f '$(MTX_TREE)/globals.c' || echo '$(srcdir)/'`$(MTX_TREE)/globals.c + +globals.obj: $(MTX_TREE)/globals.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT globals.obj -MD -MP -MF $(DEPDIR)/globals.Tpo -c -o globals.obj `if test -f '$(MTX_TREE)/globals.c'; then $(CYGPATH_W) '$(MTX_TREE)/globals.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/globals.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/globals.Tpo $(DEPDIR)/globals.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/globals.c' object='globals.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o globals.obj `if test -f '$(MTX_TREE)/globals.c'; then $(CYGPATH_W) '$(MTX_TREE)/globals.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/globals.c'; fi` + +lyrics.o: $(MTX_TREE)/lyrics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lyrics.o -MD -MP -MF $(DEPDIR)/lyrics.Tpo -c -o lyrics.o `test -f '$(MTX_TREE)/lyrics.c' || echo '$(srcdir)/'`$(MTX_TREE)/lyrics.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lyrics.Tpo $(DEPDIR)/lyrics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/lyrics.c' object='lyrics.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lyrics.o `test -f '$(MTX_TREE)/lyrics.c' || echo '$(srcdir)/'`$(MTX_TREE)/lyrics.c + +lyrics.obj: $(MTX_TREE)/lyrics.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lyrics.obj -MD -MP -MF $(DEPDIR)/lyrics.Tpo -c -o lyrics.obj `if test -f '$(MTX_TREE)/lyrics.c'; then $(CYGPATH_W) '$(MTX_TREE)/lyrics.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/lyrics.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lyrics.Tpo $(DEPDIR)/lyrics.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/lyrics.c' object='lyrics.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lyrics.obj `if test -f '$(MTX_TREE)/lyrics.c'; then $(CYGPATH_W) '$(MTX_TREE)/lyrics.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/lyrics.c'; fi` + +mtx.o: $(MTX_TREE)/mtx.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtx.o -MD -MP -MF $(DEPDIR)/mtx.Tpo -c -o mtx.o `test -f '$(MTX_TREE)/mtx.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtx.Tpo $(DEPDIR)/mtx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtx.c' object='mtx.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtx.o `test -f '$(MTX_TREE)/mtx.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtx.c + +mtx.obj: $(MTX_TREE)/mtx.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtx.obj -MD -MP -MF $(DEPDIR)/mtx.Tpo -c -o mtx.obj `if test -f '$(MTX_TREE)/mtx.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtx.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtx.Tpo $(DEPDIR)/mtx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtx.c' object='mtx.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtx.obj `if test -f '$(MTX_TREE)/mtx.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtx.c'; fi` + +mtxline.o: $(MTX_TREE)/mtxline.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtxline.o -MD -MP -MF $(DEPDIR)/mtxline.Tpo -c -o mtxline.o `test -f '$(MTX_TREE)/mtxline.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtxline.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtxline.Tpo $(DEPDIR)/mtxline.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtxline.c' object='mtxline.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtxline.o `test -f '$(MTX_TREE)/mtxline.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtxline.c + +mtxline.obj: $(MTX_TREE)/mtxline.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtxline.obj -MD -MP -MF $(DEPDIR)/mtxline.Tpo -c -o mtxline.obj `if test -f '$(MTX_TREE)/mtxline.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtxline.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtxline.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtxline.Tpo $(DEPDIR)/mtxline.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtxline.c' object='mtxline.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtxline.obj `if test -f '$(MTX_TREE)/mtxline.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtxline.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtxline.c'; fi` + +multfile.o: $(MTX_TREE)/multfile.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multfile.o -MD -MP -MF $(DEPDIR)/multfile.Tpo -c -o multfile.o `test -f '$(MTX_TREE)/multfile.c' || echo '$(srcdir)/'`$(MTX_TREE)/multfile.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multfile.Tpo $(DEPDIR)/multfile.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/multfile.c' object='multfile.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multfile.o `test -f '$(MTX_TREE)/multfile.c' || echo '$(srcdir)/'`$(MTX_TREE)/multfile.c + +multfile.obj: $(MTX_TREE)/multfile.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multfile.obj -MD -MP -MF $(DEPDIR)/multfile.Tpo -c -o multfile.obj `if test -f '$(MTX_TREE)/multfile.c'; then $(CYGPATH_W) '$(MTX_TREE)/multfile.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/multfile.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multfile.Tpo $(DEPDIR)/multfile.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/multfile.c' object='multfile.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multfile.obj `if test -f '$(MTX_TREE)/multfile.c'; then $(CYGPATH_W) '$(MTX_TREE)/multfile.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/multfile.c'; fi` + +notes.o: $(MTX_TREE)/notes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT notes.o -MD -MP -MF $(DEPDIR)/notes.Tpo -c -o notes.o `test -f '$(MTX_TREE)/notes.c' || echo '$(srcdir)/'`$(MTX_TREE)/notes.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/notes.Tpo $(DEPDIR)/notes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/notes.c' object='notes.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o notes.o `test -f '$(MTX_TREE)/notes.c' || echo '$(srcdir)/'`$(MTX_TREE)/notes.c + +notes.obj: $(MTX_TREE)/notes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT notes.obj -MD -MP -MF $(DEPDIR)/notes.Tpo -c -o notes.obj `if test -f '$(MTX_TREE)/notes.c'; then $(CYGPATH_W) '$(MTX_TREE)/notes.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/notes.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/notes.Tpo $(DEPDIR)/notes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/notes.c' object='notes.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o notes.obj `if test -f '$(MTX_TREE)/notes.c'; then $(CYGPATH_W) '$(MTX_TREE)/notes.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/notes.c'; fi` + +preamble.o: $(MTX_TREE)/preamble.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preamble.o -MD -MP -MF $(DEPDIR)/preamble.Tpo -c -o preamble.o `test -f '$(MTX_TREE)/preamble.c' || echo '$(srcdir)/'`$(MTX_TREE)/preamble.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/preamble.Tpo $(DEPDIR)/preamble.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/preamble.c' object='preamble.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preamble.o `test -f '$(MTX_TREE)/preamble.c' || echo '$(srcdir)/'`$(MTX_TREE)/preamble.c + +preamble.obj: $(MTX_TREE)/preamble.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preamble.obj -MD -MP -MF $(DEPDIR)/preamble.Tpo -c -o preamble.obj `if test -f '$(MTX_TREE)/preamble.c'; then $(CYGPATH_W) '$(MTX_TREE)/preamble.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/preamble.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/preamble.Tpo $(DEPDIR)/preamble.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/preamble.c' object='preamble.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preamble.obj `if test -f '$(MTX_TREE)/preamble.c'; then $(CYGPATH_W) '$(MTX_TREE)/preamble.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/preamble.c'; fi` + +prepmx.o: $(MTX_TREE)/prepmx.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT prepmx.o -MD -MP -MF $(DEPDIR)/prepmx.Tpo -c -o prepmx.o `test -f '$(MTX_TREE)/prepmx.c' || echo '$(srcdir)/'`$(MTX_TREE)/prepmx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/prepmx.Tpo $(DEPDIR)/prepmx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/prepmx.c' object='prepmx.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o prepmx.o `test -f '$(MTX_TREE)/prepmx.c' || echo '$(srcdir)/'`$(MTX_TREE)/prepmx.c + +prepmx.obj: $(MTX_TREE)/prepmx.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT prepmx.obj -MD -MP -MF $(DEPDIR)/prepmx.Tpo -c -o prepmx.obj `if test -f '$(MTX_TREE)/prepmx.c'; then $(CYGPATH_W) '$(MTX_TREE)/prepmx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/prepmx.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/prepmx.Tpo $(DEPDIR)/prepmx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/prepmx.c' object='prepmx.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o prepmx.obj `if test -f '$(MTX_TREE)/prepmx.c'; then $(CYGPATH_W) '$(MTX_TREE)/prepmx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/prepmx.c'; fi` + +status.o: $(MTX_TREE)/status.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT status.o -MD -MP -MF $(DEPDIR)/status.Tpo -c -o status.o `test -f '$(MTX_TREE)/status.c' || echo '$(srcdir)/'`$(MTX_TREE)/status.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/status.Tpo $(DEPDIR)/status.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/status.c' object='status.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o status.o `test -f '$(MTX_TREE)/status.c' || echo '$(srcdir)/'`$(MTX_TREE)/status.c + +status.obj: $(MTX_TREE)/status.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT status.obj -MD -MP -MF $(DEPDIR)/status.Tpo -c -o status.obj `if test -f '$(MTX_TREE)/status.c'; then $(CYGPATH_W) '$(MTX_TREE)/status.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/status.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/status.Tpo $(DEPDIR)/status.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/status.c' object='status.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o status.obj `if test -f '$(MTX_TREE)/status.c'; then $(CYGPATH_W) '$(MTX_TREE)/status.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/status.c'; fi` + +uptext.o: $(MTX_TREE)/uptext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uptext.o -MD -MP -MF $(DEPDIR)/uptext.Tpo -c -o uptext.o `test -f '$(MTX_TREE)/uptext.c' || echo '$(srcdir)/'`$(MTX_TREE)/uptext.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/uptext.Tpo $(DEPDIR)/uptext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/uptext.c' object='uptext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uptext.o `test -f '$(MTX_TREE)/uptext.c' || echo '$(srcdir)/'`$(MTX_TREE)/uptext.c + +uptext.obj: $(MTX_TREE)/uptext.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uptext.obj -MD -MP -MF $(DEPDIR)/uptext.Tpo -c -o uptext.obj `if test -f '$(MTX_TREE)/uptext.c'; then $(CYGPATH_W) '$(MTX_TREE)/uptext.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/uptext.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/uptext.Tpo $(DEPDIR)/uptext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/uptext.c' object='uptext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uptext.obj `if test -f '$(MTX_TREE)/uptext.c'; then $(CYGPATH_W) '$(MTX_TREE)/uptext.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/uptext.c'; fi` + +utility.o: $(MTX_TREE)/utility.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utility.o -MD -MP -MF $(DEPDIR)/utility.Tpo -c -o utility.o `test -f '$(MTX_TREE)/utility.c' || echo '$(srcdir)/'`$(MTX_TREE)/utility.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/utility.Tpo $(DEPDIR)/utility.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/utility.c' object='utility.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utility.o `test -f '$(MTX_TREE)/utility.c' || echo '$(srcdir)/'`$(MTX_TREE)/utility.c + +utility.obj: $(MTX_TREE)/utility.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utility.obj -MD -MP -MF $(DEPDIR)/utility.Tpo -c -o utility.obj `if test -f '$(MTX_TREE)/utility.c'; then $(CYGPATH_W) '$(MTX_TREE)/utility.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/utility.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/utility.Tpo $(DEPDIR)/utility.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/utility.c' object='utility.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utility.obj `if test -f '$(MTX_TREE)/utility.c'; then $(CYGPATH_W) '$(MTX_TREE)/utility.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/utility.c'; fi` +install-man1: $(dist_man1_MANS) + @$(NORMAL_INSTALL) + @list1='$(dist_man1_MANS)'; \ + list2=''; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) + +clean-cscope: + -rm -f cscope.files + +cscope.files: clean-cscope cscopelist + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically 'make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_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 + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_texmfSCRIPTS install-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-nodist_binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_texmfSCRIPTS \ + uninstall-man uninstall-nodist_binSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +uninstall-man: uninstall-man1 + +.MAKE: check-am install-am install-data-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ + clean clean-binPROGRAMS clean-cscope clean-generic \ + clean-noinstLIBRARIES cscope cscopelist ctags dist dist-all \ + dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-data-hook install-dist_texmfSCRIPTS \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-man1 install-nodist_binSCRIPTS install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dist_texmfSCRIPTS \ + uninstall-hook uninstall-man uninstall-man1 \ + uninstall-nodist_binSCRIPTS + + +# in case of an SVN repository +dist-hook: + rm -rf `find $(distdir) -name .svn` +.PHONY: install-lua-links install-perl-links install-shell-links \ + install-links uninstall-links +@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript) +@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@ + +install-lua-links: +@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=lua EXT=lua install-links + +install-perl-links: +@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=perl EXT=pl install-links + +install-shell-links: +@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links + +# We support native builds, multiplatform or not, as well as distro builds. +install-links: + @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \ + if test -z "$$REL"; then \ + echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \ + exit 1; \ + fi; \ + cd $(DESTDIR)$(bindir) && \ + for f in $($(TYPE)_scripts); do \ + rm -f $$f; \ + echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \ + $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \ + done + +uninstall-links: +@WIN32_FALSE@ @for f in $(all_scripts); do \ +@WIN32_FALSE@ echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \ +@WIN32_FALSE@ rm -f "$(DESTDIR)$(bindir)/$$f"; \ +@WIN32_FALSE@ done + +install-data-hook: install-lua-links + +uninstall-hook: uninstall-links + +# 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/Build/source/utils/m-tx/ac/withenable.ac b/Build/source/utils/m-tx/ac/withenable.ac new file mode 100644 index 00000000000..fdfeef37175 --- /dev/null +++ b/Build/source/utils/m-tx/ac/withenable.ac @@ -0,0 +1,7 @@ +## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl You may freely use, modify and/or distribute this file. +dnl +## configure options and TL libraries required for mtx +KPSE_ENABLE_PROG([m-tx]) diff --git a/Build/source/utils/m-tx/aclocal.m4 b/Build/source/utils/m-tx/aclocal.m4 new file mode 100644 index 00000000000..af68feb4afe --- /dev/null +++ b/Build/source/utils/m-tx/aclocal.m4 @@ -0,0 +1,1015 @@ +# generated automatically by aclocal 1.12.2 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. + +# This file 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. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 8 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.12' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.12.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.12.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 10 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 17 + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 6 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 19 + +# 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. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], +[$0: two- and three-arguments forms are deprecated. For more info, see: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +dnl Support for Objective C++ was only introduced in Autoconf 2.65, +dnl but we still cater to Autoconf 2.62. +m4_ifdef([AC_PROG_OBJCXX], +[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 8 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 7 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 5 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 7 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 6 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 9 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# 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 ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $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 + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 3 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of '-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../m4/kpse-warnings.m4]) +m4_include([../../m4/kpse-win32.m4]) diff --git a/Build/source/utils/m-tx/configure b/Build/source/utils/m-tx/configure new file mode 100755 index 00000000000..98cac93c20f --- /dev/null +++ b/Build/source/utils/m-tx/configure @@ -0,0 +1,6013 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for m-tx for TeX Live 0.60d. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='m-tx for TeX Live' +PACKAGE_TARNAME='m-tx-for-tex-live' +PACKAGE_VERSION='0.60d' +PACKAGE_STRING='m-tx for TeX Live 0.60d' +PACKAGE_BUGREPORT='tex-k@tug.org' +PACKAGE_URL='' + +ac_unique_file="mtx-0.60d/analyze.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +MTX_TREE +POW_LIB +LIBOBJS +EGREP +GREP +CPP +RANLIB +LN_S +WIN32_WRAP_FALSE +WIN32_WRAP_TRUE +WIN32_FALSE +WIN32_TRUE +WARNING_CFLAGS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_compiler_warnings +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -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_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$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 ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$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 | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$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 ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + 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 | -n) + 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 ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$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_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=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 ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# 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 the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + 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 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # 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 <<_ACEOF +\`configure' configures m-tx for TeX Live 0.60d to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root + [DATAROOTDIR/doc/m-tx-for-tex-live] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --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 +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of m-tx for TeX Live 0.60d:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-compiler-warnings=[no|min|yes|max|all] + Turn on compiler warnings [default: yes if + maintainer-mode, min otherwise] + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +m-tx for TeX Live configure 0.60d +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* 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_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by m-tx for TeX Live $as_me 0.60d, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../build-aux "$srcdir"/../../build-aux; 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 + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../build-aux \"$srcdir\"/../../build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +am__api_version='1.12' + +# 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 +# AmigaOS /C/install, which installs bootblocks on floppy discs +# 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" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /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 + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +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. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&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}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# 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 ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $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". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +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" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='m-tx-for-tex-live' + VERSION='0.60d' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&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 + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_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 $# != 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 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* 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; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +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; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +# Check whether --enable-compiler-warnings was given. +if test "${enable_compiler_warnings+set}" = set; then : + enableval=$enable_compiler_warnings; +fi +case $enable_compiler_warnings in #( + no | min | yes | max | all) : + ;; #( + *) : + if test "x$enable_maintainer_mode" = xyes; then : + enable_compiler_warnings=yes +else + enable_compiler_warnings=min +fi ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } +if ${kpse_cv_warning_cflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$GCC" = xyes; then + kpse_cv_warning_cflags= +if test "x$enable_compiler_warnings" != xno; then + kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" + case `$CC -dumpversion` in #( + 3.4.* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( + *) : + ;; +esac + case `$CC -dumpversion` in #( + 3.[234].* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( + *) : + ;; +esac + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in #( + 3.4.* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( + *) : + ;; +esac + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + fi + fi + fi +fi +elif test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= +else + kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cflags" >&5 +$as_echo "$kpse_cv_warning_cflags" >&6; } +WARNING_CFLAGS=$kpse_cv_warning_cflags + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5 +$as_echo_n "checking for native WIN32 or MINGW32... " >&6; } +if ${kpse_cv_have_win32+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef WIN32 + choke me +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __MINGW32__ + choke me +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + kpse_cv_have_win32=mingw32 +else + kpse_cv_have_win32=native +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + kpse_cv_have_win32=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5 +$as_echo "$kpse_cv_have_win32" >&6; } + + if test "x$kpse_cv_have_win32" != xno; then + WIN32_TRUE= + WIN32_FALSE='#' +else + WIN32_TRUE='#' + WIN32_FALSE= +fi + + if test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe; then + WIN32_WRAP_TRUE= + WIN32_WRAP_FALSE='#' +else + WIN32_WRAP_TRUE='#' + WIN32_WRAP_FALSE= +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + +# Checks for libraries. + +# Checks for header files. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#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)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in memory.h stddef.h stdlib.h string.h strings.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Checks for typedefs, structures, and compiler characteristics. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + +int +main () +{ + + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + +if test $ac_cv_header_stdbool_h = yes; then + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + +# Checks for library functions. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 +$as_echo_n "checking for error_at_line... " >&6; } +if ${ac_cv_lib_error_at_line+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +error_at_line (0, 0, "", 0, "an error occurred"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_error_at_line=yes +else + ac_cv_lib_error_at_line=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 +$as_echo "$ac_cv_lib_error_at_line" >&6; } +if test $ac_cv_lib_error_at_line = no; then + case " $LIBOBJS " in + *" error.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS error.$ac_objext" + ;; +esac + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 +$as_echo_n "checking for working strtod... " >&6; } +if ${ac_cv_func_strtod+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_strtod=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +$ac_includes_default +#ifndef strtod +double strtod (); +#endif +int +main() +{ + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + return 1; + } + + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + return 1; + } + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strtod=yes +else + ac_cv_func_strtod=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 +$as_echo "$ac_cv_func_strtod" >&6; } +if test $ac_cv_func_strtod = no; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac + +ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = xyes; then : + +fi + +if test $ac_cv_func_pow = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if ${ac_cv_lib_m_pow+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_pow=yes +else + ac_cv_lib_m_pow=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = xyes; then : + POW_LIB=-lm +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +fi + +fi + +fi + +for ac_func in memchr memmove memset strchr strrchr strtol +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +MTX_TREE=mtx-0.60d + + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# 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, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# 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. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then + as_fn_error $? "conditional \"WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WIN32_WRAP_TRUE}" && test -z "${WIN32_WRAP_FALSE}"; then + as_fn_error $? "conditional \"WIN32_WRAP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by m-tx for TeX Live $as_me 0.60d, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +m-tx for TeX Live config.status 0.60d +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/Build/source/utils/m-tx/configure.ac b/Build/source/utils/m-tx/configure.ac new file mode 100644 index 00000000000..6b2fcf7e043 --- /dev/null +++ b/Build/source/utils/m-tx/configure.ac @@ -0,0 +1,53 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl +dnl This file is free software; the copyright holder +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +m4_include([version.ac])[] dnl define mtx_version +AC_INIT([m-tx for TeX Live], mtx_version, [tex-k@tug.org]) +AC_PREREQ([2.65]) +AC_CONFIG_SRCDIR([mtx-]mtx_version[/analyze.c]) +AC_CONFIG_AUX_DIR([../../build-aux]) +AC_CONFIG_MACRO_DIR([../../m4]) + +AM_INIT_AUTOMAKE([foreign]) +AM_MAINTAINER_MODE + +dnl Check compiler and flags +AC_PROG_CC + +KPSE_COMPILER_WARNINGS + +KPSE_CHECK_WIN32 +AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno]) +AM_CONDITIONAL([WIN32_WRAP], + [test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe]) + +dnl Checks for programs. +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_RANLIB + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([memory.h stddef.h stdlib.h string.h strings.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +dnl AC_FUNC_MALLOC +AC_FUNC_STRTOD +AC_CHECK_FUNCS([memchr memmove memset strchr strrchr strtol]) + +AC_SUBST([MTX_TREE], [mtx-]mtx_version) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/Build/source/utils/m-tx/m-tx.1 b/Build/source/utils/m-tx/m-tx.1 new file mode 100644 index 00000000000..c9552ab3937 --- /dev/null +++ b/Build/source/utils/m-tx/m-tx.1 @@ -0,0 +1,106 @@ +.\" This manpage is licensed under the GNU Public License +.TH m-tx 1 2012-04-09 "m-tx script, version 0.3" "" + +.SH NAME +m-tx \- This script processes mtx files then deletes intermediate files + +.SH SYNOPSIS +[ texlua ] +.B m-tx[.lua] +{ +.IR option +| +.IR jobname +[ .mtx ] +} ... +.TP +The default effect is to process each file using +.TP 12 +.BR prepmx (1) +(pre-pre-processing pass) +.TP +.BR pmxab (1) +(pre-processing pass) +.TP +.BR etex (1) +(first pass) +.TP +.BR musixflx (1) +(second pass) +.TP +.BR etex (1) +(third pass) +.TP +.BR dvips (1) +(dvi to Postscript) +.TP +.BR ps2pdf (1) +(Postscript to Portable Document Format) +.TP +followed by removal of intermediate files. + +.SH OPTIONS +.TP 8 +.B -v +output program name and version number, and quit +.TP +.B -h +output usage summary and quit +.TP +.B -l +changes the TeX processor to +.BR latex (1) +or +.BR pdflatex (1) +.TP +.B -p +changes the TeX processor to +.BR pdfetex (1) +or +.BR pdflatex (1) +(and doesn't run +.BR dvips (1) +and +.BR ps2pdf (1) +or +.BR dvipdfm (1) +) +.TP +.B -d +changes the dvi processor to +.BR dvipdfm (1) +.TP +.B -s +stops processing at the dvi file +.TP +.B -t +stops processing at the tex (and midi) files +.TP +.B -m +stops processing at the pmx file +.TP +.B -i +retain intermediate files +.TP +.B -f +default processing +.TP 0 +Options affect processing of all succeeding mtx files unless changed by another option. + +.SH SEE ALSO +.BR prepmx (1) +.BR pmxab (1) +.BR scor2prt (1) +.BR etex (1), +.BR latex (1), +.BR pdfetex (1), +.BR pdflatex (1), +.BR musixflx (1), +.BR dvipdfm (1), +.BR dvips (1), +.BR ps2pdf (1). +.br +mtx260.pdf + +.SH AUTHOR +This manual page was written by Bob Tennent . diff --git a/Build/source/utils/m-tx/m-tx.lua b/Build/source/utils/m-tx/m-tx.lua new file mode 100755 index 00000000000..3ed578563ed --- /dev/null +++ b/Build/source/utils/m-tx/m-tx.lua @@ -0,0 +1,174 @@ +#!/usr/bin/env texlua + +VERSION = "0.3" + +--[[ + m-tx.lua: processes MusiXTeX files using prepmx and pmxab as pre-processors (and deletes intermediate files) + + (c) Copyright 2011-2012 Bob Tennent rdt@cs.queensu.ca + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +--]] + +--[[ + + ChangeLog: + version 0.3 2012-04-09 RDT + Change name to m-tx to avoid clash with another program. + + version 0.2 2011-11-28 RDT + Added -i (retain intermediate files) option + + version 0.1.1 2011-07-18 RDT + + Removed a file check that caused it to fail (only on Windows!) + + version 0.1 2011-07-15 RDT + +--]] + +function usage() + print("Usage: [texlua] m-tx.lua { option | basename[.mtx] } ... ") + print("options: -v version") + print(" -h help") + print(" -l latex (or pdflatex)") + print(" -p pdfetex (or pdflatex)") + print(" -d dvipdfm") + print(" -s stop at dvi") + print(" -t stop at tex/mid") + print(" -m stop at pmx") + print(" -i retain intermediate files") + print(" -f restore default processing") +end + +function whoami () + print("This is m-tx.lua version ".. VERSION .. ".") +end + +whoami() +if #arg == 0 then + usage() + os.exit(0) +end + +-- defaults: +prepmx = "prepmx" +pmx = "pmxab" +tex = "etex" +musixflx = "musixflx" +dvi = "dvips" +ps2pdf = "ps2pdf" +intermediate = 1 + +exit_code = 0 +narg = 1 +repeat + this_arg = arg[narg] + if this_arg == "-v" then + os.exit(0) + elseif this_arg == "-h" then + usage() + os.exit(0) + elseif this_arg == "-l" then + if tex == "pdfetex" then + tex = "pdflatex" + else + tex = "latex" + end + elseif this_arg == "-p" then + if tex == "latex" then + tex = "pdflatex" + else + tex = "pdfetex" + end + dvi = ""; ps2pdf = "" + elseif this_arg == "-d" then + dvi = "dvipdfm"; ps2pdf = "" + elseif this_arg == "-s" then + dvi = ""; ps2pdf = "" + elseif this_arg == "-i" then + intermediate = 0 + elseif this_arg == "-f" then + pmx = "pmxab"; tex = "etex"; dvi = "dvips"; ps2pdf = "ps2pdf"; intermediate = 1 + elseif this_arg == "-t" then + tex = ""; dvi = ""; ps2pdf = "" + elseif this_arg == "-m" then + pmx = ""; tex = ""; dvi = ""; ps2pdf = "" + else + filename = this_arg + if filename ~= "" and string.sub(filename, -4, -1) == ".mtx" then + filename = string.sub(filename, 1, -5) + end + print("Processing ".. filename .. ".mtx.") + OK = true + if ( os.execute(prepmx .. " " .. filename ) ~= 0 ) then + OK = false + end + if (OK and pmx ~= "") then + os.execute(pmx .. " " .. filename) -- does pmx return an error code? + pmxaerr = io.open("pmxaerr.dat", "r") + if (not pmxaerr) then + print("No log file.") + OK = false + else + linebuf = pmxaerr:read() + err = tonumber(linebuf) + if (err ~= 0) then + OK = false + end + pmxaerr:close() + end + end + os.remove( filename .. ".mx2" ) + if ( OK ) and + ((tex == "") or os.execute(tex .. " " .. filename) == 0) and + ((tex == "") or os.execute(musixflx .. " " .. filename) == 0) and + ((tex == "") or os.execute(tex .. " " .. filename) == 0) and + ((tex ~= "latex" and tex ~= "pdflatex") + or (os.execute(tex .. " " .. filename) == 0)) and + (dvi == "" or (os.execute(dvi .. " " .. filename) == 0)) and + (ps2pdf == "" or (os.execute(ps2pdf .. " " .. filename .. ".ps") == 0) ) + then + if ps2pdf ~= "" then + print(filename .. ".pdf generated by " .. ps2pdf .. ".") + end + if intermediate == 1 then -- clean-up: + os.remove( "pmxaerr.dat" ) + os.remove( filename .. ".mx1" ) + os.remove( filename .. ".mx2" ) + if pmx ~= "" then + os.remove( filename .. ".pmx" ) + end + if dvi ~= "" then + os.remove( filename .. ".dvi" ) + end + if ps2pdf ~= "" then + os.remove( filename .. ".ps" ) + end + end + else + print("M-Tx/pmx/MusiXTeX processing of " .. filename .. ".mtx fails.\n") + exit_code = 2 + --[[ uncomment for debugging + print("tex = ", tex) + print("dvi = ", dvi) + print("ps2pdf = ", ps2pdf) + --]] + end + end --if this_arg == ... + narg = narg+1 +until narg > #arg +os.exit( exit_code ) diff --git a/Build/source/utils/m-tx/m-tx.test b/Build/source/utils/m-tx/m-tx.test new file mode 100755 index 00000000000..e9f2e4259c5 --- /dev/null +++ b/Build/source/utils/m-tx/m-tx.test @@ -0,0 +1,16 @@ +#! /bin/sh + +# Copyright (C) 2012 Peter Breitenlohner +# You may freely use, modify and/or distribute this file. + +rm -f mozart* + +cp $srcdir/tests/mozart.mtx . + +set -x + +./prepmx mozart \ + && diff mozart.pmx $srcdir/tests/mozart.pmx \ + || exit 1 + +exit 0 diff --git a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog new file mode 100644 index 00000000000..925cebde3c1 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog @@ -0,0 +1,7 @@ +2012-05-16 Peter Breitenlohner + + * patch-01-write-bin (new): Use binary mode for output files. + From Akira Kakuto (W32TeX). + +Copyright (C) 2012 Peter Breitenlohner +You may freely use, modify and/or distribute this file. diff --git a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes new file mode 100644 index 00000000000..a24ef1965c0 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes @@ -0,0 +1,12 @@ +Changes applied to the mtx-0.60d tree as obtained from: + http://www.ctan.org/tex-archive/support/m-tx/ + +Remove: + Makefile.in + aclocal.m4 + configure + depcomp + install-sh + missing + libp2c/Makefile.in + diff --git a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-01-write-bin b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-01-write-bin new file mode 100644 index 00000000000..a513d56fc3c --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-01-write-bin @@ -0,0 +1,27 @@ +diff -ur mtx-0.60d.orig/files.c mtx-0.60d/files.c +--- mtx-0.60d.orig/files.c 2012-04-05 14:46:38.000000000 +0200 ++++ mtx-0.60d/files.c 2012-06-16 17:39:37.000000000 +0200 +@@ -275,9 +275,9 @@ + pushFile(infilename); + strcpy(outfile_NAME, outfilename); + if (outfile != NULL) +- outfile = freopen(outfile_NAME, "w", outfile); ++ outfile = freopen(outfile_NAME, "wb", outfile); + else +- outfile = fopen(outfile_NAME, "w"); ++ outfile = fopen(outfile_NAME, "wb"); + _SETIO(outfile != NULL, FileNotFound); + strcpy(stylefile_NAME, stylefilename); + if (stylefile != NULL) +diff -ur mtx-0.60d.orig/globals.c mtx-0.60d/globals.c +--- mtx-0.60d.orig/globals.c 2012-04-05 14:41:42.000000000 +0200 ++++ mtx-0.60d/globals.c 2012-06-16 17:39:40.000000000 +0200 +@@ -237,7 +237,7 @@ + if (outfile != NULL) + fclose(outfile); + outfile = NULL; +- outfile = fopen(outfile_NAME, "w"); ++ outfile = fopen(outfile_NAME, "wb"); + if (outfile == NULL) + _EscIO2(FileNotFound, outfile_NAME); + fclose(outfile); diff --git a/Build/source/utils/m-tx/mtx-0.60d/AUTHORS b/Build/source/utils/m-tx/mtx-0.60d/AUTHORS new file mode 100644 index 00000000000..9fdff1fe9d3 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/AUTHORS @@ -0,0 +1 @@ +Dirk Laurie (dpl@sun.ac.za) diff --git a/Build/source/utils/m-tx/mtx-0.60d/Bugs b/Build/source/utils/m-tx/mtx-0.60d/Bugs new file mode 100644 index 00000000000..1703eee92a2 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/Bugs @@ -0,0 +1,5 @@ +Lyrics lines when not from same paragraph don't join neatly. +Problem has been discussed on mailing list and Rainer gave +a solution. + +Rest in dot and comma shortcuts gives error at PMX stage. diff --git a/Build/source/utils/m-tx/mtx-0.60d/COPYING b/Build/source/utils/m-tx/mtx-0.60d/COPYING new file mode 100644 index 00000000000..623b6258a13 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, 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 software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, 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 redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +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 give any other recipients of the Program a copy of this License +along with the Program. + +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 Program or any portion +of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +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 Program, 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 Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) 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; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, 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 executable. 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. + +If distribution of executable or 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 counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program 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. + + 5. 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 Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program 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. + + 7. 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 Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program 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 Program. + +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. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program 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. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 Program +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 Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, 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 + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. 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. + + + Copyright (C) + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Build/source/utils/m-tx/mtx-0.60d/ChangeLog b/Build/source/utils/m-tx/mtx-0.60d/ChangeLog new file mode 100644 index 00000000000..c6191aa7874 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/ChangeLog @@ -0,0 +1,180 @@ + Corrections and enhancements to M-Tx starting from 0.53 + Newest items at top + +Version 0.60d + Replaced space character tie label by no label, + status.pas: procedure labelSlur, call procedure insertchar only for slurs. + +Version 0.60c + Added facility for prefixing music words with '_' for handling in PMX. + Prefix is stripped in output file. + mtxline.pas: type music_word, const bind_left, array name, + procedure GetNextMusWord. + +Version 0.60b + Fixed bug in doPMXpreamble causing errors with printed meters. + +Version 0.60a + Fix for music size 13 in preamble.pas. + Convert M-Tx denominators '1', '16', '32' and '64' + to PMX meter denominator syntax '0', '1', '3' and '6'. + {} ties don't get PMX label T attached in order to support MIDI ties. + +Planned for the near future + Accepts detached shortcut. + +Version 0.55h (not released) + Traces pitch including z-words; warns if unreal. Disable checkPitch + to bypass this. + +Version 0.55g (not released) + Corrects another bug in notes.pas, introduced at 0.55d. + Features: countMacro, expandMacro. + +Version 0.55f (not released) + Corrects bugs, mainly in notes.pas, introduced at 0.55d. + Help via command line. + +Version 0.55e (not released) + Chord ties. E.g. C: {ce cf ties the c. No close-tie symbol. + +Version 0.55d (not released) + Mainly code cleanup. Should be transparent to most users. + +Version 0.55c + Corrects continuation slur bug. + +Version 0.55b + Bug correction, but including a substantial rewrite of the lyrics melisma handling. + +Version 0.55 + Basically the same as 0.54k. + +Version 0.54k (not released) + DPL: Slurs are no longer translated to s and t, but to ( and {. This requires + PMX 2.502. Labels are inserted into slurs. + +Version 0.54j (not released) + DPL: "Enable" and "Disable" directives for more flexible handling of optional + features. No further development of "Options:" will be made. + +Version 0.54h (not released) + Certain parts of the unwieldy "globals" unit moved to a new "utility" unit. + Affects programming, not functionality. + +Version 0.54g (released only to beta testers) + DPL: Corrected bug in multfile.pas (end-of-input not properly recognized). + +Version 0.54f (released only to beta testers) + DPL: Cleaning up of files.pas to take full advantage of the new + multifile.pas unit. Corrected some obscure bugs. + +Version 0.54e (not released) + +2004-03-07 + DPL: Added the "Include: filename" directive. This may appear anywhere, + and diverts the input stream to the new filename. This may in turn + include other files, etc. A file may be included more than once, but + do not try recursive includes! When the end of an included file is + reached, the stream reverts to the previous file. End-of-file is + treated seamlessly and does not act as a paragraph separator. + +Version 0.54d (not released) + +2004-02-15 + DPL: {...} gives st slurs, }{ works, -t option to retain old behaviour, + some cleaning up of unused pieces of code. + Affects files.pas, globals.pas, mtxline.pas, preamble.pas, prepmx.pas, + status.pas + +Version 0.54c + +2003-08-14 + Hiroaki Morimoto: + mtx.pas: allow PMX style absolute octave assignment + +Version 0.54b + +2003-08-05 + Christian Mondrup: + mtx.tex: changed \def\mtxLyrlink{\lowlyrlink} to \def\mtxLowLyrlink{\lowlyrlink} + +2003-06-03 + Christian Mondrup: + Correct bug in procedure respace: test on 'nspace[ninstr]' rather than on + nspace[nstaves] in concluding if statement. + +Version 0.54a + +2002-01-29 + Recognizes PMX words D s t as binding to the left. + Uptext also on multi-bar rests. + +Version 0.53j + +2001-12-06 + mtx.tex tuning improvements only + +Version 0.53i + +2001-11-27 + Correct bug in verse numbers when bar starts with rests + (reported by Christian Mondrup) + +Version 0.53h + +2001-11-20 + Correct bug in decrescendo (reported by Christian Mondrup) + -- involves mtx.tex and uptext.* + 100 lines per paragraph + +Version 0.53g + +2001-10-30 + Restore midi accidental capability (lost by mistake from 0.53c to + 0.53f) + +Version 0.53f + +2001-08-29 + xtuplet may start with rest + +Version 0.53e + +2001-06-22 + Recognizes 'D' in xtuplet notes. + +Version 0.53d + +2001-06-21 + Always uses full instrument/stave format, even if there is just + one stave per instrument. + +Version 0.53c + +2001-06-18 + Improved handling of Composer, Poet and Title lines. + procedure selectVoices added (maybe one day we'll support + movement changes) + Braces around \mtxFlat and \mtxSharp + Does not translate '_' in lyrics if + (1) at end of word + (2) followed by another '_' + (3) followed by a digit + +Version 0.53b + +2001-06-02 + Improvements to mtx.tex, including nicer sharps and flats in uptext + +Version 0.53a + +2001-05-29 + Looks for 'i' anywhere in note (except in shortcut and xtuplet parts) + and moves it to follow accidental. + +2001-05-28 + From Christian Mondrup + preamble.pas: added trailing backslash to \mtxTenorClef + mtx.tex: changed \mtxmtxNormalSize to \mtxNormalSize + diff --git a/Build/source/utils/m-tx/mtx-0.60d/INSTALL b/Build/source/utils/m-tx/mtx-0.60d/INSTALL new file mode 100644 index 00000000000..7d1c323beae --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/INSTALL @@ -0,0 +1,365 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + 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. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + 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 can use 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 `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer 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. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' 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. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + 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'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Build/source/utils/m-tx/mtx-0.60d/Makefile.am b/Build/source/utils/m-tx/mtx-0.60d/Makefile.am new file mode 100644 index 00000000000..1fc037408fa --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/Makefile.am @@ -0,0 +1,13 @@ +SUBDIRS = libp2c +DIST_SUBDIRS = libp2c +bin_PROGRAMS = prepmx +INCLUDES = -I$(srcdir)/libp2c +prepmx_SOURCES = analyze.h cfuncs.h config.h control.h files.h globals.h lyrics.h\ + mtx.h mtxline.h multfile.h notes.h preamble.h status.h strings.h uptext.h utility.h\ + globals.c mtx.c preamble.c lyrics.c analyze.c mtxline.c\ + status.c uptext.c files.c notes.c prepmx.c cfuncs.c multfile.c utility.c control.c +prepmx_LDADD = libp2c/libp2c.a +EXTRA_DIST = globals.pas mtx.pas preamble.pas lyrics.pas analyze.pas mtxline.pas\ + status.pas uptext.pas prepmx.pas files.pas notes.pas multfile.pas utility.pas control.pas\ + Makefile.orig Bugs README.060d + diff --git a/Build/source/utils/m-tx/mtx-0.60d/Makefile.orig b/Build/source/utils/m-tx/mtx-0.60d/Makefile.orig new file mode 100644 index 00000000000..60cf037cbba --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/Makefile.orig @@ -0,0 +1,40 @@ +pasfiles = globals.pas mtx.pas preamble.pas lyrics.pas analyze.pas mtxline.pas\ + status.pas uptext.pas prepmx.pas files.pas notes.pas multfile.pas \ + strings.pas utility.pas control.pas +cfiles = globals.c mtx.c preamble.c lyrics.c analyze.c mtxline.c\ + status.c uptext.c prepmx.c files.c notes.c multfile.c utility.c control.c +native = cfuncs.c cfuncs.h +hfiles = globals.h mtx.h preamble.h lyrics.h analyze.h mtxline.h \ + status.h uptext.h files.h notes.h multfile.h utility.h control.h +ofiles = globals.o mtx.o preamble.o lyrics.o analyze.o mtxline.o \ + status.o uptext.o files.o notes.o prepmx.o cfuncs.o multfile.o utility.o \ + control.o + +prepmx: $(pasfiles) + fpc -g -B -vnh -So prepmx + +prepmxc: $(cfiles) $(ofiles) + cc $(ofiles) -o prepmx + +multfile.c: multfile.pas + p2c -a -LTurbo multfile.pas -o temp.c + sed -e "s/Malloc/malloc/" < temp.c > multfile.c + rm temp.c + +%.c: %.pas + p2c -a -LTurbo $*.pas + +clean: + - rm *.o *~ *~ core *.pmx *.pml *.log *.dvi + +bare: clean + - rm $(cfiles) $(hfiles) prepmx *.ppu + +Pzip: + zip -ju mtxP`./version` version $(pasfiles) pmxword.pas mtx.tex $(native) \ + Makefile Corrections Bugs README + +Czip: $(cfiles) + zip -ju mtxC`./version` version $(cfiles) $(native) $(hfiles) mtx.tex Makefile \ + Bugs Corrections README + diff --git a/Build/source/utils/m-tx/mtx-0.60d/NEWS b/Build/source/utils/m-tx/mtx-0.60d/NEWS new file mode 100644 index 00000000000..1703eee92a2 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/NEWS @@ -0,0 +1,5 @@ +Lyrics lines when not from same paragraph don't join neatly. +Problem has been discussed on mailing list and Rainer gave +a solution. + +Rest in dot and comma shortcuts gives error at PMX stage. diff --git a/Build/source/utils/m-tx/mtx-0.60d/README b/Build/source/utils/m-tx/mtx-0.60d/README new file mode 100644 index 00000000000..55e006035bf --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/README @@ -0,0 +1,164 @@ + M-Tx Preprocessor Source Code + + +This is a development version of "prepmx", the M-Tx Preprocessor. +It contains the file "mtx.tex" and all the sources for generating the +binary executable file ("prepmx", "prepmx.exe", etc., depending on your +operating system). There is no documentation: find the latest available +mtxD????.zip and read the Corrections file. There are no examples: find +the latest available mtxX????.zip. Or stay with the most recent stable +release for those. + +The development version is provided for those who need more recent features +than the most recent stable release has, in the hope that they will be +willing to report bugs and maybe even suggest how those can be fixed. +Send e-mail to Dirk Laurie . + +You will have found this README in a file called something like mtxP054f.zip +(which containes Pascal code) or mtxC054f.zip (which contains C code). +I will refer to that file as mtxP????.zip or mtxC????.zip. + +You need one of the following compilers. A later version than specified +should also work, but an earlier one probably will not. + 1. Free Pascal 1.0.10 (for mtxP????.zip) + 2. Borland Pascal 7.0 (for mtxP????.zip) + 3. Any ANSI-compliant C compiler (for mtxC????.zip) + 4. The p2c package plus any ANSI-compliant C compiler (for mtxP????.zip) +The first of these is recommended, since that is the compiler I use. +I try to stay compatible with the other three, but this may not always +be possible. + +"GNU System" means any system on which standard GNU utilities such as "bash" +and "make" is available. Typical GNU systems are (a) Linux (b) Windows with +the Cygwin package installed (c) other systems on which an appropriate +package has been installed. You do not need a GNU system to use M-Tx, +but it is easier to make the executable on a GNU system. + +Read Section 1 below, and, depending on which compiler you have, +one of the other sections. If you have no appropriate compiler, +visit http://www.freepascal.org/ to see whether there is a Free Pascal +compiler for your system (at present, MacOS is the only popular operating +system not available); if not, get an ANSI compliant C compiler and read +Section 6. + + + Contents + +1. Text file format and unzipping +2. Compiling with Free Pascal +3. Compiling with Borland Pascal 7.0 +4. Compiling with p2c +5. Compiling with a C compiler on a GNU system +6. Compiling with a C compiler on a non-GNU system +7. For experts only + + 1. Text file format and unzipping + +Change to some empty directory and unzip the distribution file. YOU MUST +UNZIP THE FILES USING AN UNZIPPER THAT CAN CONVERT TEXT FILES TO YOUR +SYSTEM'S FORMAT. Some things may work even if you don't (maybe even +everything, if your system happens to use the same text format as the +system on which the zipfile was made) but then any later errors will +only be more mysterious because of that. It may be necessary to set +special options in your unzipper to achieve this. On a GNU system, +the command is + unzip -a mtxP????.zip + + + 2. Compiling with Free Pascal + +Free Pascal is available from for most current operating systems, including +Linux, SunOS and Windows. + +If your system has GNU Make, simply type + + make + +Otherwise, type + + fpc -B -So prepmx + +to make the executable. + + + 3. Compiling with Borland Pascal 7.0 + +This compiler is a 16-bit compiler specific to MSDOS, even though it +runs under Windows and under DOS emulators on other 32-bit systems. +It cannot handle very large code and data segments, and unfortunately +it is necessary to cripple M-Tx somewhat to make it fit in, as follows: + +3.1 Edit the file "globals.pas" and change the lines + + lines_in_paragraph = 100; + max_words = 128; + max_notes = 128; + + to + + lines_in_paragraph = 50; + max_words = 64; + max_notes = 64; + +3.2 Type + + bpc -b prepmx + + to make prepmx.exe. + + + 4. Compiling with p2c + +This route is only available if you have a GNU system with a C compiler +and the package p2c (on old Red Hat systems, both p2c and p2c-devel). Type + + make prepmxc + +to make prepmx. On this system only, you can make the mtxC????.zip file +that corresponds to your mtxP????.zip file with + + make Czip + + + 5. Compiling with a C compiler on a GNU system + +Just type + + make prepmxc + +to make prepmx. + + + 6. Compiling with a C compiler on a non-GNU system + +Your C compiler must be ANSI compliant (sorry, Visual C++ 6.0 is not +such, but Turbo C++ is). Then issue a command that will compile and +link all the .c files to produce an appropriately named executable. +The command line will depend on your system; for example + + cc *.c -o prepmx + +should work on non-GNU Un?x systems. + + + 7. For experts only + +You can modify the source code as you wish -- this is open source software +and the copyright is GPL. If you wish to redistribute your modified version, +please augment the name so that there is no risk of confusion: e.g. if you +are Johannes Brahms and you have made changes to mtxC054f.zip, call it +mtxC054f-brahms.zip. + +Even better, send me an e-mail with your changes so that I can insert them +into the current development version. + +The primary source is the Pascal version; the C version is made with p2c as +described in Section 4. Therefore, any change made to the C code is volatile; +only changes made to the Pascal version become permanent. + +If you make both Pascal and C executables, it is your responsibilty to +move or rename the first executable, otherwise it will be overwritten. +Moreover, it is possible to confuse the Makefile, since object files +from Pascal and C compilations may well have the same name; you will +then get numerous error messages. The safe thing is to "make clean" +before switching languages. diff --git a/Build/source/utils/m-tx/mtx-0.60d/README.060d b/Build/source/utils/m-tx/mtx-0.60d/README.060d new file mode 100644 index 00000000000..abc347bfd0e --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/README.060d @@ -0,0 +1,8 @@ +M-Tx 0.60d is a test version of M-Tx 0.60. Please try it out and report any +error observations to Christian Mondrup, reccmo@daimi.au.dk and +Dirk Laurie, dpl@sun.ac.za + +Changes: +======== + +- Fixed a bug with non-labeled ties diff --git a/Build/source/utils/m-tx/mtx-0.60d/analyze.c b/Build/source/utils/m-tx/mtx-0.60d/analyze.c new file mode 100644 index 00000000000..3003eeb9723 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/analyze.c @@ -0,0 +1,333 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "analyze.pas" */ + + +#include "p2c.h" + + +#define ANALYZE_G +#include "analyze.h" + + +#ifndef MTX_H +#include "mtx.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef LYRICS_H +#include "lyrics.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef UPTEXT_H +#include "uptext.h" +#endif + +#ifndef PREAMBLE_H +#include "preamble.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +Void includeStartString() +{ + voice_index voice; + paragraph_index0 mus; + voice_index FORLIM; + Char STR1[256]; + Char STR2[256]; + + FORLIM = nvoices; + for (voice = 1; voice <= FORLIM; voice++) { + mus = musicLineNo(voice); + if (mus > 0) { + sprintf(STR2, "%s%s", startString(STR1, voice), P[mus-1]); + strcpy(P[mus-1], STR2); + } + } +} + + +Static Char *describe(Result, nbar, extra) +Char *Result; +short nbar, extra; +{ + Char STR1[256]; + Char STR3[256]; + Char STR4[256]; + + sprintf(Result, "%s bar%s + %s/64 notes", + toString(STR1, nbar), plural(STR3, nbar), toString(STR4, extra)); + return Result; +} + + +Void testParagraph() +{ + voice_index0 voice; + voice_index0 leader = 0, nv = 0; + paragraph_index0 mus; + short extra, l, nbar; + voice_index0 FORLIM; + Char STR2[256]; + Char STR3[256]; + + nbars = 0; + pickup = 0; + nleft = 0; + if (top > bottom) + return; + pickup = 0; + multi_bar_rest = false; + FORLIM = bottom; + for (voice = top; voice <= FORLIM; voice++) { + mus = musicLineNo(voice); + if (mus > 0) { /** -------------- Voice is present ---- */ + nv++; + line_no = orig_line_no[mus-1]; + scanMusic(voice, &l); + if (multi_bar_rest && nv > 1) + error("Multi-bar rest allows only one voice", print); + if (!pmx_preamble_done) { + if (voice == top) + pickup = l; + else if (pickup != l) + error3(voice, "The same pickup must appear in all voices"); + } + nbar = numberOfBars(voice); + extra = ExtraLength(voice); + if (multi_bar_rest && (nbar > 0 || extra > 0)) + error3(voice, "Multi-bar rest allows no other rests or notes"); + if (nbar > nbars || nbar == nbars && extra > nleft) { + nbars = nbar; + nleft = extra; + leader = voice; + } + if (!final_paragraph && meternum > 0 && extra > 0) { + printf("Line has %s\n", describe(STR2, nbar, extra)); + error(" Line does not end at complete bar", print); + } + if (pmx_preamble_done && l > 0 && meternum > 0) + error3(voice, "Short bar with no meter change"); + } + } + if (!pmx_preamble_done) { + xmtrnum0 = (double)pickup / one_beat; /* Don't want an integer result */ + if (beVerbose()) + printf("Pickup = %d/64\n", pickup); + } + if (leader <= 0) + return; + FORLIM = bottom; + for (voice = top; voice <= FORLIM; voice++) { + if (musicLineNo(voice) > 0) { + if (voice != leader) { + mus = musicLineNo(voice); + line_no = orig_line_no[mus-1]; + if (numberOfBars(voice) != numberOfBars(leader) || + ExtraLength(voice) != ExtraLength(leader)) { + printf("Following line has %s\n", + describe(STR3, numberOfBars(voice), ExtraLength(voice))); + puts(musicLine(STR3, voice)); + printf("Longest line has %s\n", + describe(STR2, numberOfBars(leader), ExtraLength(leader))); + puts(musicLine(STR2, leader)); + error("Line duration anomaly", print); + } + } + } + } +} + + +Void describeParagraph() +{ + voice_index0 voice; + Char STR2[256]; + voice_index0 FORLIM; + + printf("---- Paragraph %d starting at line %d bar %d\n", + paragraph_no, orig_line_no[0], bar_no); + FORLIM = bottom; + for (voice = top; voice <= FORLIM; voice++) + describeVoice(voice, lyricsReport(STR2, voice)); +} + + +/* Local variables for paragraphSetup: */ +struct LOC_paragraphSetup { + voice_index0 *voice; + short l; + voice_index0 k; + Char P_keep[256], w[256]; + boolean is_labelled; +} ; + +Local Void maybeUptext(i, LINK) +short i; +struct LOC_paragraphSetup *LINK; +{ + if (!doUptext()) + return; + if (strlen(LINK->w) == 1) { + if (*LINK->voice == nvoices) + warning("Uptext line below bottom voice should be labelled", print); + } + if (strlen(LINK->w) == 1) { /** Standard chord line ------ */ + LINK->k = *LINK->voice + 1; + if (LINK->k > nvoices) + LINK->k--; + setUptextLineNo(LINK->k, i); + /** Labelled chord line ---- */ + return; + } + predelete(LINK->w, 1); + LINK->k = findVoice(LINK->w); + if (LINK->k == 0) + error("Uptext line belongs to unknown voice", print); + else + setUptextLineNo(LINK->k, i); +} + +Local Void maybeChords(i, LINK) +short i; +struct LOC_paragraphSetup *LINK; +{ + if (!doChords()) + return; + if (strlen(LINK->w) == 1 && *LINK->voice == 0 && pedanticWarnings()) + warning("Chord line above top voice should be labelled", print); + if (strlen(LINK->w) == 1) { /** Standard chord line ------ */ + LINK->k = *LINK->voice; + if (LINK->k == 0) + LINK->k = 1; + setChordLineNo(LINK->k, i); + /** Labelled chord line ---- */ + return; + } + predelete(LINK->w, 1); + LINK->k = findVoice(LINK->w); + if (LINK->k == 0) + error("Chord line belongs to unknown voice", print); + else + setChordLineNo(LINK->k, i); +} + +Local Void analyzeParagraph(LINK) +struct LOC_paragraphSetup *LINK; +{ + paragraph_index i, FORLIM; + + *LINK->voice = 0; + bottom = 0; + top = nvoices + 1; + clearLabels(); + clearTags(); + clearUptext(); + FORLIM = para_len; + for (i = 1; i <= FORLIM; i++) + { /* ----- Paragraph analysis main loop ----- */ + if (*P[i-1] != '\0' && P[i-1][0] != comment) { + NextWord(LINK->w, P[i-1], blank, colon); + line_no = orig_line_no[i-1]; + LINK->l = strlen(LINK->w); + LINK->is_labelled = (LINK->w[LINK->l-1] == colon && + LINK->w[LINK->l-2] != barsym); + if (LINK->is_labelled) { + strcpy(LINK->P_keep, P[i-1]); + predelete(P[i-1], LINK->l); + shorten(LINK->w, LINK->l - 1); + LINK->k = findVoice(LINK->w); /* First look for a voice label */ + if (LINK->k > 0) { + *LINK->voice = LINK->k; + setMusicLineNo(*LINK->voice, i); + } else if (LINK->w[0] == 'L') + maybeLyrics(*LINK->voice, i, LINK->w); + else if (LINK->w[0] == 'C') + maybeChords(i, LINK); + else if (LINK->w[0] == 'U') + maybeUptext(i, LINK); + else { + if (startsWithIgnoreCase(LINK->w, "SPACE")) { + setSpace(P[i-1]); + must_respace = true; + } else { + if (startsWithIgnoreCase(LINK->w, "VOICES")) { + selectVoices(P[i-1]); + must_restyle = true; + } else { + strcpy(P[i-1], LINK->P_keep); + LINK->is_labelled = false; + if (!isNoteOrRest(LINK->w)) { + error("Unknown line label", print); + /** ------------ Maybe Space command ------------ */ + /** ------------ Maybe Voices command ------------ */ + /** Could be sticky attribute **/ + } + } + } + } + } + if (!LINK->is_labelled) { + (*LINK->voice)++; + setMusicLineNo(*LINK->voice, i); + } + if (*LINK->voice > bottom) + bottom = *LINK->voice; + if (*LINK->voice > 0 && *LINK->voice < top) + top = *LINK->voice; + } + } +} + +Local Void obliterate(LINK) +struct LOC_paragraphSetup *LINK; +{ + paragraph_index i; + Char new_only[256]; + paragraph_index FORLIM; + + *new_only = '\0'; + FORLIM = para_len; + for (i = 0; i <= FORLIM - 1; i++) { + if (startsWithIgnoreCase(P[i], "only:")) { + strcpy(new_only, P[i]); + strcpy(P[i], "%"); + } + } + if (*new_only != '\0') { + setOnly(new_only); + return; + } + FORLIM = para_len; + for (i = 1; i <= FORLIM; i++) { + if (omitLine(i)) + strcpy(P[i-1], "%"); + } +} + + +Void paragraphSetup(voice_) +voice_index0 *voice_; +{ + struct LOC_paragraphSetup V; + + V.voice = voice_; + obliterate(&V); + analyzeParagraph(&V); + reviseLyrics(); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/analyze.h b/Build/source/utils/m-tx/mtx-0.60d/analyze.h new file mode 100644 index 00000000000..e05b846ebb5 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/analyze.h @@ -0,0 +1,33 @@ +/* Header for module analyze, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef ANALYZE_H +#define ANALYZE_H + + +/* Decide which lines of paragraphs go where; test total duration of lines. */ + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef GLOBALS_H +#include "globals.h" +#endif + + +#ifdef ANALYZE_G +# define vextern +#else +# define vextern extern +#endif + +extern Void testParagraph PV(); +extern Void describeParagraph PV(); +extern Void paragraphSetup PP((voice_index0 *voice)); +extern Void includeStartString PV(); + + +#undef vextern + +#endif /*ANALYZE_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/analyze.pas b/Build/source/utils/m-tx/mtx-0.60d/analyze.pas new file mode 100644 index 00000000000..310c5887854 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/analyze.pas @@ -0,0 +1,181 @@ +unit analyze; + +{ Decide which lines of paragraphs go where; test total duration of lines. } + +interface uses control, globals; + +procedure testParagraph; +procedure describeParagraph; +procedure paragraphSetup (var voice: voice_index0); +procedure includeStartString; + +implementation uses mtx, strings, lyrics, mtxline, uptext, + preamble, utility; + +procedure includeStartString; + var voice: voice_index; + mus: paragraph_index0; +begin for voice:=1 to nvoices do + begin mus:=musicLineNo(voice); if mus>0 then + P[mus]:=startString(voice)+P[mus]; + end; +end; + +function describe(nbar,extra: integer): string; +begin describe:=toString(nbar)+' bar'+plural(nbar)+' + '+ + toString(extra)+'/64 notes'; +end; + +procedure testParagraph; + var voice, leader, nv: voice_index0; + mus: paragraph_index0; + extra, l, nbar: integer; +begin + nbars:=0; pickup:=0; nleft:=0; if top>bottom then exit; + pickup:=0; nv:=0; leader:=0; multi_bar_rest := false; + for voice:=top to bottom do + begin mus:=musicLineNo(voice); + if mus>0 then {* -------------- Voice is present ---- } + begin inc(nv); line_no:=orig_line_no[mus]; + scanMusic(voice,l); + if multi_bar_rest and (nv>1) then error( + 'Multi-bar rest allows only one voice',print); + if not pmx_preamble_done then + if voice=top then pickup:=l + else if pickup<>l then + error3(voice,'The same pickup must appear in all voices'); + nbar := numberOfBars(voice); extra := extraLength(voice); + if multi_bar_rest and ((nbar>0) or (extra>0)) then error3(voice, + 'Multi-bar rest allows no other rests or notes'); + if (nbar>nbars) or (nbar=nbars) and (extra>nleft) then + begin nbars:=nbar; nleft:=extra; leader:=voice; end; + if not final_paragraph and (meternum>0) and (extra>0) then + begin writeln('Line has ', describe(nbar,extra)); + error(' Line does not end at complete bar',print); + end; + if pmx_preamble_done and (l>0) and (meternum>0) then + error3(voice,'Short bar with no meter change'); + end + end; + if not pmx_preamble_done then + begin + xmtrnum0 := pickup/one_beat; { Don't want an integer result } + if beVerbose then writeln ('Pickup = ', pickup, '/64'); + end; + if leader>0 then + for voice:=top to bottom do if musicLineNo(voice)>0 then + if voice<>leader then + begin mus:=musicLineNo(voice); + line_no:=orig_line_no[mus]; + if (numberOfBars(voice)<>numberOfBars(leader)) + or (extraLength(voice)<>extraLength(leader)) then + begin + writeln('Following line has ', + describe(numberOfBars(voice), extraLength(voice))); + writeln(musicLine(voice)); + writeln('Longest line has ', + describe(numberOfBars(leader), extraLength(leader))); + writeln(musicLine(leader)); + error('Line duration anomaly',print); + end; + end; +end; + +procedure describeParagraph; + var voice: voice_index0; + begin writeln('---- Paragraph ',paragraph_no, + ' starting at line ', orig_line_no[1], ' bar ', bar_no); + for voice:=top to bottom do describeVoice(voice,lyricsReport(voice)); + end; + +procedure paragraphSetup (var voice: voice_index0); + var l: integer; + k: voice_index0; + P_keep, w: string; + is_labelled: boolean; + + procedure maybeUptext(i: integer); + begin if not doUptext then exit; + if (length(w)=1) then if (voice=nvoices) then + warning('Uptext line below bottom voice should be labelled',print); + if length(w)=1 then {* Standard chord line ------ } + begin k:=voice+1; if k>nvoices then dec(k); + setUptextLineNo(k,i); + end + else {* Labelled chord line ---- } + begin predelete(w,1); k:=findVoice(w); + if k=0 then error('Uptext line belongs to unknown voice',print) + else setUptextLineNo(k,i); + end + end; + + procedure maybeChords(i: integer); + begin if not doChords then exit; + if (length(w)=1) and (voice=0) and pedanticWarnings then + warning('Chord line above top voice should be labelled',print); + if length(w)=1 then {* Standard chord line ------ } + begin k:=voice; if k=0 then k:=1; + setChordLineNo(k,i); + end + else {* Labelled chord line ---- } + begin predelete(w,1); k:=findVoice(w); + if k=0 then error('Chord line belongs to unknown voice',print) + else setChordLineNo(k,i); + end + end; + + procedure analyzeParagraph; + var i: paragraph_index; + begin voice:=0; bottom:=0; top:=nvoices+1; + clearLabels; clearTags; clearUptext; + for i:=1 to para_len do { ----- Paragraph analysis main loop ----- } + if (P[i]<>'') and (P[i,1]<>comment) then + begin + w:=NextWord(P[i],blank,colon); line_no := orig_line_no[i]; + l:=length(w); + is_labelled := (w[l]=colon) and (w[l-1]<>barsym); + if is_labelled then + begin P_keep := P[i]; predelete(P[i],l); shorten(w,l-1); + k:=findVoice(w); { First look for a voice label } + if k>0 then + begin voice:=k; setMusicLineNo(voice,i); + end + else if w[1]='L' then maybeLyrics(voice,i,w) + else if w[1]='C' then maybeChords(i) + else if w[1]='U' then maybeUptext(i) + else begin {* ------------ Maybe Space command ------------ } + if startsWithIgnoreCase(w,'SPACE') then + begin setSpace(P[i]); must_respace:=true; + end + else {* ------------ Maybe Voices command ------------ } + if startsWithIgnoreCase(w,'VOICES') then + begin selectVoices(P[i]); must_restyle:=true; + end + else begin {* Could be sticky attribute *} + P[i] := P_keep; is_labelled := false; + if not isNoteOrRest(w) then error('Unknown line label',print); + end + end + end; + if not is_labelled then + begin inc(voice); setMusicLineNo(voice,i); + end; + if voice>bottom then bottom:=voice; + if (voice>0) and (voice'' then setOnly(new_only) + else for i:=1 to para_len do if omitLine(i) then P[i]:='%'; + end; + +begin obliterate; analyzeParagraph; reviseLyrics; +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/cfuncs.c b/Build/source/utils/m-tx/mtx-0.60d/cfuncs.c new file mode 100644 index 00000000000..e1f2ca65dbf --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/cfuncs.c @@ -0,0 +1,89 @@ +# define CFUNCS_C +#include "cfuncs.h" + +int P_argc; +char **P_argv; +int P_ioresult; +int _EscIO2 (int errorcode, char* filename) +{ fprintf(stderr,"Input file %s not found\n",filename); + exit(errorcode); return errorcode; } +int _EscIO (int errorcode){ return _EscIO2(errorcode,""); } +int _Escape (int exitcode) +{ exit(exitcode); return exitcode; } +int _SETIO (int OK, int errorcode){ return P_ioresult = OK ? 0 : errorcode; } +int P_eof (FILE * infile) +{ int x; + if (feof(infile)) return 1; + x = fgetc(infile); + if (x==EOF) return 1; + ungetc(x,infile); return 0; + } +void PASCAL_MAIN (int npars, char ** pars) +{ P_argc = npars; P_argv = pars; } + +void scan1(char *s, short p, short *n) +{ sscanf(s+p-1,"%hd",n); +} + +short pos1(char c, char *s) +{ char *t = strchr(s,c); + if (t) return (short) (t-s+1); else return 0; +} + +void delete1(char *s, short p) +{ char *t = (s+=p); s=t-1; + while (*s) *s++ = *t++; +} + +void predelete(char *s, short l) +{ char *t = s+l; + while (*t) *s++ = *t++; + *s = *t; +} + +void shorten(char *s, short new_length) +{ s[new_length] = '\0'; +} + +short posNot(char c, char *s) +{ char *t = s; + while (*t == c) t++; + if (*t) return t-s+1; + else return 0; +} + +void getNum(char *line, short *k) +{ int j=sscanf(line,"%hd",k); + if (j<1) *k=0; +} + + +void getTwoNums(char *line, short *k1, short *k2) +{ int param = sscanf(line,"%hd/%hd",k1,k2); + if (param<2) *k2 = 0; +} + +void toUpper(char *s) +{ while (*s) { *s = toupper(*s); s++; } +} + +boolean startsWith(char *s1, char *s2) +{ while (*s2) { if (*s1++ != *s2++) return false; } + return true; +} + +void insertChar(char c, char *s, short p) +{ char x; + s += p-1; + do { x=c; c=*s; *s++=x; } while (x); +} + +char *substr_(char *Result, char *s, short start, short count) +{ char *R = Result; + s += start-1; + while (count--) *R++ = *s++; + *R = '\0'; + return Result; +} + +# undef CFUNCS_C diff --git a/Build/source/utils/m-tx/mtx-0.60d/cfuncs.h b/Build/source/utils/m-tx/mtx-0.60d/cfuncs.h new file mode 100644 index 00000000000..5dc1c829fe7 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/cfuncs.h @@ -0,0 +1,72 @@ +/* cfuncs.h DPL 1997-03-31, 2001-12-22 */ + +#ifndef CFUNCS_H +# define CFUNCS_H + +#define STRINGS_H +typedef char Char; +typedef void Void; +#define Static static +#define Local static +#define SHORT_MAX 65535 + +# define FileNotFound 10 +# define FileWriteError 38 +#ifndef STDIO_H +# include +#endif +#ifndef CTYPE_H +# include +#endif +#ifndef STRING_H +# include +#endif +#ifndef STDLIB_H +# include +#endif +#ifndef _FNSIZE +# define _FNSIZE 120 +#endif + +typedef unsigned boolean; +#define false 0 +#define true 1 + +extern int _EscIO (int); +extern int _EscIO2 (int errorcode, char* filename); +extern int _Escape (int); +extern int P_eof (FILE *); +extern int _SETIO (int, int); + +extern void PASCAL_MAIN (int, char **); +extern int P_argc; +extern int P_ioresult; +extern char **P_argv; + +#ifdef CFUNCS_C +# define vextern +#else +# define vextern extern +#endif +/* String handling primitives. */ + +extern void scan1(char *s, short p, short *n); +/* Read an integer at position p of s */ +extern boolean startsWith(char *s1, char *s2); +/* True if s1 starts with s2 */ +extern short pos1(char c, char *s); +extern short posNot(char c, char *s); +extern void insertChar(char c, char *s, short p); +extern char *substr_(char *Result, char *s, short start, short count); +extern void getNum(char *line, short *k); +extern void getTwoNums(char *line, short *k1, short *k2); +extern void toUpper(char *s); +extern void delete1(char *s, short p); +extern void predelete(char *s, short l); +extern void shorten(char *s, short new_length); + + +#undef vextern + +#endif /*CFUNCS_H*/ + diff --git a/Build/source/utils/m-tx/mtx-0.60d/config.h b/Build/source/utils/m-tx/mtx-0.60d/config.h new file mode 100644 index 00000000000..2ce758e1759 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/config.h @@ -0,0 +1,90 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define HAVE_MALLOC 1 + +/* Define to 1 if you have the `memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Name of package */ +#define PACKAGE "mtx" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "dpl@sun.ac.za" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "mtx" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "mtx 0.60d" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "mtx" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.60d" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "0.60d" + +/* Define to rpl_malloc if the replacement function should be used. */ +/* #undef malloc */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/config.h.in b/Build/source/utils/m-tx/mtx-0.60d/config.h.in new file mode 100644 index 00000000000..88cd015fb76 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/config.h.in @@ -0,0 +1,89 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the `memchr' function. */ +#undef HAVE_MEMCHR + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/Build/source/utils/m-tx/mtx-0.60d/configure.ac b/Build/source/utils/m-tx/mtx-0.60d/configure.ac new file mode 100644 index 00000000000..a5c59e86466 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/configure.ac @@ -0,0 +1,33 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.63]) +AC_INIT([mtx], [0.60d], [dpl@sun.ac.za]) +AC_CONFIG_SRCDIR([analyze.c]) +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE(mtx,0.60d) + +# Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_MAKE_SET +AC_PROG_RANLIB + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([memory.h stddef.h stdlib.h string.h strings.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +AC_FUNC_MALLOC +AC_FUNC_STRTOD +AC_CHECK_FUNCS([memchr memmove memset strchr strrchr strtol]) + +AC_CONFIG_FILES([Makefile + libp2c/Makefile]) +AC_OUTPUT diff --git a/Build/source/utils/m-tx/mtx-0.60d/control.c b/Build/source/utils/m-tx/mtx-0.60d/control.c new file mode 100644 index 00000000000..9dbb2dae1da --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/control.c @@ -0,0 +1,274 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "control.pas" */ + + +#include "p2c.h" + + +#define CONTROL_G +#include "control.h" + + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +/* enables Include: directive */ +/* one-word shortcut is treated by simply inserting a blank */ +/* detached form of shortcut allowed */ +/* C: lines are taken into account */ +/* U: lines are taken into account */ +/* L: lines are taken into account */ +/* non-melismatic eighth and shorter notes in vocal lines are unbeamed */ +/* blind slurs are hidden */ +/* U: lines synchronize with words and rests */ +/* always insert duration into notes */ +/* include macros in the count */ +/* literally expand macros */ +/* keep track of pitch and warn if unreal */ +/* transform note words to canical form */ +/* use solfa note names */ +/* issue warnings even when default action is likely to be correct */ +/* ignore all errors except fatal errors */ +/* set instrument names */ +/* report what is being done */ +/* write all possible infomative messages */ +typedef enum { + noSuchFeature, FmultiFile, FsplitShortcut, FnewWordShortcut, FdoChords, + FdoUptext, FdoLyrics, FunbeamVocal, FhideBlindSlurs, FuptextOnRests, + FinsertDuration, FcountMacro, FexpandMacro, FcheckPitch, FrearrangeNote, + FsolfaNoteNames, FpedanticWarnings, FignoreErrors, FinstrumentNames, + FbeVerbose, FdebugMode +} feature; + +typedef struct Tfeature { + Char tag[31]; + boolean active, changed; +} Tfeature; + + +#define firstFeature FmultiFile +#define lastFeature FdebugMode + + +Static Tfeature feat[21] = { + { "", false, false }, + { "multiFile", true, false }, + { "splitShortcut", true, false }, + { "newWordShortcut", true, false }, + { "doChords", true, false }, + { "doUptext", true, false }, + { "doLyrics", true, false }, + { "unbeamVocal", true, false }, + { "hideBlindSlurs", true, false }, + { "uptextOnRests", true, false }, + { "insertDuration", true, false }, + { "countMacro", false, false }, + { "expandMacro", false, false }, + { "checkPitch", true, false }, + { "rearrangeNote", true, false }, + { "solfaNoteNames", false, false }, + { "pedanticWarnings", false, false }, + { "ignoreErrors", false, false }, + { "instrumentNames", false, false }, + { "beVerbose", false, false }, + { "debugMode", false, false } +}; + + +Void printFeatures(anyway) +boolean anyway; +{ + feature i; + Tfeature *WITH; + + for (i = firstFeature; (long)i <= (long)lastFeature; i = (feature)((long)i + 1)) { + WITH = &feat[(long)i]; + if (WITH->changed || anyway) + printf("%s = %s\n", WITH->tag, WITH->active ? " TRUE" : "FALSE"); + } +} + + +Static feature featureNamed(s) +Char *s; +{ + feature i; + + for (i = firstFeature; (long)i <= (long)lastFeature; i = (feature)((long)i + 1)) { + if (equalsIgnoreCase(s, feat[(long)i].tag)) + return i; + } + return noSuchFeature; +} + + +boolean setFeature(which, val) +Char *which; +boolean val; +{ + boolean Result = false; + feature f; + Tfeature *WITH; + + f = featureNamed(which); + if (f != noSuchFeature) { + WITH = &feat[(long)f]; + WITH->active = val; + WITH->changed = true; + Result = true; + } + if (f == FdebugMode && val) + feat[(long)FbeVerbose].active = true; + if (f == FbeVerbose && !val) + feat[(long)FdebugMode].active = false; + return Result; +} + + +Void mtxLevel(level) +Char *level; +{ + if (strcmp(level, "0.57") < 0) { + setFeature("splitShortcut", false); + setFeature("newWordShortcut", false); + } +} + + +/* Feature functions. To add a new feature "newFeature": + 1. Insert a new value "FnewFeature" in the declaration of type "feature". + 2. Insert an entry for it in array "feat". + 3. Copy the template below and change "FEATURE" into "newFeature". + 4. Copy the function header to the interface section. + 5. (Optional) Insert code into "mtxLevel" to enable/disable the feature. + +function FEATURE: boolean; +begin FEATURE := feat[FFEATURE].active end; +*/ + +boolean checkPitch() +{ + return (feat[(long)FcheckPitch].active); +} + + +boolean countMacro() +{ + return (feat[(long)FcountMacro].active); +} + + +boolean expandMacro() +{ + return (feat[(long)FexpandMacro].active); +} + + +boolean insertDuration() +{ + return (feat[(long)FinsertDuration].active); +} + + +boolean rearrangeNote() +{ + return (feat[(long)FrearrangeNote].active); +} + + +boolean beVerbose() +{ + return (feat[(long)FbeVerbose].active); +} + + +boolean debugMode() +{ + return (feat[(long)FdebugMode].active); +} + + +boolean instrumentNames() +{ + return (feat[(long)FinstrumentNames].active); +} + + +boolean hideBlindSlurs() +{ + return (feat[(long)FhideBlindSlurs].active); +} + + +boolean doLyrics() +{ + return (feat[(long)FdoLyrics].active); +} + + +boolean ignoreErrors() +{ + return (feat[(long)FignoreErrors].active); +} + + +boolean pedanticWarnings() +{ + return (feat[(long)FpedanticWarnings].active); +} + + +boolean solfaNoteNames() +{ + return (feat[(long)FsolfaNoteNames].active); +} + + +boolean uptextOnRests() +{ + return (feat[(long)FuptextOnRests].active); +} + + +boolean unbeamVocal() +{ + return (feat[(long)FunbeamVocal].active); +} + + +boolean doChords() +{ + return (feat[(long)FdoChords].active); +} + + +boolean doUptext() +{ + return (feat[(long)FdoUptext].active); +} + + +boolean newWordShortcut() +{ + return (feat[(long)FnewWordShortcut].active); +} + + +boolean splitShortcut() +{ + return (feat[(long)FsplitShortcut].active); +} + + +boolean multiFile() +{ + return (feat[(long)FmultiFile].active); +} + + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/control.h b/Build/source/utils/m-tx/mtx-0.60d/control.h new file mode 100644 index 00000000000..91ce2c2dfef --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/control.h @@ -0,0 +1,52 @@ +/* Header for module control, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef CONTROL_H +#define CONTROL_H + + +#ifdef CONTROL_G +# define vextern +#else +# define vextern extern +#endif +/* DPL 2004-03-21 */ +/* Controls which M-Tx features are enabled. + The interface allows one to interrogate the feature state, to set + features according to the M-Tx level, and to override features given + the feature name as a character string. +*/ + + +extern Void mtxLevel PP((Char *level)); +extern boolean setFeature PP((Char *which, int val)); +/* return TRUE means OK, return FALSE means there is no such feature */ +extern Void printFeatures PP((int anyway)); +/* anyway TRUE means print all feature settings, FALSE means only those + that were set via setFeature */ + +extern boolean multiFile PV(); +extern boolean splitShortcut PV(); +extern boolean newWordShortcut PV(); +extern boolean doChords PV(); +extern boolean doUptext PV(); +extern boolean doLyrics PV(); +extern boolean unbeamVocal PV(); +extern boolean uptextOnRests PV(); +extern boolean solfaNoteNames PV(); +extern boolean pedanticWarnings PV(); +extern boolean ignoreErrors PV(); +extern boolean hideBlindSlurs PV(); +extern boolean instrumentNames PV(); +extern boolean beVerbose PV(); +extern boolean debugMode PV(); +extern boolean insertDuration PV(); +extern boolean rearrangeNote PV(); +extern boolean countMacro PV(); +extern boolean expandMacro PV(); +extern boolean checkPitch PV(); + + +#undef vextern + +#endif /*CONTROL_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/control.pas b/Build/source/utils/m-tx/mtx-0.60d/control.pas new file mode 100644 index 00000000000..fbe224658a8 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/control.pas @@ -0,0 +1,198 @@ +unit control; { DPL 2004-03-21 } +{ Controls which M-Tx features are enabled. + The interface allows one to interrogate the feature state, to set + features according to the M-Tx level, and to override features given + the feature name as a character string. +} + +interface + +procedure mtxLevel(level: string); +function setFeature(which: string; val: boolean): boolean; + { return TRUE means OK, return FALSE means there is no such feature } +procedure printFeatures(anyway: boolean); + { anyway TRUE means print all feature settings, FALSE means only those + that were set via setFeature } + +function multiFile: boolean; +function splitShortcut: boolean; +function newWordShortcut: boolean; +function doChords: boolean; +function doUptext: boolean; +function doLyrics: boolean; +function unbeamVocal: boolean; +function uptextOnRests: boolean; +function solfaNoteNames: boolean; +function pedanticWarnings: boolean; +function ignoreErrors: boolean; +function hideBlindSlurs: boolean; +function instrumentNames: boolean; +function beVerbose: boolean; +function debugMode: boolean; +function insertDuration: boolean; +function rearrangeNote: boolean; +function countMacro: boolean; +function expandMacro: boolean; +function checkPitch: boolean; + +implementation uses utility; + +type feature = (noSuchFeature, + FmultiFile, { enables Include: directive } + FsplitShortcut, { one-word shortcut is treated by simply inserting a blank } + FnewWordShortcut, { detached form of shortcut allowed } + FdoChords, { C: lines are taken into account } + FdoUptext, { U: lines are taken into account } + FdoLyrics, { L: lines are taken into account } + FunbeamVocal, { non-melismatic eighth and shorter notes in vocal lines are unbeamed } + FhideBlindSlurs, { blind slurs are hidden } + FuptextOnRests, { U: lines synchronize with words and rests } + FinsertDuration, { always insert duration into notes } + FcountMacro, { include macros in the count } + FexpandMacro, { literally expand macros } + FcheckPitch, { keep track of pitch and warn if unreal } + FrearrangeNote, { transform note words to canical form } + FsolfaNoteNames, { use solfa note names } + FpedanticWarnings, { issue warnings even when default action is likely to be correct } + FignoreErrors, { ignore all errors except fatal errors } + FinstrumentNames, { set instrument names } + FbeVerbose, { report what is being done } + FdebugMode { write all possible infomative messages } ); + + Tfeature = record + tag: string[30]; + active, changed: boolean + end; + +const + firstFeature = FmultiFile; + lastFeature = FdebugMode; + + feat: array[feature] of Tfeature = ( + ( tag: ''; active: false; changed: false), + ( tag: 'multiFile'; active: true; changed: false), + ( tag: 'splitShortcut'; active: true; changed: false), + ( tag: 'newWordShortcut'; active: true; changed: false), + ( tag: 'doChords'; active: true; changed: false), + ( tag: 'doUptext'; active: true; changed: false), + ( tag: 'doLyrics'; active: true; changed: false), + ( tag: 'unbeamVocal'; active: true; changed: false), + ( tag: 'hideBlindSlurs'; active: true; changed: false), + ( tag: 'uptextOnRests'; active: true; changed: false), + ( tag: 'insertDuration'; active: true; changed: false), + ( tag: 'countMacro'; active: false; changed: false), + ( tag: 'expandMacro'; active: false; changed: false), + ( tag: 'checkPitch'; active: true; changed: false), + ( tag: 'rearrangeNote'; active: true; changed: false), + ( tag: 'solfaNoteNames'; active: false; changed: false), + ( tag: 'pedanticWarnings'; active: false; changed: false), + ( tag: 'ignoreErrors'; active: false; changed: false), + ( tag: 'instrumentNames'; active: false; changed: false), + ( tag: 'beVerbose'; active: false; changed: false), + ( tag: 'debugMode'; active: false; changed: false) + ); + +procedure printFeatures(anyway: boolean); + var i: feature; +begin for i:=firstFeature to lastFeature do with feat[i] do + if changed or anyway then writeln(tag, ' = ', active) +end; + +function featureNamed(s: string): feature; + var i: feature; +begin for i:=firstFeature to lastFeature do + if equalsIgnoreCase(s,feat[i].tag) then begin featureNamed := i; exit end; + featureNamed := noSuchFeature +end; + +function setFeature(which: string; val: boolean): boolean; + var f: feature; +begin setFeature := false; f := featureNamed(which); + if f <> noSuchFeature then with feat[f] do + begin active := val; changed := true; setFeature := true end; + if (f=FdebugMode) and val then feat[FbeVerbose].active := true; + if (f=FbeVerbose) and not val then feat[FdebugMode].active := false; +end; + +procedure mtxLevel(level: string); +begin + if level<'0.57' then + begin + setFeature('splitShortcut',false); + setFeature('newWordShortcut',false); + end +end; + +{ Feature functions. To add a new feature "newFeature": + 1. Insert a new value "FnewFeature" in the declaration of type "feature". + 2. Insert an entry for it in array "feat". + 3. Copy the template below and change "FEATURE" into "newFeature". + 4. Copy the function header to the interface section. + 5. (Optional) Insert code into "mtxLevel" to enable/disable the feature. + +function FEATURE: boolean; +begin FEATURE := feat[FFEATURE].active end; +} + +function checkPitch: boolean; +begin checkPitch := feat[FcheckPitch].active end; + +function countMacro: boolean; +begin countMacro := feat[FcountMacro].active end; + +function expandMacro: boolean; +begin expandMacro := feat[FexpandMacro].active end; + +function insertDuration: boolean; +begin insertDuration := feat[FinsertDuration].active end; + +function rearrangeNote: boolean; +begin rearrangeNote := feat[FrearrangeNote].active end; + +function beVerbose: boolean; +begin beVerbose := feat[FbeVerbose].active end; + +function debugMode: boolean; +begin debugMode := feat[FdebugMode].active end; + +function instrumentNames: boolean; +begin instrumentNames := feat[FinstrumentNames].active end; + +function hideBlindSlurs: boolean; +begin hideBlindSlurs := feat[FhideBlindSlurs].active end; + +function doLyrics: boolean; +begin doLyrics := feat[FdoLyrics].active end; + +function ignoreErrors: boolean; +begin ignoreErrors := feat[FignoreErrors].active end; + +function pedanticWarnings: boolean; +begin pedanticWarnings := feat[FpedanticWarnings].active end; + +function solfaNoteNames: boolean; +begin solfaNoteNames := feat[FsolfaNoteNames].active end; + +function uptextOnRests: boolean; +begin uptextOnRests := feat[FuptextOnRests].active end; + +function unbeamVocal: boolean; +begin unbeamVocal := feat[FunbeamVocal].active end; + +function doChords: boolean; +begin doChords := feat[FdoChords].active end; + +function doUptext: boolean; +begin doUptext := feat[FdoUptext].active end; + +function newWordShortcut: boolean; +begin newWordShortcut := feat[FnewWordShortcut].active end; + +function splitShortcut: boolean; +begin splitShortcut := feat[FsplitShortcut].active end; + +function multiFile: boolean; +begin multiFile := feat[FmultiFile].active end; + +end. + diff --git a/Build/source/utils/m-tx/mtx-0.60d/files.c b/Build/source/utils/m-tx/mtx-0.60d/files.c new file mode 100644 index 00000000000..48aacc7aae7 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/files.c @@ -0,0 +1,379 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "files.pas" */ + + +#include "p2c.h" + + +#define FILES_G +#include "files.h" + + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +#define param_leader '-' + + +Static Char stylefilename[256] = "mtxstyle.txt"; + +Static short teststyle; + + +boolean endOfInfile() +{ + return (eofAll()); +} + + +Void tex3(s) +Char *s; +{ + Char STR1[256], STR2[256]; + + if (!pmx_preamble_done) { + putLine(s); + return; + } + if (s[0] == '%') { + putLine(s); + return; + } + if (first_paragraph) { + sprintf(STR2, "\\%s\\", s); + putLine(STR2); + } else { + sprintf(STR1, "\\\\%s\\", s); + putLine(STR1); + } +} + + +Void putLine(line) +Char *line; +{ + if (outlen + strlen(line) >= PMXlinelength) + putc('\n', outfile); + fprintf(outfile, "%s\n", line); + outlen = 0; +} + + +Void put(line_, putspace_) +Char *line_; +boolean putspace_; +{ + Char line[256]; + short l; + Char STR1[256]; + + strcpy(line, line_); + l = strlen(line); + if (l > PMXlinelength) + error("Item longer than PMX line length", print); + if (outlen + l >= PMXlinelength) { + putLine(""); + put(line, false); + return; + } + if (putspace_ && outlen > 0 && line[0] != ' ') + sprintf(line, " %s", strcpy(STR1, line)); + fputs(line, outfile); + outlen += l; +} + + +boolean styleFileFound() +{ + return (teststyle != 0); +} + + +Static Void helpmessage() +{ + printf("Usage: prepmx [-bcfnhimtuvwDH0123456789] MTXFILE [TEXDIR] [STYLEFILE]\n"); +} + + +Static Void bighelpmessage() +{ + helpmessage(); + printf("\nMTXFILE: name of .mtx file without its extension\n"); + printf("TEXDIR: directory where the TeX file made by PMX goes, default is ./\n"); + printf("STYLEFILE: name of a file containing style definitions. Default is\n"); + printf(" mtxstyle.txt. This feature is now deprecated; use Include: STYLEFILE\n"); + printf(" in the preamble of the .mtx file instead.\n"); + printf("Options: (can also be entered separately: -b -c ...)\n"); + printf(" -b: disable unbeamVocal\n"); + printf(" -c: disable doChords\n"); + printf(" -f: enable solfaNoteNames\n"); + printf(" -h: display this message and quit\n"); + printf(" -i: enable ignoreErrors\n"); + printf(" -m: disable doLyrics\n"); + printf(" -n: enable instrumentNames\n"); + printf(" -t: disable doUptext\n"); + printf(" -u: disable uptextOnRests\n"); + printf(" -v: enable beVerbose\n"); + printf(" -w: enable pedanticWarnings\n"); + printf(" -D: enable debugMode\n"); + printf(" -0123456789: select Case\n"); + printf(" -H: print enabled status of all options\n"); + printf("All the above, and some other, options can be enabled or disabled\n"); + printf(" in the preamble. What you do there overrides what you do here.\n"); +} + + +Void processOption(j) +Char j; +{ + switch (j) { + + case 'b': + setFeature("unbeamVocal", false); + break; + + case 'c': + setFeature("doChords", false); + break; + + case 'f': + setFeature("solfaNoteNames", true); + break; + + case 'h': + bighelpmessage(); + _Escape(255); + break; + + case 'i': + setFeature("ignoreErrors", true); + break; + + case 'm': + setFeature("doLyrics", false); + break; + + case 'n': + setFeature("instrumentNames", true); + break; + + case 't': + setFeature("doUptext", false); + break; + + case 'u': + setFeature("uptextOnRests", false); + break; + + case 'v': + setFeature("beVerbose", true); + break; + + case 'w': + setFeature("pedanticWarnings", true); + break; + + case 'D': + setFeature("debugMode", true); + break; + + case 'H': + printFeatures(true); + break; + + default: + if (isdigit(j)) + choice = j; + else { + putchar(j); + error(": invalid option", !print); + } + break; + } +} + + +/* Local variables for OpenFiles: */ +struct LOC_OpenFiles { + short testin; + Char basename[256]; +} ; + +Local Void checkExistingFile(LINK) +struct LOC_OpenFiles *LINK; +{ + FILE *tryfile; + Char tryfile_NAME[_FNSIZE]; + + strcpy(tryfile_NAME, LINK->basename); + tryfile = fopen(tryfile_NAME, "r+b"); + _SETIO(tryfile != NULL, FileNotFound); + LINK->testin = P_ioresult; + if (LINK->testin != 0) + return; + if (tryfile != NULL) + fclose(tryfile); + printf("There exists a file named %s. I am treating this\n", + LINK->basename); + error(" as a fatal error unless you specify -i", !print); +} + + +Void OpenFiles() +{ + struct LOC_OpenFiles V; + short i, j, l; + short fileid = 0; + Char infilename[256], outfilename[256], param[256], ext[256]; + short FORLIM1; + Char STR3[256]; + + line_no = 0; + paragraph_no = 0; + for (i = 1; i <= P_argc - 1; i++) { + strcpy(param, P_argv[i]); + if (param[0] == param_leader) { + FORLIM1 = strlen(param); + for (j = 1; j <= FORLIM1 - 1; j++) + processOption(param[j]); + } else if (fileid == 0) + fileid = i; + else if (*texdir == '\0') + strcpy(texdir, param); + else + strcpy(stylefilename, param); + } + if (fileid == 0) { + helpmessage(); + printf("Try \"prepmx -h\" for more information.\n"); + _Escape(255); + } + strcpy(V.basename, P_argv[fileid]); + l = strlen(V.basename); + if (l > 4 && V.basename[l-4] == '.') { + substr_(ext, V.basename, l - 2, 3); + toUpper(ext); + if (!strcmp(ext, "MTX")) { + warning(".mtx extension deleted from basename", !print); + shorten(V.basename, l - 4); + } + } + if (pos1('.', V.basename) > 0) + checkExistingFile(&V); + sprintf(infilename, "%s.mtx", V.basename); + sprintf(outfilename, "%s.pmx", V.basename); + pushFile(infilename); + strcpy(outfile_NAME, outfilename); + if (outfile != NULL) + outfile = freopen(outfile_NAME, "wb", outfile); + else + outfile = fopen(outfile_NAME, "wb"); + _SETIO(outfile != NULL, FileNotFound); + strcpy(stylefile_NAME, stylefilename); + if (stylefile != NULL) + stylefile = freopen(stylefile_NAME, "r", stylefile); + else + stylefile = fopen(stylefile_NAME, "r"); + _SETIO(stylefile != NULL, FileNotFound); + teststyle = P_ioresult; + if (teststyle != 0 && strcmp(stylefilename, "mtxstyle.txt")) + _SETIO(printf("Can't read %s\n", stylefilename) >= 0, FileWriteError); + if (fileError()) { + sprintf(STR3, "Input file %s not found", infilename); + fatalerror(STR3); + } + outfile_open = true; + printf("Writing to %s.pmx\n", V.basename); +} + + +Void CloseFiles() +{ + if (outfile != NULL) + fclose(outfile); + outfile = NULL; + closeAll(); + if (teststyle != 0) + return; + if (stylefile != NULL) + fclose(stylefile); + stylefile = NULL; +} + + +Void readParagraph(P, no, L) +Char (*P)[256]; +short *no; +paragraph_index0 *L; +{ + boolean another; + Char filename[256], buffer[256]; + Char STR1[256], STR3[256]; + + *L = 0; + readData(buffer); + line_no = currentLineNo(); + if (isEmpty(buffer)) + return; + if (debugMode()) + printf(">>>> %s\n", buffer); + paragraph_no++; + /* Handle directives affecting the processing of the input file */ + do { + another = false; + if (startsWithIgnoreCase(buffer, "SUSPEND")) { + ignore_input = true; + another = true; + if (beVerbose()) + printf("-->> Suspending input file %s at line %d\n", + currentFilename(STR3), line_no); + } + if (startsWithIgnoreCase(buffer, "RESUME")) { + ignore_input = false; + another = true; + if (beVerbose()) + printf("-->> Resuming input file %s at line %d\n", + currentFilename(STR1), line_no); + } + if (startsWithIgnoreCase(buffer, "INCLUDE:")) { + predelete(buffer, 8); + NextWord(filename, buffer, ' ', ' '); + pushFile(filename); + another = true; + } + if (another) { + readLine(buffer); + line_no = currentLineNo(); + } + } while (another); + /* Normal paragraph input*/ + do { + if (*L < lines_in_paragraph) { + (*L)++; + strcpy(P[*L - 1], buffer); + *buffer = '\0'; + no[*L - 1] = line_no; + } else + warning("Paragraph too long: skipping line", !print); + readLine(buffer); + line_no = currentLineNo(); + if (debugMode()) + printf("%d >> %s\n", line_no, buffer); + } while (!isEmpty(buffer)); + skipBlanks(); /* needed to identify final paragraph */ +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/files.h b/Build/source/utils/m-tx/mtx-0.60d/files.h new file mode 100644 index 00000000000..66e978f78ca --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/files.h @@ -0,0 +1,38 @@ +/* Header for module files, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef FILES_H +#define FILES_H + + +/* Open and close files, interpret command line, do input, do most output*/ + +#ifndef GLOBALS_H +#include "globals.h" +#endif + +#ifndef MULTFILE_H +#include "multfile.h" +#endif + + +#ifdef FILES_G +# define vextern +#else +# define vextern extern +#endif + +extern Void readParagraph PP((Char (*P)[256], short *no, paragraph_index0 *L)); +extern boolean styleFileFound PV(); +extern Void processOption PP((int j)); +extern Void OpenFiles PV(); +extern Void CloseFiles PV(); +extern Void putLine PP((Char *line)); +extern Void put PP((Char *line, int putspace_)); +extern Void tex3 PP((Char *s)); +extern boolean endOfInfile PV(); + + +#undef vextern + +#endif /*FILES_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/files.pas b/Build/source/utils/m-tx/mtx-0.60d/files.pas new file mode 100644 index 00000000000..8762f7e6e2d --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/files.pas @@ -0,0 +1,196 @@ +unit files; +{ Open and close files, interpret command line, do input, do most output} + +interface uses globals, multfile; + +procedure readParagraph (var P: paragraph; var no: line_nos; + var L: paragraph_index0); +function styleFileFound: boolean; +procedure processOption(j: char); +procedure OpenFiles; +procedure CloseFiles; +procedure putLine (line: string); +procedure put(line: string; putspace: boolean); +procedure tex3 (s: string); +function endOfInfile: boolean; + +implementation uses control, strings, utility; + +const param_leader = '-'; + stylefilename: string = 'mtxstyle.txt'; + +var teststyle: integer; + +function endOfInfile: boolean; + begin endOfInfile:=eofAll; end; + +procedure tex3 (s: string); + begin + if pmx_preamble_done then + if s[1]='%' then putLine(s) + else if first_paragraph then putLine('\'+s+'\') + else putLine('\\'+s+'\') + else putLine(s); + end; + +procedure putLine (line: string); + begin if outlen+length(line) > pmxlinelength-1 then writeln(outfile); + writeln(outfile,line); outlen:=0; + end; + +procedure put(line: string; putspace: boolean); + var l: integer; + begin l:=length(line); + if l>pmxlinelength then error('Item longer than PMX line length',print); + if outlen+l > pmxlinelength-1 then + begin putLine(''); put(line,false) end + else begin if putspace and (outlen>0) and (line[1]<>' ') then + line:=' '+line; + write(outfile,line); inc(outlen,l); + end + end; + +function styleFileFound: boolean; +begin styleFileFound := teststyle<>0; end; + +procedure helpmessage; +begin + writeln('Usage: prepmx [-bcfnhimtuvwDH0123456789] MTXFILE [TEXDIR] [STYLEFILE]') +end; + +procedure bighelpmessage; +begin helpmessage; writeln; + writeln('MTXFILE: name of .mtx file without its extension'); + writeln('TEXDIR: directory where the TeX file made by PMX goes, default is ./'); + writeln('STYLEFILE: name of a file containing style definitions. Default is'); + writeln(' mtxstyle.txt. This feature is now deprecated; use Include: STYLEFILE'); + writeln(' in the preamble of the .mtx file instead.'); + writeln('Options: (can also be entered separately: -b -c ...)'); + writeln(' -b: disable unbeamVocal'); + writeln(' -c: disable doChords'); + writeln(' -f: enable solfaNoteNames'); + writeln(' -h: display this message and quit'); + writeln(' -i: enable ignoreErrors'); + writeln(' -m: disable doLyrics'); + writeln(' -n: enable instrumentNames'); + writeln(' -t: disable doUptext'); + writeln(' -u: disable uptextOnRests'); + writeln(' -v: enable beVerbose'); + writeln(' -w: enable pedanticWarnings'); + writeln(' -D: enable debugMode'); + writeln(' -0123456789: select Case'); + writeln(' -H: print enabled status of all options'); + writeln('All the above, and some other, options can be enabled or disabled'); + writeln(' in the preamble. What you do there overrides what you do here.') +end; + +procedure processOption(j: char); + begin case j of + 'b': setFeature('unbeamVocal',false); + 'c': setFeature('doChords',false); + 'f': setFeature('solfaNoteNames',true); + 'h': begin bighelpmessage; halt(255) end; + 'i': setFeature('ignoreErrors',true); + 'm': setFeature('doLyrics',false); + 'n': setFeature('instrumentNames',true); + 't': setFeature('doUptext',false); + 'u': setFeature('uptextOnRests',false); + 'v': setFeature('beVerbose',true); + 'w': setFeature('pedanticWarnings',true); + 'D': setFeature('debugMode',true); + '0'..'9': choice:=j; + 'H': printFeatures(true); + else write(j); error(': invalid option',not print); + end; +end; + +procedure OpenFiles; +var i, j, l, fileid, testin: integer; + infilename, outfilename, basename, param, ext: string; + procedure checkExistingFile; + var tryfile: file; + begin +{$I-} + assign(tryfile,basename); reset(tryfile); testin := ioresult; +{$I+} + if testin<>0 then exit else close(tryfile); + writeln('There exists a file named ',basename,'. I am treating this'); + error(' as a fatal error unless you specify -i',not print); + end; +begin + fileid:=0; line_no:=0; paragraph_no:=0; + for i:=1 to ParamCount do + begin param:=ParamStr(i); + if param[1]=param_leader then + for j:=2 to length(param) do processOption(param[j]) + else if fileid=0 then fileid:=i + else if texdir='' then texdir:=param + else stylefilename:=param; + end; + if fileid=0 then + begin helpmessage; writeln('Try "prepmx -h" for more information.'); halt(255) end + else basename:=paramstr(fileid); + l:=length(basename); + if (l>4) and (basename[l-3]='.') then + begin ext:=substr(basename,l-2,3); toUpper(ext); if ext='MTX' then + begin warning('.mtx extension deleted from basename',not print); + shorten(basename,l-4); + end; + end; + if pos1('.',basename)>0 then checkExistingFile; + infilename := basename+'.mtx'; outfilename := basename+'.pmx'; +{$I-} + pushFile(infilename); + assign(outfile,outfilename); rewrite(outfile); + assign(stylefile,stylefilename); reset(stylefile); teststyle := ioresult; + if (teststyle<>0) and (stylefilename<>'mtxstyle.txt') then + writeln('Can''t read ',stylefilename); +{$I+} + if fileError then fatalError('Input file '+infilename+' not found'); + outfile_open := true; writeln('Writing to ',basename,'.pmx'); +end; + +procedure CloseFiles; +begin close(outfile); closeAll; if teststyle=0 then close(stylefile); +end; + +procedure readParagraph (var P: paragraph; var no: line_nos; + var L: paragraph_index0); + var another: boolean; + filename, buffer: string; +begin + L:=0; buffer:=readData; line_no:=currentLineNo; + if isEmpty(buffer) then exit; + if debugMode then writeln('>>>> ',buffer); + inc(paragraph_no); +{ Handle directives affecting the processing of the input file } + repeat another:=false; + if startsWithIgnoreCase(buffer,'SUSPEND') then + begin ignore_input:=true; another:=true; if beVerbose then + writeln('-->> Suspending input file ',currentFilename, + ' at line ', line_no); + end; + if startsWithIgnoreCase(buffer,'RESUME') then + begin ignore_input:=false; another:=true; if beVerbose then + writeln('-->> Resuming input file ',currentFilename, + ' at line ', line_no); + end; + if startsWithIgnoreCase(buffer,'INCLUDE:') then + begin predelete(buffer,8); filename:=nextWord(buffer,' ',' '); + pushfile(filename); another:=true; + end; + if another then begin buffer:=readLine; line_no:=currentLineNo; end; + until not another; +{ Normal paragraph input} + repeat + if L> ', buffer); + until isEmpty(buffer); + skipBlanks; { needed to identify final paragraph } +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/globals.c b/Build/source/utils/m-tx/mtx-0.60d/globals.c new file mode 100644 index 00000000000..eba3ab3e00d --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/globals.c @@ -0,0 +1,348 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "globals.pas" */ + + +#include "p2c.h" + + +#define GLOBALS_G +#include "globals.h" + + +Char double_comment[3] = "%%"; +Char durations[ndurs + 1] = "90248136"; +Char terminators[256] = ".x"; +Char has_duration[9] = "abcdefgr"; +Char solfa_names[8] = "drmfslt"; +Char choice = ' '; +boolean outfile_open = false; +Char texdir[256] = ""; +Char old_meter_word[256] = ""; +short outlen = 0; +boolean ignore_input = false; + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +boolean isNoteOrRest(w) +Char *w; +{ + return (pos1(w[0], has_duration) > 0); +} + + +boolean isPause(note) +Char *note; +{ + return (startsWith(note, pause)); +} + + +Void cancel(num, denom, lowest) +short *num, *denom, lowest; +{ + while (((*num) & 1) == 0 && *denom > lowest) { + *num /= 2; + *denom /= 2; + } +} + + +Char *meterWord(Result, num, denom, pnum, pdenom) +Char *Result; +short num, denom, pnum, pdenom; +{ + Char STR1[256], STR2[256], STR4[256], STR5[256]; + + sprintf(Result, "m%s/%s/%s/%s", + toString(STR1, num), toString(STR2, denom), toString(STR4, pnum), + toString(STR5, pdenom)); + return Result; +} + + +Char *meterChange(Result, n1, n2, blind) +Char *Result; +short n1, n2; +boolean blind; +{ + short f = 64; + short l; + + if (!blind) + return (meterWord(Result, n1, PMXmeterdenom(n2), 0, 0)); + /* CMO: process denominator value with function PMXmeterdenom */ + l = n1 * (64 / n2); + cancel(&l, &f, meterdenom); + /* CMO: process denominator value with function PMXmeterdenom */ + meterWord(Result, l, PMXmeterdenom(f), 0, 0); + if (meternum > 0) + printf("Blind meter change to %d/%d on line %d\n", l, f, line_no); + return Result; +} + + +Void setSpace(line_) +Char *line_; +{ + Char line[256]; + short i = 0; + Char word[256]; + + strcpy(line, line_); + while (i < ninstr) { + GetNextWord(word, line, blank, dummy); + if (*word == '\0') + return; + i++; + getNum(word, &nspace[i-1]); + } +} + + +Static Void onumber(s, j, n1) +Char *s; +short *j, *n1; +{ + if (s[*j - 1] == 'o') + *n1 = 1; + else if (s[*j - 1] == '1') { + *n1 = digit(s[*j]) + 10; + (*j)++; + } else + *n1 = digit(s[*j - 1]); + (*j)++; +} + + +Static Void extractNumber(s, k) +Char *s; +short *k; +{ + Char w[256]; + + GetNextWord(w, s, '/', dummy); + getNum(w, k); +} + + +Static Void readMeter(meter_, meternum, meterdenom, pmnum, pmdenom) +Char *meter_; +short *meternum, *meterdenom, *pmnum, *pmdenom; +{ + Char meter[256]; + short j; + + strcpy(meter, meter_); + if (meter[0] == 'm') { + if (pos1('/', meter) == 0) { + j = 2; + onumber(meter, &j, meternum); + onumber(meter, &j, meterdenom); + onumber(meter, &j, pmnum); + onumber(meter, &j, pmdenom); + return; + } + predelete(meter, 1); + extractNumber(meter, meternum); + extractNumber(meter, meterdenom); + extractNumber(meter, pmnum); + extractNumber(meter, pmdenom); + return; + } + getTwoNums(meter, meternum, meterdenom); + *pmnum = *meternum; + *pmdenom = *meterdenom; +} + + +Void getMeter(line_, meternum, meterdenom, pmnum, pmdenom) +Char *line_; +short *meternum, *meterdenom, *pmnum, *pmdenom; +{ + Char line[256]; + Char meter[256]; + Char STR1[256]; + + strcpy(line, line_); + GetNextWord(meter, line, blank, dummy); + if (!strcmp(meter, "C/") || !strcmp(meter, "mC/")) { + *meternum = 2; + *meterdenom = 2; + *pmdenom = 5; + *pmnum = 0; + } else if (!strcmp(meter, "C") || !strcmp(meter, "mC")) { + *meternum = 4; + *meterdenom = 4; + *pmdenom = 6; + *pmnum = 0; + } else + readMeter(meter, meternum, meterdenom, pmnum, pmdenom); + if (*meterdenom == 0) { + sprintf(STR1, "%s: Meter denominator must be nonzero", meter); + error(STR1, print); + } + /* CMO: Convert PMX syntax meter denominator '0' to '1' to be used for + prepmx duration checks */ + /* if meterdenom=0 then meterdenom:=1; */ +} + + +Static short whereInParagraph(l) +short l; +{ + short Result = 0; + short j, FORLIM; + + FORLIM = para_len; + for (j = 1; j <= FORLIM; j++) { + if (orig_line_no[j-1] == l) + return j; + } + return Result; +} + + +Void fatalerror(message) +Char *message; +{ + setFeature("ignoreErrors", false); + error(message, !print); +} + + +Void error(message, printLine) +Char *message; +boolean printLine; +{ + short j; + + printf("%s: ERROR on line %d\n", message, line_no); + j = whereInParagraph(line_no); + if (j > 0 && printLine) + puts(P[j-1]); + if (ignoreErrors()) + return; + if (outfile_open) { + if (outfile != NULL) + fclose(outfile); + outfile = NULL; + outfile = fopen(outfile_NAME, "wb"); + if (outfile == NULL) + _EscIO2(FileNotFound, outfile_NAME); + fclose(outfile); + outfile = NULL; + } + if (line_no == 0) + line_no = 10000; + _Escape(line_no); +} + + +Void warning(message, printLine) +Char *message; +boolean printLine; +{ + short j; + + if (line_no <= 0) { + printf("%s: WARNING in preamble\n", message); + return; + } + printf("%s: WARNING on line %d\n", message, line_no); + if (!printLine) + return; + j = whereInParagraph(line_no); + if (j > 0) + puts(P[j-1]); +} + + +short PMXinstr(stave) +short stave; +{ + return (ninstr - instr[stave-1] + 1); +} + + +Void setDefaultDuration(meterdenom) +short meterdenom; +{ + switch (meterdenom) { + + case 1: + default_duration = '0'; + break; + + case 2: + default_duration = '2'; + break; + + case 4: + default_duration = '4'; + break; + + case 8: + default_duration = '8'; + break; + + case 16: + default_duration = '1'; + break; + + case 32: + default_duration = '3'; + break; + + case 64: + default_duration = '6'; + break; + } +} + + +short PMXmeterdenom(denom) +short denom; +{ + short Result; + + /* CMO: Convert M-Tx meter denominators to PMX syntax */ + switch (denom) { + + case 1: + Result = 0; + break; + + case 16: + Result = 1; + break; + + case 32: + Result = 3; + break; + + case 64: + Result = 6; + break; + + default: + Result = denom; + break; + } + return Result; +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/globals.h b/Build/source/utils/m-tx/mtx-0.60d/globals.h new file mode 100644 index 00000000000..1e0988edf25 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/globals.h @@ -0,0 +1,154 @@ +/* Header for module globals, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef GLOBALS_H +#define GLOBALS_H + + +#ifdef GLOBALS_G +# define vextern +#else +# define vextern extern +#endif + + +/* 1. All global variables. + 2. Miscellaneous other procedures required by several Units. +*/ + +/* CMO: addition/change by Christian Mondrup */ + + +#define PMXlinelength 128 +/* !!! One or more of the following constants should be reduced if this + program is to be compiled by a 16-bit compiler (e.g. Turbo Pascal), + otherwise you get a "Data segment too large" error */ +#define lines_in_paragraph 100 +#define max_words 128 +#define max_notes 128 +/* Christian Mondrup's suggestion to reduce data segment size: + lines_in_paragraph = 50; + max_words = 64; + max_notes = 64; +*/ +#define max_bars 16 +#define maxstaves 15 +#define maxvoices 15 +#define maxgroups 3 +#define standardPMXvoices 12 + +#define max_lyrics_line_length (PMXlinelength - 4) + +#define inf 32000 +#define unspec 1000 +#define default_size 20 + +#define start_beam '[' +#define stop_beam ']' +#define rest 'r' + +#define pause "rp" + +#define dotcode 'd' +#define grace_group 'G' +#define multi_group 'x' +#define barsym '|' +#define comment '%' +#define blank ' ' +#define dot '.' +#define comma ',' +#define colon ':' +#define tilde '~' +#define atsign '@' +#define dummy '\0' + +#define ndurs 8 + +#define unspecified '5' /* Not a valid duration */ + +#define whole 2 /* position of '0' in durations */ + +#define digits "123456789" +#define digitsdot "0123456789." + +#define putspace true +#define nospace false +#define print true + + +typedef char paragraph_index; + +typedef char voice_index; + +typedef char stave_index; + +typedef char bar_index0; + +typedef uchar word_index0; + +typedef char paragraph_index0; + +typedef char voice_index0; + +typedef char stave_index0; + +typedef Char paragraph[lines_in_paragraph][256]; +typedef short line_nos[lines_in_paragraph]; + + +extern Char double_comment[3]; +extern Char durations[ndurs + 1]; +extern Char terminators[256]; +extern Char has_duration[9]; +extern Char solfa_names[8]; + +extern Char choice; +extern boolean outfile_open; +extern Char texdir[256]; +extern Char old_meter_word[256]; +extern short outlen; +extern boolean ignore_input; +vextern Char voice_label[maxvoices][256]; +vextern Char clef[maxstaves]; +vextern voice_index0 instr[maxstaves], stave[maxstaves], + first_on_stave[maxstaves], number_on_stave[maxstaves]; +vextern short nspace[maxstaves], stave_size[maxstaves]; +vextern voice_index0 nvoices, nstaves, ninstr, bottom, top; +vextern short one_beat, full_bar, line_no, short_note, musicsize, meternum, + meterdenom, pmnum, pmdenom, paragraph_no, bar_no, pickup, nbars, + nleft; +vextern paragraph_index0 para_len; +vextern double xmtrnum0; +vextern paragraph P; +vextern line_nos orig_line_no; +vextern FILE *infile, *outfile, *stylefile; +vextern Char default_duration; +vextern Char fracindent[256], this_version[256], this_version_date[256]; +vextern boolean pmx_preamble_done, first_paragraph, final_paragraph, + must_respace, must_restyle, multi_bar_rest, some_vocal; +vextern Char infile_NAME[_FNSIZE]; +vextern Char outfile_NAME[_FNSIZE]; +vextern Char stylefile_NAME[_FNSIZE]; + + +extern Void error PP((Char *message, int printLine)); +extern Void fatalerror PP((Char *message)); +extern Void warning PP((Char *message, int printLine)); +extern short PMXinstr PP((int stave)); +extern Void setDefaultDuration PP((int meterdenom)); +extern Void getMeter PP((Char *line, short *meternum, short *meterdenom, + short *pmnum, short *pmdenom)); +extern Void setSpace PP((Char *line)); +extern Char *meterChange PP((Char *Result, int n1, int n2, int blind)); +extern Char *meterWord PP((Char *Result, int num, int denom, int pnum, + int pdenom)); +extern Void cancel PP((short *num, short *denom, int lowest)); +extern boolean isNoteOrRest PP((Char *w)); +extern boolean isPause PP((Char *note)); +/* CMO: */ +extern short PMXmeterdenom PP((int denom)); + + +#undef vextern + +#endif /*GLOBALS_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/globals.pas b/Build/source/utils/m-tx/mtx-0.60d/globals.pas new file mode 100644 index 00000000000..ad53376438f --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/globals.pas @@ -0,0 +1,247 @@ +unit globals; + +{ 1. All global variables. + 2. Miscellaneous other procedures required by several Units. +} + +interface + +const PMXlinelength = 128; +{ !!! One or more of the following constants should be reduced if this + program is to be compiled by a 16-bit compiler (e.g. Turbo Pascal), + otherwise you get a "Data segment too large" error } + lines_in_paragraph = 100; + max_words = 128; + max_notes = 128; +{ Christian Mondrup's suggestion to reduce data segment size: + lines_in_paragraph = 50; + max_words = 64; + max_notes = 64; +} + max_bars = 16; + maxstaves = 15; + maxvoices = 15; + maxgroups = 3; + standardPMXvoices = 12; + max_lyrics_line_length = PMXlinelength-4; + inf = 32000; + unspec = 1000; + default_size = 20; + + start_beam = '['; + stop_beam = ']'; + rest = 'r'; + pause = 'rp'; + dotcode = 'd'; + grace_group = 'G'; + multi_group = 'x'; + barsym = '|'; + comment = '%'; + double_comment: string[2] = '%%'; + blank = ' '; + dot = '.'; + comma = ','; + colon = ':'; + tilde = '~'; + atsign = '@'; + dummy = #0; + + ndurs = 8; + durations: string[ndurs] = '90248136'; + unspecified = '5'; { Not a valid duration } + whole = 2; { position of '0' in durations } + terminators: string = '.x'; + digits = '123456789'; + digitsdot = '0123456789.'; + has_duration: string[8] = 'abcdefgr'; + solfa_names: string[7] = 'drmfslt'; + + choice: char = ' '; + outfile_open: boolean = false; + texdir: string = ''; + old_meter_word: string = ''; + outlen: integer = 0; + putspace = true; + nospace = false; + ignore_input: boolean = false; + print = true; + +type + paragraph_index = 1..lines_in_paragraph; + voice_index = 1..maxvoices; + stave_index = 1..maxstaves; + bar_index0 = 0..max_bars; + word_index0 = 0..max_words; + paragraph_index0 = 0..lines_in_paragraph; + voice_index0 = 0..maxvoices; + stave_index0 = 0..maxstaves; + paragraph = array[paragraph_index] of string; + line_nos = array[paragraph_index] of integer; + +var voice_label: array[voice_index] of string; + clef: array[stave_index] of char; + instr, stave, first_on_stave, number_on_stave: + array[stave_index] of voice_index0; + nspace, stave_size: array[stave_index] of integer; + nvoices, nstaves, ninstr, bottom, top: voice_index0; + one_beat, full_bar, line_no, short_note, musicsize, + meternum, meterdenom, pmnum, pmdenom, paragraph_no, + bar_no, pickup, nbars, nleft: integer; + para_len: paragraph_index0; + xmtrnum0: real; + P: paragraph; + orig_line_no: line_nos; + infile, outfile, stylefile: text; + default_duration: char; + fracindent, this_version, this_version_date: string; + pmx_preamble_done, first_paragraph, final_paragraph, must_respace, + must_restyle, multi_bar_rest, some_vocal: boolean; + +procedure error(message: string; printLine: boolean); +procedure fatalerror(message: string); +procedure warning(message: string; printLine: boolean); +function PMXinstr (stave: integer): integer; +procedure setDefaultDuration(meterdenom: integer); +procedure getMeter(line: string; + var meternum, meterdenom, pmnum, pmdenom: integer); +procedure setSpace(line: string); +function meterChange(n1, n2: integer; blind: boolean): string; +function meterWord (num, denom, pnum, pdenom: integer): string; +procedure cancel(var num,denom: integer; lowest: integer); +function isNoteOrRest(w: string): boolean; +function isPause(note: string): boolean; + +implementation uses strings, control, utility; + +function isNoteOrRest(w: string): boolean; +begin isNoteOrRest := pos1(w[1],has_duration)>0; end; + +function isPause(note: string): boolean; +begin isPause:=startsWith(note,pause); end; + +procedure cancel(var num,denom: integer; lowest: integer); +begin while (num mod 2 = 0) and (denom>lowest) do + begin num:=num div 2; denom:=denom div 2; end; +end; + +function meterWord (num,denom,pnum,pdenom: integer): string; +begin meterWord := 'm' + toString(num) + '/' + toString(denom) + + '/' + toString(pnum) + '/' + toString(pdenom); +end; + +function meterChange(n1, n2: integer; blind: boolean): string; + var f, l: integer; +begin + if blind then + begin f:=64; l:=n1 * (64 div n2); + cancel(l,f,meterdenom); meterChange := meterWord (l,f,0,0); + if meternum>0 then + writeln('Blind meter change to ', l, '/', f, ' on line ', line_no); + end + else meterChange := meterWord(n1,n2,0,0); +end; + +procedure setSpace(line: string); + var i: integer; + word: string; + begin i:=0; + while i0) and printline then writeln(P[j]); + if not ignoreErrors then + begin if outfile_open then + begin close(outfile); rewrite(outfile); close(outfile); end; + if line_no=0 then line_no:=10000; + halt(line_no); + end; +end; + +procedure warning(message: string; printline: boolean); + var j: integer; +begin + if line_no>0 then + begin writeln (message, ': WARNING on line ', line_no); + if not printline then exit; + j:=whereInParagraph(line_no); if j>0 then writeln(P[j]) + end + else writeln (message, ': WARNING in preamble'); +end; + +function PMXinstr (stave: integer): integer; +begin PMXinstr := ninstr + 1 - instr[stave]; end; + +procedure setDefaultDuration(meterdenom: integer); +begin + case meterdenom of + 1: default_duration:='0'; + 2: default_duration:='2'; + 4: default_duration:='4'; + 8: default_duration:='8'; + 16: default_duration:='1'; + 32: default_duration:='3'; + 64: default_duration:='6'; + end; +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING b/Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING new file mode 100644 index 00000000000..e77696ae8dd --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 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. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, 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 software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, 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 redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +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 give any other recipients of the Program a copy of this License +along with the Program. + +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 Program or any portion +of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +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 Program, 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 Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) 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; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, 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 executable. 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. + +If distribution of executable or 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 counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program 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. + + 5. 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 Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program 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. + + 7. 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 Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program 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 Program. + +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. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program 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. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 Program +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 Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, 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 + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. 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. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog b/Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog new file mode 100644 index 00000000000..17e4bc2dbc5 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog @@ -0,0 +1,390 @@ +Wed Mar 10 15:03:20 1999 Alexander L. Belikoff + + * src/p2c.h: DOUBLE defined as double + +Tue Mar 31 14:57:26 1998 Alexander L. Belikoff + + * src/trans.h: + Magic limits (MININT, MAXINT), causing random p2c bugs on the Alpha replaced + with LONG-MIN/MAX from limits.h (integers in Pascal include longs in C, + according to p2c) + +Tue Sep 23 09:14:22 1997 Harvey J. Stein + + * src/p2c.proto, src/funcs.c, src/p2c.hdrs: + Adjustments to get pad to work correctly. + +Thu Jul 3 20:41:55 1997 Harvey J. Stein + + * src/p2c.proto, src/sys.p2crc, src/trans.h, src/expr.c, src/funcs.c, src/p2c.hdrs: + Bug: Consider: + + procedure foo(x: array[i..j : integer] of varying[k] of char); + ... + var z : array[3..12] of varying[20] of char; + ... + foo(z); + + This should become something like: + + foo(int i, int j, int k, char x[j-i+1][k]) + ... + char z[10][20]; + ... + foo(3, 12, 20, z); + + Instead, it was generating: + + foo(3, 12, 255, z); + + which totally screws up accessing z. + + Analysis: To do this correctly, p2c has to keep dereferencing z as it + processes the hidden arguments i, j, & k so that it's working on an + expression of the appropriate type each time it tries to find either + the size of the string or the start & end points of arrays. Instead, + it just wasn't. + + Fix done: I couldn't figure out exactly how to do the above. But, p2c + calls strmax_func to get the length of the character string. I just + built some additional dereferencing into it so that it gets the + correct length in the above sort of situation. So, changed + strmax_func in expr.c. + + + Bug: Index(x,y) is a common pascal extension for finding a substring + in a string. p2c handles it but it wasn't working right on Dec code. + + Analysis: Some dialects of pascal consider x to be the string and y + to be the substring. Others switch x & y. p2c supports (substring, + string), and Dec pascal supports the opposite. + + Fix: There was some support for switching index argument order, but it + was tightly coupled to HP compiler directive support. I added a + comment switch ("IndexOrder") for additional control of this feature. + Changed func_strpos in funcs.c, and added the switch in trans.h. + +Fri Jun 13 07:22:26 1997 Harvey J. Stein + + * src/p2c.hdrs, src/p2c.proto, src/pexpr.c, src/decl.c, src/funcs.c: + Fixed bug in [truncate] handling - I didn't clear the new Meaning + fields (fakenumargs & truncated) at meaning creation time, so they + were sometimes showing up on non-truncated variables. Changed + initmeaning (decl.c). + + Moved hidden number_of_args from beginning to end of arg list. At the + beginning it was interfering with the return hidden variable, + causing return to not be generated. Changes were in p_funcdecl + (decl.c), func_present (funcs.c), and p_funcarglist (pexpr.c). Added + has_truncate function to pexpr.c to check whether an arg list has the + truncated attribute. + + Argument variables were sometimes getting shadowed just because + they're initialized. Problem was in var_reference, which clones + Meanings that have constdefns. But arg variables don't need to be + cloned since the constants are handled by p_funcarglist. So skipped + cloning if Meaning's kind is MK_PARAM or MK_VARPARAM. Previous fix of + always cloning, but only copying meanings if not MK_PARAM seems to + have been incorrect. + +Sun Jun 1 13:15:06 1997 Harvey J. Stein + + * src/sys.p2crc, src/trans.h, src/pexpr.c, src/parse.c, src/lex.c, src/p2c.hdrs, src/p2c.proto, src/funcs.c, src/decl.c: + Enhancements: + + Added support for [truncate]. This involved: + 1. Added a truncated flag & a fakenumargs flag to the Meaning + structure. + 2. In p_funcdecl (decl.c), recognizing the [truncate] attribute in + argument lists. If it's seen, the argument's truncated flag is + set, and it and all arguments following are given default values + (assuming that they don't already have default values). The + default values gets p2c to automatically generate the correct + number of arguments for calling the subroutine when some are + left out. + 3. In p_funcdecl (decl.c), if any of the args are tagged with + [truncate], then add a hidden argument to the front of the + argument list - number_of_args. Flag it with fakenumargs. + 4. In p_funcarglist (pexpr.c), when the fcn has a fakenumargs + parameter as the first parameter, (and truncateisdefalt is zero) + compute the index of the last argument supplied, and pass it as + the first argument in the call. + 5. In funcs.c, added func_present to handle the PRESENT(x) calls. + It parses the call, figures out the index of the argument in the + fcns calling sequence (say n), and generates an expression + (number_of_args >= n) to be the output for the PRESENT(x) call. + 6. Added new config parameter - TruncateIsDefault to turn off + PRESENT support (in case one doesn't want the extra arg to be + generated). + + Added support for CONTINUE & BREAK. Just had to basically declare + them as keywords in lex.c, and recognize them in parse.c, and declare + their tokens in trans.h (since p2c already supported them internally). + + Added descriptions for SkipReIncludes, NoOutput, and TruncateIsDefault + to sys.p2crc. + + Bug fixes: + + Bug: args with default values which are also used in local functions + lose their default values. + + Attempted fix: in var_reference (pexpr.c), don't zero out the + constdefn when the arg is cloned if the arg is a parameter. + + Problems: This works, but it sometimes causes bogus declarations of + the old variable to be output. + +Wed May 14 14:27:32 1997 Harvey J. Stein + + * src/stuff.c, src/p2c.hdrs, src/p2c.proto, src/out.c, src/expr.c, p2c.patch: + (Updated p2c.patch for last set of changes) + + Bug: p2c was seg faulting when given expressions such as: + there := + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'; + + and: + + there := + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + + '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + where; + + when there is VARYING [XXX] OF CHAR; + + Analysis: There seem to be all sorts of fixed length character arrays + around the code. It seems that especially long expressions and/or + character strings can cause them to overflow. + + Fix: I upped some of the limits, which at least avoided core dumps on + the code I'm currently processing, but really one needs to go through + and properly keep track of the amount copied into strings so as to + avoid buffer overruns. But, this is a real pain in the ass because of + the shitty semantics of the standard C library. + + Basically, the stack allocated ones that I noticed in expr.c and out.c + I upped to length 2000, and in stuff.c, I upped the size of the + strings in formatbuf[] to 4000. + +Tue May 13 19:27:00 1997 Harvey J. Stein + + * src/lex.c, src/p2c.hdrs, src/p2c.proto, src/trans.c, src/Makefile, src/decl.c, src/expr.c, src/funcs.c: + Minor fixes/changes: + -Was calling close in handle_include (lex.c) when it should have + been fclose. + -Modified src/Makefile to allow for using insure on the source code + (to catch memory bugs). + + + Major fixes: + + Bug: p2c occasionally was freeing memory that was already freed. + + Analysis: This seems to occur sometimes on constant string + definitions because mp->val.s might point to the same string as + mp->constdefn->val.s, and forget_ctx tries to free them both. + + Fix: In decl.c, in forget_ctx: After calling free_value(&mp->val) when + mp->kind == MK_CONST, instead of always calling + freexpr(mp->constdefn), only call it when mp->kind != MK_CONST, + or when mp->constdefn->val.s != mp->val.s. + + I also tried to fix this by copying mp->val.s in p_constdecl when + creating mp->constdefn->val.s, but never got this to work + correctly, so I commented it out. + + + Bug: p2c core dumped on: + + readv(data, short_string); + + when data is a packed array[1..7] of char, and + short_string is a packed array[1..3] of char. + + Analysis: What was happening was that in handleread_text (funcs.c), + when the readv argument is an array, it was checking + ord_range(ex->val.type->indextype, ...), and ex was NULL. + + Fix: It seems like this was a typo, so I change it to check + var->... instead of ex->... + + + Bug: p2c core dumped on: + + WRITELN('%SQLMOD ', msg); + + when msg was of type varying[x] of char. + + Analysis: Some part of the code was converting the above string to + "%%SQLMOD %s". It seems that cleansprintf (from expr.c) didn't + realize that % is escaped by %%, so it thought that there should + be 2 arguments (maybe 3?) for the above printf string instead of + one, and thus was going off of the end of the args list (i.e. - + ex->args[j] out of range). + + Fix: Inside the for loop, if the next character is also a %, then + skip arg processing, and skip the next character (just copy it + into fmtbuf). + + + Bug: p2c core dumps on: + + readv(c, i); + + when c is a char and i is an integer. + + Analysis: In funcs.c, in handleread_text, var is never getting + initialized - it's getting passed in as NULL, and it only gets + set if isstrread is true. Since c is a char, fex->val.type->kind + is TK_CHAR, not TK_STRING, so isstrread is false, so var fails to + get initialized. + + Fix: After the case that var is set when isstrread is true, if it's + still NULL, we set it to p_expr(NULL). This prevents the core + dump, but produces incorrect code! It outputs: + + fscanf(c, "%ld", &i); + + when it should more likely be something along the lines of + sscanf(&c, ...) (but safer). + +Mon May 5 15:23:04 1997 Harvey J. Stein + + * src/out.c, src/p2c.hdrs, src/p2c.proto, src/trans.h, src/decl.c, src/lex.c, p2c.patch: + New features (out.c, trans.h): + New parameter NoOutput - setting it to 1 stops p2c from generating + output. Useful when trying to simulate Dec style modules via + include files - just convert INHERIT to %include, and put + {*NoOutput=1} at the top of each include file, and p2c does the + right thing. This was done by not pushing characters into the + output stream when nooutput is 1. The real code changes occur in + out.c, in putc_outf, and puts_outf. Accumulating the output, but + turning off writes (i.e. - wiring it into flush_outfilebuf) failed + because of timing differences btw when comment directives are + processed and when output occurs. + + Bug fixes: + + Bug: Some variable declarations weren't getting output. Most + noticable were the automatically generated Return variables. + + Analysis: When using the {INTF-ONLY} directive in include files + then the fwd declaration of fcns was being interpreted as the fcn + definition, and so the variables generated when the declaration was + seen were marked as "wasdeclared". Then, when the code for the + function was being generated, these variables weren't getting + output because "wasdeclared" was 1. This was most visible from the + automatically generated Return variable, but occasionally happened + to other variables. + + Fix: in decl.c:activatemeaning - added resetting of "wasdeclared" + if we can identify that the variable is the autogenerated return + variable. Detected them by snarfing code from isretvar. But this + was a lousy fix because as mentioned above, there are other + variables which are occasionally affected. And, it's no longer + needed because of the new NoOutput feature, so I commented out the + change, but left the code there as a reminder of the problem. + + + Bug: Comments weren't getting output in the correct places. This + is a serious problem when using {EMBED comments to insert C code + into the output stream. Sometimes code from the {EMBED comment + given in an include file showed up in the includer. Sometimes the + code didn't get emitted at all because of mistiming against + {nooutput} directives. + + Analysis: p2c builds up a comment string structure as it parses + the code, and hangs it off of the code's internal representation. + Presumably this is so that when doing code transformations, the + comments are output in the correct places. However, this seems to + sometimes fail when using %include files. It seems that the + comments weren't getting processed & output until the current block + was finished. Included files don't start a new block because one + could conceivably include random snippets of code anywhere you want + (inside of RECORD declarations, for example). Thus, sometimes + comments from inside the include file don't get processed & output + until well after the include file itself is finished being + processed. + + Fix: Added the call flushcomments(NULL, -1, -1) to both push_input + and pop_input (in lex.c). This seems to have fixed it with no + noticable side effects. + +Tue Apr 29 18:36:51 1997 Harvey J. Stein + + * src/p2c.hdrs, src/p2c.proto, src/lex.c: + Added recognition of AND_THEN and OR_ELSE. + + * src/trans.h, src/lex.c, src/p2c.hdrs, src/p2c.proto: + Added tracking of files that have been included so that they can + optionally be ignored the second time they're seen. This is needed + because a module (say X) can inherit from two other modules (say Y and + Z), both of whom inherit from a fourth module (say Z). Converting the + inherits to includes thus gets Z included twice. If it's not ignored, + it causes p2c to start renaming procedures so as to avoid name + clashes. + + Added an rc file parameter (skipreincludes) for controling the above + action. + + * src/decl.c, src/p2c.hdrs, src/p2c.proto, src/parse.c: + Various adjustments & bug fixes suggested by Dave Gillespie: + + decl.c: Call format_s so that we work with a copy of the string + when removing dollar signs - a little more robust. + + Missing ! on strcicmp caused bogus externs to be emitted on + some variable declarations. + + parse.c: Sprinkle afew p_attributes around p_block so that p2c + properly parses attributes in front of declaration blocks. + In particular, this fixes the problem where p2c was choking + on [hidden] followed by TYPE, which appears in analytic.pas. + +Wed Apr 23 12:17:08 1997 Harvey J. Stein + + * src/p2c.proto, src/decl.c, src/p2c.hdrs: + Modified addfield so that it removes dollar signs from record field + identifiers. This is more consistent with the handling of other + identifiers, and also needed by much of the Pascal code. + +Mon Apr 21 10:41:53 1997 Harvey J. Stein + + * p2c.patch: Submitted new patch to Dave G. + + * src/p2c.proto, src/lex.c, src/p2c.cat, src/p2c.hdrs, src/Makefile: + Changed VALUE from a keyword to a possible keyword when working with + Dec Pascal code. Original code set it to be a keyword for Dec, and a + possible keyword otherwise. However, if it's a keyword, then p2c + doesn't accept it the name of a slot in a record. Since Dec accepts + this usage, I figured that VALUE should always be a possible keyword + instead of a keyword. + +Thu Apr 17 11:33:22 1997 Harvey J. Stein + + * p2c.patch: patches generated & mailed to Dave Gillespie + +Wed Apr 16 16:26:07 1997 Harvey J. Stein + + * src/p2c.hdrs, src/p2c.proto, .cvsignore, examples/.cvsignore, src/.cvsignore, src/decl.c, src/p2c.cat: + Parser didn't expect a ( after the OTHERWISE keyword. Modified + decl.c to expect it. + + * src/INSTALL, src/citmods.c, src/comment.c, src/decl.c, src/dir.c, src/expr.c, src/funcs.c, src/hpmods.c, src/lex.c, src/loc.p2clib.c, src/loc.p2crc, src/makeproto.c, src/out.c, src/p2c.cat, src/p2c.h, src/p2c.hdrs, src/p2c.proto, src/p2cc.cat, src/p2cc.man, src/p2cc.perl, src/p2clib.c, src/parse.c, src/pexpr.c, src/string.pas, src/system.imp, src/system.m2, src/trans.h, src/turbo.imp: + Import of p2c 1.21alpha2 + + * src/INSTALL, src/citmods.c, src/comment.c, src/decl.c, src/dir.c, src/expr.c, src/funcs.c, src/hpmods.c, src/lex.c, src/loc.p2clib.c, src/loc.p2crc, src/makeproto.c, src/out.c, src/p2c.cat, src/p2c.h, src/p2c.hdrs, src/p2c.proto, src/p2cc.cat, src/p2cc.man, src/p2cc.perl, src/p2clib.c, src/parse.c, src/pexpr.c, src/string.pas, src/system.imp, src/system.m2, src/trans.h, src/turbo.imp: + Initial revision + + * HP/import/asm.imp, HP/import/fs.imp, HP/import/general_0.imp, HP/import/general_1.imp, HP/import/general_2.imp, HP/import/general_3.imp, HP/import/general_4.imp, HP/import/hpib_0.imp, HP/import/hpib_1.imp, HP/import/hpib_2.imp, HP/import/hpib_3.imp, HP/import/iodecl.imp, HP/import/misc.imp, HP/import/rnd.imp, HP/import/sysdevs.imp, HP/import/sysglobals.imp, HP/include/asm.h, HP/include/fs.h, HP/include/general_0.h, HP/include/general_1.h, HP/include/general_2.h, HP/include/general_3.h, HP/include/general_4.h, HP/include/hpib_0.h, HP/include/hpib_1.h, HP/include/hpib_2.h, HP/include/hpib_3.h, HP/include/iodecl.h, HP/include/misc.h, HP/include/rnd.h, HP/include/sysdevs.h, HP/include/sysglobals.h, Makefile, README, examples/Makefile, examples/README, examples/basic.doc, examples/basic.p, examples/c/basic.c, examples/c/cref.c, examples/c/e.c, examples/c/fact.c, examples/c/self.c, examples/cref.p, examples/e.p, examples/fact.p, examples/p2crc, examples/self.p, ftp.README, src/COPYING, src/HISTORY, src/Makefile, src/NOTES, src/README, src/p2c.man, src/stuff.c, src/sys.p2crc, src/trans.c: + Import of p2c 1.21alpha2 + + * HP/import/asm.imp, HP/import/fs.imp, HP/import/general_0.imp, HP/import/general_1.imp, HP/import/general_2.imp, HP/import/general_3.imp, HP/import/general_4.imp, HP/import/hpib_0.imp, HP/import/hpib_1.imp, HP/import/hpib_2.imp, HP/import/hpib_3.imp, HP/import/iodecl.imp, HP/import/misc.imp, HP/import/rnd.imp, HP/import/sysdevs.imp, HP/import/sysglobals.imp, HP/include/asm.h, HP/include/fs.h, HP/include/general_0.h, HP/include/general_1.h, HP/include/general_2.h, HP/include/general_3.h, HP/include/general_4.h, HP/include/hpib_0.h, HP/include/hpib_1.h, HP/include/hpib_2.h, HP/include/hpib_3.h, HP/include/iodecl.h, HP/include/misc.h, HP/include/rnd.h, HP/include/sysdevs.h, HP/include/sysglobals.h, Makefile, README, examples/Makefile, examples/README, examples/basic.doc, examples/basic.p, examples/c/basic.c, examples/c/cref.c, examples/c/e.c, examples/c/fact.c, examples/c/self.c, examples/cref.p, examples/e.p, examples/fact.p, examples/p2crc, examples/self.p, ftp.README, src/COPYING, src/HISTORY, src/Makefile, src/NOTES, src/README, src/p2c.man, src/stuff.c, src/sys.p2crc, src/trans.c: + Initial revision + diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/Makefile.am b/Build/source/utils/m-tx/mtx-0.60d/libp2c/Makefile.am new file mode 100644 index 00000000000..fd208029eef --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/libp2c/Makefile.am @@ -0,0 +1,2 @@ +noinst_LIBRARIES = libp2c.a +libp2c_a_SOURCES = p2c.h p2clib.c diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/README b/Build/source/utils/m-tx/mtx-0.60d/libp2c/README new file mode 100644 index 00000000000..47a102c88d2 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/libp2c/README @@ -0,0 +1,31 @@ + +This directory contains "p2c", a Pascal to C translator. + +"p2c" Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + +Written and maintained by: Dave Gillespie + c/o Synaptics, Inc. + 2698 Orchard Parkway + San Jose CA 95134 + daveg@synaptics.com, uunet!synaptx!daveg + + +This program is distributed under the terms of the GNU License Agreement. +See the file src/COPYING for details. + +The GNU License Agreement restrictions do _not_ apply to code generated +by p2c, nor to the p2c run-time files "p2clib.c" and "p2c.h". + +NO WARRANTY: + The program in this directory was developed for internal use at + Caltech and thus absolutely no guarantee is made that the program + will compile or run on other systems or that it will produce correct + code. P2c is _not_ a compiler, it is a translator; it strives to + produce correct code but reserves the right to sacrifice correctness + in extreme cases for readability in the general case. P2c is designed + to be extended (see funcs.c, hpmods.c and citmods.c for examples), but + some of the main code is pretty messy since the translator has grown + considerably beyond its original planned scale. Bug reports are + welcome at daveg@synaptics.com, but I may not have time to respond + to them immediately. Suggestions are welcome, too! + diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h b/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h new file mode 100644 index 00000000000..c8216a6002c --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h @@ -0,0 +1,533 @@ +#ifndef P2C_H +#define P2C_H + + +/* Header file for code generated by "p2c", the Pascal-to-C translator */ + +/* "p2c" Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation. + * By Dave Gillespie, daveg@synaptics.com. Version 1.21alpha-07.Dec.93. + * This file may be copied, modified, etc. in any way. It is not restricted + * by the licence agreement accompanying p2c itself. + */ + + +#include + +#define DOUBLE double + + + +/* If the following heuristic fails, compile -DBSD=0 for non-BSD systems, + or -DBSD=1 for BSD systems. */ + +#ifdef M_XENIX +# define BSD 0 +#endif + +#ifdef vms +# define BSD 0 +# ifndef __STDC__ +# define __STDC__ 1 +# endif +#endif + +#ifdef __TURBOC__ +# define MSDOS 1 +#endif + +#ifdef MSDOS +# define BSD 0 +#endif + +#ifdef FILE /* a #define in BSD, a typedef in SYSV (hp-ux, at least) */ +# ifndef BSD /* (a convenient, but horrible kludge!) */ +# define BSD 1 +# endif +#endif + +#ifdef BSD +# if !BSD +# undef BSD +# endif +#endif + + +#if (defined(__STDC__) && !defined(M_XENIX)) || defined(__TURBOC__) +# include +# include +# define HAS_STDLIB +# if defined(vms) || defined(__TURBOC__) +# define NON_ANSI_CAT +# endif +#else +# ifndef BSD +# ifndef __TURBOC__ +# include +# endif +# endif +# ifdef hpux +# ifdef _INCLUDE__STDC__ +# include +# include +# define HAS_STDLIB +# endif +# endif +# include +# if !defined(MSDOS) || defined(__TURBOC__) +# define NON_ANSI_CAT +# endif +#endif + +#if defined(NON_ANSI_CAT) && !defined(ANSI_CAT) +# ifdef NON_ANSI_CAT_ALTERNATE +# define __CAT__(a,b)a/**/b +# else +# define __ID__(a)a +# define __CAT__(a,b)__ID__(a)b +# endif +#else +# define __CAT__(a,b)a##b +#endif + + +#ifdef BSD +# include +# define memcpy(a,b,n) (bcopy(b,a,n),a) +# define memcmp(a,b,n) bcmp(a,b,n) +# define strchr(s,c) index(s,c) +# define strrchr(s,c) rindex(s,c) +#else +# include +#endif + +#include +#include +#include +#include + + +#ifndef NO_LACK +#ifdef vms + +#define LACK_LABS +#define LACK_MEMMOVE +#define LACK_MEMCPY + +#else + +#define LACK_LABS /* Undefine these if your library has these */ +#define LACK_MEMMOVE + +#endif +#endif + + +typedef struct __p2c_jmp_buf { + struct __p2c_jmp_buf *next; + jmp_buf jbuf; +} __p2c_jmp_buf; + + +/* Warning: The following will not work if setjmp is used simultaneously. + This also violates the ANSI restriction about using vars after longjmp, + but a typical implementation of longjmp will get it right anyway. */ + +#ifndef FAKE_TRY +# define TRY(x) do { __p2c_jmp_buf __try_jb; \ + __try_jb.next = __top_jb; \ + if (!setjmp((__top_jb = &__try_jb)->jbuf)) { +# define RECOVER(x) __top_jb = __try_jb.next; } else { +# define RECOVER2(x,L) __top_jb = __try_jb.next; } else { \ + if (0) { L: __top_jb = __try_jb.next; } +# define ENDTRY(x) } } while (0) +#else +# define TRY(x) if (1) { +# define RECOVER(x) } else do { +# define RECOVER2(x,L) } else do { L: ; +# define ENDTRY(x) } while (0) +#endif + + + +#ifdef M_XENIX /* avoid compiler bug */ +# define SHORT_MAX (32767) +# define SHORT_MIN (-32768) +#endif + + +/* The following definitions work only on twos-complement machines */ +#ifndef SHORT_MAX +# define SHORT_MAX ((short)(((unsigned short) -1) >> 1)) +# define SHORT_MIN (~SHORT_MAX) +#endif + +#ifndef INT_MAX +# define INT_MAX ((int)(((unsigned int) -1) >> 1)) +# define INT_MIN (~INT_MAX) +#endif + +#ifndef LONG_MAX +# define LONG_MAX ((long)(((unsigned long) -1) >> 1)) +# define LONG_MIN (~LONG_MAX) +#endif + +#ifndef SEEK_SET +# define SEEK_SET 0 +# define SEEK_CUR 1 +# define SEEK_END 2 +#endif + +#ifndef EXIT_SUCCESS +# ifdef vms +# define EXIT_SUCCESS 1 +# define EXIT_FAILURE (02000000000L) +# else +# define EXIT_SUCCESS 0 +# define EXIT_FAILURE 1 +# endif +#endif + + +#define SETBITS 32 + + +#if defined(__STDC__) || defined(__TURBOC__) +# if !defined(vms) && !defined(M_LINT) +# define Signed signed +# else +# define Signed +# endif +# define Void void /* Void f() = procedure */ +# ifndef Const +# define Const const +# endif +# ifndef Volatile +# define Volatile volatile +# endif +# ifdef M_LINT +# define PP(x) () +# define PV() () +typedef char *Anyptr; +# else +# define PP(x) x /* function prototype */ +# define PV() (void) /* null function prototype */ +typedef void *Anyptr; +# endif +#else +# define Signed +# define Void void +# ifndef Const +# define Const +# endif +# ifndef Volatile +# define Volatile +# endif +# define PP(x) () +# define PV() () +typedef char *Anyptr; +#endif + +#ifdef __GNUC__ +# define Inline inline +#else +# define Inline +#endif + +#define Register register /* Register variables */ +#define Char char /* Characters (not bytes) */ + +#ifndef Static +# define Static static /* Private global funcs and vars */ +#endif + +#ifndef Local +# define Local static /* Nested functions */ +#endif + +typedef Signed char schar; +typedef unsigned char uchar; +typedef unsigned char boolean; + +#ifndef NO_DECLARE_ALFA +typedef Char alfa[10]; +#endif + +#ifndef true +# define true 1 +# define false 0 +#endif + +#ifndef TRUE +# define TRUE 1 +# define FALSE 0 +#endif + + +typedef struct { + Anyptr proc, link; +} _PROCEDURE; + +#ifndef _FNSIZE +# define _FNSIZE 120 +#endif + + +extern Void PASCAL_MAIN PP( (int, Char **) ); +extern Char **P_argv; +extern int P_argc; +extern short P_escapecode; +extern int P_ioresult; +extern __p2c_jmp_buf *__top_jb; + + +#ifdef P2C_H_PROTO /* if you have Ansi C but non-prototyped header files */ +extern Char *strcat PP( (Char *, Const Char *) ); +extern Char *strchr PP( (Const Char *, int) ); +extern int strcmp PP( (Const Char *, Const Char *) ); +extern Char *strcpy PP( (Char *, Const Char *) ); +extern size_t strlen PP( (Const Char *) ); +extern Char *strncat PP( (Char *, Const Char *, size_t) ); +extern int strncmp PP( (Const Char *, Const Char *, size_t) ); +extern Char *strncpy PP( (Char *, Const Char *, size_t) ); +extern Char *strrchr PP( (Const Char *, int) ); + +extern Anyptr memchr PP( (Const Anyptr, int, size_t) ); +extern Anyptr memmove PP( (Anyptr, Const Anyptr, size_t) ); +extern Anyptr memset PP( (Anyptr, int, size_t) ); +#ifndef memcpy +extern Anyptr memcpy PP( (Anyptr, Const Anyptr, size_t) ); +extern int memcmp PP( (Const Anyptr, Const Anyptr, size_t) ); +#endif + +extern int atoi PP( (Const Char *) ); +extern double atof PP( (Const Char *) ); +extern long atol PP( (Const Char *) ); +extern double strtod PP( (Const Char *, Char **) ); +extern long strtol PP( (Const Char *, Char **, int) ); +#endif /*P2C_H_PROTO*/ + +#ifndef HAS_STDLIB +#ifndef NO_DECLARE_MALLOC +extern Anyptr malloc PP( (size_t) ); +extern Void free PP( (Anyptr) ); +#endif +#endif + +extern int _OutMem PV(); +extern int _CaseCheck PV(); +extern int _NilCheck PV(); +extern int _Escape PP( (int) ); +extern int _EscIO PP( (int) ); +extern int _EscIO2 PP( (int, Char *) ); + +extern long ipow PP( (long, long) ); +extern long P_imax PP( (long, long) ); +extern long P_imin PP( (long, long) ); +extern double P_rmax PP( (double, double) ); +extern double P_rmin PP( (double, double) ); +extern Char *strsub PP( (Char *, Char *, int, int) ); +extern Char *strltrim PP( (Char *) ); +extern Char *strrtrim PP( (Char *) ); +extern Char *strrpt PP( (Char *, Char *, int) ); +extern Char *strpad PP( (Char *, Char *, int, int) ); +extern int strpos2 PP( (Char *, Char *, int) ); +extern long memavail PV(); +extern int P_peek PP( (FILE *) ); +extern int P_eof PP( (FILE *) ); +extern int P_eoln PP( (FILE *) ); +extern Void P_readpaoc PP( (FILE *, Char *, int) ); +extern Void P_readlnpaoc PP( (FILE *, Char *, int) ); +extern long P_maxpos PP( (FILE *) ); +extern Char *P_trimname PP( (Char *, int) ); +extern long *P_setunion PP( (long *, long *, long *) ); +extern long *P_setint PP( (long *, long *, long *) ); +extern long *P_setdiff PP( (long *, long *, long *) ); +extern long *P_setxor PP( (long *, long *, long *) ); +extern int P_inset PP( (unsigned, long *) ); +extern int P_setequal PP( (long *, long *) ); +extern int P_subset PP( (long *, long *) ); +extern long *P_addset PP( (long *, unsigned) ); +extern long *P_addsetr PP( (long *, unsigned, unsigned) ); +extern long *P_remset PP( (long *, unsigned) ); +extern long *P_setcpy PP( (long *, long *) ); +extern long *P_expset PP( (long *, long) ); +extern long P_packset PP( (long *) ); +extern int P_getcmdline PP( (int, int, Char *) ); +extern Void TimeStamp PP( (int *, int *, int *, + int *, int *, int *) ); +extern Void P_sun_argv PP( (char *, int, int) ); +extern FILE *_skipspaces PP( (FILE *) ); +extern FILE *_skipnlspaces PP( (FILE *) ); + + +/* I/O error handling */ +#define _CHKIO(cond,ior,val,def) ((cond) ? P_ioresult=0,(val) \ + : P_ioresult=(ior),(def)) +#define _SETIO(cond,ior) (P_ioresult = (cond) ? 0 : (ior)) + +/* Following defines are suitable for the HP Pascal operating system */ +#define FileNotFound 10 +#define FileNotOpen 13 +#define FileWriteError 38 +#define BadInputFormat 14 +#define EndOfFile 30 + +#define FILENOTFOUND 10 +#define FILENOTOPEN 13 +#define FILEWRITEERROR 38 +#define BADINPUTFORMAT 14 +#define ENDOFFILE 30 + +/* Creating temporary files */ +#if (defined(BSD) || defined(NO_TMPFILE)) && !defined(HAVE_TMPFILE) +# define tmpfile() (fopen(tmpnam(NULL), "w+")) +#endif + +/* File buffers */ +#define FILEBUF(f,sc,type) sc int __CAT__(f,_BFLAGS); \ + sc type __CAT__(f,_BUFFER) +#define FILEBUFNC(f,type) int __CAT__(f,_BFLAGS); \ + type __CAT__(f,_BUFFER) + +#define RESETBUF(f,type) (__CAT__(f,_BFLAGS) = 1) +#define SETUPBUF(f,type) (__CAT__(f,_BFLAGS) = 0) + +#define GETFBUF(f,type) (*((__CAT__(f,_BFLAGS) == 1 && \ + ((__CAT__(f,_BFLAGS) = 2), \ + fread(&__CAT__(f,_BUFFER), \ + sizeof(type),1,(f)))),\ + &__CAT__(f,_BUFFER))) +#define AGETFBUF(f,type) ((__CAT__(f,_BFLAGS) == 1 && \ + ((__CAT__(f,_BFLAGS) = 2), \ + fread(__CAT__(f,_BUFFER), \ + sizeof(type),1,(f)))),\ + __CAT__(f,_BUFFER)) + +#define PUTFBUF(f,type,v) (GETFBUF(f,type) = (v)) +#define CPUTFBUF(f,v) (PUTFBUF(f,char,v)) +#define APUTFBUF(f,type,v) (memcpy(AGETFBUF(f,type), (v), \ + sizeof(__CAT__(f,_BUFFER)))) + +#define GET(f,type) (__CAT__(f,_BFLAGS) == 1 ? \ + fread(&__CAT__(f,_BUFFER),sizeof(type),1,(f)) : \ + (__CAT__(f,_BFLAGS) = 1)) + +#define PUT(f,type) (fwrite(&__CAT__(f,_BUFFER),sizeof(type),1,(f)), \ + (__CAT__(f,_BFLAGS) = 0)) +#define CPUT(f) (PUT(f,char)) + +#define BUFEOF(f) (__CAT__(f,_BFLAGS) != 2 && P_eof(f)) +#define BUFFPOS(f) (ftell(f) - (__CAT__(f,_BFLAGS) == 2)) + +typedef struct { + FILE *f; + int f_BFLAGS; /* FILEBUFNC(f,Char); */ + Char f_BUFFER; + Char name[_FNSIZE]; +} _TEXT; + +/* Memory allocation */ +#ifdef __GCC__ +# define Malloc(n) (malloc(n) ?: (Anyptr)_OutMem()) +#else +extern Anyptr __MallocTemp__; +# define Malloc(n) ((__MallocTemp__ = malloc(n)) ? __MallocTemp__ : (Anyptr)_OutMem()) +#endif +#define FreeR(p) (free((Anyptr)(p))) /* used if arg is an rvalue */ +#define Free(p) (free((Anyptr)(p)), (p)=NULL) + +/* sign extension */ +#define SEXT(x,n) ((x) | -(((x) & (1L<<((n)-1))) << 1)) + +/* packed arrays */ /* BEWARE: these are untested! */ +#define P_getbits_UB(a,i,n,L) ((int)((a)[(i)>>(L)-(n)] >> \ + (((~(i))&((1<<(L)-(n))-1)) << (n)) & \ + (1<<(1<<(n)))-1)) + +#define P_getbits_SB(a,i,n,L) ((int)((a)[(i)>>(L)-(n)] << \ + (16 - ((((~(i))&((1<<(L)-(n))-1))+1) <<\ + (n)) >> (16-(1<<(n)))))) + +#define P_putbits_UB(a,i,x,n,L) ((a)[(i)>>(L)-(n)] |= \ + (x) << (((~(i))&((1<<(L)-(n))-1)) << (n))) + +#define P_putbits_SB(a,i,x,n,L) ((a)[(i)>>(L)-(n)] |= \ + ((x) & (1<<(1<<(n)))-1) << \ + (((~(i))&((1<<(L)-(n))-1)) << (n))) + +#define P_clrbits_B(a,i,n,L) ((a)[(i)>>(L)-(n)] &= \ + ~( ((1<<(1<<(n)))-1) << \ + (((~(i))&((1<<(L)-(n))-1)) << (n))) ) + +/* small packed arrays */ +#define P_getbits_US(v,i,n) ((int)((v) >> ((i)<<(n)) & (1<<(1<<(n)))-1)) +#define P_getbits_SS(v,i,n) ((int)((long)(v) << (SETBITS - (((i)+1) << (n))) >> (SETBITS-(1<<(n))))) +#define P_putbits_US(v,i,x,n) ((v) |= (x) << ((i) << (n))) +#define P_putbits_SS(v,i,x,n) ((v) |= ((x) & (1<<(1<<(n)))-1) << ((i)<<(n))) +#define P_clrbits_S(v,i,n) ((v) &= ~( ((1<<(1<<(n)))-1) << ((i)<<(n)) )) + +#define P_max(a,b) ((a) > (b) ? (a) : (b)) +#define P_min(a,b) ((a) < (b) ? (a) : (b)) + + +/* Fix ANSI-isms */ + +#ifdef LACK_LABS +# ifndef labs +# define labs my_labs + extern long my_labs PP( (long) ); +# endif +#endif + +#ifdef LACK_MEMMOVE +# ifndef memmove +# define memmove my_memmove + extern Anyptr my_memmove PP( (Anyptr, Const Anyptr, size_t) ); +# endif +#endif + +#ifdef LACK_MEMCPY +# ifndef memcpy +# define memcpy my_memcpy + extern Anyptr my_memcpy PP( (Anyptr, Const Anyptr, size_t) ); +# endif +# ifndef memcmp +# define memcmp my_memcmp + extern int my_memcmp PP( (Const Anyptr, Const Anyptr, size_t) ); +# endif +# ifndef memset +# define memset my_memset + extern Anyptr my_memset PP( (Anyptr, int, size_t) ); +# endif +#endif + +/* Fix toupper/tolower on Suns and other stupid BSD systems */ +#ifdef toupper +# undef toupper +# undef tolower +# define toupper(c) my_toupper(c) +# define tolower(c) my_tolower(c) +#endif + +#ifndef _toupper +# if 'A' == 65 && 'a' == 97 +# define _toupper(c) ((c)-'a'+'A') +# define _tolower(c) ((c)-'A'+'a') +# else +# ifdef toupper +# undef toupper /* hope these are shadowing real functions, */ +# undef tolower /* because my_toupper calls _toupper! */ +# endif +# define _toupper(c) toupper(c) +# define _tolower(c) tolower(c) +# endif +#endif + + +#endif /* P2C_H */ + + + +/* End. */ + + diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c b/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c new file mode 100644 index 00000000000..98a00edf41b --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c @@ -0,0 +1,1117 @@ + +/* Run-time library for use with "p2c", the Pascal to C translator */ + +/* "p2c" Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation. + * By Dave Gillespie, daveg@synaptics.com. Version --VERSION--. + * This file may be copied, modified, etc. in any way. It is not restricted + * by the licence agreement accompanying p2c itself. + */ + + + +#include "p2c.h" + + +#ifndef NO_TIME +# include +#endif + + +#define Isspace(c) isspace(c) /* or "((c) == ' ')" if preferred */ + + + + +int P_argc; +char **P_argv; + +short P_escapecode; +int P_ioresult; + +long EXCP_LINE; /* Used by Pascal workstation system */ + +Anyptr __MallocTemp__; + +__p2c_jmp_buf *__top_jb; + + + + +void PASCAL_MAIN(argc, argv) +int argc; +char **argv; +{ + P_argc = argc; + P_argv = argv; + __top_jb = NULL; + +#ifdef LOCAL_INIT + LOCAL_INIT(); +#endif +} + + + + + +/* In case your system lacks these... */ + +long my_labs(x) +long x; +{ + return((x > 0) ? x : -x); +} + + +#ifdef __STDC__ +Anyptr my_memmove(Anyptr d, Const Anyptr s, size_t n) +#else +Anyptr my_memmove(d, s, n) +Anyptr d, s; +register int n; +#endif +{ + register char *dd = (char *)d, *ss = (char *)s; + if (dd < ss || dd - ss >= n) { +#if defined(bcopy) && defined(memcpy) + my_memcpy(dd, ss, n); +#else + memcpy(dd, ss, n); +#endif + } else if (n > 0) { + dd += n; + ss += n; + while (n-- > 0) + *--dd = *--ss; + } + return d; +} + + +#ifdef __STDC__ +Anyptr my_memcpy(Anyptr d, Const Anyptr s, size_t n) +#else +Anyptr my_memcpy(d, s, n) +Anyptr d, s; +register int n; +#endif +{ + register char *ss = (char *)s, *dd = (char *)d; + while (n-- > 0) + *dd++ = *ss++; + return d; +} + +#ifdef __STDC__ +int my_memcmp(Const Anyptr s1, Const Anyptr s2, size_t n) +#else +int my_memcmp(s1, s2, n) +Anyptr s1, s2; +register int n; +#endif +{ + register char *a = (char *)s1, *b = (char *)s2; + register int i; + while (n-- > 0) + if ((i = (*a++) - (*b++)) != 0) + return i; + return 0; +} + +#ifdef __STDC__ +Anyptr my_memset(Anyptr d, int c, size_t n) +#else +Anyptr my_memset(d, c, n) +Anyptr d; +register int c; +register int n; +#endif +{ + register char *dd = (char *)d; + while (n-- > 0) + *dd++ = c; + return d; +} + + +int my_toupper(c) +int c; +{ + if (islower(c)) + return _toupper(c); + else + return c; +} + + +int my_tolower(c) +int c; +{ + if (isupper(c)) + return _tolower(c); + else + return c; +} + + + + +long ipow(a, b) +long a, b; +{ + long v; + + if (a == 0 || a == 1) + return a; + if (a == -1) + return (b & 1) ? -1 : 1; + if (b < 0) + return 0; + if (a == 2) + return 1L << b; + v = (b & 1) ? a : 1; + while ((b >>= 1) > 0) { + a *= a; + if (b & 1) + v *= a; + } + return v; +} + + +long P_imax(a, b) +long a, b; +{ + if (a > b) + return a; + else + return b; +} + +long P_imin(a, b) +long a, b; +{ + if (a < b) + return a; + else + return b; +} + + +double P_rmax(a, b) +double a, b; +{ + if (a > b) + return a; + else + return b; +} + +double P_rmin(a, b) +double a, b; +{ + if (a < b) + return a; + else + return b; +} + + + + +/* Common string functions: */ + +/* Store in "ret" the substring of length "len" starting from "pos" (1-based). + Store a shorter or null string if out-of-range. Return "ret". */ + +char *strsub(ret, s, pos, len) +register char *ret, *s; +register int pos, len; +{ + register char *s2; + + if (--pos < 0 || len <= 0) { + *ret = 0; + return ret; + } + while (pos > 0) { + if (!*s++) { + *ret = 0; + return ret; + } + pos--; + } + s2 = ret; + while (--len >= 0) { + if (!(*s2++ = *s++)) + return ret; + } + *s2 = 0; + return ret; +} + + +/* Return the index of the first occurrence of "pat" as a substring of "s", + starting at index "pos" (1-based). Result is 1-based, 0 if not found. */ + +int strpos2(s, pat, pos) +char *s; +register char *pat; +register int pos; +{ + register char *cp, ch; + register int slen; + + if (--pos < 0) + return 0; + slen = strlen(s) - pos; + cp = s + pos; + if (!(ch = *pat++)) + return 0; + pos = strlen(pat); + slen -= pos; + while (--slen >= 0) { + if (*cp++ == ch && !strncmp(cp, pat, pos)) + return cp - s; + } + return 0; +} + + +/* Case-insensitive version of strcmp. */ + +int strcicmp(s1, s2) +register char *s1, *s2; +{ + register unsigned char c1, c2; + + while (*s1) { + if (*s1++ != *s2++) { + if (!s2[-1]) + return 1; + c1 = toupper(s1[-1]); + c2 = toupper(s2[-1]); + if (c1 != c2) + return c1 - c2; + } + } + if (*s2) + return -1; + return 0; +} + + + + +/* HP and Turbo Pascal string functions: */ + +/* Trim blanks at left end of string. */ + +char *strltrim(s) +register char *s; +{ + while (Isspace(*s++)) ; + return s - 1; +} + + +/* Trim blanks at right end of string. */ + +char *strrtrim(s) +register char *s; +{ + register char *s2 = s; + + if (!*s) + return s; + while (*++s2) ; + while (s2 > s && Isspace(*--s2)) + *s2 = 0; + return s; +} + + +/* Store in "ret" "num" copies of string "s". Return "ret". */ + +char *strrpt(ret, s, num) +char *ret; +register char *s; +register int num; +{ + register char *s2 = ret; + register char *s1; + + while (--num >= 0) { + s1 = s; + while ((*s2++ = *s1++)) ; + s2--; + } + return ret; +} + + +/* Store in "ret" string "s" with enough pad chars added to reach "size". */ + +char *strpad(ret, s, padchar, num) +char *ret; +register char *s; +register int padchar, num; +{ + register char *d = ret; + + if (s == d) { + while (*d++) ; + } else { + while ((*d++ = *s++)) ; + } + num -= (--d - ret); + while (--num >= 0) + *d++ = padchar; + *d = 0; + return ret; +} + + +/* Copy the substring of length "len" from index "spos" of "s" (1-based) + to index "dpos" of "d", lengthening "d" if necessary. Length and + indices must be in-range. */ + +void strmove(len, s, spos, d, dpos) +register char *s, *d; +register int len, spos, dpos; +{ + s += spos - 1; + d += dpos - 1; + while (*d && --len >= 0) + *d++ = *s++; + if (len > 0) { + while (--len >= 0) + *d++ = *s++; + *d = 0; + } +} + + +/* Delete the substring of length "len" at index "pos" from "s". + Delete less if out-of-range. */ + +void strdelete(s, pos, len) +register char *s; +register int pos, len; +{ + register int slen; + + if (--pos < 0) + return; + slen = strlen(s) - pos; + if (slen <= 0) + return; + s += pos; + if (slen <= len) { + *s = 0; + return; + } + while ((*s = s[len])) s++; +} + + +/* Insert string "src" at index "pos" of "dst". */ + +void strinsert(src, dst, pos) +register char *src, *dst; +register int pos; +{ + register int slen, dlen; + + if (--pos < 0) + return; + dlen = strlen(dst); + dst += dlen; + dlen -= pos; + if (dlen <= 0) { + strcpy(dst, src); + return; + } + slen = strlen(src); + do { + dst[slen] = *dst; + --dst; + } while (--dlen >= 0); + dst++; + while (--slen >= 0) + *dst++ = *src++; +} + + + + +/* File functions */ + +/* Peek at next character of input stream; return EOF at end-of-file. */ + +int P_peek(f) +FILE *f; +{ + int ch; + + ch = getc(f); + if (ch == EOF) + return EOF; + ungetc(ch, f); + return (ch == '\n') ? ' ' : ch; +} + + +/* Check if at end of file, using Pascal "eof" semantics. End-of-file for + stdin is broken; remove the special case for it to be broken in a + different way. */ + +int P_eof(f) +FILE *f; +{ + register int ch; + + if (feof(f)) + return 1; +#ifdef HAVE_ISATTY + if (isatty(fileno(f))) +#else + if (f == stdin) +#endif + return 0; /* not safe to look-ahead on the keyboard! */ + ch = getc(f); + if (ch == EOF) + return 1; + ungetc(ch, f); + return 0; +} + + +/* Check if at end of line (or end of entire file). */ + +int P_eoln(f) +FILE *f; +{ + register int ch; + + ch = getc(f); + if (ch == EOF) + return 1; + ungetc(ch, f); + return (ch == '\n'); +} + + +/* Skip whitespace (including newlines) in a file. */ + +FILE *_skipnlspaces(f) +FILE *f; +{ + register int ch; + + do { + ch = getc(f); + } while (ch == ' ' || ch == '\t' || ch == '\n'); + if (ch != EOF) + ungetc(ch, f); + return f; +} + + +/* Skip whitespace (not including newlines) in a file. */ + +FILE *_skipspaces(f) +FILE *f; +{ + register int ch; + + do { + ch = getc(f); + } while (ch == ' ' || ch == '\t'); + if (ch != EOF) + ungetc(ch, f); + return f; +} + + +/* Read a packed array of characters from a file. */ + +Void P_readpaoc(f, s, len) +FILE *f; +char *s; +int len; +{ + int ch; + + for (;;) { + if (len <= 0) + return; + ch = getc(f); + if (ch == EOF || ch == '\n') + break; + *s++ = ch; + --len; + } + while (--len >= 0) + *s++ = ' '; + if (ch != EOF) + ungetc(ch, f); +} + +Void P_readlnpaoc(f, s, len) +FILE *f; +char *s; +int len; +{ + int ch; + + for (;;) { + ch = getc(f); + if (ch == EOF || ch == '\n') + break; + if (len > 0) { + *s++ = ch; + --len; + } + } + while (--len >= 0) + *s++ = ' '; +} + + +/* Compute maximum legal "seek" index in file (0-based). */ + +long P_maxpos(f) +FILE *f; +{ + long savepos = ftell(f); + long val; + + if (fseek(f, 0L, SEEK_END)) + return -1; + val = ftell(f); + if (fseek(f, savepos, SEEK_SET)) + return -1; + return val; +} + + +/* Use packed array of char for a file name. */ + +Char *P_trimname(fn, len) +register Char *fn; +register int len; +{ + static Char fnbuf[256]; + register Char *cp = fnbuf; + + while (--len >= 0 && *fn && !isspace(*fn)) + *cp++ = *fn++; + *cp = 0; + return fnbuf; +} + + + + +/* Pascal's "memavail" doesn't make much sense in Unix with virtual memory. + We fix memory size as 10Meg as a reasonable compromise. */ + +long memavail() +{ + return 10000000; /* worry about this later! */ +} + +long maxavail() +{ + return memavail(); +} + + + + +/* Sets are stored as an array of longs. S[0] is the size of the set; + S[N] is the N'th 32-bit chunk of the set. S[0] equals the maximum + I such that S[I] is nonzero. S[0] is zero for an empty set. Within + each long, bits are packed from lsb to msb. The first bit of the + set is the element with ordinal value 0. (Thus, for a "set of 5..99", + the lowest five bits of the first long are unused and always zero.) */ + +/* (Sets with 32 or fewer elements are normally stored as plain longs.) */ + +long *P_setunion(d, s1, s2) /* d := s1 + s2 */ +register long *d, *s1, *s2; +{ + long *dbase = d++; + register int sz1 = *s1++, sz2 = *s2++; + while (sz1 > 0 && sz2 > 0) { + *d++ = *s1++ | *s2++; + sz1--, sz2--; + } + while (--sz1 >= 0) + *d++ = *s1++; + while (--sz2 >= 0) + *d++ = *s2++; + *dbase = d - dbase - 1; + return dbase; +} + + +long *P_setint(d, s1, s2) /* d := s1 * s2 */ +register long *d, *s1, *s2; +{ + long *dbase = d++; + register int sz1 = *s1++, sz2 = *s2++; + while (--sz1 >= 0 && --sz2 >= 0) + *d++ = *s1++ & *s2++; + while (--d > dbase && !*d) ; + *dbase = d - dbase; + return dbase; +} + + +long *P_setdiff(d, s1, s2) /* d := s1 - s2 */ +register long *d, *s1, *s2; +{ + long *dbase = d++; + register int sz1 = *s1++, sz2 = *s2++; + while (--sz1 >= 0 && --sz2 >= 0) + *d++ = *s1++ & ~*s2++; + if (sz1 >= 0) { + while (sz1-- >= 0) + *d++ = *s1++; + } + while (--d > dbase && !*d) ; + *dbase = d - dbase; + return dbase; +} + + +long *P_setxor(d, s1, s2) /* d := s1 / s2 */ +register long *d, *s1, *s2; +{ + long *dbase = d++; + register int sz1 = *s1++, sz2 = *s2++; + while (sz1 > 0 && sz2 > 0) { + *d++ = *s1++ ^ *s2++; + sz1--, sz2--; + } + while (--sz1 >= 0) + *d++ = *s1++; + while (--sz2 >= 0) + *d++ = *s2++; + while (--d > dbase && !*d) ; + *dbase = d - dbase; + return dbase; +} + + +int P_inset(val, s) /* val IN s */ +register unsigned val; +register long *s; +{ + register int bit; + bit = val % SETBITS; + val /= SETBITS; + if (val < *s++ && ((1L< size) { + s += size; + while (val > size) + *++s = 0, size++; + *sbase = size; + } else + s += val; + *s |= 1L< (int)v2) + return sbase; + b1 = v1 % SETBITS; + v1 /= SETBITS; + b2 = v2 % SETBITS; + v2 /= SETBITS; + size = *s; + v1++; + if (++v2 > size) { + while (v2 > size) + s[++size] = 0; + s[v2] = 0; + *s = v2; + } + s += v1; + if (v1 == v2) { + *s |= (~((-2L)<<(b2-b1))) << b1; + } else { + *s++ |= (-1L) << b1; + while (++v1 < v2) + *s++ = -1; + *s |= ~((-2L) << b2); + } + return sbase; +} + + +long *P_remset(s, val) /* s := s - [val] */ +register long *s; +register unsigned val; +{ + register int bit; + bit = val % SETBITS; + val /= SETBITS; + if (++val <= *s) { + if (!(s[val] &= ~(1L<= 0) { + if (*s1++ != *s2++) + return 0; + } + return 1; +} + + +int P_subset(s1, s2) /* s1 <= s2 */ +register long *s1, *s2; +{ + register int sz1 = *s1++, sz2 = *s2++; + if (sz1 > sz2) + return 0; + while (--sz1 >= 0) { + if (*s1++ & ~*s2++) + return 0; + } + return 1; +} + + +long *P_setcpy(d, s) /* d := s */ +register long *d, *s; +{ + register long *save_d = d; + +#ifdef SETCPY_MEMCPY + memcpy(d, s, (*s + 1) * sizeof(long)); +#else + register int i = *s + 1; + while (--i >= 0) + *d++ = *s++; +#endif + return save_d; +} + + +/* s is a "smallset", i.e., a 32-bit or less set stored + directly in a long. */ + +long *P_expset(d, s) /* d := s */ +register long *d; +register long s; +{ + if (s) { + d[1] = s; + *d = 1; + } else + *d = 0; + return d; +} + + +long P_packset(s) /* convert s to a small-set */ +register long *s; +{ + if (*s++) + return *s; + else + return 0; +} + + + + + +/* Oregon Software Pascal extensions, courtesy of William Bader */ + +int P_getcmdline(l, h, line) +int l, h; +Char *line; +{ + int i, len; + char *s; + + h = h - l + 1; + len = 0; + for(i = 1; i < P_argc; i++) { + s = P_argv[i]; + while (*s) { + if (len >= h) return len; + line[len++] = *s++; + } + if (len >= h) return len; + line[len++] = ' '; + } + return len; +} + +Void TimeStamp(Day, Month, Year, Hour, Min, Sec) +int *Day, *Month, *Year, *Hour, *Min, *Sec; +{ +#ifndef NO_TIME + struct tm *tm; + long clock; + + time(&clock); + tm = localtime(&clock); + *Day = tm->tm_mday; + *Month = tm->tm_mon + 1; /* Jan = 0 */ + *Year = tm->tm_year; + if (*Year < 1900) + *Year += 1900; /* year since 1900 */ + *Hour = tm->tm_hour; + *Min = tm->tm_min; + *Sec = tm->tm_sec; +#endif +} + +Void VAXdate(s) +char *s; +{ + long clock; + char *c; + int i; + static int where[] = {8, 9, 0, 4, 5, 6, 0, 20, 21, 22, 23}; + + time(&clock); + c = ctime(&clock); + for (i = 0; i < 11; i++) + s[i] = my_toupper(c[where[i]]); + s[2] = '-'; + s[6] = '-'; +} + +Void VAXtime(s) +char *s; +{ + long clock; + char *c; + int i; + + time(&clock); + c = ctime(&clock); + for (i = 0; i < 8; i++) + s[i] = c[i+11]; + s[8] = '.'; + s[9] = '0'; + s[10] = '0'; +} + + + + +/* SUN Berkeley Pascal extensions */ + +Void P_sun_argv(s, len, n) +register char *s; +register int len, n; +{ + register char *cp; + + if ((unsigned)n < P_argc) + cp = P_argv[n]; + else + cp = ""; + while (*cp && --len >= 0) + *s++ = *cp++; + while (--len >= 0) + *s++ = ' '; +} + + + + +int _OutMem() +{ + return _Escape(-2); +} + +int _CaseCheck() +{ + return _Escape(-9); +} + +int _NilCheck() +{ + return _Escape(-3); +} + + + + + +/* The following is suitable for the HP Pascal operating system. + It might want to be revised when emulating another system. */ + +char *_ShowEscape(buf, code, ior, prefix) +char *buf, *prefix; +int code, ior; +{ + char *bufp; + + if (prefix && *prefix) { + strcpy(buf, prefix); + strcat(buf, ": "); + bufp = buf + strlen(buf); + } else { + bufp = buf; + } + if (code == -10) { + sprintf(bufp, "Pascal system I/O error %d", ior); + switch (ior) { + case 3: + strcat(buf, " (illegal I/O request)"); + break; + case 7: + strcat(buf, " (bad file name)"); + break; + case FileNotFound: /*10*/ + strcat(buf, " (file not found)"); + break; + case FileNotOpen: /*13*/ + strcat(buf, " (file not open)"); + break; + case BadInputFormat: /*14*/ + strcat(buf, " (bad input format)"); + break; + case 24: + strcat(buf, " (not open for reading)"); + break; + case 25: + strcat(buf, " (not open for writing)"); + break; + case 26: + strcat(buf, " (not open for direct access)"); + break; + case 28: + strcat(buf, " (string subscript out of range)"); + break; + case EndOfFile: /*30*/ + strcat(buf, " (end-of-file)"); + break; + case FileWriteError: /*38*/ + strcat(buf, " (file write error)"); + break; + } + } else { + sprintf(bufp, "Pascal system error %d", code); + switch (code) { + case -2: + strcat(buf, " (out of memory)"); + break; + case -3: + strcat(buf, " (reference to NIL pointer)"); + break; + case -4: + strcat(buf, " (integer overflow)"); + break; + case -5: + strcat(buf, " (divide by zero)"); + break; + case -6: + strcat(buf, " (real math overflow)"); + break; + case -8: + strcat(buf, " (value range error)"); + break; + case -9: + strcat(buf, " (CASE value range error)"); + break; + case -12: + strcat(buf, " (bus error)"); + break; + case -20: + strcat(buf, " (stopped by user)"); + break; + } + } + return buf; +} + + +int _Escape(code) +int code; +{ + char buf[100]; + + P_escapecode = code; + if (__top_jb) { + __p2c_jmp_buf *jb = __top_jb; + __top_jb = jb->next; + longjmp(jb->jbuf, 1); + } + if (code == 0) + exit(EXIT_SUCCESS); + if (code == -1) + exit(EXIT_FAILURE); + fprintf(stderr, "%s\n", _ShowEscape(buf, P_escapecode, P_ioresult, "")); + exit(EXIT_FAILURE); +} + +int _EscIO(code) +int code; +{ + P_ioresult = code; + return _Escape(-10); +} + +int _EscIO2(code, name) +int code; +char *name; +{ + P_ioresult = code; + if (!__top_jb && name && *name) { + char buf[100]; + fprintf(stderr, "%s: %s\n", + name, _ShowEscape(buf, P_escapecode, P_ioresult, "")); + exit(EXIT_FAILURE); + } + return _Escape(-10); +} + + + +/* End. */ + + + diff --git a/Build/source/utils/m-tx/mtx-0.60d/lyrics.c b/Build/source/utils/m-tx/mtx-0.60d/lyrics.c new file mode 100644 index 00000000000..c38cdeffddf --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/lyrics.c @@ -0,0 +1,869 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "lyrics.pas" */ + + +#include "p2c.h" + + +#define LYRICS_G +#include "lyrics.h" + + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef STATUS_H +#include "status.h" +#endif + +#ifndef MULTFILE_H +#include "multfile.h" +#endif + +#ifndef FILES_H +#include "files.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +/* Symbols used in strings of melismatype */ + +#define beam_melisma '[' +#define inhibit_beam_melisma '<' +#define slur_melisma '(' +#define inhibit_slur_melisma '{' + + +typedef char other_index; + +typedef char other_index0; + +typedef Char melismatype[256]; + +typedef enum { + nolyr, haslyr +} haslyrtype; +typedef enum { + normal, aux +} auxtype; +typedef enum { + asbefore, newassign +} assigntype; +typedef enum { + virgin, active +} inittype; + +typedef struct lyrinfotype { + short lyr_adjust, slur_level, slur_change, beam_level, beam_change; + melismatype melisma; + boolean numbered; +} lyrinfotype; + +typedef enum { + none_given, global_lyrics, local_lyrics +} lyrlinetype; + +typedef struct lyrtagtype { + lyrlinetype lyrsource; + haslyrtype has_lyrics; + auxtype auxiliary; + assigntype new_assign; + inittype initialized; + short linecount; + Char tags[256]; +} lyrtagtype; + + +#define maxLyrNums 64 +#define lyrtaglength 40 + + +#define lyr_adjust_undef (-12345) +#define interstave 24 + + +Static short LyrNum = 0; + +Static boolean lyrmodealter[maxstaves], oldlyrmodealter[maxstaves]; +Static lyrtagtype tag[maxvoices], oldtag[maxvoices]; +Static lyrinfotype lyrinfo[maxvoices]; +Static Char numberedParagraph[maxLyrNums][lyrtaglength + 1]; + + +/* Information flow for verse numbers: at the SetLyrics stage, the first +line of each lyrics paragraph is checked for a verse number, and if +found, the paragraph tag is remembered. At the AssignLyrics stage, +the first time that paragraph is encountered, the particular voice +is marked in lyrinfo as being numbered. When that voice is later processed, +the mark in lyrinfo is interrogated and turned off: if it was on, the +mtxVerse pre-TeX string is put into the output. */ + +boolean hasVerseNumber(voice) +voice_index voice; +{ + boolean Result; + + Result = lyrinfo[voice-1].numbered; + lyrinfo[voice-1].numbered = false; + return Result; +} + + +Static boolean isNumberedLyricsParagraph(tag) +Char *tag; +{ + short i, FORLIM; + + FORLIM = LyrNum; + for (i = 0; i <= FORLIM - 1; i++) { + if (!strcmp(tag, numberedParagraph[i])) + return true; + } + return false; +} + + +Static boolean anyTagNumbered(tags_) +Char *tags_; +{ + boolean Result; + Char tags[256]; + Char s[256]; + + strcpy(tags, tags_); +/* p2c: lyrics.pas: Note: Eliminated unused assignment statement [338] */ + if (curtail(tags, '}') > 0) + delete1(tags, 1); + do { + GetNextWord(s, tags, ',', dummy); + if (*s == '\0') + return false; + if (isNumberedLyricsParagraph(s)) + return true; + } while (true); + return false; +} + + +/* Save the tag in the numberedParagraph list, stripping off braces if any */ +Static Void markNumbered(tag_) +Char *tag_; +{ + Char tag[256]; + + strcpy(tag, tag_); + if (LyrNum >= maxLyrNums) { + error("Too many numbered lines in the lyrics", !print); + return; + } + LyrNum++; + if (curtail(tag, '}') > 0) + delete1(tag, 1); + strcpy(numberedParagraph[LyrNum-1], tag); +/* p2c: lyrics.pas, line 104: + * Note: Possible string truncation in assignment [145] */ +} + + +/* --- end of procedures to keep track of verse numbering --- */ + +Void lyricsParagraph() +{ + Char first[256], w[256]; + paragraph_index0 l, line; + other_index0 i; + other_index0 nother = 0; + Char other_[10][lyrtaglength + 1]; + boolean numbered; + Char STR1[256], STR3[256]; + paragraph_index0 FORLIM; + Char STR4[256]; + Char STR5[256]; + + if (!doLyrics()) + return; + NextWord(w, P[0], blank, dummy); + l = strlen(w); + line_no = orig_line_no[0]; + if (w[l-1] != '}') + strcat(w, "}"); + GetNextWord(first, w, dummy, '}'); + while (*w != '\0') { + if (w[0] == '=') + predelete(w, 1); + if (w[0] != '{') + sprintf(w, "{%s", strcpy(STR1, w)); + nother++; + GetNextWord(other_[nother-1], w, dummy, '}'); +/* p2c: lyrics.pas, line 122: + * Note: Possible string truncation in assignment [145] */ + } + if (beVerbose()) { + printf("---- Paragraph %d starting at line %d has lyrics headed %s", + paragraph_no, line_no, first); + for (i = 0; i <= nother - 1; i++) + printf("=%s", other_[i]); + putchar('\n'); + } + sprintf(STR5, "%c Paragraph %s line %s bar %s", + comment, toString(STR1, paragraph_no), toString(STR3, line_no), + toString(STR4, bar_no)); + tex3(STR5); + sprintf(STR3, "\\mtxSetLyrics%s{%%", first); + tex3(STR3); + FORLIM = para_len; + for (line = 2; line <= FORLIM; line++) { + lyrTranslate(P[line-1], &numbered); + if (numbered) { + if (line > 2) + warning("Verse number not in first line of paragraph treated as lyrics", + print); + else { + markNumbered(first); + for (i = 0; i <= nother - 1; i++) + markNumbered(other_[i]); + } + } + line_no = orig_line_no[line-1]; + if (strlen(P[line-1]) > max_lyrics_line_length && pmx_preamble_done) + error("Lyrics line too long", print); + if (pmx_preamble_done) { + if (line == 2) { + sprintf(STR3, "\\\\\\:%s", P[line-1]); + put(STR3, putspace); + } else { + sprintf(STR3, "\\\\\\ %s", P[line-1]); + put(STR3, putspace); + } + } else + put(P[line-1], putspace); + if (line < para_len) { + if (pmx_preamble_done) + putLine(" %\\"); + else + putLine(" %"); + } else if (pmx_preamble_done) + putLine("}\\"); + else + putLine("}"); + } + for (i = 0; i <= nother - 1; i++) { + sprintf(STR1, "\\mtxCopyLyrics%s%s", first, other_[i]); + tex3(STR1); + } +} + + +Static Char *songraise(Result, voice) +Char *Result; +voice_index voice; +{ + Char s[256]; + lyrtagtype *WITH; + lyrinfotype *WITH1; + Char STR1[256], STR3[256]; + + WITH = &tag[voice-1]; + WITH1 = &lyrinfo[voice-1]; + if (WITH->initialized == virgin && WITH1->lyr_adjust == 0) + return strcpy(Result, ""); + else { + if (WITH->auxiliary == aux) + strcpy(s, "Aux"); + else + *s = '\0'; + sprintf(Result, "\\mtx%sLyricsAdjust{%s}{%s}", + s, toString(STR1, PMXinstr(voiceStave(voice))), + toString(STR3, WITH1->lyr_adjust)); + return Result; + } +} + + +Char *lyricsReport(Result, voice) +Char *Result; +voice_index voice; +{ + Char l[256]; + lyrtagtype *WITH; + + WITH = &tag[voice-1]; + if (WITH->has_lyrics == nolyr || + WITH->lyrsource == none_given && *WITH->tags == '\0') + return strcpy(Result, " but has no own lyrics"); + else { + strcpy(l, " with "); + if (WITH->auxiliary == aux) + strcat(l, "auxiliary "); + strcat(l, "lyrics "); + if (WITH->lyrsource == local_lyrics) + strcat(l, "locally defined as \""); + else + strcat(l, "labelled \""); + sprintf(l + strlen(l), "%s\"", WITH->tags); + if (anyTagNumbered(WITH->tags)) + strcat(l, " with verse numbers"); + return strcpy(Result, l); + } +} + + +Void initLyrics() +{ + /* at the start only */ + stave_index stave; + voice_index voice, FORLIM; + lyrinfotype *WITH; + lyrtagtype *WITH1; + stave_index FORLIM1; + + FORLIM = nvoices; + for (voice = 0; voice <= FORLIM - 1; voice++) { + WITH = &lyrinfo[voice]; + WITH1 = &tag[voice]; + WITH1->has_lyrics = nolyr; + WITH->lyr_adjust = lyr_adjust_undef; + *WITH->melisma = '\0'; + WITH->slur_level = 0; + WITH->beam_level = 0; + WITH1->auxiliary = aux; + WITH1->lyrsource = none_given; + WITH1->new_assign = asbefore; + WITH1->initialized = virgin; + } + FORLIM1 = nstaves; + for (stave = 0; stave <= FORLIM1 - 1; stave++) + oldlyrmodealter[stave] = false; +} + + +Static Void registerLyrics(voice, w) +voice_index voice; +Char *w; +{ + lyrtagtype *WITH; + + WITH = &tag[voice-1]; + strcpy(oldtag[voice-1].tags, WITH->tags); + oldtag[voice-1].lyrsource = WITH->lyrsource; + WITH->lyrsource = global_lyrics; + switch (strlen(w)) { + + case 0: + *WITH->tags = '\0'; + break; + + case 1: + fatalerror("M-Tx system error in registerLyrics"); + break; + + default: + strcpy(WITH->tags, w); + break; + } +} + + +Void extractLyrtag(voice, note) +voice_index voice; +Char *note; +{ + /* inline lyrics change */ + lyrtagtype *WITH; + Char STR1[256], STR2[256]; + + WITH = &tag[voice-1]; + if (WITH->has_lyrics == nolyr) { + error3(voice, "Inline lyrics change on no-lyrics line"); + return; + } + registerLyrics(voice, note); /* was: ''); */ + sprintf(note, "\\mtxAssignLyrics{%s}%s", + toString(STR1, PMXinstr(voiceStave(voice))), strcpy(STR2, note)); + if (WITH->auxiliary == aux) + sprintf(note, "\\mtxAuxLyr{%s}\\", strcpy(STR2, note)); + else + strcat(note, "\\"); +} + + +Void clearTags() +{ + /* at start of paragraph analyis */ + voice_index voice, FORLIM; + lyrtagtype *WITH; + + memcpy(oldtag, tag, maxvoices * sizeof(lyrtagtype)); + FORLIM = nvoices; + for (voice = 0; voice <= FORLIM - 1; voice++) { + WITH = &tag[voice]; + WITH->lyrsource = none_given; + *WITH->tags = '\0'; + WITH->linecount = 0; + } +} + + +#define maxlyrlen (PMXlinelength - 15) + + +Local Void convertlyrics(lyn, voice, mx) +Char *lyn; +voice_index voice; +auxtype mx; +{ + static Char setlyr[256] = "%%\\\\\\mtxSetLyrics"; + Char btag[256], thistag[256], w[256]; + boolean numbered; + Char STR1[256]; + lyrtagtype *WITH; + Char STR2[256]; + + NextWord(w, lyn, blank, dummy); + WITH = &tag[voice-1]; + if (*w == '\0') { + *WITH->tags = '\0'; + return; + } + WITH->has_lyrics = haslyr; + WITH->auxiliary = mx; + if (w[0] == '{') { + registerLyrics(voice, w); + return; + } + WITH->lyrsource = local_lyrics; + WITH->linecount++; + toString(thistag, voice * 10 + WITH->linecount); + sprintf(btag, "{%s}", thistag); + if (*WITH->tags == '\0') + strcpy(WITH->tags, btag); + else { + WITH->tags[strlen(WITH->tags) - 1] = ','; + sprintf(WITH->tags + strlen(WITH->tags), "%s}", thistag); + } + trim(lyn); + lyrTranslate(lyn, &numbered); + if (numbered) + markNumbered(thistag); + if (strlen(lyn) + strlen(btag) > maxlyrlen) + sprintf(lyn, "%s%s{\\\n\\\\\\:%s}\\", setlyr, btag, strcpy(STR2, lyn)); + else + sprintf(lyn, "%s%s{%s}\\", setlyr, btag, strcpy(STR1, lyn)); +} + +#undef maxlyrlen + + +Void maybeLyrics(voice, parline, w_) +voice_index voice; +paragraph_index parline; +Char *w_; +{ + /* during paragraph analysis, parline had L:, already stripped */ + Char w[256]; + voice_index0 k; + + /** Labelled lyrics line -- */ + strcpy(w, w_); + if (!doLyrics()) + return; + if (strlen(w) == 1 && voice == 0) + warning("Lyrics line above top voice should be labelled", print); + if (strlen(w) == 1) { /** Standard lyrics line -------- */ + k = voice; + if (k == 0) + k = 1; + convertlyrics(P[parline-1], k, normal); + return; + } + predelete(w, 1); + k = findVoice(w); + if (k == 0) + error("Lyrics line belongs to unknown voice", print); + else + convertlyrics(P[parline-1], k, aux); +} + + +Void reviseLyrics() +{ + /* after paragraph analysis */ + voice_index voice; + stave_index stave; + voice_index FORLIM; + lyrtagtype *WITH; + stave_index FORLIM1; + + FORLIM = nvoices; + for (voice = 0; voice <= FORLIM - 1; voice++) { + WITH = &tag[voice]; + if (oldtag[voice].lyrsource == global_lyrics && + WITH->lyrsource == none_given) { + strcpy(WITH->tags, oldtag[voice].tags); + WITH->lyrsource = global_lyrics; + } + WITH->new_assign = (assigntype)(WITH->has_lyrics == haslyr && + strcmp(WITH->tags, oldtag[voice].tags)); + if (*WITH->tags == '\0') + WITH->has_lyrics = nolyr; + strcpy(oldtag[voice].tags, WITH->tags); + oldtag[voice].lyrsource = WITH->lyrsource; + } + FORLIM1 = nstaves; + for (stave = 1; stave <= FORLIM1; stave++) { + WITH = &tag[first_on_stave[stave-1] - 1]; + lyrmodealter[stave-1] = (!aloneOnStave(stave) && + WITH->has_lyrics == haslyr && + WITH->auxiliary == normal); + } +} + + +Void assignLyrics(stave, lyrassign) +stave_index stave; +Char *lyrassign; +{ + /* at start of new block */ + Char atag[256], instr[256], l[256]; + voice_index v1, v2, voice; + lyrtagtype *WITH; + Char STR2[256]; + lyrinfotype *WITH1; + + *lyrassign = '\0'; + toString(instr, PMXinstr(stave)); + v1 = first_on_stave[stave-1]; + v2 = v1 + number_on_stave[stave-1] - 1; + /* don't reassign if other voice takes over */ + if (tag[v1-1].auxiliary == tag[v2-1].auxiliary && + tag[v1-1].has_lyrics != tag[v2-1].has_lyrics) { + for (voice = v1 - 1; voice <= v2 - 1; voice++) { + WITH = &tag[voice]; + if (WITH->new_assign == newassign) + WITH->new_assign = (assigntype)WITH->has_lyrics; + } + } + for (voice = v1 - 1; voice <= v2 - 1; voice++) + lyrinfo[voice].numbered = false; + for (voice = v1; voice <= v2; voice++) { + WITH = &tag[voice-1]; + if (WITH->new_assign == newassign) { + strcpy(atag, WITH->tags); + if (*atag == '\0') + strcpy(atag, "{}"); + sprintf(l, "\\mtxAssignLyrics{%s}%s", instr, atag); + if (WITH->auxiliary == aux) + sprintf(l, "\\mtxAuxLyr{%s}", strcpy(STR2, l)); + strcat(lyrassign, l); + if (*WITH->tags == '\0') + WITH->has_lyrics = nolyr; + if (WITH->has_lyrics == haslyr && WITH->initialized == virgin) { + WITH1 = &lyrinfo[voice-1]; + if (WITH->auxiliary == aux && upper(voice)) + WITH1->lyr_adjust = interstave; + else + WITH1->lyr_adjust = 0; + strcat(lyrassign, songraise(STR2, voice)); + WITH->initialized = active; + } + if (anyTagNumbered(atag)) + lyrinfo[voice-1].numbered = true; + } + } + if (lyrmodealter[stave-1] == oldlyrmodealter[stave-1]) + return; + if (lyrmodealter[stave-1]) + sprintf(lyrassign + strlen(lyrassign), "\\mtxLyrModeAlter{%s}", instr); + else + sprintf(lyrassign + strlen(lyrassign), "\\mtxLyrModeNormal{%s}", instr); + oldlyrmodealter[stave-1] = lyrmodealter[stave-1]; +} + + +Void lyricsAdjust(voice, note) +voice_index voice; +Char *note; +{ + /* inline at-word */ + short adj; + boolean force, put_above, put_below; + lyrinfotype *WITH; + lyrtagtype *WITH1; + Char STR2[256]; + + WITH = &lyrinfo[voice-1]; + WITH1 = &tag[voice-1]; + predelete(note, 1); + force = (note[0] == '='); + if (force) + predelete(note, 1); + put_above = (note[0] == '^'); + if (put_above) + predelete(note, 1); + put_below = (note[0] == 'v'); + if (put_below) + predelete(note, 1); + if (*note != '\0') + getNum(note, &adj); + else + adj = 0; + if (WITH1->has_lyrics == nolyr) { + *note = '\0'; + return; + } + if (put_above) + WITH->lyr_adjust = interstave; + else if (put_below) + WITH->lyr_adjust = 0; + if (force) + WITH->lyr_adjust = adj; + else + WITH->lyr_adjust += adj; + songraise(note, voice); + if (*note != '\0') + sprintf(note, "\\\\%s\\", strcpy(STR2, note)); +} + + +Void lyrTranslate(P, numbered) +Char *P; +boolean *numbered; +{ /* Test for starting number */ + short k, l, number; + Char Q[256], w[256]; + + NextWord(w, P, blank, dummy); + *numbered = false; + if (endsWith(w, ".")) { + getNum(w, &number); + *numbered = (number != 0); + } + /*Translate lyrics link */ + *Q = '\0'; + l = strlen(P); + for (k = 1; k <= l - 1; k++) { + if (P[k-1] != '_' || P[k] == '_' || P[k] == ' ' || pos1(P[k], digits) > 0) + sprintf(Q + strlen(Q), "%c", P[k-1]); + else if (k > 1 && P[k-2] == '\\') + strcat(Q, "mtxLowLyrlink "); + else + strcat(Q, "\\mtxLyrlink "); + } + sprintf(Q + strlen(Q), "%c", P[l-1]); + strcpy(P, Q); +} + + +typedef enum { + beam, slur +} melismaEnd; + + +Static Char removeLast(s, t) +Char *s; +Char *t; +{ + Char Result; + short i, l; + + l = strlen(s); + for (i = l; i >= 1; i--) { + if (pos1(s[i-1], t) > 0) { + Result = s[i-1]; + delete1(s, i); + return Result; + } + } + return dummy; +} + + +Static boolean OpenMelisma(s) +Char *s; +{ + return (pos1(slur_melisma, s) > 0 || pos1(beam_melisma, s) > 0); +} + + +/* Local variables for getSyllable: */ +struct LOC_getSyllable { + voice_index voice; + boolean BM, EM; +} ; + +Local Void startMelismas(t, LINK) +Char *t; +struct LOC_getSyllable *LINK; +{ + boolean open_before, open_now; + short i, k; + lyrinfotype *WITH; + + k = strlen(t); + for (i = 0; i <= k - 1; i++) { + WITH = &lyrinfo[LINK->voice-1]; + open_before = OpenMelisma(WITH->melisma); + sprintf(WITH->melisma + strlen(WITH->melisma), "%c", t[i]); + open_now = OpenMelisma(WITH->melisma); + LINK->BM = (LINK->BM || open_now && !open_before); + } +} + +Local boolean endMelisma(voice, LINK) +short voice; +struct LOC_getSyllable *LINK; +{ + Char found; + short i; + short count[2]; + melismaEnd t; + short FORLIM1; + lyrinfotype *WITH; + Char STR1[4]; + + LINK->EM = false; + count[(long)slur] = -lyrinfo[voice-1].slur_change; + count[(long)beam] = -lyrinfo[voice-1].beam_change; + for (t = beam; (long)t <= (long)slur; t = (melismaEnd)((long)t + 1)) { + FORLIM1 = count[(long)t]; + for (i = 1; i <= FORLIM1; i++) { + WITH = &lyrinfo[voice-1]; + switch (t) { + + case slur: + sprintf(STR1, "%c%c", slur_melisma, inhibit_slur_melisma); + found = removeLast(WITH->melisma, STR1); + break; + + case beam: + sprintf(STR1, "%c%c", beam_melisma, inhibit_beam_melisma); + found = removeLast(WITH->melisma, STR1); + break; + } + if (found == dummy) + error3(voice, "Ending a melisma that was never started"); + LINK->EM = (LINK->EM || + (!OpenMelisma(WITH->melisma) && + pos1(found, (sprintf(STR1, "%c%c", slur_melisma, beam_melisma), + STR1)) > 0)); + } + } + return LINK->EM; +} + +Local Void startSlurMelisma(voice, LINK) +voice_index voice; +struct LOC_getSyllable *LINK; +{ + static Char start[2] = { + slur_melisma, inhibit_slur_melisma + }; + + Char slurs[256]; + short k, FORLIM; + Char STR1[256]; + + *slurs = '\0'; + FORLIM = lyrinfo[voice-1].slur_change; + for (k = 1; k <= FORLIM; k++) + sprintf(slurs, "%c%s", + start[noSlurMelisma(voice, 1 - k)], strcpy(STR1, slurs)); + startMelismas(slurs, LINK); +} + +Local Void startBeamMelisma(voice, LINK) +voice_index voice; +struct LOC_getSyllable *LINK; +{ + static Char start[2] = { + beam_melisma, inhibit_beam_melisma + }; + + Char beams[256]; + short k, FORLIM; + Char STR1[256]; + + *beams = '\0'; + FORLIM = lyrinfo[voice-1].beam_change; + for (k = 1; k <= FORLIM; k++) + sprintf(beams, "%c%s", start[noBeamMelisma(voice)], strcpy(STR1, beams)); + startMelismas(beams, LINK); +} + +Local boolean startMelisma(voice, LINK) +short voice; +struct LOC_getSyllable *LINK; +{ + LINK->BM = false; + startSlurMelisma(voice, LINK); + startBeamMelisma(voice, LINK); + return LINK->BM; +} + + +/* Append mtxBM or mtxEM to pretex when appropriate */ +Void getSyllable(voice_, pretex) +voice_index voice_; +Char *pretex; +{ + struct LOC_getSyllable V; + short t; + lyrtagtype *WITH; + lyrinfotype *WITH1; + + V.voice = voice_; + WITH = &tag[V.voice-1]; + WITH1 = &lyrinfo[V.voice-1]; + if (WITH->has_lyrics != haslyr) + return; + t = WITH1->slur_level; + WITH1->slur_level = slurLevel(V.voice); + WITH1->slur_change = WITH1->slur_level - t; + t = WITH1->beam_level; + WITH1->beam_level = beamLevel(V.voice); + WITH1->beam_change = WITH1->beam_level - t; + if (startMelisma(V.voice, &V)) { + if (WITH->auxiliary == aux) + strcat(pretex, "\\mtxAuxBM"); + else + strcat(pretex, "\\mtxBM"); + } + if (!endMelisma(V.voice, &V)) + return; + if (WITH->auxiliary == aux) + strcat(pretex, "\\mtxAuxEM"); + else + strcat(pretex, "\\mtxEM"); +} + + +Static Void getSyllable1(voice, pretex) +voice_index voice; +Char *pretex; +{ + lyrinfotype *WITH; + + WITH = &lyrinfo[voice-1]; + printf("voice=%d, slurchange=%d, melisma=%s, beamchange=%d\n", + voice, WITH->slur_change, WITH->melisma, WITH->beam_change); + getSyllable1(voice, pretex); + if (*pretex != '\0') + printf("pretex = %s\n", pretex); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/lyrics.h b/Build/source/utils/m-tx/mtx-0.60d/lyrics.h new file mode 100644 index 00000000000..f225cb0d760 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/lyrics.h @@ -0,0 +1,37 @@ +/* Header for module lyrics, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef LYRICS_H +#define LYRICS_H + + +/* Everything related to lyrics */ + +#ifndef GLOBALS_H +#include "globals.h" +#endif + + +#ifdef LYRICS_G +# define vextern +#else +# define vextern extern +#endif + +extern Void initLyrics PV(); +extern Void clearTags PV(); +extern Void reviseLyrics PV(); +extern Void lyrTranslate PP((Char *P, boolean *numbered)); +extern Void getSyllable PP((int voice, Char *pretex)); +extern Char *lyricsReport PP((Char *Result, int voice)); +extern Void maybeLyrics PP((int voice, int parline, Char *w)); +extern Void extractLyrtag PP((int voice, Char *note)); +extern Void lyricsAdjust PP((int voice, Char *note)); +extern Void assignLyrics PP((int stave, Char *lyrassign)); +extern Void lyricsParagraph PV(); +extern boolean hasVerseNumber PP((int voice)); + + +#undef vextern + +#endif /*LYRICS_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/lyrics.pas b/Build/source/utils/m-tx/mtx-0.60d/lyrics.pas new file mode 100644 index 00000000000..14d7f5046eb --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/lyrics.pas @@ -0,0 +1,455 @@ +unit lyrics; +{ Everything related to lyrics } + +interface uses globals; + +procedure initLyrics; +procedure clearTags; +procedure reviseLyrics; +procedure lyrTranslate(var P: string; var numbered: boolean); +procedure getSyllable(voice: voice_index; var pretex: string); +function lyricsReport (voice: voice_index): string; +procedure maybeLyrics (voice: voice_index; parline: paragraph_index; + w: string); +procedure extractLyrtag (voice: voice_index; var note: string); +procedure lyricsAdjust (voice: voice_index; var note: string); +procedure assignLyrics(stave: stave_index; var lyrassign: string); +procedure lyricsParagraph; +function hasVerseNumber(voice: voice_index): boolean; + +implementation uses control, strings, mtxline, status, files, utility; + +{ Symbols used in strings of melismatype } +const + beam_melisma = '['; + inhibit_beam_melisma = '<'; + slur_melisma = '('; + inhibit_slur_melisma = '{'; + +type + other_index = 1..10; + other_index0 = 0..10; + melismatype = string; + haslyrtype = (nolyr, haslyr); + auxtype= (normal, aux); + assigntype = (asbefore, newassign); + inittype = (virgin,active); + lyrinfotype = record + lyr_adjust, slur_level, slur_change, beam_level, beam_change: integer; + melisma: melismatype; + numbered: boolean; + end; + + lyrlinetype = (none_given, global_lyrics, local_lyrics); + lyrtagtype = record + lyrsource: lyrlinetype; + has_lyrics: haslyrtype; + auxiliary: auxtype; + new_assign: assigntype; + initialized: inittype; + linecount: integer; + tags: string; + end; + +const maxLyrNums=64; + lyrtaglength=40; + LyrNum: integer=0; + +var lyrmodealter, oldlyrmodealter: array[stave_index] of boolean; + tag, oldtag: array[voice_index] of lyrtagtype; + lyrinfo: array[voice_index] of lyrinfotype; + numberedParagraph: array[1..maxLyrNums] of string[lyrtaglength]; + +const lyr_adjust_undef = -12345; + interstave = 24; + +{ Information flow for verse numbers: at the SetLyrics stage, the first +line of each lyrics paragraph is checked for a verse number, and if +found, the paragraph tag is remembered. At the AssignLyrics stage, +the first time that paragraph is encountered, the particular voice +is marked in lyrinfo as being numbered. When that voice is later processed, +the mark in lyrinfo is interrogated and turned off: if it was on, the +mtxVerse pre-TeX string is put into the output. } + +function hasVerseNumber(voice: voice_index): boolean; +begin hasVerseNumber:=lyrinfo[voice].numbered; + lyrinfo[voice].numbered:=false; +end; + +function isNumberedLyricsParagraph(tag: string): boolean; + var i: integer; +begin + for i:=1 to LyrNum do if tag=numberedParagraph[i] then + begin isNumberedLyricsParagraph:=true; exit; end; + isNumberedLyricsParagraph:=false; +end; + +function anyTagNumbered(tags: string): boolean; + var s: string; +begin anyTagNumbered:=false; + if curtail(tags,'}')>0 then delete1(tags,1); + repeat s:=getNextWord(tags,',',dummy); + if s='' then exit; + if isNumberedLyricsParagraph(s) then + begin anyTagNumbered:=true; exit; end; + until false; +end; + +{ Save the tag in the numberedParagraph list, stripping off braces if any } +procedure markNumbered(tag: string); +begin if LyrNum >= maxLyrNums then + begin error('Too many numbered lines in the lyrics',not print); exit; end; + inc(LyrNum); + if curtail(tag,'}')>0 then delete1(tag,1); + numberedParagraph[LyrNum] := tag; +end; + +{ --- end of procedures to keep track of verse numbering --- } + +procedure lyricsParagraph; + var first, w: string; + l, line: paragraph_index0; + i, nother: other_index0; + other: array[other_index] of string[lyrtaglength]; + numbered: boolean; +begin if not doLyrics then exit; + w:=NextWord(P[1],blank,dummy); l:=length(w); line_no := orig_line_no[1]; + if w[l]<>'}' then w:=w+'}'; + first:=GetNextWord(w,dummy,'}'); nother:=0; + while w<>'' do + begin if w[1]='=' then predelete(w,1); + if w[1]<>'{' then w:='{'+w; + inc(nother); other[nother]:=GetNextWord(w,dummy,'}'); + end; + if beVerbose then + begin write('---- Paragraph ', paragraph_no, ' starting at line ', line_no, + ' has lyrics headed ',first); + for i:=1 to nother do write('=',other[i]); writeln; + end; + tex3(comment+' Paragraph '+toString(paragraph_no)+' line '+ + toString(line_no)+' bar '+toString(bar_no)); + tex3('\mtxSetLyrics'+first+'{%'); + for line:=2 to para_len do + begin lyrTranslate(P[line],numbered); + if numbered then if (line>2) then warning( + 'Verse number not in first line of paragraph treated as lyrics',print) + else + begin markNumbered(first); for i:=1 to nother do markNumbered(other[i]); + end; + line_no:=orig_line_no[line]; + if (length(P[line])>max_lyrics_line_length) and pmx_preamble_done + then error('Lyrics line too long',print); + if pmx_preamble_done then + if line=2 then put('\\\:'+P[line],putspace) + else put('\\\ ' + P[line],putspace) + else put(P[line],putspace); + if linemaxlyrlen then + lyn := setlyr + btag + '{\'^J'\\\:' + lyn +'}\' + else lyn:= setlyr + btag + '{' + lyn +'}\'; + end; + end; + end; + end; +begin if not dolyrics then exit; + if (length(w)=1) and (voice=0) then + warning('Lyrics line above top voice should be labelled',print); + if length(w)=1 then {* Standard lyrics line -------- } + begin k:=voice; if k=0 then k:=1; convertlyrics(P[parline],k,normal); + end + else {* Labelled lyrics line -- } + begin predelete(w,1); k:=findVoice(w); + if k=0 then error('Lyrics line belongs to unknown voice',print) + else convertlyrics(P[parline],k,aux); + end; +end; + +procedure reviseLyrics; { after paragraph analysis } + var voice : voice_index; + stave : stave_index; +begin + for voice:=1 to nvoices do with tag[voice] do + begin if (oldtag[voice].lyrsource=global_lyrics) and + (lyrsource=none_given) then + begin tags:=oldtag[voice].tags; lyrsource:=global_lyrics; end; + new_assign := + assigntype(ord((has_lyrics=haslyr) and (tags<>oldtag[voice].tags))); + if tags='' then has_lyrics := nolyr; + oldtag[voice].tags := tags; + oldtag[voice].lyrsource := lyrsource; + end; + for stave:=1 to nstaves do with tag[first_on_stave[stave]] do + lyrmodealter[stave] := not aloneOnStave(stave) and + (has_lyrics=haslyr) and (auxiliary=normal); +end; + +procedure assignLyrics(stave: stave_index; var lyrassign: string); + { at start of new block } + var atag, instr, l: string; + v1, v2, voice: voice_index; + begin lyrassign:=''; instr := toString(pmxinstr(stave)); + v1:=first_on_stave[stave]; v2:=v1+number_on_stave[stave]-1; + if v1tag[v2].has_lyrics) then + for voice:=v1 to v2 do with tag[voice] do + if new_assign=newassign then new_assign:=assigntype(has_lyrics); + for voice:=v1 to v2 do lyrinfo[voice].numbered:=false; + for voice:=v1 to v2 do + with tag[voice] do if new_assign=newassign then + begin atag:=tags; if atag='' then atag:='{}'; + l := '\mtxAssignLyrics{' + instr + '}' + atag; + if auxiliary=aux then l:='\mtxAuxLyr{' + l + '}'; + lyrassign := lyrassign + l; + if tags='' then has_lyrics:=nolyr; + if (has_lyrics=haslyr) and (initialized=virgin) then + with lyrinfo[voice] do + begin if (auxiliary=aux) and upper(voice) then + lyr_adjust:=interstave else lyr_adjust:=0; + lyrassign := lyrassign + songraise(voice); + initialized := active; + end; + if anyTagNumbered(atag) then lyrinfo[voice].numbered:=true; + end; + if lyrmodealter[stave]<>oldlyrmodealter[stave] then + begin if lyrmodealter[stave] then + lyrassign := lyrassign + '\mtxLyrModeAlter{' + instr + '}' + else lyrassign := lyrassign + '\mtxLyrModeNormal{' + instr + '}'; + oldlyrmodealter[stave] := lyrmodealter[stave]; + end; + end; + +procedure lyricsAdjust (voice: voice_index; var note: string); + { inline at-word } + var adj: integer; + force, put_above, put_below: boolean; +begin with lyrinfo[voice] do with tag[voice] do + begin predelete(note,1); + force:=note[1]='='; if force then predelete(note,1); + put_above:=note[1]='^'; if put_above then predelete(note,1); + put_below:=note[1]='v'; if put_below then predelete(note,1); + if note<>'' then getNum(note,adj) else adj:=0; + if has_lyrics=nolyr then begin note:=''; exit; end; + if put_above then lyr_adjust:=interstave + else if put_below then lyr_adjust:=0; + if force then lyr_adjust:=adj else inc(lyr_adjust,adj); + note:=songraise(voice); if note<>'' then note:='\\'+note+'\'; + end +end; + +procedure lyrTranslate(var P: string; var numbered: boolean); + var k, l, number: integer; + Q, w: string; +begin { Test for starting number } w:=NextWord(P,blank,dummy); + numbered:=false; + if endsWith(w,'.') then begin getNum(w,number); numbered:=number<>0 end; + {Translate lyrics link } Q := ''; l:=length(P); + for k:=1 to l-1 do + if (P[k]<>'_') or (P[k+1]='_') or (P[k+1]=' ') or (pos1(P[k+1],digits)>0) + then Q := Q+P[k] + else if (k>1) and (P[k-1]='\') then Q := Q+'mtxLowLyrlink ' + else Q := Q+'\mtxLyrlink '; + Q:=Q+P[l]; + P := Q; +end; + +type melismaEnd = (beam, slur); + +function removeLast(var s: string; t: string): char; + var i,l: integer; +begin l:=length(s); + for i:=l downto 1 do if pos1(s[i],t)>0 then + begin removeLast:=s[i]; delete1(s,i); exit; end; + removeLast := dummy; +end; + +function OpenMelisma(s: string): boolean; +begin OpenMelisma := (pos1(slur_melisma,s)>0) or (pos1(beam_melisma,s)>0); +end; + +{ Append mtxBM or mtxEM to pretex when appropriate } +procedure getSyllable(voice: voice_index; var pretex: string); + var BM, EM: boolean; + procedure startMelismas (t: string); + var open_before, open_now: boolean; + i, k: integer; + begin k:=length(t); + for i:=1 to k do with lyrinfo[voice] do + begin open_before := OpenMelisma(melisma); + melisma := melisma + t[i]; + open_now := OpenMelisma(melisma); + BM := BM or (open_now and not open_before) + end; + end; + function endMelisma(voice: integer): boolean; + var found: char; + i: integer; + count: array[melismaEnd] of integer; + t: melismaEnd; + begin EM := false; + count[slur] := -lyrinfo[voice].slur_change; + count[beam] := -lyrinfo[voice].beam_change; + for t:=beam to slur do for i:=1 to count[t] do with lyrinfo[voice] do + begin + case t of + slur: found := removeLast(melisma,slur_melisma+inhibit_slur_melisma); + beam: found := removeLast(melisma,beam_melisma+inhibit_beam_melisma); + end; + if found=dummy then + error3(voice,'Ending a melisma that was never started'); + EM := EM or (not openMelisma(melisma) + and (pos1(found,slur_melisma+beam_melisma)>0)) + end; + endMelisma := EM + end; + procedure startSlurMelisma(voice: voice_index); + const start: array[boolean] of char = (slur_melisma,inhibit_slur_melisma); + var slurs: string; + k: integer; + begin slurs:=''; + for k:=1 to lyrinfo[voice].slur_change do + slurs:=start[noSlurMelisma(voice,1-k)]+slurs; + startMelismas(slurs) + end; + procedure startBeamMelisma(voice: voice_index); + const start: array[boolean] of char = (beam_melisma,inhibit_beam_melisma); + var beams: string; + k: integer; + begin beams:=''; + for k:=1 to lyrinfo[voice].beam_change do + beams:=start[noBeamMelisma(voice)]+beams; + startMelismas(beams) + end; + function startMelisma(voice: integer): boolean; + begin BM:=false; startSlurMelisma(voice); startBeamMelisma(voice); + startMelisma := BM + end; + var t: integer; +begin with tag[voice] do with lyrinfo[voice] do + begin if has_lyrics<>haslyr then exit; + t:=slur_level; slur_level:=slurLevel(voice); slur_change:=slur_level-t; + t:=beam_level; beam_level:=beamLevel(voice); beam_change:=beam_level-t; + if startMelisma(voice) then if auxiliary=aux + then pretex:=pretex+'\mtxAuxBM' else pretex:=pretex+'\mtxBM'; + if endMelisma(voice) then if auxiliary=aux + then pretex:=pretex+'\mtxAuxEM' else pretex:=pretex+'\mtxEM' + end +end; + +procedure getSyllable1(voice: voice_index; var pretex: string); +begin with lyrinfo[voice] do + begin + writeln('voice=',voice, ', slurchange=',slur_change, + ', melisma=',melisma, ', beamchange=', beam_change) + end; + getSyllable1(voice,pretex); + if pretex<>'' then writeln('pretex = ',pretex) +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtx.c b/Build/source/utils/m-tx/mtx-0.60d/mtx.c new file mode 100644 index 00000000000..f4a85564092 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/mtx.c @@ -0,0 +1,505 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "mtx.pas" */ + + +#include "p2c.h" + + +#define MTX_G +#include "mtx.h" + + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef STATUS_H +#include "status.h" +#endif + +#ifndef NOTES_H +#include "notes.h" +#endif + + +#define flagged "8136" + + +typedef boolean sticky['z' + 1 - 'a']; + + +Static sticky note_attrib[maxvoices], rest_attrib[maxvoices]; + + +Static short logTwo(denom) +short denom; +{ + short l = 0; + + while (denom > 1) { + l++; + denom /= 2; + } + return l; +} + + +Local boolean dotted(n) +short n; +{ + boolean Result; + +/* p2c: mtx.pas: Note: Eliminated unused assignment statement [338] */ + if (n == 0) + return false; + if (n != n / 3 * 3) + return false; + n /= 3; + while ((n & 1) == 0) + n /= 2; + return (n == 1); +} + + +/* RESTS should have a third parameter OFFSET. At present we in effect + assume OFFSET+LENGTH to be a multiple of METERDENOM. */ +Char *rests(Result, len, meterdenom, blind) +Char *Result; +short len, meterdenom; +boolean blind; +{ + Char r[256], bl[256]; + Char STR1[256]; + + if (blind) + strcpy(bl, "b"); + else + *bl = '\0'; + if (len == 0) + return strcpy(Result, ""); + else { + if (len == meterdenom * 128) { + sprintf(Result, "r9%s ", bl); + return Result; + } else { + if (dotted(len)) { + rests(r, len - len / 3, meterdenom, false); + r[2] = 'd'; + sprintf(Result, "%s%s ", r, bl); + return Result; + } else if (len >= 64 / meterdenom) { + sprintf(Result, "%sr%c%s ", + rests(STR1, len - 64 / meterdenom, meterdenom, blind), + durations[whole + logTwo(meterdenom) - 1], bl); + return Result; + } else + return (rests(Result, len, meterdenom * 2, blind)); + } + } +} + + +Local Char *attribs(Result, note) +Char *Result; +Char *note; +{ + Char a[256]; + short i = 2; + short l; + Char n; + + *a = '\0'; + l = strlen(note); + while (i <= l) { + n = note[i-1]; + if (n == 'x') + i = l; + else if (islower(n)) + sprintf(a + strlen(a), "%c", n); + i++; + } + return strcpy(Result, a); +} + + +Static Void checkSticky(note, attrib) +Char *note; +boolean *attrib; +{ + short i = 2; + short l; + Char c; + Char a[256]; + + if (*note == '\0') + return; + l = strlen(note); + while (i <= l) { + c = note[i-1]; + if (islower(c)) { + if (i < l && note[i] == ':') { + delete1(note, i + 1); + l--; + attrib[c - 'a'] = !attrib[c - 'a']; + } else + attrib[c - 'a'] = false; + } + i++; + } + attribs(a, note); + for (c = 'z'; c >= 'a'; c--) { + if (attrib[c - 'a'] && pos1(c, a) == 0) + insertChar(c, note, 3); + } +} + + +/* Routine was patched by Hiroaki Morimoto, revised 2003/08/15. + Rewritten by DPL 2004/05/16 to be more understandable. + octaveCode returns octave adjustments in the order + [absolute or =],[relative] */ +Void checkOctave(voice, note) +voice_index voice; +Char *note; +{ + Char code; + + code = octaveCode(note); + if (code == '=') { + setOctave(voice); + removeOctaveCode(code, note); + } + if (octave(voice) == blank) + return; + code = octaveCode(note); + if (isdigit(code)) { + resetOctave(voice); + return; + } + while (code == '+' || code == '-') { + newOctave(voice, code); + removeOctaveCode(code, note); + code = octaveCode(note); + } + if (code != ' ') + error3(voice, "You may have only one absolute octave assignment"); + insertOctaveCode(octave(voice), note); + resetOctave(voice); +} + + +Void markDebeamed(voice, note) +voice_index voice; +Char *note; +{ + if (isVocal(voice) && afterSlur(voice) == 0 && unbeamVocal() && + pos1(duration(voice), flagged) > 0) + insertChar('a', note, 2); +} + + +Static short barLength(meter) +Char *meter; +{ + short n1, n2, pn1, pn2; + + getMeter(meter, &n1, &n2, &pn1, &pn2); + return (n1 * (64 / n2)); +} + + +Static boolean isMultiBarRest(rest_) +Char *rest_; +{ + boolean Result; + +/* p2c: mtx.pas: Note: Eliminated unused assignment statement [338] */ + if (strlen(rest_) < 3) + return false; + if (rest_[1] != 'm') + return false; + if (multi_bar_rest) + error("Only one multibar rest allowed per line", print); + multi_bar_rest = true; + return true; +} + + +/* Double-length in xtuplet detected by a brute search for D anywhere. + Could be more elegant. */ + +Static short macro_length[20]; + +Static Char macro_ID[20][3] = { + "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", + "15", "16", "17", "18", "19", "20" +}; + + +/* Local variables for scanMusic: */ +struct LOC_scanMusic { + voice_index voice; + Char note[256]; + boolean doublex, store_macro; + short bar, old_length, bar_length, count, l, mlen, ngrace, nmulti, macroID, + playID; + Char macro_type; +} ; + +Local Void decmulti(LINK) +struct LOC_scanMusic *LINK; +{ + if (LINK->doublex) + LINK->nmulti -= 2; + else + LINK->nmulti--; +} + +/* Local variables for countIt: */ +struct LOC_countIt { + struct LOC_scanMusic *LINK; +} ; + +Local Void incbar(nl, LINK) +short nl; +struct LOC_countIt *LINK; +{ + LINK->LINK->bar_length += nl; + if (LINK->LINK->bar_length > LINK->LINK->bar && meternum > 0) + error3(LINK->LINK->voice, "Bar end occurs in mid-note"); +} + +Local Void countIt(LINK) +struct LOC_scanMusic *LINK; +{ + struct LOC_countIt V; + + V.LINK = LINK; + if (LINK->ngrace > 0) { + LINK->ngrace--; + return; + } + if (LINK->nmulti > 0) { + decmulti(LINK); + return; + } + if (LINK->count % 3 != 0 && + (LINK->note[0] != rest && note_attrib[LINK->voice-1]['d' - 'a'] || + LINK->note[0] == rest && rest_attrib[LINK->voice-1]['d' - 'a'])) + LINK->count += LINK->count / 2; +/* p2c: mtx.pas, line 148: + * Note: Using % for possibly-negative arguments [317] */ + incbar(LINK->count, &V); + LINK->l = pos1(multi_group, LINK->note); + if (LINK->l <= 0) + return; + predelete(LINK->note, LINK->l); + getNum(LINK->note, &LINK->nmulti); + decmulti(LINK); +} + +Local Void maybeGroup(LINK) +struct LOC_scanMusic *LINK; +{ + if (LINK->note[0] != grace_group) + return; + if (strlen(LINK->note) == 1) + LINK->ngrace = 1; + else + LINK->ngrace = pos1(LINK->note[1], digits); + /* bug if ngrace>9 */ + if (LINK->ngrace > 0) + LINK->ngrace--; +} + +Local short identifyMacro(s_, LINK) +Char *s_; +struct LOC_scanMusic *LINK; +{ + Char s[256]; + short k; + + strcpy(s, s_); + predelete(s, 2); + for (k = 1; k <= 20; k++) { + if (!strcmp(s, macro_ID[k-1])) + return k; + } + return 0; +} + +Local Void examineMacro(LINK) +struct LOC_scanMusic *LINK; +{ + if (!countMacro()) + return; + if (debugMode()) + printf("%s: ", LINK->note); + if (strlen(LINK->note) == 1) { + LINK->mlen = LINK->bar_length - LINK->old_length; + if (LINK->macroID < 1 || LINK->macroID > 20) + error3(LINK->voice, "Invalid macro ID"); + macro_length[LINK->macroID-1] = LINK->mlen; + if (debugMode()) + printf("Ending macro %d of type %c, length=%d\n", + LINK->macroID, LINK->macro_type, LINK->mlen); + if (LINK->macro_type == 'S') + LINK->bar_length = LINK->old_length; + LINK->store_macro = false; + return; + } + LINK->playID = identifyMacro(LINK->note, LINK); + if (LINK->playID < 1 || LINK->playID > 20) + error3(LINK->voice, "Invalid macro ID"); + if (LINK->note[1] == 'P') { + if (debugMode()) + printf("Playing macro %d of length %d\n", + LINK->playID, macro_length[LINK->playID-1]); + LINK->bar_length += macro_length[LINK->playID-1]; + return; + } + if (pos1(LINK->note[1], "SR") <= 0) + return; + LINK->old_length = LINK->bar_length; + LINK->macro_type = LINK->note[1]; + LINK->macroID = LINK->playID; + LINK->store_macro = true; + if (debugMode()) + printf("Defining macro %d of type %c\n", LINK->macroID, LINK->note[1]); +} + + +Void scanMusic(voice_, left_over) +voice_index voice_; +short *left_over; +{ + struct LOC_scanMusic V; + Char buf[256], enote[256], xnote[256]; + boolean has_next = false, done = false; + Char dur1, lastdur; + music_word nscan; + Char STR1[256]; + + V.voice = voice_; + strcpy(terminators, "d.x"); + resetInfo(V.voice, buf); + *left_over = 0; + V.store_macro = false; + V.bar = full_bar; + V.bar_length = 0; + V.ngrace = 0; + V.nmulti = 0; + if (meternum == 0) + V.bar = 32000; + dur1 = duration(V.voice); + lastdur = dur1; + do { + getNextMusWord(buf, V.note, &nscan); + if (*V.note == '\0') + break; + V.count = 0; + /* if isNoteOrRest(note) and not (isPause(note) or isMultibarRest(note)) + then note:=toStandard(note); */ + V.doublex = (pos1('D', V.note) > 0); + if (nscan == mword) { + if (*V.note == '\0') + error3(V.voice, "You may not end a line with a meter change"); + if (V.bar_length > 0) + error3(V.voice, "Meter change only allowed at start of bar"); + else + V.bar = barLength(V.note); + } else if (nscan == rword) { + if (!(isPause(V.note) || isMultiBarRest(V.note))) { + processNote(V.note, xnote, dur1, &lastdur, &V.count); + checkSticky(V.note, rest_attrib[V.voice-1]); + } + } + if (*V.note != '\0') + appendNote(V.voice, nscan); + strcpy(enote, V.note); + if (nscan == macro || nscan == endmacro) + examineMacro(&V); + if (nscan == abcdefg) { + if (!multi_bar_rest && V.ngrace + V.nmulti == 0) { + processNote(enote, xnote, dur1, &lastdur, &V.count); + if (*xnote != '\0') { + checkSticky(enote, note_attrib[V.voice-1]); + appendToLine(V.voice, enote); + appendNote(V.voice, nscan); + strcpy(enote, xnote); + } + checkSticky(enote, note_attrib[V.voice-1]); + } + } + appendToLine(V.voice, enote); + if (*V.note == '\0') /* !!! else word_bound[here]:=length(line); */ + done = true; + sprintf(STR1, "%c", barsym); + if (!strcmp(V.note, STR1)) { + if (meternum == 0) + error3(V.voice, "You may not use bar lines in barless music"); + else if (V.bar_length == 0) + markBar(V.voice); + else if (numberOfBars(V.voice) == 0 && V.bar_length < V.bar) { + if (has_next) + has_next = false; /*Should check whether pickups are equal*/ + else if (*left_over > 0) + error3(V.voice, "Bar is too short"); + *left_over = V.bar_length; + V.bar_length = 0; + } + } + if (nscan == nextvoice) { + if (V.bar_length > 0) + error3(V.voice, "Next voice before bar is full"); + else + barForward(V.voice, -1); + has_next = true; + } else if (isPause(V.note)) + V.bar_length += V.bar; + else if (!multi_bar_rest) { /*do nothing*/ + if (!done && isNoteOrRest(V.note)) + countIt(&V); + else + maybeGroup(&V); + } + dur1 = lastdur; + if (V.bar_length >= V.bar && V.ngrace + V.nmulti == 0 && !V.store_macro) { + if (debugMode()) + printf("%d %d\n", V.voice, V.bar_length); + barForward(V.voice, V.bar_length / V.bar); + V.bar_length %= V.bar; +/* p2c: mtx.pas, line 266: + * Note: Using % for possibly-negative arguments [317] */ + } + } while (!done); + setExtraLength(V.voice, V.bar_length); + resetDuration(V.voice, dur1); + regroup(V.voice); +} + + +Void initMTX() +{ + voice_index i; + Char j; + + for (i = 0; i <= maxvoices - 1; i++) { + for (j = 'a'; j <= 'z'; j++) + note_attrib[i][j - 'a'] = false; + } + memcpy(rest_attrib, note_attrib, maxvoices * sizeof(sticky)); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtx.h b/Build/source/utils/m-tx/mtx-0.60d/mtx.h new file mode 100644 index 00000000000..9c4a9811883 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/mtx.h @@ -0,0 +1,30 @@ +/* Header for module mtx, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef MTX_H +#define MTX_H + + +/* Details of M-Tx -> PMX translation */ + +#ifndef GLOBALS_H +#include "globals.h" +#endif + + +#ifdef MTX_G +# define vextern +#else +# define vextern extern +#endif + +extern Void scanMusic PP((int voice, short *left_over)); +extern Void markDebeamed PP((int voice, Char *note)); +extern Void checkOctave PP((int voice, Char *note)); +extern Char *rests PP((Char *Result, int len, int meterdenom, int blind)); +extern Void initMTX PV(); + + +#undef vextern + +#endif /*MTX_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtx.pas b/Build/source/utils/m-tx/mtx-0.60d/mtx.pas new file mode 100644 index 00000000000..474b24521a3 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/mtx.pas @@ -0,0 +1,280 @@ +unit mtx; +{ Details of M-Tx -> PMX translation } + +interface uses globals; + +procedure scanMusic(voice: voice_index; var left_over: integer); +procedure markDebeamed(voice: voice_index; var note: string); +procedure checkOctave(voice: voice_index; var note: string); +function rests (len, meterdenom: integer; blind: boolean): string; +procedure initMTX; + +implementation uses control, mtxline, strings, status, notes; + +const flagged = '8136'; + +type sticky = array['a'..'z'] of boolean; + +var note_attrib, rest_attrib: array[voice_index] of sticky; + +function logTwo(denom: integer): integer; + var l: integer; +begin l:=0; while denom>1 do begin inc(l); denom:=denom div 2; end; + logtwo:=l; +end; + +{ RESTS should have a third parameter OFFSET. At present we in effect + assume OFFSET+LENGTH to be a multiple of METERDENOM. } +function rests (len, meterdenom: integer; blind: boolean): string; + var r, bl: string; + function dotted(n: integer): boolean; + begin dotted:=false; if n=0 then exit; + if n<>3*(n div 3) then exit; + n:=n div 3; while n mod 2 = 0 do n:=n div 2; + dotted := n=1; + end; + begin if blind then bl:='b' else bl:=''; + if len=0 then rests:='' else + if len=128*meterdenom then rests:='r9'+bl+' ' else + if dotted(len) then + begin r:=rests(len-len div 3,meterdenom,false); + r[3]:='d'; rests:=r+bl+' '; + end + else if len>=64 div meterdenom then + rests:=rests(len-64 div meterdenom,meterdenom,blind)+'r' + +durations[whole+logtwo(meterdenom)]+bl+' ' + else rests:=rests(len,meterdenom*2,blind); + end; + +procedure checkSticky(var note: string; var attrib: sticky); + var i,l: integer; + c: char; + a: string; + function attribs(note: string): string; + var a: string; + i,l: integer; + n: char; + begin a:=''; i:=2; l:=length(note); + while i<=l do + begin n:=note[i]; + if n='x' then i:=l else if (n>='a') and (n<='z') then a:=a+n; + inc(i); + end; + attribs:=a; + end; +begin if note='' then exit; + l:=length(note); i:=2; + while i<=l do + begin c:=note[i]; + if (c>='a') and (c<='z') then + if (i='0') and (code<='9') then begin resetOctave(voice); exit end; + while (code='+') or (code='-') do + begin + newOctave(voice,code); removeOctaveCode(code,note); code:=octaveCode(note) + end; + if code<>' ' then error3(voice,'You may have only one absolute octave assignment'); + insertOctaveCode(octave(voice),note); resetOctave(voice) +end; + +procedure markDebeamed(voice: voice_index; var note: string); +begin + if isVocal(voice) and (afterSlur(voice)=0) and unbeamVocal + and (pos1(duration(voice),flagged)>0) then insertchar('a',note,2); +end; + +function barLength (meter: string): integer; + var n1, n2, pn1, pn2: integer; +begin + getMeter(meter,n1,n2,pn1,pn2); barLength := n1*(64 div n2); +end; + +function isMultiBarRest(rest: string): boolean; +begin isMultibarRest:=false; if length(rest)<3 then exit; + if rest[2]<>'m' then exit; + if multi_bar_rest then error( + 'Only one multibar rest allowed per line',print); + multi_bar_rest := true; isMultibarRest:=true; +end; + +{ Double-length in xtuplet detected by a brute search for D anywhere. + Could be more elegant. } + +var macro_length: array[1..20] of integer; +const macro_ID: array[1..20] of string[2]=('1','2','3','4','5','6','7','8', + '9','10','11','12','13','14','15','16','17','18','19','20'); + +procedure scanMusic(voice: voice_index; var left_over: integer); + var buf, note, enote, xnote: string; + has_next, done, doublex, store_macro: boolean; + bar, old_length, bar_length, count, l, mlen, ngrace, nmulti, + macroID, playID: integer; + dur1, lastdur, macro_type: char; + nscan: music_word; + + procedure decmulti; + begin if doublex then dec(nmulti,2) else dec(nmulti) + end; + + procedure countIt; + procedure incbar(nl: integer); + begin inc(bar_length,nl); + if (bar_length>bar) and (meternum>0) + then error3(voice,'Bar end occurs in mid-note'); + end; + begin + if ngrace>0 then dec(ngrace) else + if nmulti>0 then decmulti else + begin if (count mod 3<>0) and ( + (note[1]<>rest) and note_attrib[voice,'d'] or + (note[1]=rest) and rest_attrib[voice,'d']) then + inc(count,count div 2); + incbar(count); + l := pos1(multi_group,note); + if l>0 then + begin predelete(note,l); getNum(note,nmulti); decmulti; + end; + end + end; + + procedure maybeGroup; + begin if note[1]=grace_group then + begin if length(note)=1 then ngrace:=1 + else ngrace := pos1(note[2],digits); (* bug if ngrace>9 *) + if ngrace>0 then dec(ngrace); + end; + end; + + function identifyMacro(s: string): integer; + var k: integer; + begin predelete(s,2); for k:=1 to 20 do if s=macro_ID[k] then + begin identifyMacro:=k; exit end; + identifyMacro:=0 + end; + + procedure examineMacro; + begin if not countMacro then exit; + if debugMode then write(note,': '); if length(note)=1 then + begin + mlen:=bar_length-old_length; + if (macroID<1) or (macroID>20) then error3(voice,'Invalid macro ID'); + macro_length[macroID]:=mlen; + if debugMode then + writeln('Ending macro ',macroID,' of type ',macro_type,', length=', mlen); + if macro_type='S' then bar_length:=old_length; store_macro:=false + end + else begin playID:=identifyMacro(note); + if (playID<1) or (playID>20) then error3(voice,'Invalid macro ID'); + if note[2]='P' then + begin if debugMode then + writeln('Playing macro ',playID,' of length ', + macro_length[playID]); + inc(bar_length,macro_length[playID]) + end + else if pos1(note[2],'SR')>0 then + begin old_length:=bar_length; macro_type:=note[2]; macroID:=playID; + store_macro:=true; + if debugMode then writeln('Defining macro ',macroID,' of type ',note[2]) + end + end + end; + +begin + terminators:='d.x'; + resetInfo(voice, buf); has_next := false; left_over:=0; store_macro:=false; + bar:=full_bar; bar_length:=0; ngrace:=0; nmulti:=0; + if meternum=0 then bar:=32000; + dur1:=duration(voice); lastdur:=dur1; + done:=false; + repeat GetNextMusWord(buf,note,nscan); if length(note)=0 then break; count:=0; +{ if isNoteOrRest(note) and not (isPause(note) or isMultibarRest(note)) + then note:=toStandard(note); } + doublex := pos1('D',note)>0; + if nscan=mword then + begin + if length(note)=0 then + Error3(voice,'You may not end a line with a meter change'); + if bar_length>0 then + error3(voice,'Meter change only allowed at start of bar') + else bar:=barLength(note); + end + else if nscan=rword then + if not (isPause(note) or isMultiBarRest(note)) then + begin + processNote(note,xnote,dur1,lastdur,count); + checkSticky(note,rest_attrib[voice]); + end; + if note<>'' then appendNote(voice,nscan); + enote := note; + if (nscan=macro) or (nscan=endMacro) then examineMacro; + if nscan=abcdefg then + if (not multi_bar_rest) and (ngrace + nmulti = 0) then + begin + processNote(enote,xnote,dur1,lastdur,count); + if xnote<>'' then + begin + checkSticky(enote,note_attrib[voice]); + appendToLine(voice,enote); + appendNote(voice,nscan); enote := xnote; + end; + checkSticky(enote,note_attrib[voice]); + end; + appendToLine(voice,enote); + if note='' then done:=true; { !!! else word_bound[here]:=length(line); } + if (note=barsym) then + if meternum=0 then + error3(voice,'You may not use bar lines in barless music') + else if bar_length=0 then markBar(voice) + else if (numberOfBars(voice)=0) and (bar_length0 then error3(voice,'Bar is too short'); + left_over:=bar_length; bar_length := 0; + end; + if nscan=nextvoice then + begin if bar_length>0 then error3(voice, 'Next voice before bar is full') + else barForward(voice,-1); has_next := true; + end + else if isPause(note) then inc(bar_length,bar) + else if multi_bar_rest then {do nothing} + else if not done and isNoteOrRest(note) then countIt + else maybeGroup; + dur1:=lastdur; + if (bar_length>=bar) and (ngrace+nmulti=0) and not store_macro then + begin if debugMode then writeln(voice,' ',bar_length); + barForward(voice,bar_length div bar); bar_length:=bar_length mod bar + end; + until done; + setExtraLength(voice,bar_length); + resetDuration(voice,dur1); + regroup(voice) +end; + +procedure initMTX; + var i: voice_index; j: char; +begin for i:=1 to maxvoices do for j:='a' to 'z' do + note_attrib[i,j] := false; + rest_attrib := note_attrib; +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtxline.c b/Build/source/utils/m-tx/mtx-0.60d/mtxline.c new file mode 100644 index 00000000000..f61cee0e24d --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/mtxline.c @@ -0,0 +1,844 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "mtxline.pas" */ + + +#include "p2c.h" + + +#define MTXLINE_G +#include "mtxline.h" + + +boolean bind_left[22] = { + false, false, true, false, false, true, true, false, true, true, true, + false, true, false, true, false, true, false, false, false, false, false +}; + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef NOTES_H +#include "notes.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +typedef music_word word_scan[max_words]; + +typedef struct line_info { + word_index0 here, nword; + bar_index0 nbar; + paragraph_index0 voice_pos, voice_stave, mus, chord; + short extra; + boolean vocal; + word_index0 bar_bound[max_bars + 1]; + short word_bound[max_words + 1]; + word_scan scan; +} line_info; + + +Static Char name[22][10] = { + "?", "note", "znote", "lyricsTag", "(", ")", ")(", "[", "]", "_", "PMX<", + "macro", "endMacro", "meter", "ornament", "rest", "//", "BAR", "TeX", "@", + "firstonly", "ERROR" +}; + +Static line_info info[maxvoices]; + + +/* ------------------------------------------------------------- */ + +short beatsPerLine(void) +{ + short Result; + voice_index voice, FORLIM; + line_info *WITH; + + FORLIM = nvoices; + for (voice = 1; voice <= FORLIM; voice++) { + WITH = &info[voice-1]; + if (WITH->nbar > 0 || WITH->extra > 0) { + if (WITH->extra % one_beat > 0) { +/* p2c: mtxline.pas, line 99: + * Note: Using % for possibly-negative arguments [317] */ + error3(voice, "Line length not an integer number of beats"); + } + Result = WITH->nbar * meternum + WITH->extra / one_beat; + } + } + return Result; +} + + +void skipChordBar(voice_index voice) +{ + line_info *WITH; + Char STR1[256]; + + WITH = &info[voice-1]; + if (WITH->chord > 0) { + sprintf(STR1, "%c", barsym); + if (!strcmp(P[WITH->chord - 1], STR1)) + predelete(P[WITH->chord - 1], 1); + } +} + + +Char *getBar(Char *Result, voice_index voice, short bar) +{ + line_info *WITH; + + WITH = &info[voice-1]; + return (substr_(Result, P[WITH->mus - 1], + WITH->word_bound[WITH->bar_bound[bar-1]] + 1, + WITH->word_bound[WITH->bar_bound[bar]] - + WITH->word_bound[WITH->bar_bound[bar-1]])); +} + + +Char *musicLine(Char *Result, voice_index voice) +{ + return strcpy(Result, P[musicLineNo(voice) - 1]); +} + + +paragraph_index0 musicLineNo(voice_index voice) +{ + return (info[voice-1].mus); +} + + +void setMusicLineNo(voice_index voice, paragraph_index lno) +{ + info[voice-1].mus = lno; +} + + +paragraph_index0 chordLineNo(voice_index voice) +{ + return (info[voice-1].chord); +} + + +void setChordLineNo(voice_index voice, paragraph_index lno) +{ + info[voice-1].chord = lno; +} + + +void setVocal(voice_index voice, boolean voc) +{ + info[voice-1].vocal = voc; +} + + +boolean isVocal(voice_index voice) +{ + return (info[voice-1].vocal); +} + + +void setStavePos(voice_index voice, stave_index stave, stave_index pos) +{ + line_info *WITH; + + WITH = &info[voice-1]; + WITH->voice_pos = pos; + WITH->voice_stave = stave; +} + + +stave_index voiceStave(voice_index voice) +{ + return (info[voice-1].voice_stave); +} + + +stave_index voicePos(voice_index voice) +{ + return (info[voice-1].voice_pos); +} + + +voice_index companion(voice_index voice) +{ + short s; + + s = info[voice-1].voice_stave; + if (number_on_stave[s-1] == 1) + return voice; + else if (info[voice-1].voice_pos == 1) + return (voice + 1); + else + return (voice - 1); +} + + +void regroup(voice_index voice) +{ + word_index0 i, j; + word_index0 j2 = 0; + line_info *WITH; + word_index0 FORLIM; + + WITH = &info[voice-1]; + if (debugMode()) + printf("Voice %d has %d bars at ", voice, WITH->nbar); + if (debugMode()) { + FORLIM = WITH->nbar + 1; + for (i = 1; i <= FORLIM; i++) + printf("%d ", WITH->bar_bound[i]); + } + FORLIM = WITH->nbar; + for (i = 1; i <= FORLIM; i++) { + j2 = WITH->bar_bound[i]; + j = j2 + 1; + while (j <= WITH->here && + (bind_left[(long)WITH->scan[j-1]] || WITH->scan[j-1] == barword)) { + WITH->bar_bound[i]++; + j++; + } + } + if (WITH->extra > 0) + WITH->bar_bound[WITH->nbar + 1] = WITH->here; + if (debugMode()) { + printf(" regrouped to "); + FORLIM = WITH->nbar + 1; + for (i = 1; i <= FORLIM; i++) + printf("%d ", WITH->bar_bound[i]); + } + if (debugMode()) + putchar('\n'); + WITH->nword = WITH->here; +} + + +void resetInfo(voice_index voice, Char *buf) +{ + line_info *WITH; + + WITH = &info[voice-1]; + strcpy(buf, P[WITH->mus - 1]); + *P[WITH->mus - 1] = '\0'; + WITH->bar_bound[0] = 0; + WITH->word_bound[0] = 0; + WITH->nbar = 0; + WITH->here = 0; +} + + +void clearLabels(void) +{ + voice_index voice, FORLIM; + line_info *WITH; + + FORLIM = nvoices; + for (voice = 0; voice <= FORLIM - 1; voice++) { + WITH = &info[voice]; + WITH->chord = 0; + WITH->mus = 0; + } +} + + +void appendNote(voice_index voice, music_word nscan) +{ + line_info *WITH; + + WITH = &info[voice-1]; + WITH->here++; + if (WITH->here > max_words) + error3(voice, "Words per line limit exceeded"); + WITH->scan[WITH->here - 1] = nscan; +} + + +void appendToLine(voice_index voice, Char *note) +{ + line_info *WITH; + + if (*note == '\0') + return; + WITH = &info[voice-1]; + sprintf(P[WITH->mus - 1] + strlen(P[WITH->mus - 1]), "%s%c", note, blank); + WITH->word_bound[WITH->here] = strlen(P[WITH->mus - 1]); +} + + +void markBar(voice_index voice) +{ + line_info *WITH; + + WITH = &info[voice-1]; + if (WITH->nbar == 0) + error3(voice, "Empty bar"); + else + WITH->bar_bound[WITH->nbar] = WITH->here; +} + + +short numberOfBars(voice_index voice) +{ + return (info[voice-1].nbar); +} + + +void barForward(voice_index voice, short nbars) +{ + line_info *WITH; + + WITH = &info[voice-1]; + if (WITH->nbar + nbars < 0) + error3(voice, "Next voice before bar is full"); + WITH->nbar += nbars; + if (WITH->nbar > max_bars) + error3(voice, "Bars per line limit exceeded"); + if (nbars > 0) + WITH->bar_bound[WITH->nbar] = WITH->here; +} + + +void setExtraLength(voice_index voice, short ext) +{ + line_info *WITH; + + WITH = &info[voice-1]; + WITH->extra = ext; + WITH->scan[WITH->here] = other; +} + + +short ExtraLength(voice_index voice) +{ + return (info[voice-1].extra); +} + + +voice_index0 findVoice(Char *w_) +{ + voice_index0 Result = 0; + Char w[256]; + short i, FORLIM; + + strcpy(w, w_); + curtail(w, ':'); + FORLIM = nvoices; + for (i = 1; i <= FORLIM; i++) { + if (!strcmp(w, voice_label[i-1])) + return i; + } + getNum(w, &i); + if (i == 0) + return Result; + if (i > 0 && i <= nvoices) + return i; + error("Numeric label outside range 1..nvoices", print); + return Result; +} + + +Static void info3(voice_index voice) +{ + line_info *WITH; + + WITH = &info[voice-1]; + printf("In voice \"%s\" near word %d:\n", voice_label[voice-1], WITH->here); + printf("%*cV\n", WITH->word_bound[WITH->here], ' '); +} + + +void error3(voice_index voice, Char *message) +{ + Char STR1[256]; + + info3(voice); + sprintf(STR1, " %s", message); + error(STR1, print); +} + + +void warning3(voice_index voice, Char *message) +{ + Char STR1[256]; + + info3(voice); + sprintf(STR1, " %s", message); + warning(STR1, print); +} + + +Char *nextMusicWord(Char *Result, voice_index voice) +{ + return (MusicWord(Result, voice, info[voice-1].here)); +} + + +Char *MusicWord(Char *Result, short voice, short n) +{ + line_info *WITH; + + WITH = &info[voice-1]; + if (n > 0 && n <= WITH->nword) + return (substr_(Result, P[WITH->mus - 1], WITH->word_bound[n-1] + 1, + WITH->word_bound[n] - WITH->word_bound[n-1] - 1)); + else + return strcpy(Result, ""); +} + + +music_word thisNote(voice_index voice) +{ + line_info *WITH; + + WITH = &info[voice-1]; + return (WITH->scan[WITH->here - 2]); +} + + +music_word nextNote(voice_index voice) +{ + line_info *WITH; + + WITH = &info[voice-1]; + return (WITH->scan[WITH->here - 1]); +} + + +boolean endOfBar(voice_index voice, short bar_no) +{ + line_info *WITH; + + WITH = &info[voice-1]; + return (WITH->here > WITH->bar_bound[bar_no]); +} + + +void gotoBar(voice_index voice, short bar_no) +{ + line_info *WITH; + + WITH = &info[voice-1]; + WITH->here = WITH->bar_bound[bar_no-1] + 1; +} + + +Char *getMusicWord(Char *Result, voice_index voice) +{ + line_info *WITH; + + WITH = &info[voice-1]; + line_no = orig_line_no[WITH->mus - 1]; + MusicWord(Result, voice, WITH->here); + WITH->here++; + return Result; +} + + +boolean maybeMusicLine(Char *l_) +{ + Char l[256]; + Char w[256]; + music_word nscan; + + strcpy(l, l_); + GetNextWord(w, l, blank, dummy); +/* p2c: mtxline.pas: Note: Eliminated unused assignment statement [338] */ + if (pos1(w[0], "abcdefgr()[]{}CMm") == 0) + return false; + if (pos1(':', w) == 0) + return true; + getNextMusWord(w, l, &nscan); + return (nscan == abcdefg); +} + + +#define nmacros 99 + + +Static boolean macro_initialized = false; +Static Char macro_text[nmacros][256]; + + +Static void macroInit(void) +{ + short i; + + if (macro_initialized) + return; + macro_initialized = true; + for (i = 0; i <= nmacros - 1; i++) + *macro_text[i] = '\0'; +} + + +Static short identifyMacro(Char *s_) +{ + Char s[256]; + short k; + + strcpy(s, s_); + predelete(s, 2); + getNum(s, &k); + return k; +} + + +/* Local variables for getNextMusWord: */ +struct LOC_getNextMusWord { + Char *buf, *note; +} ; + +Local void expandThisMacro(struct LOC_getNextMusWord *LINK) +{ + Char playtag[11]; + short playID; + Char w[256]; + Char STR1[72]; + Char STR2[42]; + Char STR3[68]; + Char STR4[54]; + Char STR5[256], STR7[256]; + + macroInit(); + if (strlen(LINK->note) == 1) + error("Can't terminate a macro that has not been started", print); + playID = identifyMacro(LINK->note); + toString(playtag, playID); +/* p2c: mtxline.pas, line 310: + * Note: Possible string truncation in assignment [145] */ + if (playID < 1 || playID > 99) { + sprintf(STR2, "Macro ID %s is not in range 1..99", playtag); + error(STR2, print); + } + if (LINK->note[1] == 'P') { + if (*macro_text[playID-1] == '\0') { + sprintf(STR3, + "Macro %s inserts empty text: did you define it before use?", + playtag); + warning(STR3, print); + } + if (strlen(macro_text[playID-1]) + strlen(LINK->buf) <= 255) { + if (debugMode()) + printf("Inserting macro %s text \"%s\"\n", + playtag, macro_text[playID-1]); + printf("Buffer before insert: %s\n", LINK->buf); + sprintf(LINK->buf, "%s%s", + macro_text[playID-1], strcpy(STR5, LINK->buf)); + return; + } + sprintf(STR4, "Expansion of macro %s causes buffer overflow", playtag); + error(STR4, print); + } + if (pos1(LINK->note[1], "SR") == 0) { + sprintf(STR4, "Second character %c of macro word should be in \"PRS\"", + LINK->note[1]); + error(STR4, print); + } + *macro_text[playID-1] = '\0'; + do { + GetNextWord(w, LINK->buf, blank, dummy); + if (*w == '\0') { + sprintf(STR1, + "Macro definition %s should be terminated on the same input line", + playtag); + error(STR1, print); + } + if (!strcmp(w, "M")) { + if (debugMode()) + printf("Macro %s is: %s\n", playtag, macro_text[playID-1]); + break; + } + if (w[0] == 'M' && strlen(w) > 1) { + if (w[1] != 'P' || identifyMacro(w) == playID) { + sprintf(STR7, "%s not allowed inside macro definition %s", w, playtag); + error(STR7, print); + } + } + sprintf(macro_text[playID-1] + strlen(macro_text[playID-1]), "%s ", w); + } while (true); + if (LINK->note[1] == 'R') { + LINK->note[1] = 'P'; + sprintf(LINK->buf, "%s %s", LINK->note, strcpy(STR7, LINK->buf)); + } +} + + +void getNextMusWord(Char *buf_, Char *note_, music_word *nscan) +{ + struct LOC_getNextMusWord V; + Char maybe_error[256]; + Char STR2[256]; + + V.buf = buf_; + V.note = note_; + GetNextWord(V.note, V.buf, blank, dummy); + if (*V.note == '\0') + return; + if (V.note[0] == 'M' && expandMacro()) { + expandThisMacro(&V); + getNextMusWord(V.buf, V.note, nscan); + return; + } + if (V.note[0] == '\\') { + *maybe_error = '\0'; + if (V.note[strlen(V.note) - 1] != '\\') + strcpy(maybe_error, V.note); + while (*V.buf != '\0' && V.note[strlen(V.note) - 1] != '\\') + sprintf(V.note + strlen(V.note), " %s", + GetNextWord(STR2, V.buf, blank, dummy)); + if (V.note[strlen(V.note) - 1] != '\\') + error("Unterminated TeX literal", print); + *nscan = texword; + if (*maybe_error != '\0') { + sprintf(STR2, "Possible unterminated TeX literal: %s", maybe_error); + warning(STR2, print); + } + return; + } + if (solfaNoteNames()) { + translateSolfa(V.note); + if (V.note[0] == '"') + predelete(V.note, 1); + } + switch (V.note[0]) { + + case '_': + *nscan = pmxprefix; + delete1(V.note, 1); + break; + + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + *nscan = abcdefg; + break; + + case 'z': + *nscan = zword; + break; + + case '(': + *nscan = lparen; + break; + + case '{': + if (V.note[strlen(V.note) - 1] == '}') + *nscan = lyrtag; + else + *nscan = lparen; + break; + + case ')': + if (pos1('(', V.note) == 0) + *nscan = rparen; + else + *nscan = rlparen; + break; + + case '}': + if (pos1('{', V.note) == 0) + *nscan = rparen; + else + *nscan = rlparen; + break; + + case '[': + *nscan = lbrac; + break; + + case ']': + *nscan = rbrac; + break; + + case '@': + *nscan = atword; + break; + + case 'm': + *nscan = mword; + break; + + case 'r': + *nscan = rword; + break; + + case '#': + case '-': + case 'n': + case 'x': + case '?': + case 's': + case 't': + case 'D': + *nscan = pmxl; + break; + + case 'M': + if (!strcmp(V.note, "M")) + *nscan = endmacro; + else + *nscan = macro; + break; + + case 'G': + if (pos1('A', V.note) > 0) + *nscan = pmxl; + else + *nscan = other; + break; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (pos1('/', V.note) > 0) + *nscan = mword; + else + *nscan = pmxl; + break; + + case 'o': + *nscan = oword; + break; + + case 'A': + case 'V': + *nscan = FirstOnly; + break; + + case '/': + if (!strcmp(V.note, "//")) + *nscan = nextvoice; + else if (!strcmp(V.note, "/")) { + strcpy(V.note, "//"); + warning("/ changed to //", print); + *nscan = nextvoice; + } else { + error("Word starts with /: do you mean \\?", print); + *nscan = err; + } + break; + + default: + if (pos1('|', V.note) > 0) + *nscan = barword; + else + *nscan = other; + break; + } +} + + +boolean upper(voice_index voice) +{ + line_info *WITH; + + WITH = &info[voice-1]; + if (WITH->voice_pos == 1 && voice < nvoices) + return (WITH->voice_stave == info[voice].voice_stave); + else + return false; +} + + +void describeVoice(voice_index voice, Char *describe_lyr) +{ + short bar, w; + line_info *WITH; + Char STR1[256]; + line_info *WITH1; + short FORLIM; + + WITH = &info[voice-1]; + printf("Voice `%s' is on line %d", voice_label[voice-1], WITH->mus); + if (WITH->vocal) { + printf(", is vocal"); + puts(describe_lyr); + } else { + if (WITH->chord > 0) + printf(" and has chords on line %d", WITH->chord); + putchar('\n'); + } + if (!debugMode()) + return; + WITH1 = &info[voice-1]; + printf("Line has %d bars", WITH1->nbar); + if (WITH1->extra > 0) + printf(" + %d/64 notes\n", WITH1->extra); + else + putchar('\n'); + printf("Bars:"); + FORLIM = WITH1->nbar; + for (bar = 1; bar <= FORLIM; bar++) + printf(" %s ", getBar(STR1, voice, bar)); + printf("\nWord types:"); + FORLIM = WITH1->nword; + for (w = 0; w <= FORLIM - 1; w++) + printf(" %s", name[(long)WITH1->scan[w]]); + putchar('\n'); +} + + +boolean aloneOnStave(stave_index stave) +{ + voice_index v; + + if (number_on_stave[stave-1] != 2) + return true; + else { + v = first_on_stave[stave-1]; + return (info[v-1].mus == 0 || info[v].mus == 0); + } +} + + +void selectVoices(Char *line_) +{ + Char line[256]; + short i = 0; + short k; + Char word[256]; + short FORLIM; + + strcpy(line, line_); + FORLIM = nvoices; + for (k = 0; k <= FORLIM - 1; k++) + selected[k] = false; + printf("Voice change to: %s = ", line); + while (i < nvoices) { + GetNextWord(word, line, blank, dummy); + if (*word == '\0') { + putchar('\n'); + return; + } + i++; + printf("%s ", word); + k = findVoice(word); + if (k == 0) + error("This voice is not in the style", print); + selected[k-1] = true; + } + putchar('\n'); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtxline.h b/Build/source/utils/m-tx/mtx-0.60d/mtxline.h new file mode 100644 index 00000000000..23fc05be32c --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/mtxline.h @@ -0,0 +1,83 @@ +/* Header for module mtxline, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef MTXLINE_H +#define MTXLINE_H + + +/* Break input up into words, classify them. Supply words and + information about them. */ + +#ifndef GLOBALS_H +#include "globals.h" +#endif + + +#ifdef MTXLINE_G +# define vextern +#else +# define vextern extern +#endif + + +typedef enum { + other, abcdefg, zword, lyrtag, lparen, rparen, rlparen, lbrac, rbrac, + pmxprefix, pmxl, macro, endmacro, mword, oword, rword, nextvoice, barword, + texword, atword, FirstOnly, err +} music_word; + + +extern boolean bind_left[22]; + +/* changed bind_left[barword] to false */ + +vextern boolean selected[maxvoices]; + + +extern void error3(voice_index voice, Char *message); +extern void warning3(voice_index voice, Char *message); +extern void getNextMusWord(Char *buf, Char *note, music_word *nscan); +extern Char *MusicWord(Char *Result, short voice, short n); +extern Char *nextMusicWord(Char *Result, voice_index voice); +extern music_word thisNote(voice_index voice); +extern music_word nextNote(voice_index voice); +extern Char *getMusicWord(Char *Result, voice_index voice); +extern void gotoBar(voice_index voice, short bar_no); +extern boolean endOfBar(voice_index voice, short bar_no); +extern Char *getBar(Char *Result, voice_index voice, short bar); +extern boolean upper(voice_index voice); +extern void clearLabels(void); +extern voice_index0 findVoice(Char *w); +extern void selectVoices(Char *line); +extern void resetInfo(voice_index voice, Char *buf); +extern void setVocal(voice_index voice, boolean voc); +extern boolean isVocal(voice_index voice); +extern void setStavePos(voice_index voice, stave_index stave, stave_index pos); +extern stave_index voiceStave(voice_index voice); +extern stave_index voicePos(voice_index voice); +extern boolean aloneOnStave(stave_index stave); +extern voice_index companion(voice_index voice); +extern void appendNote(voice_index voice, music_word nscan); +extern void appendToLine(voice_index voice, Char *note); +extern void markBar(voice_index voice); +extern short numberOfBars(voice_index voice); +extern void barForward(voice_index voice, short nbars); +extern void regroup(voice_index voice); + +extern short beatsPerLine(void); +extern void setExtraLength(voice_index voice, short ext); +extern short ExtraLength(voice_index voice); +extern paragraph_index0 musicLineNo(voice_index voice); +extern void setMusicLineNo(voice_index voice, paragraph_index lno); +extern paragraph_index0 chordLineNo(voice_index voice); +extern void setChordLineNo(voice_index voice, paragraph_index lno); +extern void skipChordBar(voice_index voice); + +extern void describeVoice(voice_index voice, Char *describe_lyr); +extern boolean maybeMusicLine(Char *l); +extern Char *musicLine(Char *Result, voice_index voice); + + +#undef vextern + +#endif /*MTXLINE_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtxline.pas b/Build/source/utils/m-tx/mtx-0.60d/mtxline.pas new file mode 100644 index 00000000000..cd3e0b27bcc --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/mtxline.pas @@ -0,0 +1,447 @@ +unit mtxline; +{ Break input up into words, classify them. Supply words and + information about them. } + +interface uses globals; + +type + music_word = (other, abcdefg, zword, lyrtag, + lparen, rparen, rlparen, lbrac, rbrac, + pmxl, macro, endmacro, mword, oword, rword, nextvoice, + barword, texword, atword, FirstOnly, err ); + +const + bind_left: array[music_word] of boolean = ( + false, false, true, false, + false, true, true, false, true, + true, false, true, false, true, false, true, + false, false, false, false, false ); +{ changed bind_left[barword] to false } + +var selected: array[voice_index] of boolean; + +procedure error3(voice: voice_index; message: string ); +procedure warning3(voice: voice_index; message: string ); +procedure getNextMusWord (var buf, note: string; var nscan: music_word); +function MusicWord(voice, n: integer): string; +function nextMusicWord(voice: voice_index): string; +function thisNote(voice: voice_index): music_word; +function nextNote(voice: voice_index): music_word; +function getMusicWord(voice: voice_index): string; +procedure gotoBar(voice: voice_index; bar_no: integer); +function endOfBar(voice: voice_index; bar_no: integer): boolean; +function getBar(voice:voice_index; bar: integer): string; +function upper(voice: voice_index): boolean; +procedure clearLabels; +function findVoice(w: string): voice_index0; +procedure selectVoices(line: string); +procedure resetInfo(voice: voice_index; var buf: string); +procedure setVocal(voice: voice_index; voc: boolean); +function isVocal(voice: voice_index): boolean; +procedure setStavePos(voice: voice_index; stave, pos: stave_index); +function voiceStave(voice: voice_index): stave_index; +function voicePos(voice: voice_index): stave_index; +function aloneOnStave(stave: stave_index): boolean; +function companion(voice: voice_index): voice_index; +procedure appendNote(voice: voice_index; nscan: music_word); +procedure appendToLine(voice: voice_index; note: string); +procedure markBar(voice: voice_index); +function numberOfBars(voice: voice_index): integer; +procedure barForward(voice: voice_index; nbars: integer); +procedure regroup(voice: voice_index); + +function beatsPerLine: integer; +procedure setExtraLength(voice: voice_index; ext: integer); +function ExtraLength(voice: voice_index): integer; +function musicLineNo(voice: voice_index): paragraph_index0; +procedure setMusicLineNo(voice: voice_index; lno: paragraph_index); +function chordLineNo(voice: voice_index): paragraph_index0; +procedure setChordLineNo(voice: voice_index; lno: paragraph_index); +procedure skipChordBar(voice: voice_index); + +procedure describeVoice(voice: voice_index; describe_lyr: string); +function maybeMusicLine(l: string): boolean; +function musicLine(voice: voice_index): string; + +implementation uses strings, notes, control, utility; + +const + + name: array[music_word] of string[9] = ( + '?', 'note', 'znote', 'lyricsTag', + '(', ')', ')(', '[', ']', + 'PMX<', 'macro', 'endMacro', 'meter', 'ornament', 'rest', '//', + 'BAR', 'TeX', '@', 'firstonly', 'ERROR'); + +type + word_scan = array[1..max_words] of music_word; + + line_info = record + here, nword: word_index0; + nbar: bar_index0; + voice_pos, voice_stave, mus, chord: paragraph_index0; + extra: integer; + vocal: boolean; + bar_bound: array[bar_index0] of word_index0; + word_bound: array[word_index0] of integer; + scan: word_scan; + end; + +var info: array[voice_index] of line_info; + +{ ------------------------------------------------------------- } + +function beatsPerLine: integer; + var voice: voice_index; +begin for voice:=1 to nvoices do with info[voice] do + if (nbar>0) or (extra>0) then + begin + if extra mod one_beat > 0 + then error3(voice,'Line length not an integer number of beats'); + beatsPerLine := nbar*meternum + extra div one_beat; + end; +end; + +procedure skipChordBar(voice: voice_index); +begin with info[voice] do + if chord>0 then if P[chord]=barsym then predelete(P[chord],1); +end; + +function getBar(voice: voice_index; bar: integer): string; +begin with info[voice] do + getBar := substr(P[mus],word_bound[bar_bound[bar-1]]+1, + word_bound[bar_bound[bar]]-word_bound[bar_bound[bar-1]]); +end; + +function musicLine(voice: voice_index): string; +begin musicLine:=P[musicLineNo(voice)]; end; + +function musicLineNo(voice: voice_index): paragraph_index0; +begin musicLineNo := info[voice].mus; end; + +procedure setMusicLineNo(voice: voice_index; lno: paragraph_index); +begin info[voice].mus := lno; end; + +function chordLineNo(voice: voice_index): paragraph_index0; +begin chordLineNo := info[voice].chord; end; + +procedure setChordLineNo(voice: voice_index; lno: paragraph_index); +begin info[voice].chord := lno; end; + +procedure setVocal(voice: voice_index; voc: boolean); +begin info[voice].vocal:=voc; end; + +function isVocal(voice: voice_index): boolean; +begin isVocal := info[voice].vocal; end; + +procedure setStavePos(voice: voice_index; stave, pos: stave_index); +begin with info[voice] do begin voice_pos:=pos; voice_stave:=stave; end; +end; + +function voiceStave(voice: voice_index): stave_index; +begin voiceStave:=info[voice].voice_stave; end; + +function voicePos(voice: voice_index): stave_index; +begin voicePos:=info[voice].voice_pos; end; + +function companion(voice: voice_index): voice_index; + var s: integer; +begin s:=info[voice].voice_stave; + if number_on_stave[s]=1 then companion:=voice + else if info[voice].voice_pos=1 then companion:=voice+1 + else companion:=voice-1; +end; + +procedure regroup(voice: voice_index); + var i, j, j2: word_index0; +begin j2 := 0; with info[voice] do + begin if debugMode then write('Voice ',voice,' has ',nbar,' bars at '); + if debugMode then for i:=1 to nbar+1 do write(bar_bound[i],' '); + for i:=1 to nbar do + begin j2:=bar_bound[i]; j:=j2+1; + while (j<=here) and (bind_left[scan[j]] or (scan[j]=barword)) do + begin inc(bar_bound[i]); inc(j) end; + end; + if extra>0 then bar_bound[nbar+1]:=here; + if debugMode then + begin write(' regrouped to '); + for i:=1 to nbar+1 do write(bar_bound[i],' ') + end; + if debugMode then writeln; + nword := here + end; +end; + +procedure resetInfo(voice: voice_index; var buf: string); +begin with info[voice] do + begin buf := P[mus]; P[mus]:=''; + bar_bound[0]:=0; word_bound[0]:=0; nbar:=0; here := 0; + end; +end; + +procedure clearLabels; + var voice: voice_index; +begin for voice:=1 to nvoices do with info[voice] do + begin chord:=0; mus:=0; end; +end; + +procedure appendNote(voice: voice_index; nscan: music_word); +begin with info[voice] do + begin inc(here); if here>max_words then + error3(voice,'Words per line limit exceeded'); + scan[here]:=nscan; end; +end; + +procedure appendToLine(voice: voice_index; note: string); +begin if note<>'' then with info[voice] do + begin P[mus]:=P[mus]+note+blank; word_bound[here]:=length(P[mus]); end; +end; + +procedure markBar(voice: voice_index); +begin with info[voice] do + if nbar=0 then error3(voice,'Empty bar') else bar_bound[nbar]:=here +end; + +function numberOfBars(voice: voice_index): integer; +begin numberOfBars := info[voice].nbar; end; + +procedure barForward(voice: voice_index; nbars: integer); +begin with info[voice] do + begin + if (nbar+nbars<0) then error3(voice, 'Next voice before bar is full'); + inc(nbar,nbars); + if nbar>max_bars then error3(voice,'Bars per line limit exceeded'); + if nbars>0 then bar_bound[nbar]:=here; + end; +end; + +procedure setExtraLength(voice: voice_index; ext: integer); +begin with info[voice] do begin extra:=ext; scan[here+1]:=other; end; +end; + +function ExtraLength(voice: voice_index): integer; +begin ExtraLength := info[voice].extra; end; + +function findVoice(w: string): voice_index0; + var i: integer; +begin curtail(w,':'); findVoice:=0; + for i:=1 to nvoices do + if w=voice_label[i] then begin findVoice:=i; exit end; + getNum(w,i); if i=0 then exit; + if (i>0) and (i<=nvoices) then findVoice:=i + else error('Numeric label outside range 1..nvoices',print); +end; + +procedure info3(voice: voice_index); +begin with info[voice] do + begin + writeln ('In voice "', voice_label[voice], '" near word ', here, ':'); + writeln(' ':word_bound[here],'V') + end +end; + +procedure error3(voice: voice_index; message: string ); +begin info3(voice); error(' '+message,print) end; + +procedure warning3(voice: voice_index; message: string ); +begin info3(voice); warning(' '+message,print) end; + +function nextMusicWord(voice: voice_index): string; +begin nextMusicWord := MusicWord(voice,info[voice].here); end; + +function MusicWord(voice, n: integer): string; + begin with info[voice] do if (n>0) and (n<=nword) then + MusicWord := substr(P[mus],word_bound[n-1]+1, + word_bound[n]-word_bound[n-1]-1) + else MusicWord := ''; + end; + +function thisNote(voice: voice_index): music_word; +begin with info[voice] do thisNote := scan[here-1]; end; + +function nextNote(voice: voice_index): music_word; +begin with info[voice] do nextNote := scan[here]; end; + +function endOfBar(voice: voice_index; bar_no: integer): boolean; +begin with info[voice] do endOfBar := here > bar_bound[bar_no]; end; + +procedure gotoBar(voice: voice_index; bar_no: integer); +begin with info[voice] do here := bar_bound[bar_no-1]+1; end; + +function getMusicWord(voice: voice_index): string; +begin with info[voice] do + begin line_no := orig_line_no[mus]; + GetMusicWord := MusicWord(voice,here); inc(here); + end +end; + +function maybeMusicLine(l: string): boolean; + var w: string; + nscan: music_word; +begin w:=GetNextWord(l,blank,dummy); maybeMusicLine := false; + if pos1(w[1],'abcdefgr()[]{}CMm')=0 then begin maybeMusicLine := false; exit end; + if pos1(':',w)=0 then begin maybeMusicLine := true; exit end; + GetNextMusWord(w,l,nscan); maybeMusicLine := nscan=abcdefg; +end; + +const macro_initialized: boolean=false; + nmacros = 99; +var macro_text: array[1..nmacros] of string; +procedure macroInit; + var i: integer; +begin if macro_initialized then exit else macro_initialized:=true; + for i:=1 to nmacros do macro_text[i]:='' +end; + +function identifyMacro(s: string): integer; + var k: integer; +begin predelete(s,2); getNum(s,k); identifyMacro:=k +end; + +procedure GetNextMusWord (var buf, note: string; var nscan: music_word); + var maybe_error: string; + + procedure expandThisMacro; + var playtag: string[10]; + playID: integer; + w: string; + begin macroInit; if length(note)=1 then + error('Can''t terminate a macro that has not been started',print); + playID:=identifyMacro(note); playtag:=toString(playID); + if (playID<1) or (playID>99) then + error('Macro ID '+playtag+' is not in range 1..99',print); + if note[2]='P' then + begin if macro_text[playID]='' then + warning('Macro '+playtag+ + ' inserts empty text: did you define it before use?',print); + if length(macro_text[playID])+length(buf)>255 + then error('Expansion of macro '+playtag+' causes buffer overflow',print) + else begin if debugMode then writeln('Inserting macro '+playtag+' text "' + +macro_text[playID]+'"'); + writeln('Buffer before insert: ',buf); + buf:=macro_text[playID]+buf; exit + end + end; + if pos1(note[2],'SR')=0 then error('Second character '+note[2]+ + ' of macro word should be in "PRS"',print); + macro_text[playID]:=''; + repeat w:=getNextWord(buf,blank,dummy); + if w='' then error('Macro definition '+playtag+ + ' should be terminated on the same input line',print); + if w='M' then begin + if debugMode then writeln('Macro '+playtag+' is: '+macro_text[playID]); + break + end; + if (w[1]='M') and (length(w)>1) then + if (w[2]<>'P') or (identifyMacro(w)=playID) then + error(w+' not allowed inside macro definition '+playtag,print); + macro_text[playID]:=macro_text[playID]+w+' ' + until false; + if note[2]='R' then begin note[2]:='P'; buf:=note+' '+buf end + end; + + begin note:=GetNextWord(buf,blank,dummy); + if note='' then exit; + if (note[1]='M') and expandMacro then + begin expandThisMacro; GetNextMusWord(buf,note,nscan); exit end; + if note[1]='\' then + begin maybe_error:=''; + if note[length(note)]<>'\' then maybe_error:=note; + while (buf<>'') and (note[length(note)]<>'\') do + note:=note+' '+GetNextWord(buf,blank,dummy); + if note[length(note)]<>'\' then + error('Unterminated TeX literal',print); + nscan:=texword; + if maybe_error<>'' then + warning('Possible unterminated TeX literal: '+maybe_error,print); + exit; + end; + if solfaNoteNames then + begin translateSolfa(note[1]); if note[1]='"' then predelete(note,1); + end; + case note[1] of +'a'..'g': nscan:=abcdefg; +'z': nscan:=zword; +'(': nscan:=lparen; +'{': if note[length(note)]='}' then nscan:=lyrtag else nscan:=lparen; +')': if pos1('(',note)=0 then nscan:=rparen else nscan:=rlparen; +'}': if pos1('{',note)=0 then nscan:=rparen else nscan:=rlparen; +'[': nscan:=lbrac; +']': nscan:=rbrac; +'@': nscan:=atword; +'m': nscan:=mword; +'r': nscan:=rword; +'#','-','n','x','?','s','t','D': nscan:=pmxl; +'M': if note='M' then nscan:=endMacro else nscan:=macro; +'G': if pos1('A',note)>0 then nscan:=pmxl else nscan:=other; +'1'..'9': if pos1('/',note)>0 then nscan:=mword else nscan:=pmxl; +'o': nscan:=oword; +'A', 'V': nscan:=FirstOnly; +'/': if note='//' then nscan:=nextvoice + else if note='/' then + begin note:='//'; warning('/ changed to //',print); nscan:=nextvoice; + end + else begin error('Word starts with /: do you mean \?',print); + nscan:=err; + end; + else if pos1('|',note)>0 then nscan:=barword else + nscan:=other; + end; + end; + +function upper(voice: voice_index): boolean; +begin with info[voice] do + if (voice_pos=1) and (voice0 then write(' and has chords on line ',chord); + writeln; + end; + if debugMode then with info[voice] do + begin write('Line has ', nbar, ' bars'); + if extra>0 then writeln(' + ', extra, '/64 notes') else writeln; + write('Bars:'); + for bar:=1 to nbar do write(' ',getBar(voice,bar),' '); + writeln; write('Word types:'); + for w:=1 to nword do write(' ',name[scan[w]]); writeln; + end; + end; +end; + +function aloneOnStave(stave: stave_index): boolean; + var v: voice_index; +begin + if number_on_stave[stave]<>2 then aloneOnStave:=true else + begin v:=first_on_stave[stave]; + aloneOnStave:= (info[v].mus=0) or (info[v+1].mus=0) + end +end; + +procedure selectVoices(line: string); + var i, k: integer; + word: string; + begin + for k:=1 to nvoices do selected[k]:=false; + write('Voice change to: ',line,' = '); + i:=0; + while iname)) + return true; + previous = previous->prev; + } + return false; +} + + +void pushFile(Char *filename) +{ + filenode *newnode; + Char STR3[256]; + + if (recursive(filename)) { + printf("===! Ignoring recursive include of file %s\n", filename); + return; + } + newnode = malloc(sizeof(filenode)); + newnode->actualfile = NULL; + strcpy(newnode->name, filename); + newnode->prev = current; + newnode->lineno = 0; + strcpy(newnode->actualfile_NAME, filename); + if (newnode->actualfile != NULL) + newnode->actualfile = freopen(newnode->actualfile_NAME, "r", + newnode->actualfile); + else + newnode->actualfile = fopen(newnode->actualfile_NAME, "r"); + _SETIO(newnode->actualfile != NULL, FileNotFound); + inputerror = (P_ioresult != 0); + if (inputerror) + Free(newnode); + else + current = newnode; + if (!inputerror && (reportitem & reportnewfile) > 0) + printf("==>> Input from file %s\n", currentFilename(STR3)); + if (inputerror && (reportitem & reporterror) > 0) + printf("==!! Could not open file %s\n", filename); +} + + +void popFile(void) +{ + filenode *previous; + Char STR2[256]; + Char STR3[256]; + + if (current == NULL) + return; + if ((reportitem & reportclose) > 0) + printf("==>> Closing file %s at line number %d\n", + currentFilename(STR2), currentLineNo()); + if (current->actualfile != NULL) + fclose(current->actualfile); + current->actualfile = NULL; + previous = current->prev; + Free(current); + current = previous; + if (current != NULL && (reportitem & reportoldfile) > 0) + printf("==>> Resuming input from file %s at line number %d\n", + currentFilename(STR3), currentLineNo()); +} + + +void closeAll(void) +{ + do { + popFile(); + } while (current != NULL); +} + + +boolean eofCurrent(void) +{ + return P_eof(current->actualfile); +} + + +Char *readLine(Char *Result) +{ + Char s[256]; + Char *TEMP; + Char STR2[256]; + + if (*nextData != '\0') { + strcpy(Result, nextData); + *nextData = '\0'; + return Result; + } + if (eofAll()) + return strcpy(Result, ""); + _SETIO(fgets(s, 256, current->actualfile) != NULL, EndOfFile); + TEMP = strchr(s, '\n'); + if (TEMP != NULL) + *TEMP = 0; + strcpy(Result, s); + inputerror = (P_ioresult != 0); + if (!inputerror) + current->lineno++; + if (inputerror && (reportitem & reporterror) > 0) + printf("==!! Could not read from file %s\n", currentFilename(STR2)); + return Result; +} + + +boolean isEmpty(Char *s) +{ + short i, FORLIM; + + if (*s == '\0') + return true; + FORLIM = strlen(s); + for (i = 0; i <= FORLIM - 1; i++) { + if (s[i] != ' ') + return false; + } + return true; +} + + +Char *readData(Char *Result) +{ + Char s[256]; + + if (!isEmpty(nextData)) { + strcpy(Result, nextData); + *nextData = '\0'; + return Result; + } + while (!eofAll()) { + readLine(s); + if (!isEmpty(s)) + return strcpy(Result, s); + } + return strcpy(Result, ""); +} + + +void skipBlanks(void) +{ + while (*nextData == '\0') { + readData(nextData); + if (eofAll()) + return; + } +} + + +boolean eofAll(void) +{ + boolean Result; + +/* p2c: multfile.pas: Note: Eliminated unused assignment statement [338] */ + if (current == NULL) + return true; + if (eofCurrent()) { + popFile(); + return (eofAll()); + } + return false; +} + + +short currentLineNo(void) +{ + if (current == NULL) + return 0; + else + return (current->lineno); +} + + +Char *currentFilename(Char *Result) +{ + if (current == NULL) + return strcpy(Result, "No file open yet"); + else + return strcpy(Result, current->name); +} + + +boolean fileError(void) +{ + return inputerror; +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/multfile.h b/Build/source/utils/m-tx/mtx-0.60d/multfile.h new file mode 100644 index 00000000000..aaa094cdae7 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/multfile.h @@ -0,0 +1,87 @@ +/* Header for module multfile, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef MULTFILE_H +#define MULTFILE_H + + +#ifdef MULTFILE_G +# define vextern +#else +# define vextern extern +#endif +/* DPL 2004-03-06 +(* Support for including files into an input stream. +(* Intended for an application that does not require Pascal formatting, +(* but reads complete lines one at a time. +(* You never actually work with any files, except by supplying the +( filename when the file is opened. +(* At any stage, you can switch the input to a new file. +(* When the new file is at EOF, and a "read" is issued, the file is +(* closed and the previous one resumed transparently. This inclusion +(* can be nested to any level, memory permitting. +(* --- Normal mode of operation, replacing the usual Pascal style --- + Instead of: assign(textfile,filename); reset(textfile) + use: pushFile(filename) + When another file should be included before the current file is done, + use: pushFile(newfilename) + Instead of: readln(textfile,line) + use: line:=readLine + Instead of: eof(textfilen) + or: eofAll; {Are all files at EOF?} +(* --- Abnormal mode of operation --- + To abort a file before EOF is reached: + use: popFile; + To abort all files: + use: closeAll; + To test whether only the current file is at EOF: + use: eofCurrent; +(* Additional features: + fileError: boolean function, was there an error during file open or read? + currentFilename: string function, name of current file + currentLineNo: integer function, number of line just read from current file + isEmpty(var s: string): boolean function, is s empty? + readData: string function, like readLine, but continue reading until + a non-blank line is found, return blank only at EOF + skipBlanks: skip blank lines in input: next call to readLine will be + non-blank unless EOF is encountered + report(items): procedure to control which messages are printed, + "items" is the sum of the following options + (constants with the appropriate values are defined in the interface) + 1: reportnewfile - file is opened + 2: reportoldfile - file is resumed + 4: reportclose - file is closed + 8: reporterror - a file error is encountered + 16: reportrecursive - there is a recursive include + The default value is items=27 (all the above except reportclose) + At present you cannot turn reportrecursive off. + */ + +extern void pushFile(Char *filename); +extern void popFile(void); +extern void closeAll(void); +extern void report(short items); +extern Char *currentFilename(Char *Result); +extern boolean eofAll(void); +extern boolean eofCurrent(void); +extern boolean fileError(void); +extern Char *readLine(Char *Result); +extern Char *readData(Char *Result); +extern boolean isEmpty(Char *s); +extern short currentLineNo(void); +extern void skipBlanks(void); + + +#define reportnewfile 1 +#define reportoldfile 2 +#define reportclose 4 +#define reporterror 8 +#define reportrecursive 16 + + +extern Char nextData[256]; + + +#undef vextern + +#endif /*MULTFILE_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/multfile.pas b/Build/source/utils/m-tx/mtx-0.60d/multfile.pas new file mode 100644 index 00000000000..6c272992a3f --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/multfile.pas @@ -0,0 +1,196 @@ +unit multfile; (* DPL 2004-03-06 +(* Support for including files into an input stream. +(* Intended for an application that does not require Pascal formatting, +(* but reads complete lines one at a time. +(* You never actually work with any files, except by supplying the +( filename when the file is opened. +(* At any stage, you can switch the input to a new file. +(* When the new file is at EOF, and a "read" is issued, the file is +(* closed and the previous one resumed transparently. This inclusion +(* can be nested to any level, memory permitting. +(* --- Normal mode of operation, replacing the usual Pascal style --- + Instead of: assign(textfile,filename); reset(textfile) + use: pushFile(filename) + When another file should be included before the current file is done, + use: pushFile(newfilename) + Instead of: readln(textfile,line) + use: line:=readLine + Instead of: eof(textfilen) + or: eofAll; {Are all files at EOF?} +(* --- Abnormal mode of operation --- + To abort a file before EOF is reached: + use: popFile; + To abort all files: + use: closeAll; + To test whether only the current file is at EOF: + use: eofCurrent; +(* Additional features: + fileError: boolean function, was there an error during file open or read? + currentFilename: string function, name of current file + currentLineNo: integer function, number of line just read from current file + isEmpty(var s: string): boolean function, is s empty? + readData: string function, like readLine, but continue reading until + a non-blank line is found, return blank only at EOF + skipBlanks: skip blank lines in input: next call to readLine will be + non-blank unless EOF is encountered + report(items): procedure to control which messages are printed, + "items" is the sum of the following options + (constants with the appropriate values are defined in the interface) + 1: reportnewfile - file is opened + 2: reportoldfile - file is resumed + 4: reportclose - file is closed + 8: reporterror - a file error is encountered + 16: reportrecursive - there is a recursive include + The default value is items=27 (all the above except reportclose) + At present you cannot turn reportrecursive off. + *) +interface + + procedure pushFile(filename: string); + procedure popFile; + procedure closeAll; + procedure report(items: integer); + function currentFilename: string; + function eofAll: boolean; + function eofCurrent: boolean; + function fileError: boolean; + function readLine: string; + function readData: string; + function isEmpty(var s: string): boolean; + function currentLineNo: integer; + procedure skipBlanks; + const nextData: string = ''; + +const + reportnewfile = 1; + reportoldfile = 2; + reportclose = 4; + reporterror = 8; + reportrecursive = 16; + +implementation + + type + pfilenode = ^filenode; + filenode = record + name: string; + actualfile: text; + prev: pfilenode; + lineno: integer; + end; + + const current: pfilenode = NIL; + inputerror: boolean = false; + reportitem: integer = reportnewfile + reportoldfile + + reporterror + reportrecursive; + + procedure report(items: integer); begin reportitem := items end; + + function recursive (filename: string): boolean; + var previous: pfilenode; + begin if current=NIL then begin recursive:=false; exit; end; + previous := current; recursive:=true; + while previous <> NIL do + begin + if filename=previous^.name then exit; + previous := previous^.prev; + end; + recursive:=false + end; + + procedure pushFile(filename: string); + var newnode: pfilenode; + begin + if recursive(filename) then + begin writeln('===! Ignoring recursive include of file ',filename); exit; + end; + new(newnode); newnode^.name := filename; newnode^.prev := current; + newnode^.lineno := 0; +{$I-} + assign(newnode^.actualfile,filename); reset(newnode^.actualfile); +{$I+} + inputerror := ioresult<>0; + if inputerror then dispose(newnode) else current := newnode; + if not inputerror and ((reportitem and reportnewfile)>0) then writeln + ('==>> Input from file ',currentFilename); + if inputerror and ((reportitem and reporterror)>0) then writeln + ('==!! Could not open file ',filename); + end; + + procedure popFile; + var previous: pfilenode; + begin if current=NIL then exit; + if (reportitem and reportclose)>0 then writeln + ('==>> Closing file ',currentFilename,' at line number ', currentLineNo:1); + close(current^.actualfile); previous := current^.prev; dispose(current); + current := previous; + if (current<>NIL) and ((reportitem and reportoldfile)>0) then writeln + ('==>> Resuming input from file ',currentFilename,' at line number ', + currentLineNo:1); + end; + + procedure closeAll; begin repeat popFile until current=NIL; end; + + function eofCurrent: boolean; + begin eofCurrent := eof(current^.actualfile); + end; + + function readLine: string; + var s: string; + begin if nextData<>'' then + begin readLine:=nextData; nextData:=''; exit end; + if eofAll then begin readLine:=''; exit end; +{$I-} + readln(current^.actualfile,s); readLine:=s; +{$I+} + inputerror := ioresult<>0; + if not inputerror then inc(current^.lineno); + if inputerror and ((reportitem and reporterror)>0) then writeln + ('==!! Could not read from file ',currentFilename); + end; + + function isEmpty(var s: string): boolean; + var i: integer; + begin if length(s)=0 then begin isEmpty:=true; exit; end; + for i:=1 to length(s) do if s[i]<>' ' then + begin isEmpty:=false; exit; end; + isEmpty:=true + end; + + function readData: string; + var s: string; + begin if not isEmpty(nextData) then + begin readData:=nextData; nextData:=''; exit end; + while not eofAll do + begin s:=readLine; + if not isEmpty(s) then begin readData:=s; exit end; + end; + readData:=''; + end; + + procedure skipBlanks; + begin while nextData='' do + begin nextData:=readData; if eofAll then exit + end + end; + + function eofAll: boolean; + begin eofAll := true; + if current=NIL then exit else + if eofCurrent then begin popFile; eofAll:=eofAll; exit end; + eofAll:=false + end; + + function currentLineNo: integer; + begin if current = NIL then currentLineNo := 0 + else currentLineNo := current^.lineno; + end; + + function currentFilename: string; + begin if current = NIL then currentFilename := 'No file open yet' + else currentFilename := current^.name; + end; + + function fileError: boolean; begin fileError := inputerror; end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/notes.c b/Build/source/utils/m-tx/mtx-0.60d/notes.c new file mode 100644 index 00000000000..c212896cf90 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/notes.c @@ -0,0 +1,547 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "notes.pas" */ + + +#include "p2c.h" + + +#define NOTES_G +#include "notes.h" + + +short count64['9' + 1 - '0'] = { + 64, 4, 32, 2, 16, 0, 1, 0, 8, 128 +}; + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef GLOBALS_H +#include "globals.h" +#endif + + +typedef struct parsedNote { + Char name; + Char duration[2]; + Char octave[9]; + Char accidental[17], whatever[17], dotgroup[17], xtuplet[17]; + Char shortcut[33]; +} parsedNote; + + +Static Void printNote(n) +parsedNote n; +{ + printf("%c|%s|%s|%s|%s|%s|%s|%s\n", + n.name, n.duration, n.octave, n.accidental, n.whatever, n.dotgroup, + n.xtuplet, n.shortcut); +} + + +/* If rearrangeNote is TRUE, translate original note to the following form: + 1. Note name. + 2. Duration. + 3. Octave adjustments. + 4. Everything except the other six items. + 5. Accidental with adjustments (rest: height adjustment) + 6. Dot with adjustments. + 7. Xtuplet group. +*/ + +Void translateSolfa(nt) +Char *nt; +{ + short k; + + if (!solfaNoteNames()) + return; + k = pos1(*nt, solfa_names); + if (k > 0) + *nt = has_duration[k-1]; +} + + +Char durationCode(note) +Char *note; +{ + Char Result = unspecified; + Char code; + + if (strlen(note) <= 1) + return Result; + code = note[1]; + if (pos1(code, durations) > 0) + return code; + return Result; +} + + +Static Char half(dur) +Char dur; +{ + Char Result; + short k; + Char STR1[20]; + Char STR2[24]; + + k = pos1(dur, durations); + Result = dur; + if (k == 0) { + sprintf(STR1, "Invalid duration %c", dur); + error(STR1, print); + return Result; + } + if (k <= ndurs) + return (durations[k]); + sprintf(STR2, "%c is too short to halve", dur); + error(STR2, print); + return Result; +} + + +Static Void addDuration(note, dur) +Char *note; +Char dur; +{ + if (insertDuration()) + insertChar(dur, note, 2); +} + + +/* Extract procedures. All of these remove part of "note" (sometimes + the part is empty) and put it somewhere else. The part may be anywhere + in "note", except when otherwise specified.*/ + +/* Unconditionally extracts the first character. */ + +Static Void extractFirst(note, first) +Char *note; +Char *first; +{ + *first = note[0]; + predelete(note, 1); +} + + +/* Extracts at most one of the characters in "hits". */ + +Static Void extractOneOf(note, hits, hit) +Char *note; +Char *hits; +Char *hit; +{ + short i, l; + + l = strlen(note); + *hit = '\0'; + for (i = 1; i <= l; i++) { + if (pos1(note[i-1], hits) > 0) { + sprintf(hit, "%c", note[i-1]); + delete1(note, i); + return; + } + } +} + + +/* Extracts contiguous characters in "hits" until no more are found. + There may be more later. */ + +Static Void extractContiguous(note, hits, hit) +Char *note; +Char *hits; +Char *hit; +{ + short i, l, len; + + l = strlen(note); + len = l; + *hit = '\0'; + for (i = 1; i <= l; i++) { + if (pos1(note[i-1], hits) > 0) { + do { + if (pos1(note[i-1], hits) == 0) + return; + sprintf(hit + strlen(hit), "%c", note[i-1]); + delete1(note, i); + len--; + } while (len >= i); + return; + } + } +} + + +/* Extracts the specified character and everything after it. */ + +Static Void extractAfter(note, delim, tail) +Char *note; +Char delim; +Char *tail; +{ + short newlen; + + newlen = pos1(delim, note); + *tail = '\0'; + if (newlen == 0) + return; + newlen--; + strcpy(tail, note); + predelete(tail, newlen); + note[(long)((int)newlen)] = '\0'; +/* p2c: notes.pas, line 108: + * Note: Modification of string length may translate incorrectly [146] */ +} + + +/* Extracts the dot shortcut part of a note: comma shortcut is no problem + because a comma cannot be part of a number. */ + +Static Void extractDotShortcut(note, tail) +Char *note, *tail; +{ + Char names[256], tail2[256]; + short l = 1; + short lt; + Char ch; + + extractAfter(note, '.', tail); + lt = strlen(tail); + if (l < lt && tail[1] == '.') + l = 2; + if (solfaNoteNames()) + strcpy(names, solfa_names); + else + strcpy(names, has_duration); + if (l < lt && pos1(tail[l], names) > 0) { + translateSolfa(&tail[l]); + return; + } + if (l == 2) + error("\"..\" followed by non-note", print); + if (l >= lt) { + strcat(note, tail); + *tail = '\0'; + return; + } + ch = tail[0]; + predelete(tail, 1); + extractDotShortcut(tail, tail2); + sprintf(note + strlen(note), "%c%s", ch, tail); + strcpy(tail, tail2); +} + + +/* Extracts a signed number. */ + +Static Void extractSignedNumber(note, number) +Char *note, *number; +{ + short k; + Char note0[256]; + + k = pos1('+', note); + if (k == 0) + k = pos1('-', note); + *number = '\0'; + if (k == 0) + return; + strcpy(note0, note); + do { + sprintf(number + strlen(number), "%c", note[k-1]); + delete1(note, k); + } while (k <= strlen(note) && + (note[k-1] == '0' || pos1(note[k-1], digits) != 0)); + if (strlen(number) == 1) { + strcpy(note, note0); + *number = '\0'; + } +} + + +/* Local variables for extractGroup: */ +struct LOC_extractGroup { + Char *group; + short gl, k; + boolean probe, nonumber; +} ; + +Local Void tryMore(LINK) +struct LOC_extractGroup *LINK; +{ + while (LINK->k <= LINK->gl && LINK->group[LINK->k-1] == LINK->group[0]) + LINK->k++; +} + +Local Void try_(s, LINK) +Char *s; +struct LOC_extractGroup *LINK; +{ + LINK->probe = (LINK->k < LINK->gl && pos1(LINK->group[LINK->k-1], s) > 0); + if (LINK->probe) + LINK->k++; +} + +Local Void tryNumber(LINK) +struct LOC_extractGroup *LINK; +{ + boolean dot_ = false; + + LINK->nonumber = true; + while (LINK->k <= LINK->gl && pos1(LINK->group[LINK->k-1], digitsdot) > 0) { + LINK->k++; + if (LINK->group[LINK->k-1] == '.') { + if (dot_) + error("Extra dot in number", print); + else + dot_ = true; + } else + LINK->nonumber = false; + } +} + + +/* Extracts a symbol followed by optional +- or <> shift indicators */ + +Static Void extractGroup(note, delim, group_) +Char *note; +Char delim; +Char *group_; +{ + struct LOC_extractGroup V; + short k0; + Char tail[256]; + + V.group = group_; + extractAfter(note, delim, V.group); + if (*V.group == '\0') + return; + V.gl = strlen(V.group); + V.k = 2; + if (V.gl > 1 && V.group[1] == ':') + V.k = 3; + else { + tryMore(&V); + k0 = V.k; + try_("+-<>", &V); + if (V.probe) + tryNumber(&V); + if (V.nonumber) + V.k = k0; + k0 = V.k; + try_("+-<>", &V); + if (V.probe) + tryNumber(&V); + if (V.nonumber) + V.k = k0; + } + strcpy(tail, V.group); + V.k--; + V.group[(long)((int)V.k)] = '\0'; +/* p2c: notes.pas, line 169: + * Note: Modification of string length may translate incorrectly [146] */ + predelete(tail, V.k); + strcat(note, tail); +} + + +Static Void parseNote(note_, pnote) +Char *note_; +parsedNote *pnote; +{ + Char note[256]; + Char onlymidi[256]; + Char STR1[256]; + Char STR2[10]; + + strcpy(note, note_); + *pnote->shortcut = '\0'; + *pnote->xtuplet = '\0'; + *pnote->accidental = '\0'; + *pnote->dotgroup = '\0'; + *pnote->duration = '\0'; + *pnote->octave = '\0'; + *onlymidi = '\0'; + extractFirst(note, &pnote->name); + extractAfter(note, 'x', pnote->xtuplet); + extractAfter(note, ',', pnote->shortcut); + if (*pnote->shortcut == '\0') + extractDotShortcut(note, pnote->shortcut); + if (pnote->name != rest) { + extractGroup(note, 's', pnote->accidental); + if (*pnote->accidental == '\0') + extractGroup(note, 'f', pnote->accidental); + if (*pnote->accidental == '\0') + extractGroup(note, 'n', pnote->accidental); + } + /* Look for 'i' or 'c' anywhere in what is left of note.*/ + if (*pnote->accidental != '\0') { + extractOneOf(note, "ic", onlymidi); + strcat(pnote->accidental, onlymidi); +/* p2c: notes.pas, line 191: + * Note: Possible string truncation in assignment [145] */ + } + extractGroup(note, 'd', pnote->dotgroup); + if (pnote->name == rest) + extractSignedNumber(note, pnote->accidental); + extractOneOf(note, durations, pnote->duration); + sprintf(STR1, "%c", rest); + if (strcmp(note, STR1)) + extractContiguous(note, "=+-", pnote->octave); + if (*note != '\0' && isdigit(note[0])) { + sprintf(STR2, "%c%s", note[0], pnote->octave); + strcpy(pnote->octave, STR2); +/* p2c: notes.pas, line 197: + * Note: Possible string truncation in assignment [145] */ + delete1(note, 1); + } + strcpy(pnote->whatever, note); +/* p2c: notes.pas, line 199: + * Note: Possible string truncation in assignment [145] */ +} + + +/* On input: "note" is a note word; "dur1" is the default duration. + On output: "note" has possibly been modified; + possibly been split into two parts, the second being "shortcut"; + "dur" is the suggested new default duration; + "count" is the count of the total of "note" and "shortcut" */ +Void processNote(note, xnote, dur1, dur, count) +Char *note, *xnote; +Char dur1, *dur; +short *count; +{ + Char sc[3], origdur[3]; + short multiplicity, l; + parsedNote pnote; + Char STR1[36]; + Char STR3[256]; + + *xnote = '\0'; + *dur = dur1; + if (*note == '\0' || !isNoteOrRest(note) || isPause(note)) + return; + parseNote(note, &pnote); + if (debugMode()) { + printf("%s => ", note); + printNote(pnote); + } + if (pos1('.', pnote.whatever) > 0) { + sprintf(STR3, "Suspicious dot in word %s", note); + warning(STR3, print); + } + strcpy(origdur, pnote.duration); + if (*pnote.duration == '\0') + *dur = dur1; + else + *dur = pnote.duration[0]; + *count = count64[*dur - '0']; + if (*pnote.dotgroup != '\0') { + *count += *count / 2; + if (startsWith(pnote.dotgroup, "dd")) + *count += *count / 6; + } + sprintf(pnote.duration, "%c", *dur); + if (*pnote.shortcut != '\0') { + if (*pnote.dotgroup != '\0') + error("You may not explicitly dot a note with a shortcut", print); + sprintf(sc, "%c", pnote.shortcut[0]); + predelete(pnote.shortcut, 1); + if (!strcmp(sc, ".")) { + multiplicity = 1; + if (pnote.shortcut[0] == '.') { + multiplicity++; + predelete(pnote.shortcut, 1); + strcat(sc, "."); +/* p2c: notes.pas, line 233: + * Note: Possible string truncation in assignment [145] */ + } + *count += *count; + dur1 = pnote.duration[0]; + for (l = 1; l <= multiplicity; l++) { + sprintf(pnote.dotgroup + strlen(pnote.dotgroup), "%c", dotcode); +/* p2c: notes.pas, line 236: + * Note: Possible string truncation in assignment [145] */ + dur1 = half(dur1); + } + addDuration(pnote.shortcut, dur1); + } else { + addDuration(pnote.shortcut, half(pnote.duration[0])); + *count += *count / 2; + } + } + if (!insertDuration()) { + strcpy(pnote.duration, origdur); +/* p2c: notes.pas, line 243: + * Note: Possible string truncation in assignment [145] */ + } + if (rearrangeNote()) + sprintf(note, "%c%s%s%s%s%s%s", + pnote.name, pnote.duration, pnote.octave, pnote.whatever, + pnote.accidental, pnote.dotgroup, pnote.xtuplet); + else + strcpy(pnote.shortcut, " "); + if (!insertDuration() && *pnote.shortcut != '\0') { + sprintf(STR1, "%s%s", sc, pnote.shortcut); + strcpy(pnote.shortcut, STR1); +/* p2c: notes.pas, line 248: + * Note: Possible string truncation in assignment [145] */ + } + strcpy(xnote, pnote.shortcut); +} + + +Char octaveCode(note) +Char *note; +{ /*if debugMode then write('Octave code in note "',note,'" is ');*/ + parsedNote pnote; + + parseNote(note, &pnote); + /*if debugMode then writeln('"',octave,'"');*/ + if (*pnote.octave == '\0') + return ' '; + else + return (pnote.octave[0]); +} + + +Void removeOctaveCode(code, note) +Char code; +Char *note; +{ /*if debugMode then writeln('remove ',code,' from ',note);*/ + short k, l; + + l = strlen(note); + for (k = 1; k <= l; k++) { + if (note[k-1] == code) { + if (k == l || note[k] < '0' || note[k] > '9') { + delete1(note, k); + return; + } + } + } + fatalerror("Code not found in note"); +} + + +Void insertOctaveCode(code, note) +Char code; +Char *note; +{ /*if debugMode then writeln('insert ',code,' into ',note); */ + short l; + + l = strlen(note); + if (l < 2 || note[1] < '0' || note[1] > '9') + fatalerror("Trying to insert octave into note without duration"); + if (l <= 2 || note[2] < '0' || note[2] > '9') + insertChar(code, note, 3); + else + printf("Not inserting \"%c\", note already has octave code\"\n", code); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/notes.h b/Build/source/utils/m-tx/mtx-0.60d/notes.h new file mode 100644 index 00000000000..1b534b44186 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/notes.h @@ -0,0 +1,34 @@ +/* Header for module notes, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef NOTES_H +#define NOTES_H + + +#ifndef CONTROL_H +#include "control.h" +#endif + + +#ifdef NOTES_G +# define vextern +#else +# define vextern extern +#endif + + +extern short count64['9' + 1 - '0']; + + +extern Void processNote PP((Char *note, Char *xnote, int dur1, Char *dur, + short *count)); +extern Char durationCode PP((Char *note)); +extern Char octaveCode PP((Char *note)); +extern Void removeOctaveCode PP((int code, Char *note)); +extern Void insertOctaveCode PP((int code, Char *note)); +extern Void translateSolfa PP((Char *nt)); + + +#undef vextern + +#endif /*NOTES_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/notes.pas b/Build/source/utils/m-tx/mtx-0.60d/notes.pas new file mode 100644 index 00000000000..3fdb9edb3c2 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/notes.pas @@ -0,0 +1,280 @@ +unit notes; + +interface uses control; + +const count64: array['0'..'9'] of integer = + ( 64, 4, 32, 2, 16, 0, 1, 0, 8, 128 ); + +procedure processNote(var note, xnote: string; dur1: char; var dur: char; + var count: integer); +function durationCode (note: string): char; +function octaveCode (note: string): char; +procedure removeOctaveCode(code: char; var note: string); +procedure insertOctaveCode(code: char; var note: string); +procedure translateSolfa(var nt: char); + +implementation uses strings, globals; + +type + +parsedNote = record + name: char; + duration: string[1]; + octave: string[8]; + accidental, whatever, dotgroup, xtuplet: string[16]; + shortcut: string[32]; +end; + +procedure printNote(n: parsedNote); +begin with n do writeln(name,'|',duration,'|',octave,'|',accidental,'|', + whatever,'|',dotgroup,'|',xtuplet,'|',shortcut) +end; + +{ If rearrangeNote is TRUE, translate original note to the following form: + 1. Note name. + 2. Duration. + 3. Octave adjustments. + 4. Everything except the other six items. + 5. Accidental with adjustments (rest: height adjustment) + 6. Dot with adjustments. + 7. Xtuplet group. +} + +procedure translateSolfa(var nt: char); + var k: integer; +begin if solfaNoteNames then + begin k:=pos1(nt,solfa_names); if k>0 then nt:=has_duration[k] + end +end; + +function durationCode (note: string): char; + var code: char; + begin durationCode:=unspecified; if length(note)>1 then + begin code:=note[2]; if pos1(code,durations)>0 then durationCode:=code + end + end; + +function half ( dur: char ) : char; + var k: integer; + begin k:= pos1 (dur, durations ); half := dur; + if k=0 then error ('Invalid duration '+dur,print) + else if k>ndurs then error (dur+' is too short to halve',print) + else half := durations[k+1]; + end; + +procedure addDuration ( var note: string; dur: char); +begin if insertDuration then insertchar(dur,note,2); end; + +{ Extract procedures. All of these remove part of "note" (sometimes + the part is empty) and put it somewhere else. The part may be anywhere + in "note", except when otherwise specified.} + +{ Unconditionally extracts the first character. } + +procedure extractFirst(var note: string; var first: char); +begin first:=note[1]; predelete(note,1) +end; + +{ Extracts at most one of the characters in "hits". } + +procedure extractOneOf(var note: string; hits: string; var hit: string); + var i, l: integer; +begin l:=length(note); hit:=''; + for i:=1 to l do if pos1(note[i],hits)>0 then + begin hit:=note[i]; delete1(note,i); exit; + end; +end; + +{ Extracts contiguous characters in "hits" until no more are found. + There may be more later. } + +procedure extractContiguous(var note: string; hits: string; var hit: string); + var i, l, len: integer; +begin l:=length(note); len:=l; hit:=''; + for i:=1 to l do if pos1(note[i],hits)>0 then + begin + repeat if pos1(note[i],hits)=0 then exit; + hit:=hit+note[i]; delete1(note,i); dec(len) + until len0) then + begin translateSolfa(tail[l+1]); exit end; + if l=2 then error('".." followed by non-note',print); + if l>=lt then begin note:=note+tail; tail:=''; exit end; + ch:=tail[1]; predelete(tail,1); + extractDotShortcut(tail,tail2); note:=note+ch+tail; tail:=tail2; +end; + +{ Extracts a signed number. } + +procedure extractSignedNumber(var note, number: string); + var k: integer; + note0: string; +begin k:=pos1('+',note); if k=0 then k:=pos1('-',note); + number:=''; if k=0 then exit; + note0:=note; + repeat number:=number+note[k]; delete1(note,k) + until (k>length(note)) or (note[k]<>'0') and (pos1(note[k],digits)=0); + if length(number)=1 then begin note:=note0; number:='' end +end; + +{ Extracts a symbol followed by optional +- or <> shift indicators } + +procedure extractGroup(var note: string; delim: char; var group: string); + var gl, k, k0: integer; + probe, nonumber: boolean; + tail: string; + procedure tryMore; + begin while (k<=gl) and (group[k]=group[1]) do inc(k) end; + procedure try(s: string); + begin probe:=(k0); if probe then inc(k) + end; + procedure tryNumber; + var dot: boolean; + begin nonumber:=true; dot:=false; + while (k<=gl) and (pos1(group[k],digitsdot)>0) do + begin inc(k); if group[k]='.' then + if dot then error('Extra dot in number',print) else dot:=true + else nonumber:=false + end + end; +begin extractAfter(note,delim,group); if group='' then exit; + gl:=length(group); k:=2; + if (gl>1) and (group[2]=':') then k:=3 else + begin tryMore; + k0:=k; try('+-<>'); if probe then tryNumber; if nonumber then k:=k0; + k0:=k; try('+-<>'); if probe then tryNumber; if nonumber then k:=k0; + end; + tail:=group; dec(k); group[0]:=char(k); predelete(tail,k); + note:=note+tail +end; + +procedure parseNote(note: string; var pnote: parsedNote); +var onlymidi: string; +begin with pnote do + begin + shortcut:=''; xtuplet:=''; accidental:=''; dotgroup:=''; + duration:=''; octave:=''; onlymidi:=''; + extractFirst(note,name); + extractAfter(note,'x',xtuplet); + extractAfter(note,',',shortcut); + if shortcut='' then extractDotShortcut(note,shortcut); + if name<>rest then + begin extractGroup(note,'s',accidental); + if accidental='' then extractGroup(note,'f',accidental); + if accidental='' then extractGroup(note,'n',accidental); + end; +{ Look for 'i' or 'c' anywhere in what is left of note.} + if accidental<>'' then + begin extractOneOf(note,'ic',onlymidi); accidental:=accidental+onlymidi + end; + extractGroup(note,'d',dotgroup); + if name=rest then extractSignedNumber(note,accidental); + extractOneOf(note,durations,duration); + if note<>rest then extractContiguous(note,'=+-',octave); + if (length(note)>0) and (note[1]>='0') and (note[1]<='9') + then begin octave:=note[1]+octave; delete1(note,1) end; + whatever := note + end +end; + +{ On input: "note" is a note word; "dur1" is the default duration. + On output: "note" has possibly been modified; + possibly been split into two parts, the second being "shortcut"; + "dur" is the suggested new default duration; + "count" is the count of the total of "note" and "shortcut" } +procedure processNote(var note, xnote: string; dur1: char; var dur: char; + var count: integer); +var sc, origdur: string[2]; + multiplicity, l: integer; + pnote: parsedNote; +begin xnote:=''; dur:=dur1; + if (note='') or not isNoteOrRest(note) or isPause(note) then exit; + parseNote(note, pnote); + if debugMode then begin write(note,' => '); printNote(pnote) end; + with pnote do + begin + if pos1('.',whatever)>0 then warning('Suspicious dot in word '+note,print); + origdur := duration; + if duration='' then dur:=dur1 else dur:=duration[1]; + count:=count64[dur]; if dotgroup<>'' then + begin inc(count,count div 2); + if startswith(dotgroup,'dd') then inc(count,count div 6) + end; + duration:=dur; if shortcut<>'' then + begin + if dotgroup<>'' then + error('You may not explicitly dot a note with a shortcut',print); + sc:=shortcut[1]; predelete(shortcut,1); + if sc='.' then + begin multiplicity:=1; + if shortcut[1]='.' then + begin inc(multiplicity); predelete(shortcut,1); sc:=sc+'.' end; + inc(count,count); dur1:=duration[1]; + for l:=1 to multiplicity do + begin dotgroup:=dotgroup+dotcode; dur1:=half(dur1) end; + addDuration(shortcut,dur1); + end else + begin addDuration(shortcut,half(duration[1])); + inc(count,count div 2) + end + end; + if not insertDuration then duration := origdur; + if rearrangeNote + then note := name + duration + octave + whatever + + accidental + dotgroup + xtuplet + else shortcut:=' '; + if not insertDuration and (shortcut<>'') then shortcut:=sc+shortcut; + xnote:=shortcut + end +end; + +function octaveCode (note: string): char; + var pnote: parsedNote; +begin {if debugMode then write('Octave code in note "',note,'" is ');} + parseNote(note,pnote); with pnote do + begin {if debugMode then writeln('"',octave,'"');} + if octave='' then octaveCode:=' ' else octaveCode:=octave[1]; end +end; + +procedure removeOctaveCode(code: char; var note: string); + var k, l: integer; +begin {if debugMode then writeln('remove ',code,' from ',note);} l:=length(note); + for k:=1 to l do if note[k]=code then + if (k=l) or (note[k+1]<'0') or (note[k+1]>'9') then + begin delete1(note,k); exit end; + fatalError('Code not found in note') +end; + +procedure insertOctaveCode(code: char; var note: string); + var l: integer; +begin {if debugMode then writeln('insert ',code,' into ',note); } + l:=length(note); + if (l<2) or (note[2]<'0') or (note[2]>'9') then + fatalError('Trying to insert octave into note without duration'); + if (l<=2) or (note[3]<'0') or (note[3]>'9') then insertChar(code,note,3) + else writeln('Not inserting "',code,'", note already has octave code"') +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/preamble.c b/Build/source/utils/m-tx/mtx-0.60d/preamble.c new file mode 100644 index 00000000000..53e4a5b4576 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/preamble.c @@ -0,0 +1,1134 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "preamble.pas" */ + + +#include "p2c.h" + + +#define PREAMBLE_G +#include "preamble.h" + + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef MULTFILE_H +#include "multfile.h" +#endif + +#ifndef FILES_H +#include "files.h" +#endif + +#ifndef STATUS_H +#include "status.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +/* fpc mistakenly thinks CONTROL is not used */ + +#define blank_ ' ' +#define colon_ ':' +#define semicolon ';' +#define comma_ ',' + +#define max_styles 24 + + +typedef enum { + none, title, composer, pmx, options, msize, bars, shortnote, style, sharps, + flats, meter, space, pages, systems, enable, disable, name, indent, poet, + part, only, octave_, start +} command_type; + +typedef enum { + unknown, colon_line, command_line, comment_line, plain_line +} line_type; + +typedef char style_index; + +typedef char style_index0; + + +#define c1 title +#define cn start + + +Static short known_styles = 12; +Static boolean warn_redefine = false; + +Static Char commands[24][17] = { + "NONE", "TITLE", "COMPOSER", "PMX", "OPTIONS", "SIZE", "BARS/LINE", "SHORT", + "STYLE", "SHARPS", "FLATS", "METER", "SPACE", "PAGES", "SYSTEMS", "ENABLE", + "DISABLE", "NAME", "INDENT", "POET", "PART", "ONLY", "OCTAVE", "START" +}; + +Static Char cline[24][256] = { + "", "", "", "", "", "", "", "1/4", "", "0", "", "C", "", "1", "1", "", "", + "", "", "", "", "", "", "" +}; + +Static boolean redefined[24] = { + false, false, false, false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, false, false, false, + false, false +}; + +/** Known styles */ + +Static Char known_style[max_styles][256] = { + "SATB: Voices S,A T,B; Choral; Clefs G F", + "SATB4: Voices S A T B; Choral; Clefs G G G8 F", + "SINGER: Voices Voice; Vocal; Clefs G", + "PIANO: Voices RH LH; Continuo; Clefs G F", + "ORGAN: Voices RH LH Ped; Continuo; Clefs G F F", + "SOLO: Voices V; Clefs G", "DUET: Voices V1 Vc; Clefs G F", + "TRIO: Voices V1 Va Vc; Clefs G C F", + "QUARTET: Voices V1 V2 Va Vc; Clefs G G C F", + "QUINTET: Voices V1 V2 Va Vc1 Vc2; Clefs G G C F F", + "SEXTET: Voices V1 V2 Va1 Va2 Vc1 Vc2; Clefs G G C C F F", + "SEPTET: Voices V1 V2 Va1 Va2 Vc1 Vc2 Cb; Clefs G G C C F F F", "", "", "", + "", "", "", "", "", "", "", "", "" +}; + +Static style_index old_known_styles; +Static boolean style_used[max_styles]; +Static boolean omit_line[lines_in_paragraph]; +Static style_index0 orig_style_line[max_styles]; + +Static short nclefs, n_pages, n_systems, n_sharps, ngroups; +Static Char part_line[256], title_line[256], composer_line[256], + pmx_line[256], options_line[256], start_line[256], voices[256], + clefs[256]; +Static short group_start[maxgroups], group_stop[maxgroups]; +Static Char instr_name[maxstaves][41]; +Static boolean style_supplied; + + +/* ------------------ Styles ------------------ */ + +Static voice_index0 voiceCount(s_) +Char *s_; +{ + Char s[256]; + short i, l; + + strcpy(s, s_); + l = strlen(s); + for (i = 0; i <= l - 1; i++) { + if (s[i] == comma_) + s[i] = blank_; + } + return (wordCount(s)); +} + + +Static style_index0 findStyle(s_) +Char *s_; +{ + style_index0 Result = 0; + Char s[256]; + style_index0 i = 0; + + strcpy(s, s_); + sprintf(s + strlen(s), "%c", colon_); + while (i < known_styles) { + i++; + if (startsWithIgnoreCase(known_style[i-1], s)) + return i; + } + return Result; +} + + +Static Void addStyle(S) +Char *S; +{ + style_index0 sn; + Char STR1[256]; + + sn = findStyle(NextWord(STR1, S, colon_, dummy)); + if (sn > 0) { + strcpy(known_style[sn-1], S); + return; + } + if (known_styles < max_styles) { + known_styles++; + strcpy(known_style[known_styles-1], S); + } else + error("Can't add another style - table full", print); +} + + +Static Void readStyles() +{ + boolean eofstyle; + Char S[256]; + style_index0 l = 0; + Char *TEMP; + + if (styleFileFound()) + eofstyle = true; + else + eofstyle = P_eof(stylefile); + while (!eofstyle) { + fgets(S, 256, stylefile); + TEMP = strchr(S, '\n'); + if (TEMP != NULL) + *TEMP = 0; + if (*S != '\0') { + addStyle(S); + l++; + orig_style_line[known_styles-1] = l; + } + eofstyle = P_eof(stylefile); + } +} + + +Static Void applyStyle(s_, stylename, first_inst, first_stave) +Char *s_, *stylename; +stave_index first_inst, first_stave; +{ + Char s[256]; + Char clef[256], subline[256], subcommand[256]; + stave_index0 i, last_inst, last_stave; + boolean continuo = false, toosoon = false, vocal = false; + Char STR2[256]; + + strcpy(s, s_); + last_inst = first_inst - 1; + GetNextWord(subline, s, blank_, colon_); + while (*s != '\0') { + GetNextWord(subline, s, semicolon, dummy); + i = curtail(subline, semicolon); + GetNextWord(subcommand, subline, blank_, dummy); + if (equalsIgnoreCase(subcommand, "VOICES")) { + sprintf(voices + strlen(voices), " %s", subline); + last_stave = first_stave + wordCount(subline) - 1; + last_inst = first_inst + voiceCount(subline) - 1; + } else if (equalsIgnoreCase(subcommand, "CLEFS")) { + strcpy(clef, subline); + sprintf(clefs + strlen(clefs), " %s", clef); + } else if (equalsIgnoreCase(subcommand, "VOCAL")) { + if (last_inst < first_inst) + toosoon = true; + else { + some_vocal = true; + vocal = true; + for (i = first_inst; i <= last_inst; i++) + setVocal(i, true); + } + } else if (equalsIgnoreCase(subcommand, "CHORAL") || + equalsIgnoreCase(subcommand, "GROUP")) { + if (last_inst < first_inst) + toosoon = true; + else { + if (equalsIgnoreCase(subcommand, "CHORAL")) { + some_vocal = true; + vocal = true; + for (i = first_inst; i <= last_inst; i++) + setVocal(i, true); + } + if (ngroups == maxgroups) + error("Too many groups", print); + else { + ngroups++; + group_start[ngroups-1] = first_stave; + group_stop[ngroups-1] = last_stave; + } + } + } else if (equalsIgnoreCase(subcommand, "CONTINUO")) + continuo = true; + else { + sprintf(STR2, "Subcommand %s in STYLE unknown", subcommand); + error(STR2, print); + } + if (toosoon) { + sprintf(STR2, "You must first give VOICES before specifying %s", + subcommand); + error(STR2, print); + } + } + if (vocal && continuo) + error("A continuo instrument may not be vocal", print); + if (wordCount(clef) != last_stave - first_stave + 1) + error("Number of clefs does not match number of voices", print); + if (first_stave == last_stave || continuo) { + strcpy(instr_name[first_stave-1], stylename); +/* p2c: preamble.pas, line 184: + * Note: Possible string truncation in assignment [145] */ + } else { + for (i = first_stave - 1; i <= last_stave - 1; i++) + *instr_name[i] = '\0'; + } + if (continuo) { + ninstr++; + stave[ninstr-1] = first_stave; + for (i = first_stave - 1; i <= last_stave - 1; i++) + instr[i] = ninstr; + return; + } + for (i = first_stave; i <= last_stave; i++) { + ninstr++; + stave[ninstr-1] = i; + instr[i-1] = ninstr; + } +} + + +Static Void applyStyles() +{ + short n1, n2, sn; + Char s[256]; + Char STR2[256]; + + *voices = '\0'; + *clefs = '\0'; + ninstr = 0; + while (*cline[(long)style] != '\0') { + n1 = voiceCount(voices) + 1; + n2 = wordCount(voices) + 1; + GetNextWord(s, cline[(long)style], blank_, comma_); + curtail(s, comma_); + sn = findStyle(s); + if (sn == 0) { + sprintf(STR2, "Style %s unknown", s); + error(STR2, print); + } + line_no = orig_style_line[sn-1]; + applyStyle(known_style[sn-1], s, n1, n2); + style_used[sn-1] = true; + } +} + + +/* ------------------------------------------------------------- */ + +Static Void wipeCommands() +{ + command_type c; + + for (c = c1; (long)c <= (long)cn; c = (command_type)((long)c + 1)) + *cline[(long)c] = '\0'; +} + + +boolean omitLine(line) +paragraph_index line; +{ + if (line == 0) + return true; + else + return (omit_line[line-1]); +} + + +Static Void setName() +{ + short i, FORLIM; + + if (!redefined[(long)name]) + return; + setFeature("instrumentNames", true); + FORLIM = ninstr; + for (i = 0; i <= FORLIM - 1; i++) { + GetNextWord(instr_name[i], cline[(long)name], blank_, dummy); +/* p2c: preamble.pas, line 224: + * Note: Possible string truncation in assignment [145] */ + } +} + + +Static Void setIndent() +{ + if (redefined[(long)indent]) + strcpy(fracindent, cline[(long)indent]); +} + + +Static Void setInitOctave() +{ + if (redefined[(long)octave_]) + initOctaves(cline[(long)octave_]); +} + + +Local Void checkLabel(w) +Char *w; +{ + voice_index j, FORLIM; + Char STR1[256], STR2[256]; + + FORLIM = nvoices; + for (j = 0; j <= FORLIM - 1; j++) { + if (!strcmp(w, voice_label[j])) { + sprintf(STR2, "Voice label %s not unique", w); + warning(STR2, print); + return; + } + } + if (strlen(w) > 2) + return; + if (pos1(w[0], "CLU") > 0) { + if (strlen(w) > 1) { + if (pos1(w[1], "123456789") == 0) + return; + } + } else if (pos1(w[0], "123456789") == 0) + return; + sprintf(STR1, "Voice label %s conflicts with reserved label", w); + error(STR1, print); +} + + +Static Void setVoices(line) +Char *line; +{ + short k; + Char s[256], w[256]; + Char STR1[256]; + short FORLIM; + + nvoices = 0; + nstaves = 0; + do { + GetNextWord(s, line, blank_, dummy); + if (*s != '\0') { + nstaves++; + k = 0; + first_on_stave[nstaves-1] = nvoices + 1; + do { + GetNextWord(w, s, blank_, comma_); + curtail(w, comma_); + if (*w != '\0') { + k++; + if (k <= 2) { + nvoices++; + checkLabel(w); + strcpy(voice_label[nvoices-1], w); + if (*instr_name[nstaves-1] == '\0') { + strcpy(instr_name[nstaves-1], w); +/* p2c: preamble.pas, line 264: + * Note: Possible string truncation in assignment [145] */ + } + setStavePos(nvoices, nstaves, k); + } + } + } while (*w != '\0'); + if (k > 2) { + sprintf(STR1, "More than two voices per stave: %s", s); + error(STR1, print); + } + if (k == 2) { + sprintf(instr_name[nstaves-1], "\\mtxTwoInstruments{%s}{%s}", + voice_label[nvoices-2], voice_label[nvoices-1]); +/* p2c: preamble.pas, line 271: + * Note: Possible string truncation in assignment [145] */ + } + number_on_stave[nstaves-1] = k; + } + } while (*line != '\0'); + FORLIM = nvoices; + for (k = 0; k <= FORLIM - 1; k++) + selected[k] = true; +} + + +Static Void setClefs(line_) +Char *line_; +{ + Char line[256]; + Char s[256]; + + strcpy(line, line_); + nclefs = 0; + do { + GetNextWord(s, line, blank_, dummy); + if (*s != '\0') { + nclefs++; + if (strlen(s) == 1) + clef[nclefs-1] = s[0]; + else + clef[nclefs-1] = s[1]; + } + } while (*s != '\0'); +} + + +Static Void setSize(line_) +Char *line_; +{ + Char line[256]; + stave_index0 i = 0; + Char word[256]; + stave_index0 FORLIM; + + strcpy(line, line_); + while (i < ninstr) { + GetNextWord(word, line, blank_, dummy); + if (*word == '\0') + break; + i++; + getNum(word, &musicsize); + stave_size[i-1] = musicsize; + } + if ((unsigned)musicsize >= 32 || ((1L << musicsize) & 0x110000L) == 0) { + FORLIM = ninstr; + for (i = 0; i <= FORLIM - 1; i++) { + if (stave_size[i] == unspec) + stave_size[i] = musicsize; + } + } + if (musicsize < 16) + musicsize = 16; + else if (musicsize > 20) + musicsize = 20; +} + + +Static command_type findCommand(command) +Char *command; +{ + command_type j; + + curtail(command, ':'); + if (equalsIgnoreCase(command, "STYLE")) + style_supplied = true; + for (j = c1; (long)j <= (long)cn; j = (command_type)((long)j + 1)) { + if (equalsIgnoreCase(command, commands[(long)j])) + return j; + } + return none; +} + + +boolean isCommand(command_) +Char *command_; +{ + Char command[256]; + + strcpy(command, command_); + return (findCommand(command) != none); +} + + +Static Void doEnable(line, choice) +Char *line; +boolean choice; +{ + Char word[256]; + Char STR1[256]; + + do { + GetNextWord(word, line, blank_, dummy); + if (*word != '\0') { + if (!setFeature(word, choice)) { + sprintf(STR1, "No such feature: %s", word); + error(STR1, !print); + } + } + } while (*word != '\0'); +} + + +Static line_type doCommand(line_) +Char *line_; +{ + line_type Result; + Char line[256]; + Char command[256]; + command_type last_command; + boolean starts_with_note; + Char STR1[256], STR2[256]; + + strcpy(line, line_); + if (line[0] == comment) + return comment_line; + starts_with_note = maybeMusicLine(line); + GetNextWord(command, line, blank_, colon_); + sprintf(STR1, "%c", colon_); + if (endsWith(command, STR1)) { + last_command = findCommand(command); + Result = command_line; + if (last_command == enable) + doEnable(line, true); + else if (last_command == disable) + doEnable(line, false); + if (last_command != none) { + strcpy(cline[(long)last_command], line); + if (last_command == start) + strcpy(start_line, line); + if (warn_redefine && redefined[(long)last_command]) { + sprintf(STR2, "You have redefined preamble command %s", command); + warning(STR2, print); + } + redefined[(long)last_command] = true; + return Result; + } + Result = colon_line; + sprintf(STR2, "%s%c %s", command, colon_, line); + addStyle(STR2); + orig_style_line[known_styles-1] = line_no; + return Result; + } else if (starts_with_note) + return plain_line; + else + return unknown; + return Result; +} + + +Void setOnly(line_) +Char *line_; +{ + Char line[256]; + short num, num1, num2, l; + Char s[256]; + Char STR1[256]; + + strcpy(line, line_); + if (*line == '\0') + return; + if (startsWithIgnoreCase(line, "only")) + GetNextWord(STR1, line, colon_, dummy); + for (l = 0; l <= lines_in_paragraph - 1; l++) + omit_line[l] = true; + do { + GetNextWord(s, line, blank_, comma_); + if (*s == '\0') + return; + curtail(s, comma_); + if (pos1('-', s) == 0) { + getNum(s, &num); + if (num > 0 && num <= lines_in_paragraph) + omit_line[num-1] = false; + else + warning("Invalid line number in Only: is skipped", print); + } else { + getTwoNums(s, &num1, &num2); + if (num1 > 0 && num2 <= lines_in_paragraph) { + for (num = num1 - 1; num <= num2 - 1; num++) + omit_line[num] = false; + } else + warning("Invalid line range in Only: is skipped", print); + } + } while (true); +} + + +Void interpretCommands() +{ + short i, num, den, nbars; + Char STR2[256]; + short FORLIM; + + strcpy(title_line, cline[(long)title]); + strcpy(part_line, cline[(long)part]); + if (*cline[(long)poet] != '\0' || *cline[(long)composer] != '\0') + sprintf(composer_line, "\\mtxComposerLine{%s}{%s}", + cline[(long)poet], cline[(long)composer]); + else + *composer_line = '\0'; + strcpy(pmx_line, cline[(long)pmx]); + GetNextWord(options_line, cline[(long)options], blank_, dummy); + FORLIM = known_styles; + for (i = 0; i <= FORLIM - 1; i++) + style_used[i] = false; + applyStyles(); + setVoices(voices); + FORLIM = known_styles; + for (i = old_known_styles; i <= FORLIM - 1; i++) { + if (!style_used[i]) { + warning("The following style was supplied but not used", !print); + puts(known_style[i]); + } + } + setClefs(clefs); + if (!redefined[(long)meter]) { + sprintf(STR2, "You have not defined Meter, assuming \"%s\" ", + cline[(long)meter]); + warning(STR2, !print); + } + getMeter(cline[(long)meter], &meternum, &meterdenom, &pmnum, &pmdenom); + setDefaultDuration(meterdenom); + if (meternum == 0 && + !(redefined[(long)pages] || redefined[(long)systems] || + redefined[(long)bars])) { + strcpy(cline[(long)bars], "1"); + redefined[(long)bars] = true; + } + if (redefined[(long)pages] || redefined[(long)systems]) { + if (redefined[(long)bars]) + warning("BARS/LINE ignored since you specified PAGES or SYSTEMS", print); + if (redefined[(long)systems]) + getNum(cline[(long)systems], &n_systems); + else + warning("PAGES specified but not SYSTEMS", !print); + if (redefined[(long)pages]) + getNum(cline[(long)pages], &n_pages); + else + warning("SYSTEMS specified but not PAGES", !print); + } else if (redefined[(long)bars]) { + getNum(cline[(long)bars], &nbars); + if (nbars > 0) { + n_pages = 0; + n_systems = nbars; + } + } + getNum(cline[(long)sharps], &n_sharps); + setSpace(cline[(long)space]); + setSize(cline[(long)msize]); + getTwoNums(cline[(long)shortnote], &num, &den); + if (den == 0) + den = 1; + short_note = num * 64 / den; + if (*cline[(long)flats] != '\0') { + getNum(cline[(long)flats], &n_sharps); + n_sharps = -n_sharps; + } + setName(); + setIndent(); + setInitOctave(); + setOnly(cline[(long)only]); + if (*options_line != '\0') { + warning("\"Options\" is cryptic and obsolescent.", !print); + printf(" Use \"Enable\" and \"Disable\" instead.\n"); + } + FORLIM = strlen(options_line); + for (i = 0; i <= FORLIM - 1; i++) + processOption(options_line[i]); +} + + +Void preambleDefaults() +{ + short i; + + xmtrnum0 = 0.0; + strcpy(fracindent, "0"); + musicsize = 20; + *start_line = '\0'; + some_vocal = false; + ngroups = 0; + style_supplied = false; + for (i = 1; i <= maxvoices; i++) + setVocal(i, false); + for (i = 0; i <= maxstaves - 1; i++) { + nspace[i] = unspec; + stave_size[i] = unspec; + } + n_pages = 1; + n_systems = 1; + readStyles(); + old_known_styles = known_styles; + for (i = 0; i <= lines_in_paragraph - 1; i++) + omit_line[i] = false; +} + + +Static Void preambleGuess(maybe_voices) +voice_index maybe_voices; +{ + switch (maybe_voices) { + + case 1: + strcpy(cline[(long)style], "Solo"); + break; + + case 2: + strcpy(cline[(long)style], "Duet"); + break; + + case 3: + strcpy(cline[(long)style], "Trio"); + break; + + case 4: + strcpy(cline[(long)style], "Quartet"); + break; + + case 5: + strcpy(cline[(long)style], "Quintet"); + break; + + case 6: + strcpy(cline[(long)style], "Sextet"); + break; + + case 7: + strcpy(cline[(long)style], "Septet"); + break; + + default: + error("I cannot guess a style", !print); + return; + break; + } + printf("I guess this piece is a %s for strings in C major.\n", + cline[(long)style]); + printf(" Why not provide a STYLE in the setup paragraph to make sure?\n"); +} + + +/* ------------------------------------------------------------------ */ + +Void nonMusic() +{ + paragraph_index i, FORLIM; + + FORLIM = para_len; + for (i = 0; i <= FORLIM - 1; i++) + doCommand(P[i]); + setOnly(cline[(long)only]); + wipeCommands(); +} + + +boolean thisCase() +{ + boolean Result; + +/* p2c: preamble.pas: Note: Eliminated unused assignment statement [338] */ + if (!startsWithIgnoreCase(P[0], "case:")) + return true; + Result = (choice != ' ' && pos1(choice, P[0]) > 0); + strcpy(P[0], "%"); + return Result; +} + + +Void augmentPreamble(control_para) +boolean control_para; +{ + paragraph_index i; + line_type l; + short s[5]; + paragraph_index FORLIM; + + if (!thisCase()) + return; + for (l = unknown; (long)l <= (long)plain_line; l = (line_type)((long)l + 1)) + s[(long)l] = 0; + FORLIM = para_len; + for (i = 0; i <= FORLIM - 1; i++) { + line_no = orig_line_no[i]; + l = doCommand(P[i]); + s[(long)l]++; + if (l == comment_line && P[i][1] == comment) { + predelete(P[i], 2); + putLine(P[i]); + } + if (!control_para && l == unknown) + error("Unidentifiable line", print); + } + if (!control_para && s[(long)command_line] > 0 && s[(long)plain_line] > 0) + error("Mixture of preamble commands and music", !print); +} + + +Void doPreamble() +{ + paragraph_index i; + voice_index0 maybe_voices = 0; + paragraph_index FORLIM; + + if (style_supplied) /*augmentPreamble(not known);*/ + return; + if (true) + warning("No STYLE supplied", !print); + FORLIM = para_len; + for (i = 0; i <= FORLIM - 1; i++) { + if (maybeMusicLine(P[i])) + maybe_voices++; + } + if (maybe_voices > 0) + preambleGuess(maybe_voices); + else + error("No voices found", !print); +} + + +Void respace() +{ + stave_index i, j; + Char STR1[256]; + Char STR2[256], STR3[256]; + + for (i = ninstr; i >= 2; i--) { + j = ninstr - i + 1; + if (nspace[j-1] != unspec) { + sprintf(STR3, "\\mtxInterInstrument{%s}{%s}", + toString(STR1, i - 1), toString(STR2, nspace[j-1])); + tex3(STR3); + } + } + if (nspace[ninstr-1] != unspec) { + sprintf(STR3, "\\mtxStaffBottom{%s}", toString(STR1, nspace[ninstr-1])); + tex3(STR3); + } + must_respace = false; +} + + +Void restyle() +{ + must_restyle = false; +} + + +Static short clefno(cl) +Char cl; +{ + short Result; + + switch (cl) { + + case 'G': + case '0': + case 't': + case '8': + Result = 0; + break; + + case 's': + case '1': + Result = 1; + break; + + case 'm': + case '2': + Result = 2; + break; + + case 'a': + case '3': + Result = 3; + break; + + case 'n': + case '4': + Result = 4; + break; + + case 'r': + case '5': + Result = 5; + break; + + case 'F': + case 'b': + case '6': + Result = 6; + break; + + case 'C': + Result = 3; + break; + + default: + warning("Unknown clef code - replaced by treble", print); + Result = 0; + break; + } + return Result; +} + + +Static Void doTenorClefs() +{ + voice_index i; + Char c; + voice_index FORLIM; + Char STR1[256]; + Char STR3[256]; + + FORLIM = nclefs; + for (i = 1; i <= FORLIM; i++) { + c = clef[i-1]; + if (c == '8' || c == 't') { + sprintf(STR3, "\\\\mtxTenorClef{%s}\\", toString(STR1, PMXinstr(i))); + putLine(STR3); + } + } +} + + +Local Char *pmxMeter(Result) +Char *Result; +{ + short denom, num; + Char STR1[256], STR3[256], STR4[256], STR5[256]; + + if (meternum == 0) { + num = beatsPerLine(); /** denom := 0; **/ + meterChange(old_meter_word, num, meterdenom, true); + } else + num = meternum; /** denom := pmdenom; **/ + /* CMO: unconditonally assign value of pmdenom to denom */ + denom = pmdenom; + sprintf(Result, "%s %s %s %s", + toString(STR1, num), toString(STR3, PMXmeterdenom(meterdenom)), + toString(STR4, pmnum), toString(STR5, denom)); + return Result; +} + +Local Char *sizecode(Result, k) +Char *Result; +short k; +{ + strcpy(Result, "\\mtxNormalSize"); + switch (k) { + + case 13: + if (musicsize == 20) + strcpy(Result, "\\mtxTinySize"); + else + strcpy(Result, "\\mtxSmallSize"); + break; + + case 16: + if (musicsize == 20) + strcpy(Result, "\\mtxSmallSize"); + break; + + case 20: + if (musicsize == 16) + strcpy(Result, "\\mtxLargeSize"); + break; + + case 24: + if (musicsize == 20) + strcpy(Result, "\\mtxLargeSize"); + else + strcpy(Result, "\\mtxHugeSize"); + break; + + case 29: + strcpy(Result, "\\mtxHugeSize"); + break; + + default: + error("Valid sizes are 13, 16, 20, 24, 29", print); + break; + } + return Result; +} + + +Void doPMXpreamble() +{ + static Char clefcode[9] = "0123456"; + short i, j; + Char clefs[256]; + Char STR1[256]; + Char STR2[256]; + Char STR3[58]; + short FORLIM; + Char STR5[256]; + + if (*composer_line != '\0') + putLine(composer_line); + if (*title_line != '\0') { + sprintf(STR2, "\\mtxTitleLine{%s}", title_line); + putLine(STR2); + } + putLine("---"); + if (instrumentNames() && !redefined[(long)indent]) + strcpy(fracindent, "0.12"); + fprintf(outfile, "%d", nstaves); + fprintf(outfile, " %d", -ninstr); + stave[ninstr] = nstaves + 1; + for (j = ninstr; j >= 1; j--) + fprintf(outfile, " %d", stave[j] - stave[j-1]); + fprintf(outfile, " %s %8.5f %d %d %d %d %s\n", + pmxMeter(STR1), xmtrnum0, n_sharps, n_pages, n_systems, musicsize, + fracindent); + FORLIM = ninstr; + for (i = 1; i <= FORLIM; i++) { + if (!instrumentNames()) + putLine(""); + else { + sprintf(STR3, "\\mtxInstrName{%s}", instr_name[ninstr - i]); + putLine(STR3); + } + } + *clefs = '\0'; + for (i = nclefs - 1; i >= 0; i--) + sprintf(clefs + strlen(clefs), "%c", clefcode[clefno(clef[i])]); + putLine(clefs); + if (*texdir == '\0') + strcpy(texdir, "./"); + putLine(texdir); + + pmx_preamble_done = true; + respace(); + + FORLIM = ngroups; + for (j = 1; j <= FORLIM; j++) + fprintf(outfile, "\\\\mtxGroup{%s}{%s}{%s}\\\n", + toString(STR1, j), toString(STR2, ninstr - group_start[j-1] + 1), + toString(STR5, ninstr - group_stop[j-1] + 1)); + FORLIM = ninstr; + for (j = 1; j <= FORLIM; j++) { + if (stave_size[j-1] != unspec) { + sprintf(STR5, "\\\\mtxSetSize{%s}{%s}\\", + toString(STR1, ninstr - j + 1), + sizecode(STR2, stave_size[j-1])); + putLine(STR5); + } + } + if (*part_line != '\0') { + putLine("Ti"); + putLine(part_line); + } + if (*title_line != '\0') { + putLine("Tt"); + putLine("\\mtxTitle"); + } + if (*composer_line != '\0') { + putLine("Tc"); + putLine("\\mtxPoetComposer"); + } + if (*pmx_line != '\0') + putLine(pmx_line); + doTenorClefs(); + wipeCommands(); +} + + +Char *startString(Result, voice) +Char *Result; +voice_index0 voice; +{ + Char s[256], w[256]; + voice_index j; + + strcpy(s, start_line); + for (j = 1; j <= voice; j++) + GetNextWord(w, s, dummy, ';'); + curtail(w, ';'); + if (*w != '\0') { + sprintf(Result, "%s ", w); + return Result; + } else + return strcpy(Result, w); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/preamble.h b/Build/source/utils/m-tx/mtx-0.60d/preamble.h new file mode 100644 index 00000000000..ef854aa0dcb --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/preamble.h @@ -0,0 +1,42 @@ +/* Header for module preamble, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef PREAMBLE_H +#define PREAMBLE_H + + +/*$X+*/ +/* Interpret preamble paragraph, compose PMX preamble */ + +#ifndef GLOBALS_H +#include "globals.h" +#endif + + +#ifdef PREAMBLE_G +# define vextern +#else +# define vextern extern +#endif + +extern boolean thisCase PV(); +extern Void preambleDefaults PV(); +extern Void interpretCommands PV(); +extern Void doPreamble PV(); +extern Void doPMXpreamble PV(); +extern Void respace PV(); +extern Void restyle PV(); +extern Char *startString PP((Char *Result, int voice)); +extern Void augmentPreamble PP((int control_para)); +extern boolean omitLine PP((int line)); +extern Void nonMusic PV(); +extern Void setOnly PP((Char *line)); +extern boolean isCommand PP((Char *command)); + + +#define known true + + +#undef vextern + +#endif /*PREAMBLE_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/preamble.pas b/Build/source/utils/m-tx/mtx-0.60d/preamble.pas new file mode 100644 index 00000000000..9ece7d67adc --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/preamble.pas @@ -0,0 +1,624 @@ +unit preamble; +{$X+} +{ Interpret preamble paragraph, compose PMX preamble } + +interface uses globals; + +function thisCase: boolean; +procedure preambleDefaults; +procedure interpretCommands; +procedure doPreamble; +procedure doPMXpreamble; +procedure respace; +procedure restyle; +function startString(voice: voice_index0): string; +procedure augmentPreamble(control_para: boolean); +function omitLine(line: paragraph_index): boolean; +procedure nonMusic; +procedure setOnly(line: string); +function isCommand(command: string): boolean; + +const known = true; + +implementation uses control, mtxline, strings, files, status, utility; +{ fpc mistakenly thinks CONTROL is not used } + +const blank = ' '; + colon = ':'; + semicolon = ';'; + comma = ','; + known_styles: integer = 12; + max_styles = 24; + warn_redefine: boolean = false; + +type command_type = + ( none, title, composer, pmx, options, msize, bars, shortnote, + style, sharps, flats, meter, space, pages, systems, + enable, disable, name, indent, + poet, part, only, octave, start ); + + line_type = ( unknown, colon_line, command_line, comment_line, + plain_line ); + + style_index = 1..max_styles; + style_index0 = 0..max_styles; + +const c1 = title; cn = start; + commands: array[command_type] of string[16] = + ( 'NONE', 'TITLE', 'COMPOSER', 'PMX', 'OPTIONS', + 'SIZE', 'BARS/LINE', 'SHORT', + 'STYLE', 'SHARPS', 'FLATS', 'METER', 'SPACE', 'PAGES', 'SYSTEMS', + 'ENABLE', 'DISABLE', + 'NAME', 'INDENT', 'POET', 'PART', 'ONLY', 'OCTAVE', 'START'); + cline: array[command_type] of string = + ( '', '', '', '', '', '', '', '1/4', + '', '0', '', 'C', '', '1', '1', '', '', '', '', '', '', '', '', '' ); + redefined: array[command_type] of boolean = + ( false, false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, false, + false, false, false, false, false, false ); + +(** Known styles *) + known_style: array[style_index] of string = ( +'SATB: Voices S,A T,B; Choral; Clefs G F', +'SATB4: Voices S A T B; Choral; Clefs G G G8 F', +'SINGER: Voices Voice; Vocal; Clefs G', +'PIANO: Voices RH LH; Continuo; Clefs G F', +'ORGAN: Voices RH LH Ped; Continuo; Clefs G F F', +'SOLO: Voices V; Clefs G', +'DUET: Voices V1 Vc; Clefs G F', +'TRIO: Voices V1 Va Vc; Clefs G C F', +'QUARTET: Voices V1 V2 Va Vc; Clefs G G C F', +'QUINTET: Voices V1 V2 Va Vc1 Vc2; Clefs G G C F F', +'SEXTET: Voices V1 V2 Va1 Va2 Vc1 Vc2; Clefs G G C C F F', +'SEPTET: Voices V1 V2 Va1 Va2 Vc1 Vc2 Cb; Clefs G G C C F F F', +'', '', '', '', '', '', '', '', '', '', '', ''); + +var old_known_styles: style_index; + style_used: array[style_index] of boolean; + omit_line: array[paragraph_index] of boolean; + orig_style_line: array[style_index] of style_index0; + +var nclefs, n_pages, n_systems, n_sharps, ngroups: integer; + part_line, title_line, composer_line, pmx_line, options_line, + start_line, voices, clefs: string; + group_start, group_stop: array[1..maxgroups] of integer; + instr_name: array[stave_index] of string[40]; + style_supplied: boolean; + +{ ------------------ Styles ------------------ } + +function voiceCount(s: string): voice_index0; + var i, l: integer; + begin l:=length(s); for i:=1 to l do if s[i]=comma then s[i]:=blank; + voiceCount:=wordCount(s); + end; + +function findStyle(s: string): style_index0; + var i: style_index0; +begin + i:=0; s:=s+colon; findStyle:=0; + while i0 then known_style[sn] := S + else if known_styles < max_styles then + begin inc(known_styles); + known_style[known_styles] := S; + end + else error('Can''t add another style - table full',print); +end; + +procedure readStyles; + var eofstyle: boolean; + S: string; + l: style_index0; +begin if styleFileFound then eofstyle:=true else eofstyle := eof(stylefile); + l:=0; + while not eofstyle do + begin readln(stylefile,S); if S<>'' then + begin addStyle(S); inc(l); orig_style_line[known_styles]:=l; end; + eofstyle := eof(stylefile); + end; +end; + +procedure applyStyle(s, stylename: string; + first_inst, first_stave: stave_index); + var clef, subline, subcommand: string; + i, last_inst, last_stave: stave_index0; + continuo, toosoon, vocal: boolean; + begin last_inst:=first_inst-1; + toosoon := false; continuo:=false; vocal := false; + subline:=GetNextWord(s,blank,colon); + while s<>'' do + begin subline:=GetNextWord(s,semicolon,dummy); + i:=curtail(subline,semicolon); + subcommand:=GetNextWord(subline,blank,dummy); + if equalsIgnoreCase(subcommand,'VOICES') then + begin voices:=voices+' '+subline; + last_stave := first_stave + wordCount(subline) - 1; + last_inst := first_inst + voiceCount(subline) - 1; + end + else if equalsIgnoreCase(subcommand,'CLEFS') + then + begin clef:=subline; clefs:=clefs+' '+clef; end + else if equalsIgnoreCase(subcommand,'VOCAL') then + if last_instlast_stave-first_stave+1 then error( + 'Number of clefs does not match number of voices',print); + if (first_stave=last_stave) or continuo + then instr_name[first_stave]:=stylename + else for i:=first_stave to last_stave do instr_name[i]:=''; + if continuo then + begin inc(ninstr); stave[ninstr] := first_stave; + for i:=first_stave to last_stave do instr[i]:=ninstr; + end + else for i:=first_stave to last_stave do + begin inc(ninstr); stave[ninstr] := i; instr[i] := ninstr; + end; + end; + +procedure applyStyles; + var n1, n2, sn: integer; + s: string; + begin voices:=''; clefs:=''; ninstr:=0; + while cline[style]<>'' do + begin n1:=voiceCount(voices)+1; + n2:=wordCount(voices)+1; + s:=GetNextWord(cline[style],blank,comma); + curtail(s,comma); + sn:=findStyle(s); if sn=0 then error ('Style ' + s +' unknown',print); + line_no := orig_style_line[sn]; applyStyle(known_style[sn],s,n1,n2); + style_used[sn] := true; + end; + end; + +{ ------------------------------------------------------------- } + +procedure wipeCommands; + var c: command_type; +begin for c:=c1 to cn do cline[c]:=''; +end; + +function omitLine(line: paragraph_index): boolean; +begin if line=0 then omitLine:=true else omitLine:=omit_line[line] end; + +procedure setName; + var i: integer; +begin if not redefined[name] then exit; + setFeature('instrumentNames',true); + for i:=1 to ninstr do + instr_name[i] := getNextWord(cline[name],blank,dummy); +end; + +procedure setIndent; +begin if redefined[indent] then fracindent := cline[indent]; +end; + +procedure setInitOctave; +begin if redefined[octave] then initOctaves(cline[octave]); +end; + +procedure setVoices(var line: string); + var k: integer; + s, w: string; + procedure checkLabel(w: string); + var j: voice_index; + begin + for j:=1 to nvoices do if w=voice_label[j] then + begin warning('Voice label '+w+' not unique',print); exit; + end; + if length(w)>2 then exit; + if pos1(w[1],'CLU')>0 then + if length(w)>1 then if pos1(w[2],'123456789')=0 then exit + else + else + else if pos1(w[1],'123456789')=0 then exit; + error('Voice label '+w+' conflicts with reserved label',print); + end; +begin nvoices:=0; nstaves:=0; + repeat s:=GetNextWord(line,blank,dummy); + if length(s)>0 then + begin inc(nstaves); k:=0; + first_on_stave[nstaves] := nvoices + 1; + repeat + w:=GetNextWord(s,blank,comma); curtail(w, comma); + if w<>'' then + begin + inc(k); if k<=2 then + begin inc(nvoices); checkLabel(w); + voice_label[nvoices]:=w; + if instr_name[nstaves]='' then instr_name[nstaves]:=w; + setStavePos(nvoices,nstaves,k); + end + end; + until w=''; + if k>2 then error('More than two voices per stave: ' + s,print); + if k=2 then instr_name[nstaves]:='\mtxTwoInstruments{' + + voice_label[nvoices-1] + '}{'+ voice_label[nvoices] + '}'; + number_on_stave[nstaves] := k; + end + until length(line)=0; + for k:=1 to nvoices do selected[k]:=true; +end; + +procedure setClefs(line: string); + var s: string; +begin + nclefs:=0; + repeat + s:=getnextword(line,blank,dummy); + if s<>'' then + begin inc(nclefs); + if length(s)=1 then clef[nclefs]:=s[1] else clef[nclefs]:=s[2]; + end; + until s=''; +end; + +procedure setSize(line: string); + var i: stave_index0; + word: string; + begin i:=0; + while i20 then musicsize:=20; + end; + +function findCommand(var command: string): command_type; + var j: command_type; +begin curtail(command,':'); + if equalsIgnoreCase(command,'STYLE') then style_supplied := true; + for j:=c1 to cn do if equalsIgnoreCase(command,commands[j]) then + begin findCommand:=j; exit; end; + findCommand:=none; +end; + +function isCommand(command: string): boolean; +begin isCommand:=findCommand(command)<>none end; + +procedure doEnable(var line: string; choice: boolean); + var word: string; +begin + repeat word:=GetNextWord(line,blank,dummy); + if word<>'' then if not setFeature(word,choice) then + Error('No such feature: '+word,not print) + until word='' +end; + +function doCommand(line: string): line_type; + var command: string; + last_command: command_type; + starts_with_note: boolean; +begin + if line[1]=comment then begin doCommand:=comment_line; exit; end; + starts_with_note := maybeMusicLine(line); + command:=GetNextWord(line,blank,colon); + if endsWith(command,colon) then + begin last_command:=findCommand(command); + doCommand:=command_line; + if last_command = enable then doEnable(line,true) + else if last_command = disable then doEnable(line,false); + if last_command<>none then + begin cline[last_command]:=line; + if last_command=start then start_line:=line; + if warn_redefine and redefined[last_command] then + warning('You have redefined preamble command '+command,print); + redefined[last_command]:=true; + end + else begin doCommand:=colon_line; addStyle(command+colon+' '+line); + orig_style_line[known_styles] := line_no; + end + end + else if starts_with_note then doCommand:=plain_line + else doCommand:=unknown; +end; + +procedure setOnly(line: string); + var num, num1, num2, l: integer; + s: string; +begin if line='' then exit; + if startsWithIgnoreCase(line,'only') then GetNextWord(line,colon,dummy); + for l:=1 to lines_in_paragraph do omit_line[l]:=true; + repeat s:=GetNextWord(line,blank,comma); if s='' then exit; + curtail(s, comma); + if pos1('-',s)=0 then + begin getNum(s,num); + if (num>0) and (num<=lines_in_paragraph) then omit_line[num]:=false + else warning('Invalid line number in Only: is skipped',print); + end else + begin getTwoNums(s,num1,num2); + if (num1>0) and (num2<=lines_in_paragraph) then + for num:=num1 to num2 do omit_line[num]:=false + else warning('Invalid line range in Only: is skipped',print); + end; + until false; +end; + +procedure interpretCommands; + var i, num, den, nbars: integer; +begin + title_line := cline[title]; + part_line := cline[part]; + if (cline[poet]<>'') or (cline[composer]<>'') then + composer_line:='\mtxComposerLine{'+cline[poet]+'}{'+cline[composer]+'}' + else composer_line:=''; + pmx_line := cline[pmx]; + options_line := GetNextWord(cline[options],blank,dummy); + for i:=1 to known_styles do style_used[i] := false; + applyStyles; setVoices(voices); + for i:=old_known_styles+1 to known_styles do + if not style_used[i] then + begin warning('The following style was supplied but not used',not print); + writeln(known_style[i]); + end; + setClefs(clefs); + if not redefined[meter] then warning( + 'You have not defined Meter, assuming "'+cline[meter]+'" ',not print); + getMeter(cline[meter],meternum, meterdenom, pmnum, pmdenom); + setDefaultDuration(meterdenom); + if (meternum=0) and + not (redefined[pages] or redefined[systems] or redefined[bars]) + then begin cline[bars] := '1'; redefined[bars]:=true; end; + if redefined[pages] or redefined[systems] then + begin if redefined[bars] then + warning('BARS/LINE ignored since you specified PAGES or SYSTEMS',print); + if redefined[systems] then getNum(cline[systems],n_systems) + else warning('PAGES specified but not SYSTEMS',not print); + if redefined[pages] then getNum(cline[pages],n_pages) + else warning('SYSTEMS specified but not PAGES',not print); + end + else if redefined[bars] then + begin getNum(cline[bars],nbars); if nbars>0 then + begin n_pages:=0; n_systems:=nbars end; + end; + getNum(cline[sharps],n_sharps); + setSpace(cline[space]); + setSize(cline[msize]); + getTwoNums(cline[shortnote],num, den); if den=0 then den:=1; + short_note := (num*64) div den; + if cline[flats]<>'' then + begin getNum(cline[flats],n_sharps); n_sharps:=-n_sharps; end; + setName; setIndent; setInitOctave; setOnly(cline[only]); + if options_line <>'' then begin + warning('"Options" is cryptic and obsolescent.', not print); + writeln(' Use "Enable" and "Disable" instead.') + end; + for i:=1 to length(options_line) do processOption(options_line[i]); +end; + +procedure preambleDefaults; + var i: integer; +begin + xmtrnum0:=0; fracindent:='0'; musicsize:=20; start_line:=''; + some_vocal:=false; ngroups:=0; + style_supplied := false; + for i:=1 to maxvoices do setVocal(i,false); + for i:=1 to maxstaves do + begin nspace[i]:=unspec; stave_size[i]:=unspec; end; + n_pages:=1; n_systems:=1; + readStyles; old_known_styles := known_styles; + for i:=1 to lines_in_paragraph do omit_line[i]:=false; +end; + +procedure preambleGuess(maybe_voices: voice_index); +begin + case maybe_voices of + 1: cline[style] := 'Solo'; + 2: cline[style] := 'Duet'; + 3: cline[style] := 'Trio'; + 4: cline[style] := 'Quartet'; + 5: cline[style] := 'Quintet'; + 6: cline[style] := 'Sextet'; + 7: cline[style] := 'Septet'; + else begin error('I cannot guess a style',not print); exit; end; + end; + writeln('I guess this piece is a ',cline[style], + ' for strings in C major.'); + writeln(' Why not provide a STYLE in the setup paragraph to make sure?'); +end; + +{ ------------------------------------------------------------------ } + +procedure nonMusic; + var i: paragraph_index; +begin for i:=1 to para_len do doCommand(P[i]); + setOnly(cline[only]); wipeCommands; +end; + +function thisCase: boolean; +begin thisCase:=true; + if not startsWithIgnoreCase(P[1],'case:') then exit; + thisCase:=(choice<>' ') and (pos1(choice,P[1])>0); P[1]:='%'; +end; + +procedure augmentPreamble(control_para: boolean); + var i: paragraph_index; + l: line_type; + s: array[line_type] of integer; +begin + if not thisCase then exit; + for l:=unknown to plain_line do s[l]:=0; + for i:=1 to para_len do + begin line_no:=orig_line_no[i]; l:=doCommand(P[i]); + inc(s[l]); + if (l=comment_line) and (P[i,2]=comment) + then begin predelete(P[i],2); putLine(P[i]); end; + if not control_para and (l=unknown) then + error('Unidentifiable line',print); + end; + if not control_para and (s[command_line]>0) and (s[plain_line]>0) + then error('Mixture of preamble commands and music',not print); +end; + +procedure doPreamble; + var i: paragraph_index; + maybe_voices: voice_index0; +begin maybe_voices:=0; + if not style_supplied then + begin {augmentPreamble(not known);} + if not style_supplied then warning('No STYLE supplied',not print); + for i:=1 to para_len do if maybeMusicLine(P[i]) then + inc(maybe_voices); + if maybe_voices>0 then preambleGuess(maybe_voices) + else error('No voices found',not print); + end +end; + +procedure respace; + var i, j: stave_index; + begin + for i:=ninstr downto 2 do + begin j:=ninstr-i+1; + if nspace[j]<>unspec then tex3('\mtxInterInstrument{'+toString(i-1)+ + '}{'+toString(nspace[j])+'}'); + end; + if nspace[ninstr]<>unspec then tex3('\mtxStaffBottom{'+ + toString(nspace[ninstr])+'}'); + must_respace:=false; + end; + +procedure restyle; +begin + must_restyle:=false; +end; + +function clefno ( cl: char ): integer; +begin + case cl of +'G','0','t','8': clefno:=0; +'s','1': clefno:=1; +'m','2': clefno:=2; +'a','3': clefno:=3; +'n','4': clefno:=4; +'r','5': clefno:=5; +'F','b','6': clefno:=6; +'C': clefno:=3; + else + begin warning('Unknown clef code - replaced by treble',print); + clefno:=0; + end; + end +end; + +procedure doTenorClefs; + var i: voice_index; + c: char; +begin for i:=1 to nclefs do + begin + c:=clef[i]; if (c='8') or (c='t') then + putLine('\\mtxTenorClef{' + toString(PMXinstr(i)) + '}\' ); + end; +end; + +procedure doPMXpreamble; + const clefcode: string[8]='0123456'; + var i, j: integer; + clefs: string; + function pmxMeter: string; + var denom, num: integer; + begin if meternum=0 then + begin num := beatsPerLine; denom := 0; + old_meter_word := meterChange(num,meterdenom,true); + end + else begin num := meternum; denom := pmdenom; end; + pmxMeter := toString(num) + ' ' + toString(meterdenom) + + ' ' + toString(pmnum) + ' ' + toString(denom); + end; + function sizecode(k: integer): string; + begin sizecode:='\mtxNormalSize'; + case k of +13: if musicsize=20 then sizecode:='\mtxTinySize' else sizecode:='\mtxSmallSize'; +16: if musicsize=20 then sizecode:='\mtxSmallSize'; +20: if musicsize=16 then sizecode:='\mtxLargeSize'; +24: if musicsize=20 then sizecode:='\mtxLargeSize' else sizecode:='\mtxHugeSize'; +29: sizecode:='\mtxHugeSize'; + else error('Valid sizes are 13, 16, 20, 24, 29',print); + end; + end; +begin + if composer_line <> '' then putline(composer_line); + if title_line <> '' then putline('\mtxTitleLine{'+title_line+'}'); + putLine('---'); + if instrumentNames and not redefined[indent] then fracindent:='0.12'; + write(outfile, nstaves); + write(outfile, ' ', -ninstr); + stave[ninstr+1]:=nstaves+1; + for j:=ninstr downto 1 do write(outfile, ' ', stave[j+1] - stave[j]); + writeln(outfile, ' ', pmxMeter, ' ',xmtrnum0:8:5, ' ',n_sharps, + ' ', n_pages, ' ',n_systems, ' ',musicsize, ' ',fracindent); + for i:=1 to ninstr do if not instrumentNames then putLine('') + else putLine('\mtxInstrName{'+instr_name[ninstr+1-i]+'}'); + clefs:=''; + for i:=nclefs downto 1 do clefs:=clefs+clefcode[1+clefno(clef[i])]; + putLine(clefs); + if texdir='' then texdir := './'; + putLine(texdir); + + pmx_preamble_done:=true; respace; + + for j:=1 to ngroups do + writeln(outfile,'\\mtxGroup{'+toString(j)+'}{' + +toString(ninstr+1-group_start[j])+'}{' + +toString(ninstr+1-group_stop[j])+'}\'); + for j:=1 to ninstr do + if (stave_size[j]<>unspec) then + putLine( + '\\mtxSetSize{'+toString(ninstr+1-j)+'}{'+sizecode(stave_size[j])+'}\'); + if part_line <> '' then + begin putLine('Ti'); putLine(part_line); end; + if title_line <> '' then + begin putLine('Tt'); putLine('\mtxTitle'); end; + if composer_line <> '' then + begin putLine('Tc'); putLine('\mtxPoetComposer'); end; + if pmx_line <> '' then putLine(pmx_line); + doTenorClefs; + wipeCommands; +end; + +function startString(voice: voice_index0): string; + var s, w: string; + j: voice_index; +begin s:=start_line; + for j:=1 to voice do w:=getNextWord(s,dummy,';'); + curtail(w,';'); if w<>'' then startString:=w+' ' else startString:=w; +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/prepmx.c b/Build/source/utils/m-tx/mtx-0.60d/prepmx.c new file mode 100644 index 00000000000..ba186a63e13 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/prepmx.c @@ -0,0 +1,887 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "prepmx.pas" */ + + +#include "p2c.h" + + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef GLOBALS_H +#include "globals.h" +#endif + +#ifndef PREAMBLE_H +#include "preamble.h" +#endif + +#ifndef LYRICS_H +#include "lyrics.h" +#endif + +#ifndef MTX_H +#include "mtx.h" +#endif + +#ifndef ANALYZE_H +#include "analyze.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef STATUS_H +#include "status.h" +#endif + +#ifndef UPTEXT_H +#include "uptext.h" +#endif + +#ifndef NOTES_H +#include "notes.h" +#endif + +#ifndef MULTFILE_H +#include "multfile.h" +#endif + +#ifndef FILES_H +#include "files.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +/* fpc mistakenly thinks CONTROL and GLOBALS are not used */ + +/* CMO: addition/change by Christian Mondrup */ + +/** M-Tx preprocessor to PMX Dirk Laurie */ + +#define version "0.60d" +#define version_date "<11 October 2008>" + +/** See file "Corrections" for updates later than those listed below +*/ + +/** Changes since 0.52b + Uses mtx.tex file + More than one # or % per word treated correctly in uptext + Better way of handling line numbers in lyrics +*/ + +/** To do next: + Take notice of recent improvements in musixtex, pmx and musixlyr +{* Current bugs: +{* Old bugs: + Does not check PMX syntax +{* Weaknesses that may later cause bugs: + Decisions sometimes made on note, sometimes on scan + Can 'here' overrun? + Where does one note stop and the next begin? + See comment on '!' in uptext +*/ + +#define chord_flat 't' +#define chord_left 'l' + +#define blind true +#define visible false + + +Static boolean last_bar; +Static Char multibar[256]; +Static Char repeat_sign[256]; +Static short bar_of_line, bars_of_rest, rest_spacing; + + +/* --------------- Bars and rests --------------- */ + +Static Void writeRepeat(bar) +Char *bar; +{ + Char repcode[256]; + Char STR1[256]; + + if (*bar == '\0') + return; + *repcode = '\0'; + if (!strcmp(bar, "||")) + strcpy(repcode, "Rd"); + else if (!strcmp(bar, "|]")) + strcpy(repcode, "RD"); + else if (!strcmp(bar, "|:")) + strcpy(repcode, "Rl"); + else if (!strcmp(bar, ":|:")) + strcpy(repcode, "Rlr"); + else if (!strcmp(bar, ":|")) + strcpy(repcode, "Rr"); + else if (last_bar && !strcmp(bar, "|")) + strcpy(repcode, "Rb"); + if (*repcode != '\0') { + sprintf(STR1, " %s", repcode); + putLine(STR1); + } + *bar = '\0'; +} + + +Static Void supplyRests(voice) +voice_index voice; +{ + Char STR2[4]; + Char STR3[256]; + + if (multi_bar_rest) { + put(multibar, putspace); + return; + } + if (bar_of_line == 1 && pedanticWarnings()) { + printf("Bar %d Voice %d", bar_no, voice); + warning(" Filling missing voice with rests", !print); + } + if (pickup > 0) + put(rests(STR3, pickup, meterdenom, visible), nospace); + sprintf(STR2, "%s ", pause); + put(STR2, putspace); +} + + +Static Void countBars(note_) +Char *note_; +{ + Char note[256]; + short k, adjust; + short sign = 1; + + strcpy(note, note_); + predelete(note, 2); + k = pos1('+', note); + if (k == 0) { + k = pos1('-', note); + if (k > 0) + sign = -1; + } + if (k > 0) { + note[k-1] = '/'; + getTwoNums(note, &bars_of_rest, &adjust); + } else { + getNum(note, &bars_of_rest); + adjust = 0; + } + rest_spacing = adjust * sign + 14; +} + + +/* FIXME This procedure had a serious bug. It now has a smaller bug. + Basically there should be a test on whether a break between staves + is a break between instruments, in which case the procedure is (now) + right; or a break between staves of the same instrument, in which + case a '|' instead of a '&' should be output (as it was). If the Space + feature is not used, the bug does not show up. */ +Static Void putMBRest() +{ + stave_index i, FORLIM; + Char STR1[256]; + Char STR2[256], STR3[256]; + + put("\\\\\\def\\atnextbar{\\znotes", nospace); + FORLIM = nstaves; + for (i = 1; i <= FORLIM; i++) { + sprintf(STR3, "\\mbrest{%s}{%s}0", + toString(STR1, bars_of_rest), toString(STR2, rest_spacing)); + put(STR3, nospace); + if (i < nstaves) + put("&", nospace); + else + putLine("\\en}\\"); + } + sprintf(STR3, "\\\\\\advance\\barno%s\\", toString(STR1, bars_of_rest - 1)); + putLine(STR3); + bar_no += bars_of_rest - 1; +} + + +/* Local variables for processLine: */ +struct LOC_processLine { + voice_index voice; + Char chords[256], note[256], cutnote[256], pretex[256]; + short ngrace, nmulti; + boolean no_chords, no_uptext; + + short l; + boolean in_group; +} ; + +Local Void output(note_, LINK) +Char *note_; +struct LOC_processLine *LINK; +{ + Char note[256]; + Char STR2[256]; + + strcpy(note, note_); + if (*note != '\0') + { /* pretex is saved up until a spacing note or rest comes */ + if (endsWith(note, "\\") && note[1] != '\\') { + curtail(note, '\\'); + strcat(LINK->pretex, note); + *note = '\0'; + return; + } + if (*LINK->pretex != '\0' && isNoteOrRest(note)) { + sprintf(note, "%s\\ %s", LINK->pretex, strcpy(STR2, note)); + *LINK->pretex = '\0'; + } + if (outlen > 0 && note[0] != ' ') + sprintf(note, " %s", strcpy(STR2, note)); + put(note, nospace); + } + if (thisNote(LINK->voice) == nextvoice) + putLine(""); +} + +Local Void maybeDotted(note, LINK) +Char *note; +struct LOC_processLine *LINK; +{ + if (strlen(note) < 2) + return; + if (note[1] == '"') { + note[1] = note[0]; + strcat(LINK->pretex, "\\mtxDotted"); + } +} + +/* Local variables for addChords: */ +struct LOC_addChords { + struct LOC_processLine *LINK; + Char nt[256], labels[256]; + boolean tieme; + Char lab; + int5 pitches; +} ; + +Local Void outChord(LINK) +struct LOC_addChords *LINK; +{ + short k; + Char STR2[256]; + short FORLIM; + + if (*LINK->nt == '\0') + return; + LINK->tieme = (LINK->nt[0] == '{'); + if (LINK->tieme) + predelete(LINK->nt, 1); + if (*LINK->nt == '\0' || LINK->nt[0] < 'a' || LINK->nt[0] > 'g') { + sprintf(STR2, "Must have a note name at the start of \"%s\", not \"%c\"", + LINK->nt, LINK->nt[0]); + error(STR2, print); + } + renewChordPitch(LINK->LINK->voice, LINK->nt); + sprintf(LINK->LINK->chords + strlen(LINK->LINK->chords), " z%s", LINK->nt); + *LINK->nt = '\0'; + FORLIM = strlen(LINK->labels); + for (k = 0; k <= FORLIM - 1; k++) { + if (chordPitch(LINK->LINK->voice) == LINK->pitches[k]) { + sprintf(LINK->LINK->chords + strlen(LINK->LINK->chords), " s%ct", + LINK->labels[k]); + LINK->labels[k] = ' '; + } + } + if (LINK->tieme) { + chordTie(LINK->LINK->voice, &LINK->lab); + sprintf(LINK->LINK->chords + strlen(LINK->LINK->chords), " s%ct", + LINK->lab); + } +} + +Local Void addChords(LINK) +struct LOC_processLine *LINK; +{ + struct LOC_addChords V; + Char w[256]; + short j = 1; + short mus_line; + paragraph_index0 chord_line; + boolean arpeggio; + Char STR1[256]; + short FORLIM; + + V.LINK = LINK; + saveStatus(LINK->voice); + getChordTies(LINK->voice, V.pitches, V.labels); + *LINK->chords = '\0'; + chord_line = chordLineNo(LINK->voice); + if (chord_line == 0) + LINK->no_chords = true; + if (LINK->no_chords) + return; + GetNextWord(w, P[chord_line-1], blank, dummy); + sprintf(STR1, "%c", barsym); + if (!strcmp(w, STR1) || *w == '\0') + LINK->no_chords = true; + sprintf(STR1, "%c", tilde); + if (!strcmp(w, STR1) || LINK->no_chords) + return; + mus_line = line_no; + line_no = orig_line_no[chord_line-1]; + arpeggio = (w[0] == '?'); + if (arpeggio) { + strcpy(LINK->chords, " ?"); + predelete(w, 1); + } + *V.nt = '\0'; + while (j <= strlen(w)) { + if (w[j-1] == '{' || strcmp(V.nt, "{") && w[j-1] >= 'a' && w[j-1] <= 'g') + outChord(&V); + else if (w[j-1] == chord_flat) + w[j-1] = 'f'; + else if (w[j-1] == chord_left) + w[j-1] = 'e'; + sprintf(V.nt + strlen(V.nt), "%c", w[j-1]); + j++; + } + if (*V.nt != '\0') + outChord(&V); + if (arpeggio) + strcat(LINK->chords, " ?"); + strcat(LINK->note, LINK->chords); + FORLIM = strlen(V.labels); + for (j = 0; j <= FORLIM - 1; j++) { + if (V.labels[j] != ' ') + error("Tie on chord note started but not finished", print); + } + line_no = mus_line; +} + +Local Char *processOther(Result, note_, LINK) +Char *Result; +Char *note_; +struct LOC_processLine *LINK; +{ + Char note[256]; + + strcpy(note, note_); + switch (thisNote(LINK->voice)) { + + case other: + if (note[0] == grace_group) { + if (strlen(note) == 1) + LINK->ngrace = 1; + else + LINK->ngrace = pos1(note[1], digits); + if (LINK->ngrace > 0) + LINK->ngrace--; + } + break; + + /* For a zword, take note of pitch but do not change the contents */ + /* Add spurious duration because repich expects duration to be present */ + case zword: + strcpy(LINK->cutnote, note); + predelete(LINK->cutnote, 1); + insertChar('4', LINK->cutnote, 2); + checkOctave(LINK->voice, LINK->cutnote); + renewPitch(LINK->voice, LINK->cutnote); + break; + + case lyrtag: + extractLyrtag(LINK->voice, note); + break; + + case rbrac: + endBeam(LINK->voice); + break; + + case rparen: + case rlparen: + endSlur(LINK->voice, note); + break; + + case lbrac: + beginBeam(LINK->voice, note); + break; + + case lparen: + maybeDotted(note, LINK); + beginSlur(LINK->voice, note); + break; + + case mword: + error3(LINK->voice, "Meter change must be the first word of its bar"); + break; + + case atword: + lyricsAdjust(LINK->voice, note); + break; + } + return strcpy(Result, note); +} + +Local Void lookahead(LINK) +struct LOC_processLine *LINK; +{ + Char STR2[256]; + Char STR3[256]; + + while (bind_left[(long)nextNote(LINK->voice)]) + sprintf(LINK->note + strlen(LINK->note), " %s", + processOther(STR2, getMusicWord(STR3, LINK->voice), LINK)); +} + +Local Void processNote_(LINK) +struct LOC_processLine *LINK; +{ + if (hasVerseNumber(LINK->voice)) + strcat(LINK->pretex, "\\mtxVerse"); + LINK->l = pos1(multi_group, LINK->note); + if (LINK->l > 0) + scan1(LINK->note, LINK->l + 1, &LINK->nmulti); + activateBeamsAndSlurs(LINK->voice); + LINK->in_group = false; + if (LINK->ngrace > 0) { + LINK->in_group = true; + LINK->ngrace--; + } else { + if (LINK->nmulti > 0) { + LINK->in_group = true; + LINK->nmulti--; + } + } + checkOctave(LINK->voice, LINK->note); + renewPitch(LINK->voice, LINK->note); + if (!LINK->in_group) { + resetDuration(LINK->voice, durationCode(LINK->note)); + markDebeamed(LINK->voice, LINK->note); + } + lookahead(LINK); + getSyllable(LINK->voice, LINK->pretex); + addUptext(LINK->voice, &LINK->no_uptext, LINK->pretex); + addChords(LINK); +} + + +/* ---------------------------------------------------------------- */ + +Static Void processLine(voice_, bar_no) +voice_index voice_; +short bar_no; +{ + struct LOC_processLine V; + paragraph_index par_line; + Char STR2[256]; + + V.voice = voice_; + *V.pretex = '\0'; + V.no_chords = false; + V.no_uptext = false; + par_line = musicLineNo(V.voice); + V.nmulti = 0; + V.ngrace = 0; + line_no = orig_line_no[par_line-1]; + do { + getMusicWord(V.note, V.voice); + if (*V.note == '\0') + return; + if (debugMode()) + printf("%d %s\n", V.voice, V.note); + switch (thisNote(V.voice)) { + + case rword: + if (multi_bar_rest) { + countBars(V.note); + strcpy(V.note, multibar); + if (uptextOnRests()) + addUptext(V.voice, &V.no_uptext, V.pretex); + } else { + V.l = pos1(multi_group, V.note); + if (V.l > 0) + scan1(V.note, V.l + 1, &V.nmulti); + if (V.nmulti > 0) { + V.in_group = true; + V.nmulti--; + } + if (uptextOnRests()) + addUptext(V.voice, &V.no_uptext, V.pretex); + if (!isPause(V.note)) + resetDuration(V.voice, durationCode(V.note)); + } + break; + + case abcdefg: + processNote_(&V); + break; + + case barword: + if (V.voice == nvoices) { + if (endOfBar(V.voice, bar_no)) + strcpy(repeat_sign, V.note); + else + writeRepeat(V.note); + } + sprintf(STR2, "%c", barsym); + if (strcmp(V.note, STR2)) + *V.note = '\0'; + V.no_chords = false; + break; + + case FirstOnly: + if (V.voice != nvoices) + *V.note = '\0'; + else + strcpy(V.note, processOther(STR2, V.note, &V)); + break; + + default: + strcpy(V.note, processOther(STR2, V.note, &V)); + break; + } + output(V.note, &V); + } while (!endOfBar(V.voice, bar_no)); + if (!V.no_chords) + skipChordBar(V.voice); +} + + +/* ------------------------------------------------------------------- */ + +Static Void getMeterChange(voice, new_meter) +voice_index voice; +Char *new_meter; +{ + short pn1, pn2; + Char w[256], new_command[256]; + + if (nextNote(voice) != mword) + return; + getMusicWord(w, voice); + getMeter(w, &meternum, &meterdenom, &pn1, &pn2); + full_bar = meternum * (64 / meterdenom); + /* CMO: process denominator value with function PMXmeterdenom */ + meterWord(new_command, meternum, PMXmeterdenom(meterdenom), pn1, pn2); + if (*new_meter != '\0' && strcmp(new_meter, new_command)) + error3(voice, "The same meter change must appear in all voices"); + strcpy(new_meter, new_command); +} + + +/* Local variables for musicParagraph: */ +struct LOC_musicParagraph { + Char new_meter[256]; +} ; + +Local Void putPMXlines(LINK) +struct LOC_musicParagraph *LINK; +{ + paragraph_index i, FORLIM; + + FORLIM = para_len; + for (i = 0; i <= FORLIM - 1; i++) { + if (startsWith(P[i], double_comment)) { + predelete(P[i], 2); + putLine(P[i]); + strcpy(P[i], "%"); + } + } +} + +Local Void processOneBar(LINK) +struct LOC_musicParagraph *LINK; +{ + paragraph_index0 m, cm; + short n1, n2; + voice_index voice, cvoice; + boolean ignore_voice; + boolean wrote_repeat = false; + boolean alone; + Char STR2[256]; + Char STR3[256]; + + if (bar_of_line > 1) { + sprintf(STR3, "%cBar %s", comment, toString(STR2, bar_no)); + putLine(STR3); + } + last_bar = (bar_of_line == nbars && final_paragraph); + if (last_bar && !strcmp(repeat_sign, "|")) + *repeat_sign = '\0'; + writeRepeat(repeat_sign); + *LINK->new_meter = '\0'; + for (voice = nvoices; voice >= 1; voice--) { + if (musicLineNo(voice) > 0) { + gotoBar(voice, bar_of_line); + getMeterChange(voice, LINK->new_meter); + } + } + if (last_bar && *LINK->new_meter == '\0' && nleft > pickup && meternum > 0) + meterChange(LINK->new_meter, nleft, 64, true); + if (*LINK->new_meter != '\0') + putLine(LINK->new_meter); + if (multi_bar_rest) { + n1 = meternum * 64; + n2 = meterdenom; + cancel(&n1, &n2, 1); + rests(multibar, n1, n2, blind); + } + for (voice = nvoices; voice >= 1; voice--) { + ignore_voice = !selected[voice-1]; + cvoice = companion(voice); + m = musicLineNo(voice); + cm = musicLineNo(cvoice); + alone = (voice == cvoice || m > 0 && cm == 0 || + m == 0 && cm == 0 && voice < cvoice || !selected[cvoice-1]); + if (selected[voice-1]) { + if (m > 0) + processLine(voice, bar_of_line); + else if (alone) + supplyRests(voice); + else + ignore_voice = true; + if (last_bar && *repeat_sign != '\0' && !wrote_repeat) { + writeRepeat(repeat_sign); + wrote_repeat = true; + } + if (!ignore_voice) { + if (alone || voicePos(voice) == 1) + putLine(" /"); + else + putLine(" //"); + } + } + } + if (multi_bar_rest) + putMBRest(); + bar_no++; + pickup = 0; + putLine(""); +} + +Local Void putMeter(new_meter_word, LINK) +Char *new_meter_word; +struct LOC_musicParagraph *LINK; +{ + if (strcmp(new_meter_word, old_meter_word)) + putLine(new_meter_word); + strcpy(old_meter_word, new_meter_word); +} + + +Static Void musicParagraph() +{ + struct LOC_musicParagraph V; + voice_index0 j, nvoice; + Char lyrassign[256]; + Char STR1[256]; + Char STR2[256]; + Char STR3[256], STR4[256], STR5[256]; + voice_index0 FORLIM; + short FORLIM1; + + paragraphSetup(&nvoice); + if (nvoice == 0) { + nonMusic(); + return; + } + if (nvoice > nvoices) { + if (nvoice == 0) + error("No voices! Did you remember to to supply a Style?", !print); + sprintf(STR4, "Paragraph has %s voices but Style allows only %s", + toString(STR1, nvoice), toString(STR2, nvoices)); + error(STR4, !print); + return; + } + if (first_paragraph) + includeStartString(); + if (pmx_preamble_done && (!final_paragraph || nvoice > 0)) { + sprintf(STR5, "%c Paragraph %s line %s bar %s", + comment, toString(STR1, paragraph_no), + toString(STR2, orig_line_no[0]), toString(STR3, bar_no)); + putLine(STR5); + } + testParagraph(); + rememberDurations(); + if (beVerbose()) + describeParagraph(); + /* ---- Knowing the score, we can start setting music ---------------- */ + if (!pmx_preamble_done) { + doPMXpreamble(); + sprintf(STR3, "%c Paragraph %s line %s bar ", + comment, toString(STR1, paragraph_no), + toString(STR2, orig_line_no[0])); + put(STR3, putspace); + if (pickup > 0) + putLine("0"); + else + putLine("1"); + } + putPMXlines(&V); + if (must_restyle) + restyle(); + if (some_vocal && (nvoice > 0 || !final_paragraph)) { + FORLIM = ninstr; + for (j = 1; j <= FORLIM; j++) { + assignLyrics(j, lyrassign); + if (*lyrassign != '\0') { + sprintf(STR2, "\\\\%s\\", lyrassign); + putLine(STR2); + } + } + } + if (must_respace) + respace(); + if (meternum == 0) + putMeter(meterChange(STR2, beatsPerLine(), meterdenom, true), &V); + if (nleft > 0) + nbars++; + if (nbars == 0 && multi_bar_rest) + nbars = 1; + FORLIM1 = nbars; + for (bar_of_line = 1; bar_of_line <= FORLIM1; bar_of_line++) + processOneBar(&V); + restoreDurations(); +} + + +/* ----------------------------------------------------------------------- */ + +Static boolean no_commands_yet; + + +Static Void doMusic() +{ + Char STR1[256], STR2[256]; + Char STR4[256]; + + first_paragraph = true; + pmx_preamble_done = false; + bar_no = 1; + *repeat_sign = '\0'; + must_respace = false; + must_restyle = false; + do { + final_paragraph = endOfInfile(); + if (para_len > 0 && !ignore_input && thisCase()) { + if (no_commands_yet) { + interpretCommands(); + printFeatures(false); + one_beat = 64 / meterdenom; + full_bar = meternum * one_beat; + if (nvoices > standardPMXvoices) { + sprintf(STR4, "You have %s voices; standard PMX can only handle %s", + toString(STR1, nvoices), toString(STR2, standardPMXvoices)); + warning(STR4, !print); + } + initMTX(); + initUptext(); + initStatus(); + initLyrics(); + no_commands_yet = false; + } + if (startsWithBracedWord(P[0])) + lyricsParagraph(); + else { + musicParagraph(); + first_paragraph = false; + writeRepeat(repeat_sign); + } + } + readParagraph(P, orig_line_no, ¶_len); + } while (para_len != 0); +} + + +Static boolean control_paragraph, no_report_errors; + + +Static boolean isControlParagraph(P, para_len) +Char (*P)[256]; +paragraph_index para_len; +{ + paragraph_index0 commands = 0, labels = 0, voices = 0, guff = 0; + paragraph_index0 i; + Char w[256]; + +/* p2c: prepmx.pas: Note: Eliminated unused assignment statement [338] */ + for (i = 0; i <= para_len - 1; i++) { + if (!startsWith(P[i], "%")) { + NextWord(w, P[i], ' ', ':'); + if (!endsWith(w, ":")) + guff++; + else if (strlen(w) < 3 || findVoice(w) > 0) + voices++; + else if (isCommand(w)) + commands++; + else + labels++; + } + } + if (voices + guff > commands) + return false; + return true; +} + + +Static Void topOfPMXfile() +{ + Char STR2[24]; + Char STR3[34]; + + putLine("---"); + sprintf(STR2, "\\def\\mtxversion{%s}", version); + putLine(STR2); + sprintf(STR3, "\\def\\mtxdate{%s}", version_date); + putLine(STR3); + putLine("\\input mtx"); +} + + +main(argc, argv) +int argc; +Char *argv[]; +{ /* ---- Main program ------------------------ */ + PASCAL_MAIN(argc, argv); + strcpy(this_version, version); + strcpy(this_version_date, version_date); + printf("==> This is M-Tx %s (Music from TeXt) %s\n", version, version_date); + mtxLevel(version); + OpenFiles(); + no_commands_yet = true; + preambleDefaults(); + no_report_errors = false; + topOfPMXfile(); + do { + readParagraph(P, orig_line_no, ¶_len); + control_paragraph = isControlParagraph(P, para_len); + if (control_paragraph) { + augmentPreamble(no_report_errors); + no_report_errors = true; + if (para_len == 0) + error("No music paragraphs!", !print); + } + } while (control_paragraph); + doPreamble(); + doMusic(); + if (!pmx_preamble_done) + error("No music paragraphs!", !print); + putLine("% Coded by M-Tx"); + CloseFiles(); + printf("PrePMX done. Now run PMX.\n"); + _Escape(0); + exit(EXIT_SUCCESS); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/prepmx.pas b/Build/source/utils/m-tx/mtx-0.60d/prepmx.pas new file mode 100644 index 00000000000..0b246e04f7d --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/prepmx.pas @@ -0,0 +1,444 @@ +program prepmx; +uses control, strings, globals, preamble, lyrics, mtx, analyze, + mtxline, status, uptext, notes, files, utility; +{ fpc mistakenly thinks CONTROL and GLOBALS are not used } + +{* M-Tx preprocessor to PMX Dirk Laurie } +const version = '0.60'; + version_date = '<16 March 2005>'; + +{* See file "Corrections" for updates later than those listed below +} + +{* Changes since 0.52b + Uses mtx.tex file + More than one # or % per word treated correctly in uptext + Better way of handling line numbers in lyrics +} + +{* To do next: + Take notice of recent improvements in musixtex, pmx and musixlyr +{* Current bugs: +{* Old bugs: + Does not check PMX syntax +{* Weaknesses that may later cause bugs: + Decisions sometimes made on note, sometimes on scan + Can 'here' overrun? + Where does one note stop and the next begin? + See comment on '!' in uptext +} + chord_flat = 't'; + chord_left = 'l'; + blind = true; + visible = false; + +var + last_bar: boolean; + multibar: string; + repeat_sign: string; + bar_of_line, bars_of_rest, rest_spacing: integer; + +{ --------------- Bars and rests --------------- } + +procedure writeRepeat(var bar: string); + var repcode: string; + begin if bar='' then exit; + repcode:=''; + if bar='||' then repcode:='Rd' + else if (bar='|]') then repcode:='RD' + else if bar='|:' then repcode:='Rl' + else if bar=':|:' then repcode:='Rlr' + else if bar=':|' then repcode:='Rr' + else if last_bar and (bar='|') then repcode:='Rb'; + if repcode<>'' then putLine(' '+repcode); + bar:=''; + end; + +procedure supplyRests(voice: voice_index); +begin + if multi_bar_rest then + begin put(multibar,putspace); exit; end; + if (bar_of_line=1) and pedanticWarnings then + begin write('Bar ', bar_no, ' Voice ', voice); + warning(' Filling missing voice with rests',not print); + end; + if pickup>0 then + put(rests(pickup,meterdenom,visible),nospace); + put(pause+' ',putspace); +end; + +procedure countBars(note: string); + var k, adjust, sign: integer; +begin predelete(note,2); k:=pos1('+',note); sign:=1; + if k=0 then + begin k:=pos1('-',note); if k>0 then sign:=-1; end; + if k>0 then + begin note[k]:='/'; getTwoNums(note,bars_of_rest,adjust); end + else begin getNum(note,bars_of_rest); adjust:=0; end; + rest_spacing := 14 + adjust*sign; +end; + +(* FIXME This procedure had a serious bug. It now has a smaller bug. + Basically there should be a test on whether a break between staves + is a break between instruments, in which case the procedure is (now) + right; or a break between staves of the same instrument, in which + case a '|' instead of a '&' should be output (as it was). If the Space + feature is not used, the bug does not show up. *) +procedure putMBRest; + var i: stave_index; +begin + put('\\\def\atnextbar{\znotes',nospace); + for i:=1 to nstaves do + begin put('\mbrest{'+toString(bars_of_rest)+'}{'+toString(rest_spacing) + +'}0',nospace); + if i'' then + begin { pretex is saved up until a spacing note or rest comes } + if endsWith(note,'\') and (note[2]<>'\') then + begin curtail(note,'\'); pretex:=pretex+note; note:=''; exit end; + if (pretex<>'') and isNoteOrRest(note) then + begin note:=pretex+'\ '+note; pretex:='' end; + if (outlen>0) and (note[1]<>' ') then note:=' '+note; + put(note,nospace); + end; + if thisNote(voice)=nextvoice then putLine(''); + end; + + procedure maybeDotted(var note: string); + begin if length(note)<2 then exit; + if note[2]='"' then + begin note[2]:=note[1]; pretex:=pretex+'\mtxDotted' end + end; + + procedure addChords; + var w, nt, labels: string; + j, mus_line: integer; + chord_line: paragraph_index0; + arpeggio, tieme: boolean; + lab: char; + pitches: int5; + procedure outChord; + var k: integer; + begin if nt='' then exit; tieme:=nt[1]='{'; if tieme then predelete(nt,1); + if (nt='') or (nt[1]<'a') or (nt[1]>'g') then + error('Must have a note name at the start of "'+nt + +'", not "'+nt[1]+'"',print); + renewChordPitch(voice,nt); + chords := chords+' z'+nt; nt:=''; + for k:=1 to length(labels) do if chordPitch(voice)=pitches[k] then + begin chords:=chords+' s'+labels[k]+'t'; labels[k]:=' ' end; + if tieme then begin chordTie(voice,lab); chords:=chords+' s'+lab+'t' end + end; + begin saveStatus(voice); + getChordTies(voice, pitches, labels); + chords:=''; chord_line:=chordLineNo(voice); + if chord_line=0 then no_chords:=true; + if no_chords then exit; + w := getNextWord(P[chord_line],blank,dummy); + if (w=barsym) or (w='') then no_chords:=true; + if (w=tilde) or no_chords then exit; + mus_line:=line_no; line_no:=orig_line_no[chord_line]; + arpeggio := w[1]='?'; if arpeggio then + begin chords:=' ?'; predelete(w,1); end; + j:=1; nt:=''; + while j<=length(w) do + begin + if (w[j]='{') or ((nt<>'{') and (w[j]>='a') and (w[j]<='g')) then outChord + else if w[j]=chord_flat then w[j]:='f' + else if w[j]=chord_left then w[j]:='e'; + nt:=nt+w[j]; j:=j+1 + end; + if nt<>'' then outChord; if arpeggio then chords:=chords+' ?'; + note:=note+chords; + for j:=1 to length(labels) do if labels[j]<>' ' then + error('Tie on chord note started but not finished',print); + line_no:=mus_line; + end; + + function processOther(note: string): string; + begin + case thisNote(voice) of +other: if note[1]=grace_group then + begin if length(note)=1 then ngrace:=1 + else ngrace := pos1(note[2],digits); + if ngrace>0 then dec(ngrace); + end; +{ For a zword, take note of pitch but do not change the contents } +{ Add spurious duration because repich expects duration to be present } +zword: begin cutnote:=note; predelete(cutnote,1); insertchar('4',cutnote,2); + checkOctave(voice,cutnote); renewPitch(voice,cutnote) + end; +lyrtag: extractLyrtag(voice,note); +rbrac: endBeam(voice); +rparen, rlparen: endSlur(voice,note); +lbrac: beginBeam(voice,note); +lparen: begin maybeDotted(note); beginSlur(voice,note); end; +mword: error3(voice,'Meter change must be the first word of its bar'); +atword: lyricsAdjust(voice, note); + end; + processOther:=note; + end; + + procedure lookahead; + begin while bind_left[nextNote(voice)] do + note:=note+' '+processOther(getMusicWord(voice)); + end; + + var l: integer; + in_group: boolean; + + procedure processNote; + begin + begin if hasVerseNumber(voice) then pretex:=pretex+'\mtxVerse'; + l := pos1(multi_group,note); + if l>0 then scan1(note,l+1,nmulti); + activateBeamsAndSlurs(voice); + in_group:=false; + if ngrace>0 then begin in_group:=true; dec(ngrace) end else + if nmulti>0 then begin in_group:=true; dec(nmulti); end; + checkOctave(voice,note); renewPitch(voice,note); + if not in_group then + begin resetDuration(voice,durationCode(note)); markDebeamed(voice,note) end; + lookahead; getSyllable(voice,pretex); + addUptext(voice, no_uptext, pretex); + addChords; + end; + end; + +begin + pretex:=''; no_chords:=false; no_uptext := false; + par_line:=musicLineNo(voice); + nmulti :=0; ngrace := 0; line_no:=orig_line_no[par_line]; + repeat note:=getMusicWord(voice); if note='' then exit; + if debugMode then writeln(voice,' ',note); + case thisNote(voice) of + rword: begin if multi_bar_rest then + begin countBars(note); note:=multibar; + if uptextOnRests then + addUptext(voice, no_uptext, pretex); + end + else begin + l := pos1(multi_group,note); + if l>0 then scan1(note,l+1,nmulti); + if nmulti>0 then begin in_group:=true; dec(nmulti); end; + if uptextOnRests then + addUptext(voice, no_uptext, pretex); + if not isPause(note) then resetDuration(voice,durationCode(note)); + end + end; + abcdefg: processNote; + barword: begin + if voice=nvoices then + if endOfBar(voice,bar_no) then repeat_sign := note + else writeRepeat(note); + if note<>barsym then note:=''; + no_chords:=false; + end; + FirstOnly: if voice<>nvoices then note:='' else + note:=processOther(note); + else note:=processOther(note); + end; + output(note); + until endOfBar(voice,bar_no); + if not no_chords then skipChordBar(voice); +end; + +{ ------------------------------------------------------------------- } + +procedure getMeterChange(voice: voice_index; var new_meter: string); + var pn1, pn2: integer; + w, new_command: string; +begin if nextNote(voice)<>mword then exit; + w:=getMusicWord(voice); + getMeter(w, meternum, meterdenom, pn1, pn2); + full_bar := meternum*(64 div meterdenom); + new_command := meterWord(meternum, meterdenom, pn1, pn2); + if (new_meter<>'') and (new_meter<>new_command) + then error3(voice,'The same meter change must appear in all voices'); + new_meter:=new_command; +end; + +procedure musicParagraph; + var j, nvoice: voice_index0; + new_meter, lyrassign: string; + + procedure putPMXlines; + var i: paragraph_index; + begin for i:=1 to para_len do + if startsWith(P[i],double_comment) then + begin predelete(P[i],2); putLine(P[i]); P[i]:='%'; end; + end; + + procedure processOneBar; + var m, cm: paragraph_index0; + n1, n2: integer; + voice, cvoice: voice_index; + ignore_voice, wrote_repeat, alone: boolean; + begin + if bar_of_line>1 then putLine(comment+'Bar '+toString(bar_no)); + last_bar := (bar_of_line=nbars) and final_paragraph; + if last_bar and (repeat_sign='|') then repeat_sign:=''; + writeRepeat(repeat_sign); new_meter := ''; + for voice:=nvoices downto 1 do + if musicLineNo(voice)>0 then + begin gotoBar(voice,bar_of_line); getMeterChange(voice,new_meter); + end; + if last_bar and (new_meter='') and (nleft>pickup) and (meternum>0) then + new_meter := meterChange(nleft,64,true); + if new_meter<>'' then putLine(new_meter); + wrote_repeat := false; if multi_bar_rest then + begin n1:=64*meternum; n2:=meterdenom; cancel(n1,n2,1); + multibar:=rests(n1,n2,blind); + end; + for voice:=nvoices downto 1 do + begin ignore_voice:=not selected[voice]; cvoice:=companion(voice); + m:=musicLineNo(voice); cm:=musicLineNo(cvoice); + alone:=(voice=cvoice) or ((m>0) and (cm=0)) + or ((m=0) and (cm=0) and (voice0 then processLine(voice,bar_of_line) + else if alone then supplyRests(voice) else ignore_voice:=true; + if last_bar and (repeat_sign<>'') and not wrote_repeat then + begin writeRepeat(repeat_sign); wrote_repeat := true; end; + if not ignore_voice then + if alone or (voicePos(voice)=1) then putLine(' /') + else putLine(' //'); + end; + end; + if multi_bar_rest then putMBRest; + inc(bar_no); pickup:=0; putLine(''); + end; + + procedure putMeter(new_meter_word: string); + begin if new_meter_word<>old_meter_word then putLine(new_meter_word); + old_meter_word := new_meter_word; + end; + +begin + paragraphSetup(nvoice); + if nvoice=0 then begin nonMusic; exit end + else if nvoice>nvoices then + begin if nvoice=0 then + error('No voices! Did you remember to to supply a Style?',not print); + error('Paragraph has '+toString(nvoice)+ + ' voices but Style allows only '+toString(nvoices),not print); exit; + end; + if first_paragraph then includeStartString; + if pmx_preamble_done and (not final_paragraph or (nvoice>0)) then + putLine(comment +' Paragraph ' + toString(paragraph_no) + + ' line ' + toString(orig_line_no[1]) + ' bar ' + toString(bar_no)); + testParagraph; rememberDurations; + if beVerbose then describeParagraph; + { ---- Knowing the score, we can start setting music ---------------- } + if not pmx_preamble_done then + begin doPMXpreamble; + put( comment + ' Paragraph ' + toString(paragraph_no) + ' line ' + + toString(orig_line_no[1]) + ' bar ',putspace); + if pickup>0 then putLine('0') else putLine('1'); + end; + putPMXlines; + if must_restyle then restyle; + if some_vocal and ((nvoice>0) or not final_paragraph) then + for j:=1 to ninstr do + begin assignLyrics(j,lyrassign); + if lyrassign<>'' then putLine('\\'+lyrassign+'\'); + end; + if must_respace then respace; + if (meternum=0) then putMeter(meterChange(beatsPerLine,meterdenom,true)); + if nleft > 0 then inc(nbars); + if (nbars=0) and multi_bar_rest then nbars:=1; + for bar_of_line:=1 to nbars do + processOneBar; + restoreDurations; +end; + +{ ----------------------------------------------------------------------- } + +var no_commands_yet: boolean; + +procedure doMusic; +begin first_paragraph:=true; pmx_preamble_done:=false; bar_no:=1; + repeat_sign:=''; must_respace:=false; must_restyle:=false; + repeat final_paragraph := endOfInfile; + if (para_len>0) and not ignore_input and thisCase then + begin if no_commands_yet then + begin interpretCommands; printFeatures(false); + one_beat := 64 div meterdenom; full_bar := meternum*one_beat; + if nvoices>standardPMXvoices then warning('You have ' + +toString(nvoices)+' voices; standard PMX can only handle ' + +toString(standardPMXvoices),not print); + initMTX; initUptext; initStatus; initLyrics; + no_commands_yet:=false + end; + if startsWithBracedWord(P[1]) then lyricsParagraph else + begin musicParagraph; first_paragraph:=false; + writeRepeat(repeat_sign); + end + end; + readParagraph(P,orig_line_no,para_len); + until para_len=0; +end; + +var control_paragraph, no_report_errors: boolean; + +function isControlParagraph (var P: paragraph; para_len: paragraph_index) + : boolean; + var commands, labels, voices, guff, i: paragraph_index0; + w: string; +begin isControlParagraph:=true; commands:=0; labels:=0; voices:=0; guff:=0; + for i:=1 to para_len do + if not (startsWith(P[i],'%')) then + begin w:=nextWord(P[i],' ',':'); + if not endsWith(w,':') then inc(guff) + else if (length(w)<3) or (findVoice(w)>0) then inc(voices) + else if isCommand(w) then inc(commands) + else inc(labels) + end; + if (voices+guff>commands) then isControlParagraph:=false +end; + +procedure topOfPMXfile; +begin + putLine('---'); + putLine('\def\mtxversion{'+version+'}'); + putline('\def\mtxdate{'+version_date+'}'); + putline('\input mtx'); +end; + +begin { ---- Main program ------------------------ } + this_version := version; this_version_date := version_date; + writeln ('==> This is M-Tx ' + version + ' (Music from TeXt) ' + + version_date ); + mtxLevel(version); OpenFiles; no_commands_yet:=true; preambleDefaults; + no_report_errors:=false; + topOfPMXfile; + repeat readParagraph(P,orig_line_no,para_len); + control_paragraph:=isControlParagraph(P,para_len); + if control_paragraph then + begin augmentPreamble(no_report_errors); + no_report_errors:=true; + if para_len=0 then error('No music paragraphs!',not print) + end + until not control_paragraph; + doPreamble; doMusic; + if not pmx_preamble_done then error('No music paragraphs!',not print); + putline('% Coded by M-Tx'); + CloseFiles; + writeln ('PrePMX done. Now run PMX.'); halt(0); +end. + diff --git a/Build/source/utils/m-tx/mtx-0.60d/status.c b/Build/source/utils/m-tx/mtx-0.60d/status.c new file mode 100644 index 00000000000..aef14b88a7b --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/status.c @@ -0,0 +1,649 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "status.pas" */ + + +#include "p2c.h" + + +#define STATUS_G +#include "status.h" + + +#ifndef GLOBALS_H +#include "globals.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef CONTROL_H +#include "control.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + +#ifndef NOTES_H +#include "notes.h" +#endif + + +#define lowest_pitch (-9) +#define highest_pitch 61 + + +typedef struct line_status { + short pitch, chord_pitch, octave_adjust, beam_level, slur_level, after_slur; + Char octave, lastnote, chord_lastnote, duration, slurID, tieID; + boolean beamnext, beamed, slurnext, slurred, no_beam_melisma; + boolean no_slur_melisma[12]; + int5 chord_tie_pitch; + Char chord_tie_label[6]; +} line_status; + + +Static Char init_oct[256] = ""; +Static line_status current[maxvoices]; +Static Char lastdur[maxvoices]; + + +Void chordTie(voice, lab) +short voice; +Char *lab; +{ + short n; + line_status *WITH; + + WITH = ¤t[voice-1]; + n = strlen(WITH->chord_tie_label); + if (n == 5) + error3(voice, "Only five slur ties allowed per voice"); + if (n == 0) + *lab = 'T'; + else + *lab = WITH->chord_tie_label[n-1]; + (*lab)++; + sprintf(WITH->chord_tie_label + strlen(WITH->chord_tie_label), "%c", *lab); +/* p2c: status.pas, line 66: + * Note: Possible string truncation in assignment [145] */ + n++; + WITH->chord_tie_pitch[n-1] = WITH->chord_pitch; +} + + +Void getChordTies(voice, pitches, labels) +short voice; +short *pitches; +Char *labels; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + memcpy(pitches, WITH->chord_tie_pitch, sizeof(int5)); + strcpy(labels, WITH->chord_tie_label); + *WITH->chord_tie_label = '\0'; +} + + +Void rememberDurations() +{ + voice_index v, FORLIM; + + FORLIM = nvoices; + for (v = 1; v <= FORLIM; v++) + lastdur[v-1] = duration(v); +} + + +Void restoreDurations() +{ + voice_index v, FORLIM; + + FORLIM = nvoices; + for (v = 1; v <= FORLIM; v++) + resetDuration(v, lastdur[v-1]); +} + + +Char duration(voice) +short voice; +{ + return (current[voice-1].duration); +} + + +Void resetDuration(voice, dur) +short voice; +Char dur; +{ + if (pos1(dur, durations) == 0) { + printf("Trying to set duration to %c; ", dur); + error3(voice, "M-Tx system error: resetDuration"); + } + current[voice-1].duration = dur; +} + + +Void activateBeamsAndSlurs(voice) +short voice; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + if (WITH->beamnext) { + WITH->beamed = true; + WITH->beamnext = false; + } + if (WITH->slurnext) { + WITH->slurred = true; + WITH->slurnext = false; + } + if (WITH->slurred) + WITH->after_slur++; +} + + +Void saveStatus(voice) +short voice; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + WITH->chord_pitch = WITH->pitch; + WITH->chord_lastnote = WITH->lastnote; +} + + +boolean noBeamMelisma(voice) +short voice; +{ + return (current[voice-1].no_beam_melisma); +} + + +short afterSlur(voice) +short voice; +{ + short Result; + line_status *WITH; + + WITH = ¤t[voice-1]; + Result = WITH->after_slur; + if (WITH->after_slur > 0 && WITH->slur_level < 1) + error3(voice, "M-Tx system error: afterSlur and slur_level incompatible)"); + return Result; +} + + +Char octave(voice) +short voice; +{ + return (current[voice-1].octave); +} + + +Void resetOctave(voice) +short voice; +{ + current[voice-1].octave = ' '; +} + + +Void initOctaves(octaves) +Char *octaves; +{ + short i = 1; + + strcpy(init_oct, octaves); + while (i <= strlen(init_oct)) { + if (init_oct[i-1] == ' ') + delete1(init_oct, i); + else + i++; + } +} + + +Static Char initOctave(voice_stave) +stave_index voice_stave; +{ + if (voice_stave > strlen(init_oct)) { + if (pos1(clef[voice_stave-1], "Gt08") > 0) + return '4'; + else + return '3'; + } else + return (init_oct[voice_stave-1]); +} + + +Void setOctave(voice) +short voice; +{ + current[voice-1].octave = initOctave(voiceStave(voice)); +} + + +Void newOctave(voice, dir) +short voice; +Char dir; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + switch (dir) { + + case '+': + WITH->octave++; + break; + + case '-': + WITH->octave--; + break; + } +} + + +Static short newPitch(voice, note_, pitch, lastnote) +short voice; +Char *note_; +short pitch; +Char lastnote; +{ + Char note[256]; + short interval, npitch; + Char oct; + + strcpy(note, note_); + /*if debugMode then + write('New pitch for note ',note,' relative to ',lastnote, + ' at pitch ',pitch);*/ + oct = octaveCode(note); + if (oct == '=') + oct = initOctave(voiceStave(voice)); + if (isdigit(oct)) { + pitch = (oct - '0') * 7 - 3; + lastnote = 'f'; + removeOctaveCode(oct, note); + oct = octaveCode(note); + } + interval = note[0] - lastnote; + if (interval > 3) + interval -= 7; + if (interval < -3) + interval += 7; + npitch = pitch + interval; /*if debugMode then write(' was ',npitch);*/ + while (oct != ' ') { + if (oct == '+') + npitch += 7; + else if (oct == '-') + npitch -= 7; + removeOctaveCode(oct, note); + oct = octaveCode(note); + } + /*if debugMode then writeln(' is ',npitch);*/ + return npitch; +} + + +Local Void delins(note, c1, c2, l) +Char *note; +Char c1, c2; +short l; +{ + short i, n; + + n = strlen(note); + i = pos1(c1, note); + if (i == 0) + i = n + 1; + while (l > 0 && i <= n) { + delete1(note, i); + n--; + l--; + } + i = pos1(c2, note); + if (i == 0) { + if (strlen(note) < 2) + error("M-Tx program error", print); + else + i = 3; + } + while (l > 0) { + insertChar(c2, note, i); + l--; + } +} + + +Static Void repitch(note, diff) +Char *note; +short diff; +{ + diff /= 7; + if (diff > 0) + delins(note, '-', '+', diff); + else + delins(note, '+', '-', -diff); +} + + +Void setUnbeamed(voice) +short voice; +{ + current[voice-1].beamed = false; +} + + +Void setUnslurred(voice) +short voice; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + WITH->slurred = false; + WITH->after_slur = 0; +} + + +Void beginBeam(voice, note) +short voice; +Char *note; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + if (WITH->beamed) + error3(voice, "Starting a forced beam while another is open"); + if (WITH->beam_level > 0) + error3(voice, + "Starting a forced beam while another is open (beamlevel>0)"); + WITH->beam_level++; + WITH->beamnext = true; + WITH->no_beam_melisma = startsWith(note, "[["); + if (WITH->no_beam_melisma) + predelete(note, 1); +} + + +Void endBeam(voice) +short voice; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + if (WITH->beam_level < 1) + error3(voice, "Closing a beam that was never opened"); + WITH->beam_level--; + setUnbeamed(voice); +} + + +short slurLevel(voice) +short voice; +{ + return (current[voice-1].slur_level); +} + + +short beamLevel(voice) +short voice; +{ + return (current[voice-1].beam_level); +} + + +boolean noSlurMelisma(voice, history) +short voice, history; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + return (WITH->no_slur_melisma[WITH->slur_level + history - 1]); +} + + +Static Char *slurLabel(Result, voice, note) +Char *Result; +short voice; +Char *note; +{ + Char sl; + + if (*note == '\0') + return strcpy(Result, ""); + if (strlen(note) < 2) + return strcpy(Result, " "); + if (note[1] >= '0' && note[1] <= 'Z') + sl = note[1]; + else + sl = ' '; + if (sl >= 'I' && sl <= 'T') + warning3(voice, "Slur label in the range I..T may cause conflict"); + sprintf(Result, "%c", sl); + return Result; +} + + +Static Void labelSlur(voice, note) +short voice; +Char *note; +{ + Char sl; + line_status *WITH; + + if (*note == '\0') + return; + WITH = ¤t[voice-1]; + if (note[0] == ')') + WITH->slurID += 2; + else if (note[0] == '}') + WITH->tieID += 2; + /** CMO 0.60a: replace assigning tieID to sl by space charater + if (note[1]='(') or (note[1]=')') then sl:=slurID else sl:=tieID; */ + if (note[0] == '(' || note[0] == ')') + sl = WITH->slurID; + else + sl = ' '; + /** CMO 0.60d: omit insertchar in case of tie + insertchar(sl,note,2); */ + if (note[0] == '(' || note[0] == ')') + insertChar(sl, note, 2); + if (note[0] == '(') + WITH->slurID -= 2; + else if (note[0] == '{') + WITH->tieID -= 2; + if (WITH->slurID < 'I') + warning3(voice, "Too many nested slurs may cause conflict"); + if (WITH->tieID < 'I') + warning3(voice, "Too many nested ties may cause conflict"); +} + + +Void beginSlur(voice, note) +short voice; +Char *note; +{ + short posblind; + line_status *WITH; + Char STR1[256], STR2[256]; + + WITH = ¤t[voice-1]; + WITH->slur_level++; + if (WITH->slur_level > 12) + error3(voice, "Too many open slurs"); + WITH->no_slur_melisma[WITH->slur_level - 1] = (startsWith(note, "((") || + startsWith(note, "{{")); + if (WITH->no_slur_melisma[WITH->slur_level - 1]) + predelete(note, 1); + if (!strcmp(slurLabel(STR1, voice, note), "0")) + delete1(note, 2); + else { + if (!strcmp(slurLabel(STR2, voice, note), " ")) + labelSlur(voice, note); + } + posblind = pos1('~', note); + if (posblind > 0) { + if (hideBlindSlurs()) + *note = '\0'; + else + delete1(note, posblind); + } + WITH->slurnext = true; +} + + +Void endSlur(voice, note) +short voice; +Char *note; +{ + short poscontinue, posblind; + Char contslur[256]; + line_status *WITH; + Char STR1[256], STR2[256]; + + WITH = ¤t[voice-1]; + *contslur = '\0'; + if (WITH->slur_level < 1) + error3(voice, "Ending a slur that was never started"); + if (note[0] == ')') + poscontinue = pos1('(', note); + else if (note[0] == '}') + poscontinue = pos1('{', note); + if (poscontinue == 0) + WITH->slur_level--; + else { + poscontinue--; + strcpy(contslur, note); + predelete(contslur, poscontinue); + shorten(note, poscontinue); + } + if (WITH->slur_level == 0) + setUnslurred(voice); + if (!strcmp(slurLabel(STR1, voice, note), "0")) + delete1(note, 2); + else { + if (!strcmp(slurLabel(STR2, voice, note), " ")) + labelSlur(voice, note); + } + if (!strcmp(slurLabel(STR1, voice, contslur), "0")) + delete1(contslur, 2); + else { + if (!strcmp(slurLabel(STR2, voice, contslur), " ")) + labelSlur(voice, contslur); + } + if (poscontinue > 0) { + if (note[0] == '}') + strcat(note, "t"); + note[0] = 's'; + if (contslur[0] == '{') + strcat(contslur, "t"); + contslur[0] = 's'; + } + posblind = pos1('~', note); + if (posblind > 0) { + if (hideBlindSlurs()) + *note = '\0'; + else + delete1(note, posblind); + } + if (*note != '\0' && *contslur != '\0') + sprintf(note + strlen(note), " %s", contslur); +} + + +Void renewPitch(voice, note) +short voice; +Char *note; +{ + short pstat; + line_status *WITH; + + WITH = ¤t[voice-1]; + pstat = newPitch(voice, note, WITH->chord_pitch, WITH->chord_lastnote); + if (debugMode()) + printf("Current pitch in voice %d is %d, last note was %c, this note is %s", + voice, WITH->pitch, WITH->lastnote, note); + WITH->pitch = newPitch(voice, note, WITH->pitch, WITH->lastnote); + if (WITH->pitch != pstat) + repitch(note, WITH->pitch - pstat); + if (WITH->pitch < lowest_pitch && checkPitch()) { + printf("Pitch of note %s following %c reported as %d", + note, WITH->lastnote, WITH->pitch); + error3(voice, "Pitch too low"); + } + if (WITH->pitch > highest_pitch && checkPitch()) { + printf("Pitch of note %s following %c reported as %d", + note, WITH->lastnote, WITH->pitch); + error3(voice, "Pitch too high"); + } + WITH->lastnote = note[0]; + if (debugMode()) + printf(", repitched to %d\n", WITH->pitch); + if (debugMode() && WITH->pitch != pstat) + printf("Pitch from melodic line = %d from last chordal note = %d\n", + WITH->pitch, pstat); +} + + +short chordPitch(voice) +short voice; +{ + return (current[voice-1].chord_pitch); +} + + +Void renewChordPitch(voice, note) +short voice; +Char *note; +{ + line_status *WITH; + + WITH = ¤t[voice-1]; + WITH->chord_pitch = newPitch(voice, note, WITH->chord_pitch, + WITH->chord_lastnote); + if (WITH->chord_pitch < lowest_pitch) + error3(voice, "Pitch in chord too low"); + if (WITH->chord_pitch > highest_pitch) + error3(voice, "Pitch in chord too high"); + WITH->chord_lastnote = note[0]; +} + + +Void initStatus() +{ + short voice, FORLIM; + line_status *WITH; + + FORLIM = nvoices; + for (voice = 1; voice <= FORLIM; voice++) { + WITH = ¤t[voice-1]; + WITH->duration = default_duration; + WITH->octave_adjust = 0; + WITH->slur_level = 0; + WITH->beam_level = 0; + WITH->beamed = false; + WITH->beamnext = false; + WITH->slurred = false; + WITH->slurnext = false; + WITH->after_slur = 0; + WITH->octave = initOctave(voiceStave(voice)); + WITH->slurID = 'S'; + WITH->tieID = 'T'; + WITH->lastnote = 'f'; + WITH->pitch = (WITH->octave - '0') * 7 - 3; + *WITH->chord_tie_label = '\0'; + saveStatus(voice); + } +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/status.h b/Build/source/utils/m-tx/mtx-0.60d/status.h new file mode 100644 index 00000000000..1a81d124398 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/status.h @@ -0,0 +1,57 @@ +/* Header for module status, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef STATUS_H +#define STATUS_H + + +#ifdef STATUS_G +# define vextern +#else +# define vextern extern +#endif +/* Keep track of duration, octave, slur and beam status. */ + + +extern Void initStatus PV(); +extern Void saveStatus PP((int voice)); + +extern Void resetDuration PP((int voice, int dur)); +extern Char duration PP((int voice)); + +extern short slurLevel PP((int voice)); +extern short beamLevel PP((int voice)); +extern boolean noBeamMelisma PP((int voice)); +extern boolean noSlurMelisma PP((int voice, int history)); +extern short afterSlur PP((int voice)); +extern Void setUnbeamed PP((int voice)); +extern Void setUnslurred PP((int voice)); +extern Void beginBeam PP((int voice, Char *note)); +extern Void endBeam PP((int voice)); +extern Void beginSlur PP((int voice, Char *note)); +extern Void endSlur PP((int voice, Char *note)); +extern Void activateBeamsAndSlurs PP((int voice)); + +extern Void setOctave PP((int voice)); +extern Void resetOctave PP((int voice)); +extern Char octave PP((int voice)); +extern Void newOctave PP((int voice, int dir)); +extern Void initOctaves PP((Char *octaves)); + +extern Void renewPitch PP((int voice, Char *note)); +extern short chordPitch PP((int voice)); +extern Void renewChordPitch PP((int voice, Char *note)); +extern Void rememberDurations PV(); +extern Void restoreDurations PV(); +extern Void chordTie PP((int voice, Char *lab)); + + +typedef short int5[5]; + + +extern Void getChordTies PP((int voice, short *pitches, Char *labels)); + + +#undef vextern + +#endif /*STATUS_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/status.pas b/Build/source/utils/m-tx/mtx-0.60d/status.pas new file mode 100644 index 00000000000..9056dbe1917 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/status.pas @@ -0,0 +1,348 @@ +unit status; +{ Keep track of duration, octave, slur and beam status. } + +interface + +procedure initStatus; +procedure saveStatus(voice: integer); + +procedure resetDuration (voice: integer; dur: char); +function duration(voice: integer): char; + +function slurLevel(voice: integer): integer; +function beamLevel(voice: integer): integer; +function noBeamMelisma(voice: integer): boolean; +function noSlurMelisma(voice, history: integer): boolean; +function afterSlur(voice: integer): integer; +procedure setUnbeamed(voice: integer); +procedure setUnslurred(voice: integer); +procedure beginBeam(voice: integer; var note: string); +procedure endBeam(voice: integer); +procedure beginSlur(voice: integer; var note: string); +procedure endSlur(voice: integer; var note: string); +procedure activateBeamsAndSlurs(voice: integer); + +procedure setOctave(voice: integer); +procedure resetOctave(voice: integer); +function octave(voice: integer): char; +procedure newOctave(voice: integer; dir: char); +procedure initOctaves(octaves: string); + +procedure renewPitch (voice: integer; var note: string); +function chordPitch(voice: integer): integer; +procedure renewChordPitch (voice: integer; note: string); +procedure rememberDurations; +procedure restoreDurations; +procedure chordTie(voice: integer; var lab: char); +type int5 = array[1..5] of integer; +procedure getChordTies(voice: integer; var pitches: int5; var labels: string); + +implementation uses globals, strings, mtxline, control, utility, notes; + +const + init_oct: string = ''; + lowest_pitch = -9; + highest_pitch = 61; + +type + line_status = record + pitch, chord_pitch, octave_adjust, beam_level, slur_level, after_slur: integer; + octave, lastnote, chord_lastnote, duration, slurID, tieID: char; + beamnext, beamed, slurnext, slurred, no_beam_melisma: boolean; + no_slur_melisma: array[1..12] of boolean; + chord_tie_pitch: int5; + chord_tie_label: string[5]; + end; + +var current: array[voice_index] of line_status; + lastdur: array[voice_index] of char; + +procedure chordTie(voice: integer; var lab: char); + var n: integer; +begin with current[voice] do + begin n:=length(chord_tie_label); + if n=5 then error3(voice,'Only five slur ties allowed per voice'); + if n=0 then lab:='T' else lab:=chord_tie_label[n]; + inc(lab); chord_tie_label:=chord_tie_label+lab; + inc(n); chord_tie_pitch[n]:=chord_pitch + end +end; + +procedure getChordTies(voice: integer; var pitches: int5; var labels: string); +begin with current[voice] do + begin pitches:=chord_tie_pitch; labels:=chord_tie_label; chord_tie_label:='' end +end; + +procedure rememberDurations; + var v: voice_index; +begin for v:=1 to nvoices do lastdur[v]:=duration(v) end; + +procedure restoreDurations; + var v: voice_index; +begin for v:=1 to nvoices do resetDuration(v,lastdur[v]) end; + +function duration(voice: integer): char; +begin duration := current[voice].duration; end; + +procedure resetDuration(voice: integer; dur: char); +begin if pos1(dur,durations)=0 then + begin write('Trying to set duration to ',dur,'; '); + error3(voice,'M-Tx system error: resetDuration'); + end; + current[voice].duration := dur +end; + + +procedure activateBeamsAndSlurs(voice: integer); +begin with current[voice] do + begin + if beamnext then begin beamed:=true; beamnext:=false; end; + if slurnext then begin slurred:=true; slurnext:=false; end; + if slurred then inc(after_slur); + end +end; + +procedure saveStatus(voice: integer); +begin with current[voice] do + begin chord_pitch := pitch; chord_lastnote := lastnote; end; +end; + +function noBeamMelisma(voice: integer): boolean; +begin noBeamMelisma := current[voice].no_beam_melisma; end; + +function afterSlur(voice: integer): integer; +begin with current[voice] do + begin afterSlur := after_slur; if (after_slur>0) and (slur_level<1) then + error3(voice,'M-Tx system error: afterSlur and slur_level incompatible)') + end +end; + +function octave(voice: integer): char; +begin octave := current[voice].octave; end; + +procedure resetOctave(voice: integer); +begin current[voice].octave := ' '; end; + +procedure initOctaves(octaves: string); + var i: integer; +begin init_oct:=octaves; + i:=1; + while i<=length(init_oct) do + if init_oct[i]=' ' then delete1(init_oct,i) else inc(i); +end; + +function initOctave(voice_stave: stave_index): char; +begin + if voice_stave>length(init_oct) then + if pos1(clef[voice_stave],'Gt08')>0 + then initOctave:='4' else initOctave:='3' + else initOctave:=init_oct[voice_stave]; +end; + +procedure setOctave(voice: integer); +begin current[voice].octave:=initOctave(voiceStave(voice)); end; + +procedure newOctave(voice: integer; dir: char); +begin with current[voice] do case dir of + '+': inc(octave); + '-': dec(octave); + end; +end; + +function newPitch (voice: integer; note: string; pitch: integer; + lastnote: char): integer; + var interval, npitch: integer; + oct: char; +begin {if debugMode then + write('New pitch for note ',note,' relative to ',lastnote, + ' at pitch ',pitch);} + oct:=octaveCode(note); + if oct='=' then oct:=initOctave(voiceStave(voice)); + if (oct>='0') and (oct<='9') then + begin pitch:=7*(ord(oct)-ord('0'))-3; lastnote:='f'; + removeOctaveCode(oct,note); oct:=octaveCode(note) + end; + interval := ord(note[1])-ord(lastnote); + if interval>3 then dec(interval,7); + if interval<-3 then inc(interval,7); + npitch:=pitch+interval; {if debugMode then write(' was ',npitch);} + while oct<>' ' do + begin if oct='+' then inc(npitch,7) else if oct='-' then dec(npitch,7); + removeOctaveCode(oct,note); oct:=octaveCode(note) + end; + {if debugMode then writeln(' is ',npitch);} + newPitch:=npitch +end; + +procedure repitch(var note: string; diff: integer); + procedure delins(var note: string; c1, c2: char; l: integer); + var i, n: integer; + begin n:=length(note); i:=pos1(c1,note); if i=0 then i:=n+1; + while (l>0) and (i<=n) do begin delete1(note,i); dec(n); dec(l); end; + i:=pos1(c2,note); + if i=0 then if length(note)<2 then error('M-Tx program error',print) + else i:=3; + while l>0 do begin insertchar(c2,note,i); dec(l); end; + end; + begin diff:=diff div 7; + if diff>0 then delins(note, '-','+',diff) + else delins(note, '+','-',-diff); + end; + +procedure setUnbeamed(voice: integer); +begin current[voice].beamed:=false end; + +procedure setUnslurred(voice: integer); +begin with current[voice] do + begin slurred:=false; after_slur:=0; end; +end; + +procedure beginBeam(voice: integer; var note: string); +begin with current[voice] do + begin if beamed then + error3(voice, 'Starting a forced beam while another is open'); + if beam_level>0 then error3(voice, + 'Starting a forced beam while another is open (beamlevel>0)'); + inc(beam_level); + beamnext := true; no_beam_melisma:=startsWith(note,'[['); + if no_beam_melisma then predelete(note,1); + end; +end; + +procedure endBeam(voice: integer); +begin with current[voice] do + begin if beam_level<1 then error3(voice, 'Closing a beam that was never opened'); + dec(beam_level) + end; + setUnbeamed(voice) +end; + +function slurLevel(voice: integer): integer; +begin slurLevel := current[voice].slur_level; end; + +function beamLevel(voice: integer): integer; +begin beamLevel := current[voice].beam_level; end; + +function noSlurMelisma(voice, history: integer): boolean; +begin with current[voice] do + noSlurMelisma := no_slur_melisma[slur_level+history]; +end; + +function slurLabel(voice: integer; note: string): string; + var sl: char; +begin if note='' then begin slurLabel:=''; exit end; + if length(note)<2 then begin slurLabel:=' '; exit end; + if (note[2]>='0') and (note[2]<='Z') then sl:=note[2] else sl:=' '; + if (sl>='I') and (sl<='T') then + warning3(voice,'Slur label in the range I..T may cause conflict'); + slurLabel:=sl +end; + +procedure labelSlur(voice: integer; var note: string); + var sl: char; +begin if note='' then exit; + with current[voice] do + begin + if note[1]=')' then inc(slurID,2) else if note[1]='}' then inc(tieID,2); + if (note[1]='(') or (note[1]=')') then sl:=slurID else sl:=tieID; + insertchar(sl,note,2); + if note[1]='(' then dec(slurID,2) else if note[1]='{' then dec(tieID,2); + if slurID<'I' then warning3(voice,'Too many nested slurs may cause conflict'); + if tieID<'I' then warning3(voice,'Too many nested ties may cause conflict') + end +end; + +procedure beginSlur(voice: integer; var note: string); + var posblind: integer; +begin + with current[voice] do + begin + inc(slur_level); if slur_level>12 then Error3(voice,'Too many open slurs'); + no_slur_melisma[slur_level] := startsWith(note,'((') or startsWith(note,'{{'); + if no_slur_melisma[slur_level] then predelete(note,1); + if slurLabel(voice,note)='0' then delete1(note,2) else + if slurLabel(voice,note)=' ' then labelSlur(voice,note); + posblind:=pos1('~',note); if posblind>0 then + if hideBlindSlurs then note:='' else delete1(note,posblind); + slurnext := true; + end; +end; + +procedure endSlur(voice: integer; var note: string); + var poscontinue, posblind: integer; + contslur: string; +begin with current[voice] do + begin contslur:=''; + if slur_level<1 then Error3(voice,'Ending a slur that was never started'); + if note[1]=')' then poscontinue:=pos1('(',note) + else if note[1]='}' then poscontinue:=pos1('{',note); + if poscontinue=0 then dec(slur_level) else + begin dec(poscontinue); contslur:=note; predelete(contslur,poscontinue); + shorten(note,poscontinue); + end; + if slur_level=0 then setUnslurred(voice); + if slurLabel(voice,note)='0' then delete1(note,2) else + if slurLabel(voice,note)=' ' then labelSlur(voice,note); + if slurLabel(voice,contslur)='0' then delete1(contslur,2) else + if slurLabel(voice,contslur)=' ' then labelSlur(voice,contslur); + if poscontinue>0 then + begin if note[1]='}' then note:=note+'t'; note[1]:='s'; + if contslur[1]='{' then contslur:=contslur+'t'; contslur[1]:='s'; + end; + posblind:=pos1('~',note); if posblind>0 then + if hideBlindSlurs then note:='' else delete1(note,posblind); + if (note<>'') and (contslur<>'') then note := note + ' ' + contslur; + end; +end; + +procedure renewPitch (voice: integer; var note: string); + var pstat: integer; +begin with current[voice] do + begin pstat:=newPitch (voice, note, chord_pitch, chord_lastnote); + if debugMode then write('Current pitch in voice ',voice,' is ',pitch, + ', last note was ',lastnote,', this note is ',note); + pitch := newPitch (voice, note, pitch, lastnote); + if pitch<>pstat then repitch(note,pitch-pstat); + if (pitchhighest_pitch) and checkPitch then + begin write('Pitch of note ',note,' following ',lastnote,' reported as ',pitch); + error3(voice,'Pitch too high') + end; + lastnote:=note[1]; + if debugMode then writeln(', repitched to ',pitch); + if debugMode and (pitch<>pstat) then + writeln('Pitch from melodic line = ',pitch, + ' from last chordal note = ', pstat); + end; +end; + +function chordPitch(voice: integer): integer; +begin chordPitch:=current[voice].chord_pitch end; + +procedure renewChordPitch (voice: integer; note: string); +begin with current[voice] do + begin chord_pitch:=newPitch(voice,note,chord_pitch,chord_lastnote); + if chord_pitchhighest_pitch then error3(voice,'Pitch in chord too high'); + chord_lastnote:=note[1]; + end +end; + +procedure initStatus; + var voice: integer; +begin for voice:=1 to nvoices do with current[voice] do + begin duration:=default_duration; + octave_adjust:=0; slur_level:=0; beam_level:=0; + beamed:=false; beamnext:=false; + slurred:=false; slurnext:=false; after_slur:=0; + octave:=initOctave(voiceStave(voice)); slurID:='S'; tieID:='T'; + lastnote:='f'; pitch:=7*(ord(octave)-ord('0'))-3; + chord_tie_label:=''; + saveStatus(voice); + end; +end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/strings.h b/Build/source/utils/m-tx/mtx-0.60d/strings.h new file mode 100644 index 00000000000..6e0bcdfae8e --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/strings.h @@ -0,0 +1,34 @@ +/* Header for module strings, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef STRINGS_H +#define STRINGS_H + + +#ifdef STRINGS_G +# define vextern +#else +# define vextern extern +#endif +/* String handling primitives. */ +/* These should be recoded in C instead of using the p2c code. */ + + +extern Void scan1 PP((Char *s, int p, short *n)); +/* Read an integer at position p of s */ +extern boolean startsWith PP((Char *s1, Char *s2)); +extern short pos1 PP((int c, Char *s)); +extern short posNot PP((int c, Char *s)); +extern Void insertChar PP((int c, Char *s, int p)); +extern Char *substr_ PP((Char *Result, Char *s, int start, int count)); +extern Void getNum PP((Char *line, short *k)); +extern Void getTwoNums PP((Char *line, short *k1, short *k2)); +extern Void toUpper PP((Char *s)); +extern Void delete1 PP((Char *s, int p)); +extern Void predelete PP((Char *s, int l)); +extern Void shorten PP((Char *s, int new_length)); + + +#undef vextern + +#endif /*STRINGS_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/uptext.c b/Build/source/utils/m-tx/mtx-0.60d/uptext.c new file mode 100644 index 00000000000..eb5b2772e02 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/uptext.c @@ -0,0 +1,277 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "uptext.pas" */ + + +#include "p2c.h" + + +#define UPTEXT_G +#include "uptext.h" + + +#ifndef GLOBALS_H +#include "globals.h" +#endif + +#ifndef STRINGS_H +#include "strings.h" +#endif + +#ifndef MTXLINE_H +#include "mtxline.h" +#endif + +#ifndef UTILITY_H +#include "utility.h" +#endif + + +typedef struct uptext_info { + short uptext, uptext_adjust, uptext_lcz; + Char uptext_font[256]; +} uptext_info; + + +Static uptext_info U[maxvoices]; + + +short uptextLineNo(voice) +short voice; +{ + return (U[voice-1].uptext); +} + + +Void setUptextLineNo(voice, lno) +short voice, lno; +{ + U[voice-1].uptext = lno; +} + + +Void clearUptext() +{ + voice_index voice, FORLIM; + + FORLIM = nvoices; + for (voice = 0; voice <= FORLIM - 1; voice++) + U[voice].uptext = 0; +} + + +Void initUptext() +{ + voice_index voice, FORLIM; + uptext_info *WITH; + + FORLIM = nvoices; + for (voice = 0; voice <= FORLIM - 1; voice++) { + WITH = &U[voice]; + WITH->uptext_adjust = 0; + WITH->uptext_lcz = 3; + *WITH->uptext_font = '\0'; + } +} + + +Static Void textTranslate(uptext, font) +Char *uptext, *font; +{ + short k; + Char STR1[256], STR2[256], STR3[256], STR4[256]; + short FORLIM; + + if (*uptext == '\0') + return; + do { + k = pos1('%', uptext); + if (k > 0) { + sprintf(STR4, "%s{\\mtxFlat}%s", + substr_(STR1, uptext, 1, k - 1), + substr_(STR3, uptext, k + 1, strlen(uptext) - k)); + strcpy(uptext, STR4); + } + } while (k != 0); + do { + k = pos1('#', uptext); + if (k > 0) { + sprintf(STR2, "%s{\\mtxSharp}%s", + substr_(STR1, uptext, 1, k - 1), + substr_(STR4, uptext, k + 1, strlen(uptext) - k)); + strcpy(uptext, STR2); + } + } while (k != 0); + switch (uptext[0]) { + + case '<': + if (!strcmp(uptext, "<")) + strcpy(uptext, "\\mtxIcresc"); + else if (!strcmp(uptext, "<.")) + strcpy(uptext, "\\mtxTcresc"); + else { + predelete(uptext, 1); + sprintf(uptext, "\\mtxCresc{%s}", strcpy(STR4, uptext)); + } + break; + + case '>': + if (!strcmp(uptext, ">")) + strcpy(uptext, "\\mtxIdecresc"); + else if (!strcmp(uptext, ">.")) + strcpy(uptext, "\\mtxTdecresc"); + else { + predelete(uptext, 1); + sprintf(uptext, "\\mtxDecresc{%s}", strcpy(STR1, uptext)); + } + break; + + default: + FORLIM = strlen(uptext); + for (k = 0; k <= FORLIM - 1; k++) { + if (pos1(uptext[k], "mpfzrs~") == 0) + return; + } + break; + } + strcpy(font, "\\mtxPF"); +} + + +#define default_ 10 +#define under (-14) + + +/* Local variables for addUptext: */ +struct LOC_addUptext { + short voice; + Char w[256]; + short adj; +} ; + +Local Void adjustUptext(LINK) +struct LOC_addUptext *LINK; +{ + Char letter; + boolean force = false; + uptext_info *WITH1; + + delete1(LINK->w, 1); + while (*LINK->w != '\0') { +/* p2c: uptext.pas: Note: Eliminated unused assignment statement [338] */ + letter = LINK->w[0]; + delete1(LINK->w, 1); + WITH1 = &U[LINK->voice-1]; + switch (letter) { + + case '<': + if (WITH1->uptext_lcz > 1) + WITH1->uptext_lcz--; + break; + + case '>': + if (WITH1->uptext_lcz < 3) + WITH1->uptext_lcz++; + break; + + case '^': + WITH1->uptext_adjust = 0; + break; + + case 'v': + WITH1->uptext_adjust = under; + break; + + case '=': + force = true; + break; + + case '+': + case '-': + if (*LINK->w != '\0') + getNum(LINK->w, &LINK->adj); + else + LINK->adj = 0; + if (letter == '-') + LINK->adj = -LINK->adj; + if (force) + WITH1->uptext_adjust = LINK->adj; + else + WITH1->uptext_adjust += LINK->adj; + *LINK->w = '\0'; + break; + + default: + error3(LINK->voice, "Unknown uptext adjustment"); + break; + } + } + strcpy(LINK->w, "!"); +} + + +Void addUptext(voice_, no_uptext, pretex) +short voice_; +boolean *no_uptext; +Char *pretex; +{ + struct LOC_addUptext V; + Char font[256]; + static Char lcz[4] = "lcz"; + uptext_info *WITH; + Char STR1[256], STR2[256], STR3[256]; + + V.voice = voice_; + WITH = &U[V.voice-1]; + if (WITH->uptext == 0) + *no_uptext = true; + if (*no_uptext) + return; + do { + GetNextWord(V.w, P[WITH->uptext - 1], blank, dummy); + sprintf(STR1, "%c", barsym); + if (!strcmp(V.w, STR1) || *V.w == '\0') + *no_uptext = true; + sprintf(STR1, "%c", tilde); + if (!strcmp(V.w, STR1) || *no_uptext) + return; + if (V.w[0] == '!') { + strcpy(WITH->uptext_font, V.w); + WITH->uptext_font[0] = '\\'; + } + if (V.w[0] == '@') + adjustUptext(&V); + } while (V.w[0] == '!'); /* ! is a kludge, will get me in trouble later */ + strcpy(font, WITH->uptext_font); + textTranslate(V.w, font); + if (*font != '\0') + sprintf(V.w, "%s{%s}", font, strcpy(STR1, V.w)); + switch (lcz[WITH->uptext_lcz - 1]) { + + case 'l': + sprintf(V.w, "\\mtxLchar{%s}{%s}", + toString(STR1, default_ + WITH->uptext_adjust), + strcpy(STR3, V.w)); + break; + + case 'c': + sprintf(V.w, "\\mtxCchar{%s}{%s}", + toString(STR1, default_ + WITH->uptext_adjust), + strcpy(STR2, V.w)); + break; + + case 'z': + sprintf(V.w, "\\mtxZchar{%s}{%s}", + toString(STR1, default_ + WITH->uptext_adjust), + strcpy(STR3, V.w)); + break; + } + strcat(pretex, V.w); +} + +#undef default_ +#undef under + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/uptext.h b/Build/source/utils/m-tx/mtx-0.60d/uptext.h new file mode 100644 index 00000000000..8a9a1643dea --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/uptext.h @@ -0,0 +1,25 @@ +/* Header for module uptext, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef UPTEXT_H +#define UPTEXT_H + + +#ifdef UPTEXT_G +# define vextern +#else +# define vextern extern +#endif +/* Insert and translate uptext */ + + +extern Void initUptext PV(); +extern Void clearUptext PV(); +extern short uptextLineNo PP((int voice)); +extern Void setUptextLineNo PP((int voice, int lno)); +extern Void addUptext PP((int voice, boolean *no_uptext, Char *pretex)); + + +#undef vextern + +#endif /*UPTEXT_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/uptext.pas b/Build/source/utils/m-tx/mtx-0.60d/uptext.pas new file mode 100644 index 00000000000..16bebc7556f --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/uptext.pas @@ -0,0 +1,119 @@ +unit uptext; +{ Insert and translate uptext } + +interface + +procedure initUptext; +procedure clearUptext; +function uptextLineNo(voice: integer): integer; +procedure setUptextLineNo(voice, lno: integer); +procedure addUptext(voice: integer; var no_uptext: boolean; + var pretex: string); + +implementation uses globals, strings, mtxline, utility; + +type uptext_info = record + uptext, uptext_adjust, uptext_lcz: integer; + uptext_font: string; + end; + +var U: array[voice_index] of uptext_info; + +function uptextLineNo(voice: integer): integer; +begin uptextLineNo := U[voice].uptext; end; + +procedure setUptextLineNo(voice, lno: integer); +begin U[voice].uptext := lno; end; + +procedure clearUptext; + var voice: voice_index; +begin for voice:=1 to nvoices do U[voice].uptext:=0; end; + +procedure initUptext; + var voice: voice_index; +begin for voice:=1 to nvoices do with U[voice] do + begin + uptext_adjust:=0; uptext_lcz:=3; uptext_font:=''; + end; +end; + +procedure textTranslate(var uptext, font: string); + var k: integer; +begin + if uptext='' then exit; + repeat k := pos1('%',uptext); + if k>0 then uptext:= + substr(uptext,1,k-1)+'{\mtxFlat}'+substr(uptext,k+1,length(uptext)-k); + until k=0; + repeat k := pos1('#',uptext); + if k>0 then uptext:= + substr(uptext,1,k-1)+'{\mtxSharp}'+substr(uptext,k+1,length(uptext)-k); + until k=0; + case uptext[1] of + '<': if uptext='<' then uptext:='\mtxIcresc' + else if uptext='<.' then uptext:='\mtxTcresc' + else begin + predelete(uptext,1); uptext:='\mtxCresc{'+uptext+'}' + end; + '>': if uptext='>' then uptext:='\mtxIdecresc' + else if uptext='>.' then uptext:='\mtxTdecresc' + else begin + predelete(uptext,1); uptext:='\mtxDecresc{'+uptext+'}' + end; + else for k:=1 to length(uptext) do if pos1(uptext[k],'mpfzrs~')=0 then exit; + end; + font:='\mtxPF'; +end; + +procedure addUptext(voice: integer; var no_uptext: boolean; + var pretex: string); + var w, font: string; + adj: integer; + const default = 10; under = -14; + lcz: string[3] = 'lcz'; + procedure adjustUptext; + var letter: char; + force: boolean; + begin delete1(w,1); force:=false; + while w<>'' do with U[voice] do + begin letter:=w[1]; delete1(w,1); with U[voice] do + case letter of + '<': if uptext_lcz>1 then dec(uptext_lcz); + '>': if uptext_lcz<3 then inc(uptext_lcz); + '^': uptext_adjust:=0; + 'v': uptext_adjust:=under; + '=': force:=true; +'+','-': begin if w<>'' then getNum(w,adj) else adj:=0; + if letter = '-' then adj := -adj; + if force then uptext_adjust := adj else inc(uptext_adjust,adj); + w:=''; + end; + else error3(voice,'Unknown uptext adjustment'); + end; + end; + w:='!'; + end; + + begin + with U[voice] do begin + if uptext=0 then no_uptext := true; + if no_uptext then exit; + repeat + w := GetNextWord(P[uptext],blank,dummy); + if (w=barsym) or (w='') then no_uptext:=true; + if (w=tilde) or no_uptext then exit; + if w[1]='!' then begin uptext_font:=w; uptext_font[1]:='\'; end; + if w[1]='@' then adjustUptext; + until w[1]<>'!'; { ! is a kludge, will get me in trouble later } + font:=uptext_font; textTranslate(w,font); + if font<>'' then w:=font+'{'+w+'}'; + case lcz[uptext_lcz] of +'l': w:='\mtxLchar{' + toString(default+uptext_adjust) + '}{' + w + '}'; +'c': w:='\mtxCchar{' + toString(default+uptext_adjust) + '}{' + w + '}'; +'z': w:='\mtxZchar{' + toString(default+uptext_adjust) + '}{' + w + '}'; + end; + pretex:=pretex+w; + end; + end; + +end. diff --git a/Build/source/utils/m-tx/mtx-0.60d/utility.c b/Build/source/utils/m-tx/mtx-0.60d/utility.c new file mode 100644 index 00000000000..225936909d1 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/utility.c @@ -0,0 +1,393 @@ +/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ +/* From input file "utility.pas" */ + + +#include "p2c.h" + + +#define UTILITY_G +#include "utility.h" + + +#ifndef STRINGS_H +#include "strings.h" +#endif + + +#define blank ' ' +#define dummy '\0' + + +short wordCount(s) +Char *s; +{ + short i, n, FORLIM; + + if (*s == '\0') + return 0; + if (s[0] == blank) + n = 0; + else + n = 1; + FORLIM = strlen(s); + for (i = 1; i <= FORLIM - 1; i++) { + if (s[i-1] == blank && s[i] != blank) + n++; + } + return n; +} + + +Char *GetNextWord(Result, s, Delim, Term) +Char *Result; +Char *s; +Char Delim, Term; +{ + /* A delimiter is a character that separates words, but forms no part + of them. A terminator is a character that appears at the end of + a word. */ + short n = 1; + short start, last; + + last = strlen(s); + while (n <= last && s[n-1] == Delim) + n++; + start = n; + while (n <= last && s[n-1] != Term && s[n-1] != Delim) + n++; + if (n <= last && s[n-1] == Term) + n++; + substr_(Result, s, start, n - start); + while (n <= last && s[n-1] == Delim) + n++; + predelete(s, n - 1); + return Result; +} + + +Char *NextWord(Result, s_, Delim, Term) +Char *Result; +Char *s_; +Char Delim, Term; +{ + Char s[256]; + + strcpy(s, s_); + return (GetNextWord(Result, s, Delim, Term)); +} + + +Char *plural(Result, n) +Char *Result; +short n; +{ + if (n == 1) + return strcpy(Result, ""); + else + return strcpy(Result, "s"); +} + + +short curtail(s, c) +Char *s; +Char c; +{ + short Result = 0; + short l; + + l = strlen(s); + if (s[l-1] == c) { + shorten(s, l - 1); + return l; + } + return Result; +} + + +Char *toString(Result, n) +Char *Result; +short n; +{ + Char s[256]; + + sprintf(s, "%d", n); + return strcpy(Result, s); +} + + +short digit(c) +Char c; +{ + return (c - '0'); +} + + +boolean equalsIgnoreCase(s1_, s2_) +Char *s1_, *s2_; +{ + Char s1[256], s2[256]; + + strcpy(s1, s1_); + strcpy(s2, s2_); + toUpper(s1); + toUpper(s2); + return (strcmp(s1, s2) == 0); +} + + +boolean startsWithIgnoreCase(s1_, s2_) +Char *s1_, *s2_; +{ + Char s1[256], s2[256]; + + strcpy(s1, s1_); + strcpy(s2, s2_); + toUpper(s1); + toUpper(s2); + return (startsWith(s1, s2)); +} + + +boolean startsWithBracedWord(P_) +Char *P_; +{ + Char P[256]; + Char w[256]; + + strcpy(P, P_); + GetNextWord(w, P, blank, dummy); + return (w[0] == '{' && w[strlen(w) - 1] == '}'); +} + + +Void trim(s) +Char *s; +{ + short k; + + k = posNot(blank, s); + if (k > 1) + predelete(s, k - 1); + else if (k == 0) + *s = '\0'; +} + + +boolean endsWith(s1_, s2) +Char *s1_, *s2; +{ + Char s1[256]; + short l1, l2; + + strcpy(s1, s1_); + l1 = strlen(s1); + l2 = strlen(s2); + if (l1 < l2) + return false; + predelete(s1, l1 - l2); + return (strcmp(s1, s2) == 0); +} + + +/* Local variables for grep: */ +struct LOC_grep { + Char *source, *pattern; + short p1[10], p2[10]; + short i, p, s, index; + boolean matching; +} ; + +Local Void remember(s1, s2, LINK) +short s1, s2; +struct LOC_grep *LINK; +{ + if (LINK->index > 9) + _Escape(9999); + LINK->p1[LINK->index] = s1; + LINK->p2[LINK->index] = s2; + LINK->s = s2 + 1; + LINK->index++; +} + +Local Void matchnum(LINK) +struct LOC_grep *LINK; +{ + boolean allowsign = false, allowpoint = false, quit = false; + short s0; + + LINK->matching = false; + s0 = LINK->s; + if (LINK->p < strlen(LINK->pattern)) { + if (LINK->pattern[LINK->p] == '#') { + LINK->p++; + allowsign = true; + if (LINK->p < strlen(LINK->pattern)) { + if (LINK->pattern[LINK->p] == '#') { + LINK->p++; + allowpoint = true; + } + } + } + } + if (allowsign && + (LINK->source[LINK->s-1] == '-' || LINK->source[LINK->s-1] == '+')) { + LINK->s++; + if (LINK->s > strlen(LINK->source)) + return; + } + while (!quit && LINK->s <= strlen(LINK->source)) { + if (LINK->source[LINK->s-1] == '.') { + if (!allowpoint) + quit = true; + else { + LINK->s++; + allowpoint = false; + } + } + if (isdigit(LINK->source[LINK->i-1])) { + LINK->s++; + LINK->matching = true; + } else + quit = true; + } + if (LINK->matching) + remember(s0, LINK->s - 1, LINK); +} + +Local Void matchmeta(LINK) +struct LOC_grep *LINK; +{ + if (LINK->p < strlen(LINK->pattern)) + LINK->p++; + if (LINK->source[LINK->s-1] == LINK->pattern[LINK->p-1]) { + LINK->s++; + LINK->p++; + } else + LINK->matching = false; +} + +Local Void subgrep(LINK) +struct LOC_grep *LINK; +{ + LINK->matching = true; + if (LINK->pattern[LINK->p-1] == '*') { + remember(LINK->s, strlen(LINK->source), LINK); + LINK->p++; + return; + } + if (LINK->pattern[LINK->p-1] == '?') { + remember(LINK->s, LINK->s, LINK); + LINK->p++; + return; + } + if (LINK->pattern[LINK->p-1] == '#') { + matchnum(LINK); + return; + } + if (LINK->pattern[LINK->p-1] == '\\') { + matchmeta(LINK); + return; + } + if (LINK->source[LINK->s-1] == LINK->pattern[LINK->p-1]) { + LINK->s++; + LINK->p++; + } else + LINK->matching = false; +} + + +/*--- Match/Replace package --- */ + +/* Search and replace. Stops when pattern no longer matches source. + Pattern wildcards: + ? Any single character + * Any string + # An unsigned integer + ## A signed integer + ### A signed number maybe with a decimal part + Pattern metacharacters: + \x where x is any character, stands for that character + Target wildcards + \0 to \9 Value of corresponding source wildcard + Target metacharacters + \ When not followed by 0..9 or \, stands for itself + \\ Backslash +*/ +Void grep(source_, pattern_, target) +Char *source_, *pattern_, *target; +{ + struct LOC_grep V; + short j, t, reg; + Char product[256]; + boolean trigger = false; + short FORLIM, FORLIM1; + Char STR2[256]; + + V.source = source_; + V.pattern = pattern_; + V.index = 0; + V.s = 1; + V.p = 1; + for (V.i = 0; V.i <= 9; V.i++) { + V.p1[V.i] = 1; + V.p2[V.i] = 0; + } + while (V.matching && V.p <= strlen(V.pattern) && V.s <= strlen(V.source)) + subgrep(&V); + *product = '\0'; + FORLIM = strlen(target); + for (t = 0; t <= FORLIM - 1; t++) { + if (trigger) { + reg = digit(target[t]); + if ((unsigned)reg <= 9) { + FORLIM1 = V.p2[reg]; + for (j = V.p1[reg] - 1; j <= FORLIM1 - 1; j++) + sprintf(product + strlen(product), "%c", V.source[j]); + } else if (target[t] == '\\') + strcat(product, "\\"); + else + sprintf(product + strlen(product), "\\%c", target[t]); + trigger = false; + } else if (target[t] == '\\' && t + 1 < strlen(target)) + trigger = true; + else + sprintf(product + strlen(product), "%c", target[t]); + } + strcpy(V.source, substr_(STR2, V.source, V.s, strlen(V.source))); + strcpy(V.pattern, substr_(STR2, V.pattern, V.p, strlen(V.pattern))); + strcpy(target, product); +} + + +/* "match" tests whether the source matches the pattern exactly */ +boolean match(source_, pattern_) +Char *source_, *pattern_; +{ + Char source[256], pattern[256]; + static Char target[256] = ""; + + strcpy(source, source_); + strcpy(pattern, pattern_); + grep(source, pattern, target); + return (*source == '\0' && *pattern == '\0'); +} + + +/* "translate" replaces the pattern by the target in the source. */ +Char *translate(Result, source_, pattern_, target_) +Char *Result; +Char *source_, *pattern_, *target_; +{ + Char source[256], pattern[256], target[256]; + + strcpy(source, source_); + strcpy(pattern, pattern_); + strcpy(target, target_); + grep(source, pattern, target); + return strcpy(Result, target); +} + + + + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/utility.h b/Build/source/utils/m-tx/mtx-0.60d/utility.h new file mode 100644 index 00000000000..eee95a563b7 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/utility.h @@ -0,0 +1,41 @@ +/* Header for module utility, generated by p2c 1.21alpha-07.Dec.93 */ +#ifndef UTILITY_H +#define UTILITY_H + + +#ifdef UTILITY_G +# define vextern +#else +# define vextern extern +#endif +/* DPL 2004-03-22 */ + +/* Utilities, mainly aids to parsing */ + + +extern boolean equalsIgnoreCase PP((Char *s1, Char *s2)); +extern boolean startsWithIgnoreCase PP((Char *s1, Char *s2)); +extern boolean endsWith PP((Char *s1, Char *s2)); +extern boolean startsWithBracedWord PP((Char *P)); +extern Char *GetNextWord PP((Char *Result, Char *s, int Delim, int Term)); +extern Char *NextWord PP((Char *Result, Char *s, int Delim, int Term)); +extern short wordCount PP((Char *s)); +extern Char *plural PP((Char *Result, int n)); +extern short curtail PP((Char *s, int c)); +/* Remove last character if it equals c and return its position; + otherwise return 0 */ +extern Char *toString PP((Char *Result, int n)); +extern Void trim PP((Char *s)); +extern short digit PP((int c)); +extern boolean match PP((Char *source, Char *pattern)); +extern Char *translate PP((Char *Result, Char *source, Char *pattern, + Char *target)); +extern Void grep PP((Char *source, Char *pattern, Char *target)); +/* See Implementation for what this currently does. */ + + +#undef vextern + +#endif /*UTILITY_H*/ + +/* End. */ diff --git a/Build/source/utils/m-tx/mtx-0.60d/utility.pas b/Build/source/utils/m-tx/mtx-0.60d/utility.pas new file mode 100644 index 00000000000..42cc76d15d5 --- /dev/null +++ b/Build/source/utils/m-tx/mtx-0.60d/utility.pas @@ -0,0 +1,194 @@ +unit utility; { DPL 2004-03-22 } + +{ Utilities, mainly aids to parsing } + +interface + +function equalsIgnoreCase(s1, s2: string): boolean; +function startsWithIgnoreCase(s1, s2: string): boolean; +function endsWith(s1, s2: string): boolean; +function startsWithBracedWord (P: string): boolean; +function GetNextWord (var s: string; Delim, Term: char): string; +function NextWord (s: string; Delim, Term: char): string; +function wordCount (s: string): integer; +function plural (n: integer): string; +function curtail (var s: string; c: char): integer; + { Remove last character if it equals c and return its position; + otherwise return 0 } +function toString(n: integer): string; +procedure trim(var s: string); +function digit(c: char): integer; +function match(source, pattern: string): boolean; +function translate(source, pattern, target: string): string; +procedure grep(var source, pattern, target: string); + { See Implementation for what this currently does. } + +implementation uses strings; + +const blank = ' '; dummy = #0; + +function wordCount (s: string): integer; + var i, n: integer; + begin if length(s)=0 then + begin wordCount:=0; exit; end; + if s[1]=blank then n:=0 else n:=1; + for i:=1 to length(s)-1 do + if (s[i]=blank) and (s[i+1]<>blank) then inc(n); + wordCount:=n; + end; + +function GetNextWord (var s: string; Delim, Term: char): string; +{ A delimiter is a character that separates words, but forms no part + of them. A terminator is a character that appears at the end of + a word. } + var n, start, last: integer; +begin last:=length(s); n:=1; + while (n<=last) and (s[n] = Delim) do inc(n); + start:=n; + while (n<=last) and not (s[n] in [Delim,Term]) do inc(n); + if (n<=last) and (s[n] = Term) then inc(n); + GetNextWord:=substr(s,start,n-start); + while (n<=last) and (s[n] = Delim) do inc(n); + predelete(s,n-1); +end; + +function NextWord (s: string; Delim, Term: char): string; + begin NextWord:=GetNextWord(s,Delim,Term); end; + +function plural (n: integer): string; + begin if n=1 then plural:='' else plural:='s'; end; + +function curtail (var s: string; c: char): integer; + var l: integer; + begin l:=length(s); curtail:=0; + if s[l]=c then begin shorten(s,l-1); curtail:=l; end; + end; + +function toString(n: integer): string; + var s: string; +begin str(n,s); toString:=s; end; + +function digit(c: char): integer; + begin digit:=ord(c)-ord('0'); end; + +function equalsIgnoreCase(s1, s2: string): boolean; +begin toUpper(s1); toUpper(s2); equalsIgnoreCase:=s1=s2; +end; + +function startsWithIgnoreCase(s1, s2: string): boolean; +begin toUpper(s1); toUpper(s2); startsWithIgnoreCase:=startsWith(s1,s2); +end; + +function startsWithBracedWord (P: string): boolean; + var w: string; +begin w := getNextWord(P,blank,dummy); + startsWithBracedWord := (w[1]='{') and (w[length(w)]='}'); +end; + +procedure trim(var s: string); + var k: integer; + begin k:=posnot(blank,s); + if k>1 then predelete(s,k-1) else if k=0 then s:=''; + end; + +function endsWith(s1, s2: string): boolean; + var l1, l2: integer; +begin l1:=length(s1); l2:=length(s2); + if l19 then halt(9999); + p1[index] := s1; p2[index] := s2; s := s2+1; inc(index) + end; + procedure matchnum; + var allowsign, allowpoint, quit: boolean; + s0: integer; + begin allowsign := false; allowpoint := false; matching := false; s0 := s; + if plength(source) then exit end; + quit := false; + while (not quit) and (s<=length(source)) do + begin if source[s]='.' then if not allowpoint then quit := true else + begin inc(s); allowpoint := false end; + if (source[i]>='0') and (source[i]<='9') then + begin inc(s); matching := true end + else quit := true + end; + if matching then remember(s0,s-1) + end; + procedure matchmeta; + begin if p=0) and (reg<=9) then + for j:=p1[reg] to p2[reg] do product := product + source[j] + else if target[t]='\' then product := product + '\' + else product := product + '\' + target[t]; + trigger := false + end + else if (target[t]='\') and (t. +This manual page was written by Roland Stigge for the Debian +project. It was revised and extended by Nis Martensen +, mostly by copying text from Dirk Laurie's M-Tx +User's Guide. diff --git a/Build/source/utils/m-tx/tests/mozart.mtx b/Build/source/utils/m-tx/tests/mozart.mtx new file mode 100644 index 00000000000..88a4123c24d --- /dev/null +++ b/Build/source/utils/m-tx/tests/mozart.mtx @@ -0,0 +1,7 @@ +Title: Riff in C +Composer: W. A. Mozart (1756--1791) +Style: piano + +%% w120m +c2+ e4 g | b4d- c1 d c2 | +c8 g+ e g c- g+ e g | d g f g c- g+ e g | diff --git a/Build/source/utils/m-tx/tests/mozart.pmx b/Build/source/utils/m-tx/tests/mozart.pmx new file mode 100644 index 00000000000..ae55c3f13d9 --- /dev/null +++ b/Build/source/utils/m-tx/tests/mozart.pmx @@ -0,0 +1,26 @@ +--- +\def\mtxversion{0.60d} +\def\mtxdate{<11 October 2008>} +\input mtx +\mtxComposerLine{}{W. A. Mozart (1756--1791)} +\mtxTitleLine{Riff in C} +--- +2 -1 2 4 4 0 6 0.00000 0 1 1 20 0 + +60 +./ +Tt +\mtxTitle +Tc +\mtxPoetComposer +% Paragraph 2 line 5 bar 1 + w120m +c83 g8+ e8 g8 c8- g8+ e8 g8 | / +c25 e4 g4 | / + +%Bar 2 +d8 g8 f8 g8 c8- g8+ e8 g8 | Rb + / +b4-d c1 d1 c2 | / + +% Coded by M-Tx diff --git a/Build/source/utils/m-tx/version.ac b/Build/source/utils/m-tx/version.ac new file mode 100644 index 00000000000..cfad6555f7b --- /dev/null +++ b/Build/source/utils/m-tx/version.ac @@ -0,0 +1,11 @@ +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl +dnl This file is free software; the copyright holder +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl -------------------------------------------------------- +dnl +dnl m4-include this file to define the current mtx version +m4_define([mtx_version], [0.60d]) diff --git a/Build/source/utils/mtx/ChangeLog b/Build/source/utils/mtx/ChangeLog deleted file mode 100644 index 2a54c90d82e..00000000000 --- a/Build/source/utils/mtx/ChangeLog +++ /dev/null @@ -1,17 +0,0 @@ -2012-05-16 Peter Breitenlohner - - * Makefile.am (AM_CPPFLAGS): Add '-DNO_DECLARE_MALLOC' to avoid - a possibly conflicting redeclaration of malloc(). - From Vladimir Volovich . - -2012-04-16 Peter Breitenlohner - - Adapt mtx-0.60d to the TeX Live build system. - - * configure.ac: Do not use AC_CONFIG_HEADERS because config.h - is not included by the sources. - Do not use AC_FUNC_MALLOC because this might redefine malloc() - as rpl_malloc(). - -Copyright (C) 2012 Peter Breitenlohner -You may freely use, modify and/or distribute this file. diff --git a/Build/source/utils/mtx/Makefile.am b/Build/source/utils/mtx/Makefile.am deleted file mode 100644 index f84371cf50a..00000000000 --- a/Build/source/utils/mtx/Makefile.am +++ /dev/null @@ -1,89 +0,0 @@ -## Makefile.am for the TeX Live subdirectory utils/mtx/ -## -## Copyright (C) 2012 Peter Breitenlohner -## You may freely use, modify and/or distribute this file. -## -ACLOCAL_AMFLAGS = -I ../../m4 - -## We want to re-distribute the whole original mtx source tree. -EXTRA_DIST = $(MTX_TREE) -## Patches applied to the original source tree -EXTRA_DIST += $(MTX_TREE)-PATCHES - -# in case of an SVN repository -dist-hook: - rm -rf `find $(distdir) -name .svn` - -INCLUDES = -I$(srcdir)/$(MTX_TREE)/libp2c -AM_CPPFLAGS = -DNO_DECLARE_MALLOC -AM_CFLAGS = #$(WARNING_CFLAGS) - -bin_PROGRAMS = prepmx - -## prepmx_SOURCES = config.h - -prepmx_SOURCES = \ - $(MTX_TREE)/analyze.c \ - $(MTX_TREE)/analyze.h \ - $(MTX_TREE)/cfuncs.c \ - $(MTX_TREE)/cfuncs.h \ - $(MTX_TREE)/control.c \ - $(MTX_TREE)/control.h \ - $(MTX_TREE)/files.c \ - $(MTX_TREE)/files.h \ - $(MTX_TREE)/globals.c \ - $(MTX_TREE)/globals.h \ - $(MTX_TREE)/lyrics.c \ - $(MTX_TREE)/lyrics.h \ - $(MTX_TREE)/mtx.c \ - $(MTX_TREE)/mtx.h \ - $(MTX_TREE)/mtxline.c \ - $(MTX_TREE)/mtxline.h \ - $(MTX_TREE)/multfile.c \ - $(MTX_TREE)/multfile.h \ - $(MTX_TREE)/notes.c \ - $(MTX_TREE)/notes.h \ - $(MTX_TREE)/preamble.c \ - $(MTX_TREE)/preamble.h \ - $(MTX_TREE)/prepmx.c \ - $(MTX_TREE)/status.c \ - $(MTX_TREE)/status.h \ - $(MTX_TREE)/strings.h \ - $(MTX_TREE)/uptext.c \ - $(MTX_TREE)/uptext.h \ - $(MTX_TREE)/utility.c \ - $(MTX_TREE)/utility.h - -LDADD = libp2c.a - -noinst_LIBRARIES = libp2c.a - -libp2c_a_SOURCES = \ - $(MTX_TREE)/libp2c/p2c.h \ - $(MTX_TREE)/libp2c/p2clib.c - -lua_scripts = m-tx - -scriptsdir = texmf-dist/scripts/m-tx -nodist_bin_SCRIPTS = - -include $(srcdir)/../../texk/am/script_links.am - -texmfdir = $(datarootdir)/$(scriptsdir) -dist_texmf_SCRIPTS = $(lua_scripts:=.lua) - -install-data-hook: install-lua-links - -uninstall-hook: uninstall-links - -dist_man1_MANS = m-tx.1 prepmx.1 - -## Tests -## -TESTS = mtx.test -EXTRA_DIST += $(TESTS) - -## mtx.test -EXTRA_DIST += tests/mozart.mtx tests/mozart.pmx -DISTCLEANFILES = mozart* - diff --git a/Build/source/utils/mtx/Makefile.in b/Build/source/utils/mtx/Makefile.in deleted file mode 100644 index f24247f8500..00000000000 --- a/Build/source/utils/mtx/Makefile.in +++ /dev/null @@ -1,1300 +0,0 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2012 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. - -@SET_MAKE@ - - - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -bin_PROGRAMS = prepmx$(EXEEXT) -DIST_COMMON = $(am__configure_deps) $(dist_man1_MANS) \ - $(dist_texmf_SCRIPTS) $(srcdir)/../../texk/am/script_links.am \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/../../build-aux/depcomp \ - $(top_srcdir)/../../build-aux/install-sh \ - $(top_srcdir)/../../build-aux/missing $(top_srcdir)/configure \ - ../../build-aux/config.guess ../../build-aux/config.sub \ - ../../build-aux/depcomp ../../build-aux/install-sh \ - ../../build-aux/ltmain.sh ../../build-aux/missing \ - ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog -@WIN32_TRUE@@WIN32_WRAP_TRUE@am__append_1 = $(wrappers) -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ - $(top_srcdir)/../../m4/kpse-win32.m4 $(top_srcdir)/version.ac \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -libp2c_a_AR = $(AR) $(ARFLAGS) -libp2c_a_LIBADD = -am_libp2c_a_OBJECTS = p2clib.$(OBJEXT) -libp2c_a_OBJECTS = $(am_libp2c_a_OBJECTS) -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am_prepmx_OBJECTS = analyze.$(OBJEXT) cfuncs.$(OBJEXT) \ - control.$(OBJEXT) files.$(OBJEXT) globals.$(OBJEXT) \ - lyrics.$(OBJEXT) mtx.$(OBJEXT) mtxline.$(OBJEXT) \ - multfile.$(OBJEXT) notes.$(OBJEXT) preamble.$(OBJEXT) \ - prepmx.$(OBJEXT) status.$(OBJEXT) uptext.$(OBJEXT) \ - utility.$(OBJEXT) -prepmx_OBJECTS = $(am_prepmx_OBJECTS) -prepmx_LDADD = $(LDADD) -prepmx_DEPENDENCIES = libp2c.a -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -SCRIPTS = $(dist_texmf_SCRIPTS) $(nodist_bin_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libp2c_a_SOURCES) $(prepmx_SOURCES) -DIST_SOURCES = $(libp2c_a_SOURCES) $(prepmx_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(dist_man1_MANS) -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -AM_RECURSIVE_TARGETS = cscope -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = $(am__tty_colors_dummy) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -DIST_TARGETS = dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MTX_TREE = @MTX_TREE@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POW_LIB = @POW_LIB@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -ACLOCAL_AMFLAGS = -I ../../m4 -EXTRA_DIST = $(MTX_TREE) $(MTX_TREE)-PATCHES ../../build-aux/relpath \ - $(TESTS) tests/mozart.mtx tests/mozart.pmx -INCLUDES = -I$(srcdir)/$(MTX_TREE)/libp2c -AM_CPPFLAGS = -DNO_DECLARE_MALLOC -AM_CFLAGS = #$(WARNING_CFLAGS) -prepmx_SOURCES = \ - $(MTX_TREE)/analyze.c \ - $(MTX_TREE)/analyze.h \ - $(MTX_TREE)/cfuncs.c \ - $(MTX_TREE)/cfuncs.h \ - $(MTX_TREE)/control.c \ - $(MTX_TREE)/control.h \ - $(MTX_TREE)/files.c \ - $(MTX_TREE)/files.h \ - $(MTX_TREE)/globals.c \ - $(MTX_TREE)/globals.h \ - $(MTX_TREE)/lyrics.c \ - $(MTX_TREE)/lyrics.h \ - $(MTX_TREE)/mtx.c \ - $(MTX_TREE)/mtx.h \ - $(MTX_TREE)/mtxline.c \ - $(MTX_TREE)/mtxline.h \ - $(MTX_TREE)/multfile.c \ - $(MTX_TREE)/multfile.h \ - $(MTX_TREE)/notes.c \ - $(MTX_TREE)/notes.h \ - $(MTX_TREE)/preamble.c \ - $(MTX_TREE)/preamble.h \ - $(MTX_TREE)/prepmx.c \ - $(MTX_TREE)/status.c \ - $(MTX_TREE)/status.h \ - $(MTX_TREE)/strings.h \ - $(MTX_TREE)/uptext.c \ - $(MTX_TREE)/uptext.h \ - $(MTX_TREE)/utility.c \ - $(MTX_TREE)/utility.h - -LDADD = libp2c.a -noinst_LIBRARIES = libp2c.a -libp2c_a_SOURCES = \ - $(MTX_TREE)/libp2c/p2c.h \ - $(MTX_TREE)/libp2c/p2clib.c - -lua_scripts = m-tx -scriptsdir = texmf-dist/scripts/m-tx -nodist_bin_SCRIPTS = $(am__append_1) -all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts) -@WIN32_TRUE@@WIN32_WRAP_TRUE@wrappers = $(all_scripts:=.exe) -@WIN32_TRUE@@WIN32_WRAP_TRUE@runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe -texmfdir = $(datarootdir)/$(scriptsdir) -dist_texmf_SCRIPTS = $(lua_scripts:=.lua) -dist_man1_MANS = m-tx.1 prepmx.1 -TESTS = mtx.test -DISTCLEANFILES = mozart* -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../texk/am/script_links.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; -$(srcdir)/../../texk/am/script_links.am: - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libp2c.a: $(libp2c_a_OBJECTS) $(libp2c_a_DEPENDENCIES) $(EXTRA_libp2c_a_DEPENDENCIES) - -rm -f libp2c.a - $(libp2c_a_AR) libp2c.a $(libp2c_a_OBJECTS) $(libp2c_a_LIBADD) - $(RANLIB) libp2c.a -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -prepmx$(EXEEXT): $(prepmx_OBJECTS) $(prepmx_DEPENDENCIES) $(EXTRA_prepmx_DEPENDENCIES) - @rm -f prepmx$(EXEEXT) - $(LINK) $(prepmx_OBJECTS) $(prepmx_LDADD) $(LIBS) -install-dist_texmfSCRIPTS: $(dist_texmf_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(dist_texmf_SCRIPTS)'; test -n "$(texmfdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(texmfdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(texmfdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(texmfdir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(texmfdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-dist_texmfSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(dist_texmf_SCRIPTS)'; test -n "$(texmfdir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(texmfdir)'; $(am__uninstall_files_from_dir) -install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-nodist_binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analyze.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfuncs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lyrics.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtxline.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multfile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p2clib.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preamble.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepmx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -p2clib.o: $(MTX_TREE)/libp2c/p2clib.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT p2clib.o -MD -MP -MF $(DEPDIR)/p2clib.Tpo -c -o p2clib.o `test -f '$(MTX_TREE)/libp2c/p2clib.c' || echo '$(srcdir)/'`$(MTX_TREE)/libp2c/p2clib.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/p2clib.Tpo $(DEPDIR)/p2clib.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/libp2c/p2clib.c' object='p2clib.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o p2clib.o `test -f '$(MTX_TREE)/libp2c/p2clib.c' || echo '$(srcdir)/'`$(MTX_TREE)/libp2c/p2clib.c - -p2clib.obj: $(MTX_TREE)/libp2c/p2clib.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT p2clib.obj -MD -MP -MF $(DEPDIR)/p2clib.Tpo -c -o p2clib.obj `if test -f '$(MTX_TREE)/libp2c/p2clib.c'; then $(CYGPATH_W) '$(MTX_TREE)/libp2c/p2clib.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/libp2c/p2clib.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/p2clib.Tpo $(DEPDIR)/p2clib.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/libp2c/p2clib.c' object='p2clib.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o p2clib.obj `if test -f '$(MTX_TREE)/libp2c/p2clib.c'; then $(CYGPATH_W) '$(MTX_TREE)/libp2c/p2clib.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/libp2c/p2clib.c'; fi` - -analyze.o: $(MTX_TREE)/analyze.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT analyze.o -MD -MP -MF $(DEPDIR)/analyze.Tpo -c -o analyze.o `test -f '$(MTX_TREE)/analyze.c' || echo '$(srcdir)/'`$(MTX_TREE)/analyze.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/analyze.Tpo $(DEPDIR)/analyze.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/analyze.c' object='analyze.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o analyze.o `test -f '$(MTX_TREE)/analyze.c' || echo '$(srcdir)/'`$(MTX_TREE)/analyze.c - -analyze.obj: $(MTX_TREE)/analyze.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT analyze.obj -MD -MP -MF $(DEPDIR)/analyze.Tpo -c -o analyze.obj `if test -f '$(MTX_TREE)/analyze.c'; then $(CYGPATH_W) '$(MTX_TREE)/analyze.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/analyze.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/analyze.Tpo $(DEPDIR)/analyze.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/analyze.c' object='analyze.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o analyze.obj `if test -f '$(MTX_TREE)/analyze.c'; then $(CYGPATH_W) '$(MTX_TREE)/analyze.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/analyze.c'; fi` - -cfuncs.o: $(MTX_TREE)/cfuncs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfuncs.o -MD -MP -MF $(DEPDIR)/cfuncs.Tpo -c -o cfuncs.o `test -f '$(MTX_TREE)/cfuncs.c' || echo '$(srcdir)/'`$(MTX_TREE)/cfuncs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cfuncs.Tpo $(DEPDIR)/cfuncs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/cfuncs.c' object='cfuncs.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfuncs.o `test -f '$(MTX_TREE)/cfuncs.c' || echo '$(srcdir)/'`$(MTX_TREE)/cfuncs.c - -cfuncs.obj: $(MTX_TREE)/cfuncs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfuncs.obj -MD -MP -MF $(DEPDIR)/cfuncs.Tpo -c -o cfuncs.obj `if test -f '$(MTX_TREE)/cfuncs.c'; then $(CYGPATH_W) '$(MTX_TREE)/cfuncs.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/cfuncs.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cfuncs.Tpo $(DEPDIR)/cfuncs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/cfuncs.c' object='cfuncs.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfuncs.obj `if test -f '$(MTX_TREE)/cfuncs.c'; then $(CYGPATH_W) '$(MTX_TREE)/cfuncs.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/cfuncs.c'; fi` - -control.o: $(MTX_TREE)/control.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control.o -MD -MP -MF $(DEPDIR)/control.Tpo -c -o control.o `test -f '$(MTX_TREE)/control.c' || echo '$(srcdir)/'`$(MTX_TREE)/control.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/control.Tpo $(DEPDIR)/control.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/control.c' object='control.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control.o `test -f '$(MTX_TREE)/control.c' || echo '$(srcdir)/'`$(MTX_TREE)/control.c - -control.obj: $(MTX_TREE)/control.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control.obj -MD -MP -MF $(DEPDIR)/control.Tpo -c -o control.obj `if test -f '$(MTX_TREE)/control.c'; then $(CYGPATH_W) '$(MTX_TREE)/control.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/control.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/control.Tpo $(DEPDIR)/control.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/control.c' object='control.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control.obj `if test -f '$(MTX_TREE)/control.c'; then $(CYGPATH_W) '$(MTX_TREE)/control.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/control.c'; fi` - -files.o: $(MTX_TREE)/files.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.o -MD -MP -MF $(DEPDIR)/files.Tpo -c -o files.o `test -f '$(MTX_TREE)/files.c' || echo '$(srcdir)/'`$(MTX_TREE)/files.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/files.Tpo $(DEPDIR)/files.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/files.c' object='files.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.o `test -f '$(MTX_TREE)/files.c' || echo '$(srcdir)/'`$(MTX_TREE)/files.c - -files.obj: $(MTX_TREE)/files.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT files.obj -MD -MP -MF $(DEPDIR)/files.Tpo -c -o files.obj `if test -f '$(MTX_TREE)/files.c'; then $(CYGPATH_W) '$(MTX_TREE)/files.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/files.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/files.Tpo $(DEPDIR)/files.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/files.c' object='files.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o files.obj `if test -f '$(MTX_TREE)/files.c'; then $(CYGPATH_W) '$(MTX_TREE)/files.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/files.c'; fi` - -globals.o: $(MTX_TREE)/globals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT globals.o -MD -MP -MF $(DEPDIR)/globals.Tpo -c -o globals.o `test -f '$(MTX_TREE)/globals.c' || echo '$(srcdir)/'`$(MTX_TREE)/globals.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/globals.Tpo $(DEPDIR)/globals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/globals.c' object='globals.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o globals.o `test -f '$(MTX_TREE)/globals.c' || echo '$(srcdir)/'`$(MTX_TREE)/globals.c - -globals.obj: $(MTX_TREE)/globals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT globals.obj -MD -MP -MF $(DEPDIR)/globals.Tpo -c -o globals.obj `if test -f '$(MTX_TREE)/globals.c'; then $(CYGPATH_W) '$(MTX_TREE)/globals.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/globals.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/globals.Tpo $(DEPDIR)/globals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/globals.c' object='globals.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o globals.obj `if test -f '$(MTX_TREE)/globals.c'; then $(CYGPATH_W) '$(MTX_TREE)/globals.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/globals.c'; fi` - -lyrics.o: $(MTX_TREE)/lyrics.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lyrics.o -MD -MP -MF $(DEPDIR)/lyrics.Tpo -c -o lyrics.o `test -f '$(MTX_TREE)/lyrics.c' || echo '$(srcdir)/'`$(MTX_TREE)/lyrics.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lyrics.Tpo $(DEPDIR)/lyrics.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/lyrics.c' object='lyrics.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lyrics.o `test -f '$(MTX_TREE)/lyrics.c' || echo '$(srcdir)/'`$(MTX_TREE)/lyrics.c - -lyrics.obj: $(MTX_TREE)/lyrics.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lyrics.obj -MD -MP -MF $(DEPDIR)/lyrics.Tpo -c -o lyrics.obj `if test -f '$(MTX_TREE)/lyrics.c'; then $(CYGPATH_W) '$(MTX_TREE)/lyrics.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/lyrics.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lyrics.Tpo $(DEPDIR)/lyrics.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/lyrics.c' object='lyrics.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lyrics.obj `if test -f '$(MTX_TREE)/lyrics.c'; then $(CYGPATH_W) '$(MTX_TREE)/lyrics.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/lyrics.c'; fi` - -mtx.o: $(MTX_TREE)/mtx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtx.o -MD -MP -MF $(DEPDIR)/mtx.Tpo -c -o mtx.o `test -f '$(MTX_TREE)/mtx.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtx.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtx.Tpo $(DEPDIR)/mtx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtx.c' object='mtx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtx.o `test -f '$(MTX_TREE)/mtx.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtx.c - -mtx.obj: $(MTX_TREE)/mtx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtx.obj -MD -MP -MF $(DEPDIR)/mtx.Tpo -c -o mtx.obj `if test -f '$(MTX_TREE)/mtx.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtx.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtx.Tpo $(DEPDIR)/mtx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtx.c' object='mtx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtx.obj `if test -f '$(MTX_TREE)/mtx.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtx.c'; fi` - -mtxline.o: $(MTX_TREE)/mtxline.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtxline.o -MD -MP -MF $(DEPDIR)/mtxline.Tpo -c -o mtxline.o `test -f '$(MTX_TREE)/mtxline.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtxline.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtxline.Tpo $(DEPDIR)/mtxline.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtxline.c' object='mtxline.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtxline.o `test -f '$(MTX_TREE)/mtxline.c' || echo '$(srcdir)/'`$(MTX_TREE)/mtxline.c - -mtxline.obj: $(MTX_TREE)/mtxline.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtxline.obj -MD -MP -MF $(DEPDIR)/mtxline.Tpo -c -o mtxline.obj `if test -f '$(MTX_TREE)/mtxline.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtxline.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtxline.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtxline.Tpo $(DEPDIR)/mtxline.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/mtxline.c' object='mtxline.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtxline.obj `if test -f '$(MTX_TREE)/mtxline.c'; then $(CYGPATH_W) '$(MTX_TREE)/mtxline.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/mtxline.c'; fi` - -multfile.o: $(MTX_TREE)/multfile.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multfile.o -MD -MP -MF $(DEPDIR)/multfile.Tpo -c -o multfile.o `test -f '$(MTX_TREE)/multfile.c' || echo '$(srcdir)/'`$(MTX_TREE)/multfile.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multfile.Tpo $(DEPDIR)/multfile.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/multfile.c' object='multfile.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multfile.o `test -f '$(MTX_TREE)/multfile.c' || echo '$(srcdir)/'`$(MTX_TREE)/multfile.c - -multfile.obj: $(MTX_TREE)/multfile.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multfile.obj -MD -MP -MF $(DEPDIR)/multfile.Tpo -c -o multfile.obj `if test -f '$(MTX_TREE)/multfile.c'; then $(CYGPATH_W) '$(MTX_TREE)/multfile.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/multfile.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multfile.Tpo $(DEPDIR)/multfile.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/multfile.c' object='multfile.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multfile.obj `if test -f '$(MTX_TREE)/multfile.c'; then $(CYGPATH_W) '$(MTX_TREE)/multfile.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/multfile.c'; fi` - -notes.o: $(MTX_TREE)/notes.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT notes.o -MD -MP -MF $(DEPDIR)/notes.Tpo -c -o notes.o `test -f '$(MTX_TREE)/notes.c' || echo '$(srcdir)/'`$(MTX_TREE)/notes.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/notes.Tpo $(DEPDIR)/notes.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/notes.c' object='notes.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o notes.o `test -f '$(MTX_TREE)/notes.c' || echo '$(srcdir)/'`$(MTX_TREE)/notes.c - -notes.obj: $(MTX_TREE)/notes.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT notes.obj -MD -MP -MF $(DEPDIR)/notes.Tpo -c -o notes.obj `if test -f '$(MTX_TREE)/notes.c'; then $(CYGPATH_W) '$(MTX_TREE)/notes.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/notes.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/notes.Tpo $(DEPDIR)/notes.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/notes.c' object='notes.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o notes.obj `if test -f '$(MTX_TREE)/notes.c'; then $(CYGPATH_W) '$(MTX_TREE)/notes.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/notes.c'; fi` - -preamble.o: $(MTX_TREE)/preamble.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preamble.o -MD -MP -MF $(DEPDIR)/preamble.Tpo -c -o preamble.o `test -f '$(MTX_TREE)/preamble.c' || echo '$(srcdir)/'`$(MTX_TREE)/preamble.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/preamble.Tpo $(DEPDIR)/preamble.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/preamble.c' object='preamble.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preamble.o `test -f '$(MTX_TREE)/preamble.c' || echo '$(srcdir)/'`$(MTX_TREE)/preamble.c - -preamble.obj: $(MTX_TREE)/preamble.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preamble.obj -MD -MP -MF $(DEPDIR)/preamble.Tpo -c -o preamble.obj `if test -f '$(MTX_TREE)/preamble.c'; then $(CYGPATH_W) '$(MTX_TREE)/preamble.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/preamble.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/preamble.Tpo $(DEPDIR)/preamble.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/preamble.c' object='preamble.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preamble.obj `if test -f '$(MTX_TREE)/preamble.c'; then $(CYGPATH_W) '$(MTX_TREE)/preamble.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/preamble.c'; fi` - -prepmx.o: $(MTX_TREE)/prepmx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT prepmx.o -MD -MP -MF $(DEPDIR)/prepmx.Tpo -c -o prepmx.o `test -f '$(MTX_TREE)/prepmx.c' || echo '$(srcdir)/'`$(MTX_TREE)/prepmx.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/prepmx.Tpo $(DEPDIR)/prepmx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/prepmx.c' object='prepmx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o prepmx.o `test -f '$(MTX_TREE)/prepmx.c' || echo '$(srcdir)/'`$(MTX_TREE)/prepmx.c - -prepmx.obj: $(MTX_TREE)/prepmx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT prepmx.obj -MD -MP -MF $(DEPDIR)/prepmx.Tpo -c -o prepmx.obj `if test -f '$(MTX_TREE)/prepmx.c'; then $(CYGPATH_W) '$(MTX_TREE)/prepmx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/prepmx.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/prepmx.Tpo $(DEPDIR)/prepmx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/prepmx.c' object='prepmx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o prepmx.obj `if test -f '$(MTX_TREE)/prepmx.c'; then $(CYGPATH_W) '$(MTX_TREE)/prepmx.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/prepmx.c'; fi` - -status.o: $(MTX_TREE)/status.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT status.o -MD -MP -MF $(DEPDIR)/status.Tpo -c -o status.o `test -f '$(MTX_TREE)/status.c' || echo '$(srcdir)/'`$(MTX_TREE)/status.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/status.Tpo $(DEPDIR)/status.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/status.c' object='status.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o status.o `test -f '$(MTX_TREE)/status.c' || echo '$(srcdir)/'`$(MTX_TREE)/status.c - -status.obj: $(MTX_TREE)/status.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT status.obj -MD -MP -MF $(DEPDIR)/status.Tpo -c -o status.obj `if test -f '$(MTX_TREE)/status.c'; then $(CYGPATH_W) '$(MTX_TREE)/status.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/status.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/status.Tpo $(DEPDIR)/status.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/status.c' object='status.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o status.obj `if test -f '$(MTX_TREE)/status.c'; then $(CYGPATH_W) '$(MTX_TREE)/status.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/status.c'; fi` - -uptext.o: $(MTX_TREE)/uptext.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uptext.o -MD -MP -MF $(DEPDIR)/uptext.Tpo -c -o uptext.o `test -f '$(MTX_TREE)/uptext.c' || echo '$(srcdir)/'`$(MTX_TREE)/uptext.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/uptext.Tpo $(DEPDIR)/uptext.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/uptext.c' object='uptext.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uptext.o `test -f '$(MTX_TREE)/uptext.c' || echo '$(srcdir)/'`$(MTX_TREE)/uptext.c - -uptext.obj: $(MTX_TREE)/uptext.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uptext.obj -MD -MP -MF $(DEPDIR)/uptext.Tpo -c -o uptext.obj `if test -f '$(MTX_TREE)/uptext.c'; then $(CYGPATH_W) '$(MTX_TREE)/uptext.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/uptext.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/uptext.Tpo $(DEPDIR)/uptext.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/uptext.c' object='uptext.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uptext.obj `if test -f '$(MTX_TREE)/uptext.c'; then $(CYGPATH_W) '$(MTX_TREE)/uptext.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/uptext.c'; fi` - -utility.o: $(MTX_TREE)/utility.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utility.o -MD -MP -MF $(DEPDIR)/utility.Tpo -c -o utility.o `test -f '$(MTX_TREE)/utility.c' || echo '$(srcdir)/'`$(MTX_TREE)/utility.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/utility.Tpo $(DEPDIR)/utility.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/utility.c' object='utility.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utility.o `test -f '$(MTX_TREE)/utility.c' || echo '$(srcdir)/'`$(MTX_TREE)/utility.c - -utility.obj: $(MTX_TREE)/utility.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utility.obj -MD -MP -MF $(DEPDIR)/utility.Tpo -c -o utility.obj `if test -f '$(MTX_TREE)/utility.c'; then $(CYGPATH_W) '$(MTX_TREE)/utility.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/utility.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/utility.Tpo $(DEPDIR)/utility.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/utility.c' object='utility.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utility.obj `if test -f '$(MTX_TREE)/utility.c'; then $(CYGPATH_W) '$(MTX_TREE)/utility.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/utility.c'; fi` -install-man1: $(dist_man1_MANS) - @$(NORMAL_INSTALL) - @list1='$(dist_man1_MANS)'; \ - list2=''; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) - -clean-cscope: - -rm -f cscope.files - -cscope.files: clean-cscope cscopelist - -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically 'make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_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 - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_texmfSCRIPTS install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-nodist_binSCRIPTS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-dist_texmfSCRIPTS \ - uninstall-man uninstall-nodist_binSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ - clean clean-binPROGRAMS clean-cscope clean-generic \ - clean-noinstLIBRARIES cscope cscopelist ctags dist dist-all \ - dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-data-hook install-dist_texmfSCRIPTS \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-nodist_binSCRIPTS install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-dist_texmfSCRIPTS \ - uninstall-hook uninstall-man uninstall-man1 \ - uninstall-nodist_binSCRIPTS - - -# in case of an SVN repository -dist-hook: - rm -rf `find $(distdir) -name .svn` -.PHONY: install-lua-links install-perl-links install-shell-links \ - install-links uninstall-links -@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript) -@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@ - -install-lua-links: -@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=lua EXT=lua install-links - -install-perl-links: -@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=perl EXT=pl install-links - -install-shell-links: -@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links - -# We support native builds, multiplatform or not, as well as distro builds. -install-links: - @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \ - if test -z "$$REL"; then \ - echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \ - exit 1; \ - fi; \ - cd $(DESTDIR)$(bindir) && \ - for f in $($(TYPE)_scripts); do \ - rm -f $$f; \ - echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \ - $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \ - done - -uninstall-links: -@WIN32_FALSE@ @for f in $(all_scripts); do \ -@WIN32_FALSE@ echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \ -@WIN32_FALSE@ rm -f "$(DESTDIR)$(bindir)/$$f"; \ -@WIN32_FALSE@ done - -install-data-hook: install-lua-links - -uninstall-hook: uninstall-links - -# 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/Build/source/utils/mtx/ac/withenable.ac b/Build/source/utils/mtx/ac/withenable.ac deleted file mode 100644 index 696bfacabba..00000000000 --- a/Build/source/utils/mtx/ac/withenable.ac +++ /dev/null @@ -1,7 +0,0 @@ -## utils/mtx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/mtx/ -dnl -dnl Copyright (C) 2012 Peter Breitenlohner -dnl You may freely use, modify and/or distribute this file. -dnl -## configure options and TL libraries required for mtx -KPSE_ENABLE_PROG([mtx]) diff --git a/Build/source/utils/mtx/aclocal.m4 b/Build/source/utils/mtx/aclocal.m4 deleted file mode 100644 index af68feb4afe..00000000000 --- a/Build/source/utils/mtx/aclocal.m4 +++ /dev/null @@ -1,1015 +0,0 @@ -# generated automatically by aclocal 1.12.2 -*- Autoconf -*- - -# Copyright (C) 1996-2012 Free Software Foundation, Inc. - -# This file 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. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -# Copyright (C) 2002-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 8 - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.12' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.12.2], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.12.2])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 10 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 17 - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 19 - -# 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. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -dnl Support for Objective C++ was only introduced in Autoconf 2.65, -dnl but we still cater to Autoconf 2.62. -m4_ifdef([AC_PROG_OBJCXX], -[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 8 - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 7 - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 7 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 9 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# 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 ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $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 - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2001-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 3 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2012 Free Software Foundation, Inc. -# -# This file 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. - -# serial 3 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of '-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([../../m4/kpse-warnings.m4]) -m4_include([../../m4/kpse-win32.m4]) diff --git a/Build/source/utils/mtx/configure b/Build/source/utils/mtx/configure deleted file mode 100755 index a1c590e0043..00000000000 --- a/Build/source/utils/mtx/configure +++ /dev/null @@ -1,6013 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for mtx for TeX Live 0.60d. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='mtx for TeX Live' -PACKAGE_TARNAME='mtx-for-tex-live' -PACKAGE_VERSION='0.60d' -PACKAGE_STRING='mtx for TeX Live 0.60d' -PACKAGE_BUGREPORT='tex-k@tug.org' -PACKAGE_URL='' - -ac_unique_file="mtx-0.60d/analyze.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -MTX_TREE -POW_LIB -LIBOBJS -EGREP -GREP -CPP -RANLIB -LN_S -WIN32_WRAP_FALSE -WIN32_WRAP_TRUE -WIN32_FALSE -WIN32_TRUE -WARNING_CFLAGS -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_dependency_tracking -enable_compiler_warnings -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -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_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$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 ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$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 | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$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 ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - 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 | -n) - 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 ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$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_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=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 ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# 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 the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - 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 - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # 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 <<_ACEOF -\`configure' configures mtx for TeX Live 0.60d to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root - [DATAROOTDIR/doc/mtx-for-tex-live] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --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 -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of mtx for TeX Live 0.60d:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-compiler-warnings=[no|min|yes|max|all] - Turn on compiler warnings [default: yes if - maintainer-mode, min otherwise] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -mtx for TeX Live configure 0.60d -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* 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_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by mtx for TeX Live $as_me 0.60d, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_aux_dir= -for ac_dir in ../../build-aux "$srcdir"/../../build-aux; 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 - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../build-aux \"$srcdir\"/../../build-aux" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - - -am__api_version='1.12' - -# 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 -# AmigaOS /C/install, which installs bootblocks on floppy discs -# 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" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /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 - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -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. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&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}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# 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 ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $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". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -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" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='mtx-for-tex-live' - VERSION='0.60d' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&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 - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_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 $# != 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 - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* 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; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -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; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -# Check whether --enable-compiler-warnings was given. -if test "${enable_compiler_warnings+set}" = set; then : - enableval=$enable_compiler_warnings; -fi -case $enable_compiler_warnings in #( - no | min | yes | max | all) : - ;; #( - *) : - if test "x$enable_maintainer_mode" = xyes; then : - enable_compiler_warnings=yes -else - enable_compiler_warnings=min -fi ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 -$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } -if ${kpse_cv_warning_cflags+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$GCC" = xyes; then - kpse_cv_warning_cflags= -if test "x$enable_compiler_warnings" != xno; then - kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" - case `$CC -dumpversion` in #( - 3.4.* | 4.*) : - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( - *) : - ;; -esac - case `$CC -dumpversion` in #( - 3.[234].* | 4.*) : - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( - *) : - ;; -esac - if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" - case `$CC -dumpversion` in #( - 3.4.* | 4.*) : - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( - *) : - ;; -esac - if test "x$enable_compiler_warnings" != xmax; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" - fi - fi - fi -fi -elif test "x$enable_compiler_warnings" = xno; then - kpse_cv_warning_cflags= -else - kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cflags" >&5 -$as_echo "$kpse_cv_warning_cflags" >&6; } -WARNING_CFLAGS=$kpse_cv_warning_cflags - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5 -$as_echo_n "checking for native WIN32 or MINGW32... " >&6; } -if ${kpse_cv_have_win32+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef WIN32 - choke me -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __MINGW32__ - choke me -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - kpse_cv_have_win32=mingw32 -else - kpse_cv_have_win32=native -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - kpse_cv_have_win32=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5 -$as_echo "$kpse_cv_have_win32" >&6; } - - if test "x$kpse_cv_have_win32" != xno; then - WIN32_TRUE= - WIN32_FALSE='#' -else - WIN32_TRUE='#' - WIN32_FALSE= -fi - - if test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe; then - WIN32_WRAP_TRUE= - WIN32_WRAP_FALSE='#' -else - WIN32_WRAP_TRUE='#' - WIN32_WRAP_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -# Checks for libraries. - -# Checks for header files. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#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)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in memory.h stddef.h stdlib.h string.h strings.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Checks for typedefs, structures, and compiler characteristics. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - -int -main () -{ - - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes -else - ac_cv_header_stdbool_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - - -if test $ac_cv_header_stdbool_h = yes; then - -$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - -# Checks for library functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 -$as_echo_n "checking for error_at_line... " >&6; } -if ${ac_cv_lib_error_at_line+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -error_at_line (0, 0, "", 0, "an error occurred"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_error_at_line=yes -else - ac_cv_lib_error_at_line=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 -$as_echo "$ac_cv_lib_error_at_line" >&6; } -if test $ac_cv_lib_error_at_line = no; then - case " $LIBOBJS " in - *" error.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS error.$ac_objext" - ;; -esac - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 -$as_echo_n "checking for working strtod... " >&6; } -if ${ac_cv_func_strtod+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_strtod=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -$ac_includes_default -#ifndef strtod -double strtod (); -#endif -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strtod=yes -else - ac_cv_func_strtod=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 -$as_echo "$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = no; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac - -ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes; then : - -fi - -if test $ac_cv_func_pow = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if ${ac_cv_lib_m_pow+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_pow=yes -else - ac_cv_lib_m_pow=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes; then : - POW_LIB=-lm -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 -$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} -fi - -fi - -fi - -for ac_func in memchr memmove memset strchr strrchr strtol -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -MTX_TREE=mtx-0.60d - - -ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# 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, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# 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. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then - as_fn_error $? "conditional \"WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WIN32_WRAP_TRUE}" && test -z "${WIN32_WRAP_FALSE}"; then - as_fn_error $? "conditional \"WIN32_WRAP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by mtx for TeX Live $as_me 0.60d, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -mtx for TeX Live config.status 0.60d -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/Build/source/utils/mtx/configure.ac b/Build/source/utils/mtx/configure.ac deleted file mode 100644 index 8da2c4e44a0..00000000000 --- a/Build/source/utils/mtx/configure.ac +++ /dev/null @@ -1,53 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (C) 2012 Peter Breitenlohner -dnl -dnl This file is free software; the copyright holder -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -m4_include([version.ac])[] dnl define mtx_version -AC_INIT([mtx for TeX Live], mtx_version, [tex-k@tug.org]) -AC_PREREQ([2.65]) -AC_CONFIG_SRCDIR([mtx-]mtx_version[/analyze.c]) -AC_CONFIG_AUX_DIR([../../build-aux]) -AC_CONFIG_MACRO_DIR([../../m4]) - -AM_INIT_AUTOMAKE([foreign]) -AM_MAINTAINER_MODE - -dnl Check compiler and flags -AC_PROG_CC - -KPSE_COMPILER_WARNINGS - -KPSE_CHECK_WIN32 -AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno]) -AM_CONDITIONAL([WIN32_WRAP], - [test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe]) - -dnl Checks for programs. -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_RANLIB - -# Checks for libraries. - -# Checks for header files. -AC_CHECK_HEADERS([memory.h stddef.h stdlib.h string.h strings.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T - -# Checks for library functions. -AC_FUNC_ERROR_AT_LINE -dnl AC_FUNC_MALLOC -AC_FUNC_STRTOD -AC_CHECK_FUNCS([memchr memmove memset strchr strrchr strtol]) - -AC_SUBST([MTX_TREE], [mtx-]mtx_version) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/Build/source/utils/mtx/m-tx.1 b/Build/source/utils/mtx/m-tx.1 deleted file mode 100644 index c9552ab3937..00000000000 --- a/Build/source/utils/mtx/m-tx.1 +++ /dev/null @@ -1,106 +0,0 @@ -.\" This manpage is licensed under the GNU Public License -.TH m-tx 1 2012-04-09 "m-tx script, version 0.3" "" - -.SH NAME -m-tx \- This script processes mtx files then deletes intermediate files - -.SH SYNOPSIS -[ texlua ] -.B m-tx[.lua] -{ -.IR option -| -.IR jobname -[ .mtx ] -} ... -.TP -The default effect is to process each file using -.TP 12 -.BR prepmx (1) -(pre-pre-processing pass) -.TP -.BR pmxab (1) -(pre-processing pass) -.TP -.BR etex (1) -(first pass) -.TP -.BR musixflx (1) -(second pass) -.TP -.BR etex (1) -(third pass) -.TP -.BR dvips (1) -(dvi to Postscript) -.TP -.BR ps2pdf (1) -(Postscript to Portable Document Format) -.TP -followed by removal of intermediate files. - -.SH OPTIONS -.TP 8 -.B -v -output program name and version number, and quit -.TP -.B -h -output usage summary and quit -.TP -.B -l -changes the TeX processor to -.BR latex (1) -or -.BR pdflatex (1) -.TP -.B -p -changes the TeX processor to -.BR pdfetex (1) -or -.BR pdflatex (1) -(and doesn't run -.BR dvips (1) -and -.BR ps2pdf (1) -or -.BR dvipdfm (1) -) -.TP -.B -d -changes the dvi processor to -.BR dvipdfm (1) -.TP -.B -s -stops processing at the dvi file -.TP -.B -t -stops processing at the tex (and midi) files -.TP -.B -m -stops processing at the pmx file -.TP -.B -i -retain intermediate files -.TP -.B -f -default processing -.TP 0 -Options affect processing of all succeeding mtx files unless changed by another option. - -.SH SEE ALSO -.BR prepmx (1) -.BR pmxab (1) -.BR scor2prt (1) -.BR etex (1), -.BR latex (1), -.BR pdfetex (1), -.BR pdflatex (1), -.BR musixflx (1), -.BR dvipdfm (1), -.BR dvips (1), -.BR ps2pdf (1). -.br -mtx260.pdf - -.SH AUTHOR -This manual page was written by Bob Tennent . diff --git a/Build/source/utils/mtx/m-tx.lua b/Build/source/utils/mtx/m-tx.lua deleted file mode 100755 index 3ed578563ed..00000000000 --- a/Build/source/utils/mtx/m-tx.lua +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/env texlua - -VERSION = "0.3" - ---[[ - m-tx.lua: processes MusiXTeX files using prepmx and pmxab as pre-processors (and deletes intermediate files) - - (c) Copyright 2011-2012 Bob Tennent rdt@cs.queensu.ca - - 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., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - ---]] - ---[[ - - ChangeLog: - version 0.3 2012-04-09 RDT - Change name to m-tx to avoid clash with another program. - - version 0.2 2011-11-28 RDT - Added -i (retain intermediate files) option - - version 0.1.1 2011-07-18 RDT - - Removed a file check that caused it to fail (only on Windows!) - - version 0.1 2011-07-15 RDT - ---]] - -function usage() - print("Usage: [texlua] m-tx.lua { option | basename[.mtx] } ... ") - print("options: -v version") - print(" -h help") - print(" -l latex (or pdflatex)") - print(" -p pdfetex (or pdflatex)") - print(" -d dvipdfm") - print(" -s stop at dvi") - print(" -t stop at tex/mid") - print(" -m stop at pmx") - print(" -i retain intermediate files") - print(" -f restore default processing") -end - -function whoami () - print("This is m-tx.lua version ".. VERSION .. ".") -end - -whoami() -if #arg == 0 then - usage() - os.exit(0) -end - --- defaults: -prepmx = "prepmx" -pmx = "pmxab" -tex = "etex" -musixflx = "musixflx" -dvi = "dvips" -ps2pdf = "ps2pdf" -intermediate = 1 - -exit_code = 0 -narg = 1 -repeat - this_arg = arg[narg] - if this_arg == "-v" then - os.exit(0) - elseif this_arg == "-h" then - usage() - os.exit(0) - elseif this_arg == "-l" then - if tex == "pdfetex" then - tex = "pdflatex" - else - tex = "latex" - end - elseif this_arg == "-p" then - if tex == "latex" then - tex = "pdflatex" - else - tex = "pdfetex" - end - dvi = ""; ps2pdf = "" - elseif this_arg == "-d" then - dvi = "dvipdfm"; ps2pdf = "" - elseif this_arg == "-s" then - dvi = ""; ps2pdf = "" - elseif this_arg == "-i" then - intermediate = 0 - elseif this_arg == "-f" then - pmx = "pmxab"; tex = "etex"; dvi = "dvips"; ps2pdf = "ps2pdf"; intermediate = 1 - elseif this_arg == "-t" then - tex = ""; dvi = ""; ps2pdf = "" - elseif this_arg == "-m" then - pmx = ""; tex = ""; dvi = ""; ps2pdf = "" - else - filename = this_arg - if filename ~= "" and string.sub(filename, -4, -1) == ".mtx" then - filename = string.sub(filename, 1, -5) - end - print("Processing ".. filename .. ".mtx.") - OK = true - if ( os.execute(prepmx .. " " .. filename ) ~= 0 ) then - OK = false - end - if (OK and pmx ~= "") then - os.execute(pmx .. " " .. filename) -- does pmx return an error code? - pmxaerr = io.open("pmxaerr.dat", "r") - if (not pmxaerr) then - print("No log file.") - OK = false - else - linebuf = pmxaerr:read() - err = tonumber(linebuf) - if (err ~= 0) then - OK = false - end - pmxaerr:close() - end - end - os.remove( filename .. ".mx2" ) - if ( OK ) and - ((tex == "") or os.execute(tex .. " " .. filename) == 0) and - ((tex == "") or os.execute(musixflx .. " " .. filename) == 0) and - ((tex == "") or os.execute(tex .. " " .. filename) == 0) and - ((tex ~= "latex" and tex ~= "pdflatex") - or (os.execute(tex .. " " .. filename) == 0)) and - (dvi == "" or (os.execute(dvi .. " " .. filename) == 0)) and - (ps2pdf == "" or (os.execute(ps2pdf .. " " .. filename .. ".ps") == 0) ) - then - if ps2pdf ~= "" then - print(filename .. ".pdf generated by " .. ps2pdf .. ".") - end - if intermediate == 1 then -- clean-up: - os.remove( "pmxaerr.dat" ) - os.remove( filename .. ".mx1" ) - os.remove( filename .. ".mx2" ) - if pmx ~= "" then - os.remove( filename .. ".pmx" ) - end - if dvi ~= "" then - os.remove( filename .. ".dvi" ) - end - if ps2pdf ~= "" then - os.remove( filename .. ".ps" ) - end - end - else - print("M-Tx/pmx/MusiXTeX processing of " .. filename .. ".mtx fails.\n") - exit_code = 2 - --[[ uncomment for debugging - print("tex = ", tex) - print("dvi = ", dvi) - print("ps2pdf = ", ps2pdf) - --]] - end - end --if this_arg == ... - narg = narg+1 -until narg > #arg -os.exit( exit_code ) diff --git a/Build/source/utils/mtx/mtx-0.60d-PATCHES/ChangeLog b/Build/source/utils/mtx/mtx-0.60d-PATCHES/ChangeLog deleted file mode 100644 index 925cebde3c1..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d-PATCHES/ChangeLog +++ /dev/null @@ -1,7 +0,0 @@ -2012-05-16 Peter Breitenlohner - - * patch-01-write-bin (new): Use binary mode for output files. - From Akira Kakuto (W32TeX). - -Copyright (C) 2012 Peter Breitenlohner -You may freely use, modify and/or distribute this file. diff --git a/Build/source/utils/mtx/mtx-0.60d-PATCHES/TL-Changes b/Build/source/utils/mtx/mtx-0.60d-PATCHES/TL-Changes deleted file mode 100644 index a24ef1965c0..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d-PATCHES/TL-Changes +++ /dev/null @@ -1,12 +0,0 @@ -Changes applied to the mtx-0.60d tree as obtained from: - http://www.ctan.org/tex-archive/support/m-tx/ - -Remove: - Makefile.in - aclocal.m4 - configure - depcomp - install-sh - missing - libp2c/Makefile.in - diff --git a/Build/source/utils/mtx/mtx-0.60d-PATCHES/patch-01-write-bin b/Build/source/utils/mtx/mtx-0.60d-PATCHES/patch-01-write-bin deleted file mode 100644 index a513d56fc3c..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d-PATCHES/patch-01-write-bin +++ /dev/null @@ -1,27 +0,0 @@ -diff -ur mtx-0.60d.orig/files.c mtx-0.60d/files.c ---- mtx-0.60d.orig/files.c 2012-04-05 14:46:38.000000000 +0200 -+++ mtx-0.60d/files.c 2012-06-16 17:39:37.000000000 +0200 -@@ -275,9 +275,9 @@ - pushFile(infilename); - strcpy(outfile_NAME, outfilename); - if (outfile != NULL) -- outfile = freopen(outfile_NAME, "w", outfile); -+ outfile = freopen(outfile_NAME, "wb", outfile); - else -- outfile = fopen(outfile_NAME, "w"); -+ outfile = fopen(outfile_NAME, "wb"); - _SETIO(outfile != NULL, FileNotFound); - strcpy(stylefile_NAME, stylefilename); - if (stylefile != NULL) -diff -ur mtx-0.60d.orig/globals.c mtx-0.60d/globals.c ---- mtx-0.60d.orig/globals.c 2012-04-05 14:41:42.000000000 +0200 -+++ mtx-0.60d/globals.c 2012-06-16 17:39:40.000000000 +0200 -@@ -237,7 +237,7 @@ - if (outfile != NULL) - fclose(outfile); - outfile = NULL; -- outfile = fopen(outfile_NAME, "w"); -+ outfile = fopen(outfile_NAME, "wb"); - if (outfile == NULL) - _EscIO2(FileNotFound, outfile_NAME); - fclose(outfile); diff --git a/Build/source/utils/mtx/mtx-0.60d/AUTHORS b/Build/source/utils/mtx/mtx-0.60d/AUTHORS deleted file mode 100644 index 9fdff1fe9d3..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Dirk Laurie (dpl@sun.ac.za) diff --git a/Build/source/utils/mtx/mtx-0.60d/Bugs b/Build/source/utils/mtx/mtx-0.60d/Bugs deleted file mode 100644 index 1703eee92a2..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/Bugs +++ /dev/null @@ -1,5 +0,0 @@ -Lyrics lines when not from same paragraph don't join neatly. -Problem has been discussed on mailing list and Rainer gave -a solution. - -Rest in dot and comma shortcuts gives error at PMX stage. diff --git a/Build/source/utils/mtx/mtx-0.60d/COPYING b/Build/source/utils/mtx/mtx-0.60d/COPYING deleted file mode 100644 index 623b6258a13..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, 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 software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, 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 redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -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 give any other recipients of the Program a copy of this License -along with the Program. - -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 Program or any portion -of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -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 Program, 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 Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) 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; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, 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 executable. 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. - -If distribution of executable or 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 counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. 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 Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program 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. - - 7. 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 Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program 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 Program. - -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. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program 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. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 Program -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 Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, 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 - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. 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. - - - Copyright (C) - - 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/Build/source/utils/mtx/mtx-0.60d/ChangeLog b/Build/source/utils/mtx/mtx-0.60d/ChangeLog deleted file mode 100644 index c6191aa7874..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/ChangeLog +++ /dev/null @@ -1,180 +0,0 @@ - Corrections and enhancements to M-Tx starting from 0.53 - Newest items at top - -Version 0.60d - Replaced space character tie label by no label, - status.pas: procedure labelSlur, call procedure insertchar only for slurs. - -Version 0.60c - Added facility for prefixing music words with '_' for handling in PMX. - Prefix is stripped in output file. - mtxline.pas: type music_word, const bind_left, array name, - procedure GetNextMusWord. - -Version 0.60b - Fixed bug in doPMXpreamble causing errors with printed meters. - -Version 0.60a - Fix for music size 13 in preamble.pas. - Convert M-Tx denominators '1', '16', '32' and '64' - to PMX meter denominator syntax '0', '1', '3' and '6'. - {} ties don't get PMX label T attached in order to support MIDI ties. - -Planned for the near future - Accepts detached shortcut. - -Version 0.55h (not released) - Traces pitch including z-words; warns if unreal. Disable checkPitch - to bypass this. - -Version 0.55g (not released) - Corrects another bug in notes.pas, introduced at 0.55d. - Features: countMacro, expandMacro. - -Version 0.55f (not released) - Corrects bugs, mainly in notes.pas, introduced at 0.55d. - Help via command line. - -Version 0.55e (not released) - Chord ties. E.g. C: {ce cf ties the c. No close-tie symbol. - -Version 0.55d (not released) - Mainly code cleanup. Should be transparent to most users. - -Version 0.55c - Corrects continuation slur bug. - -Version 0.55b - Bug correction, but including a substantial rewrite of the lyrics melisma handling. - -Version 0.55 - Basically the same as 0.54k. - -Version 0.54k (not released) - DPL: Slurs are no longer translated to s and t, but to ( and {. This requires - PMX 2.502. Labels are inserted into slurs. - -Version 0.54j (not released) - DPL: "Enable" and "Disable" directives for more flexible handling of optional - features. No further development of "Options:" will be made. - -Version 0.54h (not released) - Certain parts of the unwieldy "globals" unit moved to a new "utility" unit. - Affects programming, not functionality. - -Version 0.54g (released only to beta testers) - DPL: Corrected bug in multfile.pas (end-of-input not properly recognized). - -Version 0.54f (released only to beta testers) - DPL: Cleaning up of files.pas to take full advantage of the new - multifile.pas unit. Corrected some obscure bugs. - -Version 0.54e (not released) - -2004-03-07 - DPL: Added the "Include: filename" directive. This may appear anywhere, - and diverts the input stream to the new filename. This may in turn - include other files, etc. A file may be included more than once, but - do not try recursive includes! When the end of an included file is - reached, the stream reverts to the previous file. End-of-file is - treated seamlessly and does not act as a paragraph separator. - -Version 0.54d (not released) - -2004-02-15 - DPL: {...} gives st slurs, }{ works, -t option to retain old behaviour, - some cleaning up of unused pieces of code. - Affects files.pas, globals.pas, mtxline.pas, preamble.pas, prepmx.pas, - status.pas - -Version 0.54c - -2003-08-14 - Hiroaki Morimoto: - mtx.pas: allow PMX style absolute octave assignment - -Version 0.54b - -2003-08-05 - Christian Mondrup: - mtx.tex: changed \def\mtxLyrlink{\lowlyrlink} to \def\mtxLowLyrlink{\lowlyrlink} - -2003-06-03 - Christian Mondrup: - Correct bug in procedure respace: test on 'nspace[ninstr]' rather than on - nspace[nstaves] in concluding if statement. - -Version 0.54a - -2002-01-29 - Recognizes PMX words D s t as binding to the left. - Uptext also on multi-bar rests. - -Version 0.53j - -2001-12-06 - mtx.tex tuning improvements only - -Version 0.53i - -2001-11-27 - Correct bug in verse numbers when bar starts with rests - (reported by Christian Mondrup) - -Version 0.53h - -2001-11-20 - Correct bug in decrescendo (reported by Christian Mondrup) - -- involves mtx.tex and uptext.* - 100 lines per paragraph - -Version 0.53g - -2001-10-30 - Restore midi accidental capability (lost by mistake from 0.53c to - 0.53f) - -Version 0.53f - -2001-08-29 - xtuplet may start with rest - -Version 0.53e - -2001-06-22 - Recognizes 'D' in xtuplet notes. - -Version 0.53d - -2001-06-21 - Always uses full instrument/stave format, even if there is just - one stave per instrument. - -Version 0.53c - -2001-06-18 - Improved handling of Composer, Poet and Title lines. - procedure selectVoices added (maybe one day we'll support - movement changes) - Braces around \mtxFlat and \mtxSharp - Does not translate '_' in lyrics if - (1) at end of word - (2) followed by another '_' - (3) followed by a digit - -Version 0.53b - -2001-06-02 - Improvements to mtx.tex, including nicer sharps and flats in uptext - -Version 0.53a - -2001-05-29 - Looks for 'i' anywhere in note (except in shortcut and xtuplet parts) - and moves it to follow accidental. - -2001-05-28 - From Christian Mondrup - preamble.pas: added trailing backslash to \mtxTenorClef - mtx.tex: changed \mtxmtxNormalSize to \mtxNormalSize - diff --git a/Build/source/utils/mtx/mtx-0.60d/INSTALL b/Build/source/utils/mtx/mtx-0.60d/INSTALL deleted file mode 100644 index 7d1c323beae..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - 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. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - 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 can use 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 `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer 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. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' 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. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - 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'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/Build/source/utils/mtx/mtx-0.60d/Makefile.am b/Build/source/utils/mtx/mtx-0.60d/Makefile.am deleted file mode 100644 index 1fc037408fa..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -SUBDIRS = libp2c -DIST_SUBDIRS = libp2c -bin_PROGRAMS = prepmx -INCLUDES = -I$(srcdir)/libp2c -prepmx_SOURCES = analyze.h cfuncs.h config.h control.h files.h globals.h lyrics.h\ - mtx.h mtxline.h multfile.h notes.h preamble.h status.h strings.h uptext.h utility.h\ - globals.c mtx.c preamble.c lyrics.c analyze.c mtxline.c\ - status.c uptext.c files.c notes.c prepmx.c cfuncs.c multfile.c utility.c control.c -prepmx_LDADD = libp2c/libp2c.a -EXTRA_DIST = globals.pas mtx.pas preamble.pas lyrics.pas analyze.pas mtxline.pas\ - status.pas uptext.pas prepmx.pas files.pas notes.pas multfile.pas utility.pas control.pas\ - Makefile.orig Bugs README.060d - diff --git a/Build/source/utils/mtx/mtx-0.60d/Makefile.orig b/Build/source/utils/mtx/mtx-0.60d/Makefile.orig deleted file mode 100644 index 60cf037cbba..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/Makefile.orig +++ /dev/null @@ -1,40 +0,0 @@ -pasfiles = globals.pas mtx.pas preamble.pas lyrics.pas analyze.pas mtxline.pas\ - status.pas uptext.pas prepmx.pas files.pas notes.pas multfile.pas \ - strings.pas utility.pas control.pas -cfiles = globals.c mtx.c preamble.c lyrics.c analyze.c mtxline.c\ - status.c uptext.c prepmx.c files.c notes.c multfile.c utility.c control.c -native = cfuncs.c cfuncs.h -hfiles = globals.h mtx.h preamble.h lyrics.h analyze.h mtxline.h \ - status.h uptext.h files.h notes.h multfile.h utility.h control.h -ofiles = globals.o mtx.o preamble.o lyrics.o analyze.o mtxline.o \ - status.o uptext.o files.o notes.o prepmx.o cfuncs.o multfile.o utility.o \ - control.o - -prepmx: $(pasfiles) - fpc -g -B -vnh -So prepmx - -prepmxc: $(cfiles) $(ofiles) - cc $(ofiles) -o prepmx - -multfile.c: multfile.pas - p2c -a -LTurbo multfile.pas -o temp.c - sed -e "s/Malloc/malloc/" < temp.c > multfile.c - rm temp.c - -%.c: %.pas - p2c -a -LTurbo $*.pas - -clean: - - rm *.o *~ *~ core *.pmx *.pml *.log *.dvi - -bare: clean - - rm $(cfiles) $(hfiles) prepmx *.ppu - -Pzip: - zip -ju mtxP`./version` version $(pasfiles) pmxword.pas mtx.tex $(native) \ - Makefile Corrections Bugs README - -Czip: $(cfiles) - zip -ju mtxC`./version` version $(cfiles) $(native) $(hfiles) mtx.tex Makefile \ - Bugs Corrections README - diff --git a/Build/source/utils/mtx/mtx-0.60d/NEWS b/Build/source/utils/mtx/mtx-0.60d/NEWS deleted file mode 100644 index 1703eee92a2..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/NEWS +++ /dev/null @@ -1,5 +0,0 @@ -Lyrics lines when not from same paragraph don't join neatly. -Problem has been discussed on mailing list and Rainer gave -a solution. - -Rest in dot and comma shortcuts gives error at PMX stage. diff --git a/Build/source/utils/mtx/mtx-0.60d/README b/Build/source/utils/mtx/mtx-0.60d/README deleted file mode 100644 index 55e006035bf..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/README +++ /dev/null @@ -1,164 +0,0 @@ - M-Tx Preprocessor Source Code - - -This is a development version of "prepmx", the M-Tx Preprocessor. -It contains the file "mtx.tex" and all the sources for generating the -binary executable file ("prepmx", "prepmx.exe", etc., depending on your -operating system). There is no documentation: find the latest available -mtxD????.zip and read the Corrections file. There are no examples: find -the latest available mtxX????.zip. Or stay with the most recent stable -release for those. - -The development version is provided for those who need more recent features -than the most recent stable release has, in the hope that they will be -willing to report bugs and maybe even suggest how those can be fixed. -Send e-mail to Dirk Laurie . - -You will have found this README in a file called something like mtxP054f.zip -(which containes Pascal code) or mtxC054f.zip (which contains C code). -I will refer to that file as mtxP????.zip or mtxC????.zip. - -You need one of the following compilers. A later version than specified -should also work, but an earlier one probably will not. - 1. Free Pascal 1.0.10 (for mtxP????.zip) - 2. Borland Pascal 7.0 (for mtxP????.zip) - 3. Any ANSI-compliant C compiler (for mtxC????.zip) - 4. The p2c package plus any ANSI-compliant C compiler (for mtxP????.zip) -The first of these is recommended, since that is the compiler I use. -I try to stay compatible with the other three, but this may not always -be possible. - -"GNU System" means any system on which standard GNU utilities such as "bash" -and "make" is available. Typical GNU systems are (a) Linux (b) Windows with -the Cygwin package installed (c) other systems on which an appropriate -package has been installed. You do not need a GNU system to use M-Tx, -but it is easier to make the executable on a GNU system. - -Read Section 1 below, and, depending on which compiler you have, -one of the other sections. If you have no appropriate compiler, -visit http://www.freepascal.org/ to see whether there is a Free Pascal -compiler for your system (at present, MacOS is the only popular operating -system not available); if not, get an ANSI compliant C compiler and read -Section 6. - - - Contents - -1. Text file format and unzipping -2. Compiling with Free Pascal -3. Compiling with Borland Pascal 7.0 -4. Compiling with p2c -5. Compiling with a C compiler on a GNU system -6. Compiling with a C compiler on a non-GNU system -7. For experts only - - 1. Text file format and unzipping - -Change to some empty directory and unzip the distribution file. YOU MUST -UNZIP THE FILES USING AN UNZIPPER THAT CAN CONVERT TEXT FILES TO YOUR -SYSTEM'S FORMAT. Some things may work even if you don't (maybe even -everything, if your system happens to use the same text format as the -system on which the zipfile was made) but then any later errors will -only be more mysterious because of that. It may be necessary to set -special options in your unzipper to achieve this. On a GNU system, -the command is - unzip -a mtxP????.zip - - - 2. Compiling with Free Pascal - -Free Pascal is available from for most current operating systems, including -Linux, SunOS and Windows. - -If your system has GNU Make, simply type - - make - -Otherwise, type - - fpc -B -So prepmx - -to make the executable. - - - 3. Compiling with Borland Pascal 7.0 - -This compiler is a 16-bit compiler specific to MSDOS, even though it -runs under Windows and under DOS emulators on other 32-bit systems. -It cannot handle very large code and data segments, and unfortunately -it is necessary to cripple M-Tx somewhat to make it fit in, as follows: - -3.1 Edit the file "globals.pas" and change the lines - - lines_in_paragraph = 100; - max_words = 128; - max_notes = 128; - - to - - lines_in_paragraph = 50; - max_words = 64; - max_notes = 64; - -3.2 Type - - bpc -b prepmx - - to make prepmx.exe. - - - 4. Compiling with p2c - -This route is only available if you have a GNU system with a C compiler -and the package p2c (on old Red Hat systems, both p2c and p2c-devel). Type - - make prepmxc - -to make prepmx. On this system only, you can make the mtxC????.zip file -that corresponds to your mtxP????.zip file with - - make Czip - - - 5. Compiling with a C compiler on a GNU system - -Just type - - make prepmxc - -to make prepmx. - - - 6. Compiling with a C compiler on a non-GNU system - -Your C compiler must be ANSI compliant (sorry, Visual C++ 6.0 is not -such, but Turbo C++ is). Then issue a command that will compile and -link all the .c files to produce an appropriately named executable. -The command line will depend on your system; for example - - cc *.c -o prepmx - -should work on non-GNU Un?x systems. - - - 7. For experts only - -You can modify the source code as you wish -- this is open source software -and the copyright is GPL. If you wish to redistribute your modified version, -please augment the name so that there is no risk of confusion: e.g. if you -are Johannes Brahms and you have made changes to mtxC054f.zip, call it -mtxC054f-brahms.zip. - -Even better, send me an e-mail with your changes so that I can insert them -into the current development version. - -The primary source is the Pascal version; the C version is made with p2c as -described in Section 4. Therefore, any change made to the C code is volatile; -only changes made to the Pascal version become permanent. - -If you make both Pascal and C executables, it is your responsibilty to -move or rename the first executable, otherwise it will be overwritten. -Moreover, it is possible to confuse the Makefile, since object files -from Pascal and C compilations may well have the same name; you will -then get numerous error messages. The safe thing is to "make clean" -before switching languages. diff --git a/Build/source/utils/mtx/mtx-0.60d/README.060d b/Build/source/utils/mtx/mtx-0.60d/README.060d deleted file mode 100644 index abc347bfd0e..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/README.060d +++ /dev/null @@ -1,8 +0,0 @@ -M-Tx 0.60d is a test version of M-Tx 0.60. Please try it out and report any -error observations to Christian Mondrup, reccmo@daimi.au.dk and -Dirk Laurie, dpl@sun.ac.za - -Changes: -======== - -- Fixed a bug with non-labeled ties diff --git a/Build/source/utils/mtx/mtx-0.60d/analyze.c b/Build/source/utils/mtx/mtx-0.60d/analyze.c deleted file mode 100644 index 3003eeb9723..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/analyze.c +++ /dev/null @@ -1,333 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "analyze.pas" */ - - -#include "p2c.h" - - -#define ANALYZE_G -#include "analyze.h" - - -#ifndef MTX_H -#include "mtx.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef LYRICS_H -#include "lyrics.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef UPTEXT_H -#include "uptext.h" -#endif - -#ifndef PREAMBLE_H -#include "preamble.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -Void includeStartString() -{ - voice_index voice; - paragraph_index0 mus; - voice_index FORLIM; - Char STR1[256]; - Char STR2[256]; - - FORLIM = nvoices; - for (voice = 1; voice <= FORLIM; voice++) { - mus = musicLineNo(voice); - if (mus > 0) { - sprintf(STR2, "%s%s", startString(STR1, voice), P[mus-1]); - strcpy(P[mus-1], STR2); - } - } -} - - -Static Char *describe(Result, nbar, extra) -Char *Result; -short nbar, extra; -{ - Char STR1[256]; - Char STR3[256]; - Char STR4[256]; - - sprintf(Result, "%s bar%s + %s/64 notes", - toString(STR1, nbar), plural(STR3, nbar), toString(STR4, extra)); - return Result; -} - - -Void testParagraph() -{ - voice_index0 voice; - voice_index0 leader = 0, nv = 0; - paragraph_index0 mus; - short extra, l, nbar; - voice_index0 FORLIM; - Char STR2[256]; - Char STR3[256]; - - nbars = 0; - pickup = 0; - nleft = 0; - if (top > bottom) - return; - pickup = 0; - multi_bar_rest = false; - FORLIM = bottom; - for (voice = top; voice <= FORLIM; voice++) { - mus = musicLineNo(voice); - if (mus > 0) { /** -------------- Voice is present ---- */ - nv++; - line_no = orig_line_no[mus-1]; - scanMusic(voice, &l); - if (multi_bar_rest && nv > 1) - error("Multi-bar rest allows only one voice", print); - if (!pmx_preamble_done) { - if (voice == top) - pickup = l; - else if (pickup != l) - error3(voice, "The same pickup must appear in all voices"); - } - nbar = numberOfBars(voice); - extra = ExtraLength(voice); - if (multi_bar_rest && (nbar > 0 || extra > 0)) - error3(voice, "Multi-bar rest allows no other rests or notes"); - if (nbar > nbars || nbar == nbars && extra > nleft) { - nbars = nbar; - nleft = extra; - leader = voice; - } - if (!final_paragraph && meternum > 0 && extra > 0) { - printf("Line has %s\n", describe(STR2, nbar, extra)); - error(" Line does not end at complete bar", print); - } - if (pmx_preamble_done && l > 0 && meternum > 0) - error3(voice, "Short bar with no meter change"); - } - } - if (!pmx_preamble_done) { - xmtrnum0 = (double)pickup / one_beat; /* Don't want an integer result */ - if (beVerbose()) - printf("Pickup = %d/64\n", pickup); - } - if (leader <= 0) - return; - FORLIM = bottom; - for (voice = top; voice <= FORLIM; voice++) { - if (musicLineNo(voice) > 0) { - if (voice != leader) { - mus = musicLineNo(voice); - line_no = orig_line_no[mus-1]; - if (numberOfBars(voice) != numberOfBars(leader) || - ExtraLength(voice) != ExtraLength(leader)) { - printf("Following line has %s\n", - describe(STR3, numberOfBars(voice), ExtraLength(voice))); - puts(musicLine(STR3, voice)); - printf("Longest line has %s\n", - describe(STR2, numberOfBars(leader), ExtraLength(leader))); - puts(musicLine(STR2, leader)); - error("Line duration anomaly", print); - } - } - } - } -} - - -Void describeParagraph() -{ - voice_index0 voice; - Char STR2[256]; - voice_index0 FORLIM; - - printf("---- Paragraph %d starting at line %d bar %d\n", - paragraph_no, orig_line_no[0], bar_no); - FORLIM = bottom; - for (voice = top; voice <= FORLIM; voice++) - describeVoice(voice, lyricsReport(STR2, voice)); -} - - -/* Local variables for paragraphSetup: */ -struct LOC_paragraphSetup { - voice_index0 *voice; - short l; - voice_index0 k; - Char P_keep[256], w[256]; - boolean is_labelled; -} ; - -Local Void maybeUptext(i, LINK) -short i; -struct LOC_paragraphSetup *LINK; -{ - if (!doUptext()) - return; - if (strlen(LINK->w) == 1) { - if (*LINK->voice == nvoices) - warning("Uptext line below bottom voice should be labelled", print); - } - if (strlen(LINK->w) == 1) { /** Standard chord line ------ */ - LINK->k = *LINK->voice + 1; - if (LINK->k > nvoices) - LINK->k--; - setUptextLineNo(LINK->k, i); - /** Labelled chord line ---- */ - return; - } - predelete(LINK->w, 1); - LINK->k = findVoice(LINK->w); - if (LINK->k == 0) - error("Uptext line belongs to unknown voice", print); - else - setUptextLineNo(LINK->k, i); -} - -Local Void maybeChords(i, LINK) -short i; -struct LOC_paragraphSetup *LINK; -{ - if (!doChords()) - return; - if (strlen(LINK->w) == 1 && *LINK->voice == 0 && pedanticWarnings()) - warning("Chord line above top voice should be labelled", print); - if (strlen(LINK->w) == 1) { /** Standard chord line ------ */ - LINK->k = *LINK->voice; - if (LINK->k == 0) - LINK->k = 1; - setChordLineNo(LINK->k, i); - /** Labelled chord line ---- */ - return; - } - predelete(LINK->w, 1); - LINK->k = findVoice(LINK->w); - if (LINK->k == 0) - error("Chord line belongs to unknown voice", print); - else - setChordLineNo(LINK->k, i); -} - -Local Void analyzeParagraph(LINK) -struct LOC_paragraphSetup *LINK; -{ - paragraph_index i, FORLIM; - - *LINK->voice = 0; - bottom = 0; - top = nvoices + 1; - clearLabels(); - clearTags(); - clearUptext(); - FORLIM = para_len; - for (i = 1; i <= FORLIM; i++) - { /* ----- Paragraph analysis main loop ----- */ - if (*P[i-1] != '\0' && P[i-1][0] != comment) { - NextWord(LINK->w, P[i-1], blank, colon); - line_no = orig_line_no[i-1]; - LINK->l = strlen(LINK->w); - LINK->is_labelled = (LINK->w[LINK->l-1] == colon && - LINK->w[LINK->l-2] != barsym); - if (LINK->is_labelled) { - strcpy(LINK->P_keep, P[i-1]); - predelete(P[i-1], LINK->l); - shorten(LINK->w, LINK->l - 1); - LINK->k = findVoice(LINK->w); /* First look for a voice label */ - if (LINK->k > 0) { - *LINK->voice = LINK->k; - setMusicLineNo(*LINK->voice, i); - } else if (LINK->w[0] == 'L') - maybeLyrics(*LINK->voice, i, LINK->w); - else if (LINK->w[0] == 'C') - maybeChords(i, LINK); - else if (LINK->w[0] == 'U') - maybeUptext(i, LINK); - else { - if (startsWithIgnoreCase(LINK->w, "SPACE")) { - setSpace(P[i-1]); - must_respace = true; - } else { - if (startsWithIgnoreCase(LINK->w, "VOICES")) { - selectVoices(P[i-1]); - must_restyle = true; - } else { - strcpy(P[i-1], LINK->P_keep); - LINK->is_labelled = false; - if (!isNoteOrRest(LINK->w)) { - error("Unknown line label", print); - /** ------------ Maybe Space command ------------ */ - /** ------------ Maybe Voices command ------------ */ - /** Could be sticky attribute **/ - } - } - } - } - } - if (!LINK->is_labelled) { - (*LINK->voice)++; - setMusicLineNo(*LINK->voice, i); - } - if (*LINK->voice > bottom) - bottom = *LINK->voice; - if (*LINK->voice > 0 && *LINK->voice < top) - top = *LINK->voice; - } - } -} - -Local Void obliterate(LINK) -struct LOC_paragraphSetup *LINK; -{ - paragraph_index i; - Char new_only[256]; - paragraph_index FORLIM; - - *new_only = '\0'; - FORLIM = para_len; - for (i = 0; i <= FORLIM - 1; i++) { - if (startsWithIgnoreCase(P[i], "only:")) { - strcpy(new_only, P[i]); - strcpy(P[i], "%"); - } - } - if (*new_only != '\0') { - setOnly(new_only); - return; - } - FORLIM = para_len; - for (i = 1; i <= FORLIM; i++) { - if (omitLine(i)) - strcpy(P[i-1], "%"); - } -} - - -Void paragraphSetup(voice_) -voice_index0 *voice_; -{ - struct LOC_paragraphSetup V; - - V.voice = voice_; - obliterate(&V); - analyzeParagraph(&V); - reviseLyrics(); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/analyze.h b/Build/source/utils/mtx/mtx-0.60d/analyze.h deleted file mode 100644 index e05b846ebb5..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/analyze.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Header for module analyze, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef ANALYZE_H -#define ANALYZE_H - - -/* Decide which lines of paragraphs go where; test total duration of lines. */ - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef GLOBALS_H -#include "globals.h" -#endif - - -#ifdef ANALYZE_G -# define vextern -#else -# define vextern extern -#endif - -extern Void testParagraph PV(); -extern Void describeParagraph PV(); -extern Void paragraphSetup PP((voice_index0 *voice)); -extern Void includeStartString PV(); - - -#undef vextern - -#endif /*ANALYZE_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/analyze.pas b/Build/source/utils/mtx/mtx-0.60d/analyze.pas deleted file mode 100644 index 310c5887854..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/analyze.pas +++ /dev/null @@ -1,181 +0,0 @@ -unit analyze; - -{ Decide which lines of paragraphs go where; test total duration of lines. } - -interface uses control, globals; - -procedure testParagraph; -procedure describeParagraph; -procedure paragraphSetup (var voice: voice_index0); -procedure includeStartString; - -implementation uses mtx, strings, lyrics, mtxline, uptext, - preamble, utility; - -procedure includeStartString; - var voice: voice_index; - mus: paragraph_index0; -begin for voice:=1 to nvoices do - begin mus:=musicLineNo(voice); if mus>0 then - P[mus]:=startString(voice)+P[mus]; - end; -end; - -function describe(nbar,extra: integer): string; -begin describe:=toString(nbar)+' bar'+plural(nbar)+' + '+ - toString(extra)+'/64 notes'; -end; - -procedure testParagraph; - var voice, leader, nv: voice_index0; - mus: paragraph_index0; - extra, l, nbar: integer; -begin - nbars:=0; pickup:=0; nleft:=0; if top>bottom then exit; - pickup:=0; nv:=0; leader:=0; multi_bar_rest := false; - for voice:=top to bottom do - begin mus:=musicLineNo(voice); - if mus>0 then {* -------------- Voice is present ---- } - begin inc(nv); line_no:=orig_line_no[mus]; - scanMusic(voice,l); - if multi_bar_rest and (nv>1) then error( - 'Multi-bar rest allows only one voice',print); - if not pmx_preamble_done then - if voice=top then pickup:=l - else if pickup<>l then - error3(voice,'The same pickup must appear in all voices'); - nbar := numberOfBars(voice); extra := extraLength(voice); - if multi_bar_rest and ((nbar>0) or (extra>0)) then error3(voice, - 'Multi-bar rest allows no other rests or notes'); - if (nbar>nbars) or (nbar=nbars) and (extra>nleft) then - begin nbars:=nbar; nleft:=extra; leader:=voice; end; - if not final_paragraph and (meternum>0) and (extra>0) then - begin writeln('Line has ', describe(nbar,extra)); - error(' Line does not end at complete bar',print); - end; - if pmx_preamble_done and (l>0) and (meternum>0) then - error3(voice,'Short bar with no meter change'); - end - end; - if not pmx_preamble_done then - begin - xmtrnum0 := pickup/one_beat; { Don't want an integer result } - if beVerbose then writeln ('Pickup = ', pickup, '/64'); - end; - if leader>0 then - for voice:=top to bottom do if musicLineNo(voice)>0 then - if voice<>leader then - begin mus:=musicLineNo(voice); - line_no:=orig_line_no[mus]; - if (numberOfBars(voice)<>numberOfBars(leader)) - or (extraLength(voice)<>extraLength(leader)) then - begin - writeln('Following line has ', - describe(numberOfBars(voice), extraLength(voice))); - writeln(musicLine(voice)); - writeln('Longest line has ', - describe(numberOfBars(leader), extraLength(leader))); - writeln(musicLine(leader)); - error('Line duration anomaly',print); - end; - end; -end; - -procedure describeParagraph; - var voice: voice_index0; - begin writeln('---- Paragraph ',paragraph_no, - ' starting at line ', orig_line_no[1], ' bar ', bar_no); - for voice:=top to bottom do describeVoice(voice,lyricsReport(voice)); - end; - -procedure paragraphSetup (var voice: voice_index0); - var l: integer; - k: voice_index0; - P_keep, w: string; - is_labelled: boolean; - - procedure maybeUptext(i: integer); - begin if not doUptext then exit; - if (length(w)=1) then if (voice=nvoices) then - warning('Uptext line below bottom voice should be labelled',print); - if length(w)=1 then {* Standard chord line ------ } - begin k:=voice+1; if k>nvoices then dec(k); - setUptextLineNo(k,i); - end - else {* Labelled chord line ---- } - begin predelete(w,1); k:=findVoice(w); - if k=0 then error('Uptext line belongs to unknown voice',print) - else setUptextLineNo(k,i); - end - end; - - procedure maybeChords(i: integer); - begin if not doChords then exit; - if (length(w)=1) and (voice=0) and pedanticWarnings then - warning('Chord line above top voice should be labelled',print); - if length(w)=1 then {* Standard chord line ------ } - begin k:=voice; if k=0 then k:=1; - setChordLineNo(k,i); - end - else {* Labelled chord line ---- } - begin predelete(w,1); k:=findVoice(w); - if k=0 then error('Chord line belongs to unknown voice',print) - else setChordLineNo(k,i); - end - end; - - procedure analyzeParagraph; - var i: paragraph_index; - begin voice:=0; bottom:=0; top:=nvoices+1; - clearLabels; clearTags; clearUptext; - for i:=1 to para_len do { ----- Paragraph analysis main loop ----- } - if (P[i]<>'') and (P[i,1]<>comment) then - begin - w:=NextWord(P[i],blank,colon); line_no := orig_line_no[i]; - l:=length(w); - is_labelled := (w[l]=colon) and (w[l-1]<>barsym); - if is_labelled then - begin P_keep := P[i]; predelete(P[i],l); shorten(w,l-1); - k:=findVoice(w); { First look for a voice label } - if k>0 then - begin voice:=k; setMusicLineNo(voice,i); - end - else if w[1]='L' then maybeLyrics(voice,i,w) - else if w[1]='C' then maybeChords(i) - else if w[1]='U' then maybeUptext(i) - else begin {* ------------ Maybe Space command ------------ } - if startsWithIgnoreCase(w,'SPACE') then - begin setSpace(P[i]); must_respace:=true; - end - else {* ------------ Maybe Voices command ------------ } - if startsWithIgnoreCase(w,'VOICES') then - begin selectVoices(P[i]); must_restyle:=true; - end - else begin {* Could be sticky attribute *} - P[i] := P_keep; is_labelled := false; - if not isNoteOrRest(w) then error('Unknown line label',print); - end - end - end; - if not is_labelled then - begin inc(voice); setMusicLineNo(voice,i); - end; - if voice>bottom then bottom:=voice; - if (voice>0) and (voice'' then setOnly(new_only) - else for i:=1 to para_len do if omitLine(i) then P[i]:='%'; - end; - -begin obliterate; analyzeParagraph; reviseLyrics; -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/cfuncs.c b/Build/source/utils/mtx/mtx-0.60d/cfuncs.c deleted file mode 100644 index e1f2ca65dbf..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/cfuncs.c +++ /dev/null @@ -1,89 +0,0 @@ -# define CFUNCS_C -#include "cfuncs.h" - -int P_argc; -char **P_argv; -int P_ioresult; -int _EscIO2 (int errorcode, char* filename) -{ fprintf(stderr,"Input file %s not found\n",filename); - exit(errorcode); return errorcode; } -int _EscIO (int errorcode){ return _EscIO2(errorcode,""); } -int _Escape (int exitcode) -{ exit(exitcode); return exitcode; } -int _SETIO (int OK, int errorcode){ return P_ioresult = OK ? 0 : errorcode; } -int P_eof (FILE * infile) -{ int x; - if (feof(infile)) return 1; - x = fgetc(infile); - if (x==EOF) return 1; - ungetc(x,infile); return 0; - } -void PASCAL_MAIN (int npars, char ** pars) -{ P_argc = npars; P_argv = pars; } - -void scan1(char *s, short p, short *n) -{ sscanf(s+p-1,"%hd",n); -} - -short pos1(char c, char *s) -{ char *t = strchr(s,c); - if (t) return (short) (t-s+1); else return 0; -} - -void delete1(char *s, short p) -{ char *t = (s+=p); s=t-1; - while (*s) *s++ = *t++; -} - -void predelete(char *s, short l) -{ char *t = s+l; - while (*t) *s++ = *t++; - *s = *t; -} - -void shorten(char *s, short new_length) -{ s[new_length] = '\0'; -} - -short posNot(char c, char *s) -{ char *t = s; - while (*t == c) t++; - if (*t) return t-s+1; - else return 0; -} - -void getNum(char *line, short *k) -{ int j=sscanf(line,"%hd",k); - if (j<1) *k=0; -} - - -void getTwoNums(char *line, short *k1, short *k2) -{ int param = sscanf(line,"%hd/%hd",k1,k2); - if (param<2) *k2 = 0; -} - -void toUpper(char *s) -{ while (*s) { *s = toupper(*s); s++; } -} - -boolean startsWith(char *s1, char *s2) -{ while (*s2) { if (*s1++ != *s2++) return false; } - return true; -} - -void insertChar(char c, char *s, short p) -{ char x; - s += p-1; - do { x=c; c=*s; *s++=x; } while (x); -} - -char *substr_(char *Result, char *s, short start, short count) -{ char *R = Result; - s += start-1; - while (count--) *R++ = *s++; - *R = '\0'; - return Result; -} - -# undef CFUNCS_C diff --git a/Build/source/utils/mtx/mtx-0.60d/cfuncs.h b/Build/source/utils/mtx/mtx-0.60d/cfuncs.h deleted file mode 100644 index 5dc1c829fe7..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/cfuncs.h +++ /dev/null @@ -1,72 +0,0 @@ -/* cfuncs.h DPL 1997-03-31, 2001-12-22 */ - -#ifndef CFUNCS_H -# define CFUNCS_H - -#define STRINGS_H -typedef char Char; -typedef void Void; -#define Static static -#define Local static -#define SHORT_MAX 65535 - -# define FileNotFound 10 -# define FileWriteError 38 -#ifndef STDIO_H -# include -#endif -#ifndef CTYPE_H -# include -#endif -#ifndef STRING_H -# include -#endif -#ifndef STDLIB_H -# include -#endif -#ifndef _FNSIZE -# define _FNSIZE 120 -#endif - -typedef unsigned boolean; -#define false 0 -#define true 1 - -extern int _EscIO (int); -extern int _EscIO2 (int errorcode, char* filename); -extern int _Escape (int); -extern int P_eof (FILE *); -extern int _SETIO (int, int); - -extern void PASCAL_MAIN (int, char **); -extern int P_argc; -extern int P_ioresult; -extern char **P_argv; - -#ifdef CFUNCS_C -# define vextern -#else -# define vextern extern -#endif -/* String handling primitives. */ - -extern void scan1(char *s, short p, short *n); -/* Read an integer at position p of s */ -extern boolean startsWith(char *s1, char *s2); -/* True if s1 starts with s2 */ -extern short pos1(char c, char *s); -extern short posNot(char c, char *s); -extern void insertChar(char c, char *s, short p); -extern char *substr_(char *Result, char *s, short start, short count); -extern void getNum(char *line, short *k); -extern void getTwoNums(char *line, short *k1, short *k2); -extern void toUpper(char *s); -extern void delete1(char *s, short p); -extern void predelete(char *s, short l); -extern void shorten(char *s, short new_length); - - -#undef vextern - -#endif /*CFUNCS_H*/ - diff --git a/Build/source/utils/mtx/mtx-0.60d/config.h b/Build/source/utils/mtx/mtx-0.60d/config.h deleted file mode 100644 index 2ce758e1759..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/config.h +++ /dev/null @@ -1,90 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#define HAVE_MALLOC 1 - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strrchr' function. */ -#define HAVE_STRRCHR 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Name of package */ -#define PACKAGE "mtx" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "dpl@sun.ac.za" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "mtx" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "mtx 0.60d" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "mtx" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.60d" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "0.60d" - -/* Define to rpl_malloc if the replacement function should be used. */ -/* #undef malloc */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ diff --git a/Build/source/utils/mtx/mtx-0.60d/config.h.in b/Build/source/utils/mtx/mtx-0.60d/config.h.in deleted file mode 100644 index 88cd015fb76..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/config.h.in +++ /dev/null @@ -1,89 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* Define to 1 if stdbool.h conforms to C99. */ -#undef HAVE_STDBOOL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR - -/* Define to 1 if you have the `strtol' function. */ -#undef HAVE_STRTOL - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if the system has the type `_Bool'. */ -#undef HAVE__BOOL - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/Build/source/utils/mtx/mtx-0.60d/configure.ac b/Build/source/utils/mtx/mtx-0.60d/configure.ac deleted file mode 100644 index a5c59e86466..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/configure.ac +++ /dev/null @@ -1,33 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.63]) -AC_INIT([mtx], [0.60d], [dpl@sun.ac.za]) -AC_CONFIG_SRCDIR([analyze.c]) -AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE(mtx,0.60d) - -# Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_MAKE_SET -AC_PROG_RANLIB - -# Checks for libraries. - -# Checks for header files. -AC_CHECK_HEADERS([memory.h stddef.h stdlib.h string.h strings.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T - -# Checks for library functions. -AC_FUNC_ERROR_AT_LINE -AC_FUNC_MALLOC -AC_FUNC_STRTOD -AC_CHECK_FUNCS([memchr memmove memset strchr strrchr strtol]) - -AC_CONFIG_FILES([Makefile - libp2c/Makefile]) -AC_OUTPUT diff --git a/Build/source/utils/mtx/mtx-0.60d/control.c b/Build/source/utils/mtx/mtx-0.60d/control.c deleted file mode 100644 index 9dbb2dae1da..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/control.c +++ /dev/null @@ -1,274 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "control.pas" */ - - -#include "p2c.h" - - -#define CONTROL_G -#include "control.h" - - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -/* enables Include: directive */ -/* one-word shortcut is treated by simply inserting a blank */ -/* detached form of shortcut allowed */ -/* C: lines are taken into account */ -/* U: lines are taken into account */ -/* L: lines are taken into account */ -/* non-melismatic eighth and shorter notes in vocal lines are unbeamed */ -/* blind slurs are hidden */ -/* U: lines synchronize with words and rests */ -/* always insert duration into notes */ -/* include macros in the count */ -/* literally expand macros */ -/* keep track of pitch and warn if unreal */ -/* transform note words to canical form */ -/* use solfa note names */ -/* issue warnings even when default action is likely to be correct */ -/* ignore all errors except fatal errors */ -/* set instrument names */ -/* report what is being done */ -/* write all possible infomative messages */ -typedef enum { - noSuchFeature, FmultiFile, FsplitShortcut, FnewWordShortcut, FdoChords, - FdoUptext, FdoLyrics, FunbeamVocal, FhideBlindSlurs, FuptextOnRests, - FinsertDuration, FcountMacro, FexpandMacro, FcheckPitch, FrearrangeNote, - FsolfaNoteNames, FpedanticWarnings, FignoreErrors, FinstrumentNames, - FbeVerbose, FdebugMode -} feature; - -typedef struct Tfeature { - Char tag[31]; - boolean active, changed; -} Tfeature; - - -#define firstFeature FmultiFile -#define lastFeature FdebugMode - - -Static Tfeature feat[21] = { - { "", false, false }, - { "multiFile", true, false }, - { "splitShortcut", true, false }, - { "newWordShortcut", true, false }, - { "doChords", true, false }, - { "doUptext", true, false }, - { "doLyrics", true, false }, - { "unbeamVocal", true, false }, - { "hideBlindSlurs", true, false }, - { "uptextOnRests", true, false }, - { "insertDuration", true, false }, - { "countMacro", false, false }, - { "expandMacro", false, false }, - { "checkPitch", true, false }, - { "rearrangeNote", true, false }, - { "solfaNoteNames", false, false }, - { "pedanticWarnings", false, false }, - { "ignoreErrors", false, false }, - { "instrumentNames", false, false }, - { "beVerbose", false, false }, - { "debugMode", false, false } -}; - - -Void printFeatures(anyway) -boolean anyway; -{ - feature i; - Tfeature *WITH; - - for (i = firstFeature; (long)i <= (long)lastFeature; i = (feature)((long)i + 1)) { - WITH = &feat[(long)i]; - if (WITH->changed || anyway) - printf("%s = %s\n", WITH->tag, WITH->active ? " TRUE" : "FALSE"); - } -} - - -Static feature featureNamed(s) -Char *s; -{ - feature i; - - for (i = firstFeature; (long)i <= (long)lastFeature; i = (feature)((long)i + 1)) { - if (equalsIgnoreCase(s, feat[(long)i].tag)) - return i; - } - return noSuchFeature; -} - - -boolean setFeature(which, val) -Char *which; -boolean val; -{ - boolean Result = false; - feature f; - Tfeature *WITH; - - f = featureNamed(which); - if (f != noSuchFeature) { - WITH = &feat[(long)f]; - WITH->active = val; - WITH->changed = true; - Result = true; - } - if (f == FdebugMode && val) - feat[(long)FbeVerbose].active = true; - if (f == FbeVerbose && !val) - feat[(long)FdebugMode].active = false; - return Result; -} - - -Void mtxLevel(level) -Char *level; -{ - if (strcmp(level, "0.57") < 0) { - setFeature("splitShortcut", false); - setFeature("newWordShortcut", false); - } -} - - -/* Feature functions. To add a new feature "newFeature": - 1. Insert a new value "FnewFeature" in the declaration of type "feature". - 2. Insert an entry for it in array "feat". - 3. Copy the template below and change "FEATURE" into "newFeature". - 4. Copy the function header to the interface section. - 5. (Optional) Insert code into "mtxLevel" to enable/disable the feature. - -function FEATURE: boolean; -begin FEATURE := feat[FFEATURE].active end; -*/ - -boolean checkPitch() -{ - return (feat[(long)FcheckPitch].active); -} - - -boolean countMacro() -{ - return (feat[(long)FcountMacro].active); -} - - -boolean expandMacro() -{ - return (feat[(long)FexpandMacro].active); -} - - -boolean insertDuration() -{ - return (feat[(long)FinsertDuration].active); -} - - -boolean rearrangeNote() -{ - return (feat[(long)FrearrangeNote].active); -} - - -boolean beVerbose() -{ - return (feat[(long)FbeVerbose].active); -} - - -boolean debugMode() -{ - return (feat[(long)FdebugMode].active); -} - - -boolean instrumentNames() -{ - return (feat[(long)FinstrumentNames].active); -} - - -boolean hideBlindSlurs() -{ - return (feat[(long)FhideBlindSlurs].active); -} - - -boolean doLyrics() -{ - return (feat[(long)FdoLyrics].active); -} - - -boolean ignoreErrors() -{ - return (feat[(long)FignoreErrors].active); -} - - -boolean pedanticWarnings() -{ - return (feat[(long)FpedanticWarnings].active); -} - - -boolean solfaNoteNames() -{ - return (feat[(long)FsolfaNoteNames].active); -} - - -boolean uptextOnRests() -{ - return (feat[(long)FuptextOnRests].active); -} - - -boolean unbeamVocal() -{ - return (feat[(long)FunbeamVocal].active); -} - - -boolean doChords() -{ - return (feat[(long)FdoChords].active); -} - - -boolean doUptext() -{ - return (feat[(long)FdoUptext].active); -} - - -boolean newWordShortcut() -{ - return (feat[(long)FnewWordShortcut].active); -} - - -boolean splitShortcut() -{ - return (feat[(long)FsplitShortcut].active); -} - - -boolean multiFile() -{ - return (feat[(long)FmultiFile].active); -} - - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/control.h b/Build/source/utils/mtx/mtx-0.60d/control.h deleted file mode 100644 index 91ce2c2dfef..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/control.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Header for module control, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef CONTROL_H -#define CONTROL_H - - -#ifdef CONTROL_G -# define vextern -#else -# define vextern extern -#endif -/* DPL 2004-03-21 */ -/* Controls which M-Tx features are enabled. - The interface allows one to interrogate the feature state, to set - features according to the M-Tx level, and to override features given - the feature name as a character string. -*/ - - -extern Void mtxLevel PP((Char *level)); -extern boolean setFeature PP((Char *which, int val)); -/* return TRUE means OK, return FALSE means there is no such feature */ -extern Void printFeatures PP((int anyway)); -/* anyway TRUE means print all feature settings, FALSE means only those - that were set via setFeature */ - -extern boolean multiFile PV(); -extern boolean splitShortcut PV(); -extern boolean newWordShortcut PV(); -extern boolean doChords PV(); -extern boolean doUptext PV(); -extern boolean doLyrics PV(); -extern boolean unbeamVocal PV(); -extern boolean uptextOnRests PV(); -extern boolean solfaNoteNames PV(); -extern boolean pedanticWarnings PV(); -extern boolean ignoreErrors PV(); -extern boolean hideBlindSlurs PV(); -extern boolean instrumentNames PV(); -extern boolean beVerbose PV(); -extern boolean debugMode PV(); -extern boolean insertDuration PV(); -extern boolean rearrangeNote PV(); -extern boolean countMacro PV(); -extern boolean expandMacro PV(); -extern boolean checkPitch PV(); - - -#undef vextern - -#endif /*CONTROL_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/control.pas b/Build/source/utils/mtx/mtx-0.60d/control.pas deleted file mode 100644 index fbe224658a8..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/control.pas +++ /dev/null @@ -1,198 +0,0 @@ -unit control; { DPL 2004-03-21 } -{ Controls which M-Tx features are enabled. - The interface allows one to interrogate the feature state, to set - features according to the M-Tx level, and to override features given - the feature name as a character string. -} - -interface - -procedure mtxLevel(level: string); -function setFeature(which: string; val: boolean): boolean; - { return TRUE means OK, return FALSE means there is no such feature } -procedure printFeatures(anyway: boolean); - { anyway TRUE means print all feature settings, FALSE means only those - that were set via setFeature } - -function multiFile: boolean; -function splitShortcut: boolean; -function newWordShortcut: boolean; -function doChords: boolean; -function doUptext: boolean; -function doLyrics: boolean; -function unbeamVocal: boolean; -function uptextOnRests: boolean; -function solfaNoteNames: boolean; -function pedanticWarnings: boolean; -function ignoreErrors: boolean; -function hideBlindSlurs: boolean; -function instrumentNames: boolean; -function beVerbose: boolean; -function debugMode: boolean; -function insertDuration: boolean; -function rearrangeNote: boolean; -function countMacro: boolean; -function expandMacro: boolean; -function checkPitch: boolean; - -implementation uses utility; - -type feature = (noSuchFeature, - FmultiFile, { enables Include: directive } - FsplitShortcut, { one-word shortcut is treated by simply inserting a blank } - FnewWordShortcut, { detached form of shortcut allowed } - FdoChords, { C: lines are taken into account } - FdoUptext, { U: lines are taken into account } - FdoLyrics, { L: lines are taken into account } - FunbeamVocal, { non-melismatic eighth and shorter notes in vocal lines are unbeamed } - FhideBlindSlurs, { blind slurs are hidden } - FuptextOnRests, { U: lines synchronize with words and rests } - FinsertDuration, { always insert duration into notes } - FcountMacro, { include macros in the count } - FexpandMacro, { literally expand macros } - FcheckPitch, { keep track of pitch and warn if unreal } - FrearrangeNote, { transform note words to canical form } - FsolfaNoteNames, { use solfa note names } - FpedanticWarnings, { issue warnings even when default action is likely to be correct } - FignoreErrors, { ignore all errors except fatal errors } - FinstrumentNames, { set instrument names } - FbeVerbose, { report what is being done } - FdebugMode { write all possible infomative messages } ); - - Tfeature = record - tag: string[30]; - active, changed: boolean - end; - -const - firstFeature = FmultiFile; - lastFeature = FdebugMode; - - feat: array[feature] of Tfeature = ( - ( tag: ''; active: false; changed: false), - ( tag: 'multiFile'; active: true; changed: false), - ( tag: 'splitShortcut'; active: true; changed: false), - ( tag: 'newWordShortcut'; active: true; changed: false), - ( tag: 'doChords'; active: true; changed: false), - ( tag: 'doUptext'; active: true; changed: false), - ( tag: 'doLyrics'; active: true; changed: false), - ( tag: 'unbeamVocal'; active: true; changed: false), - ( tag: 'hideBlindSlurs'; active: true; changed: false), - ( tag: 'uptextOnRests'; active: true; changed: false), - ( tag: 'insertDuration'; active: true; changed: false), - ( tag: 'countMacro'; active: false; changed: false), - ( tag: 'expandMacro'; active: false; changed: false), - ( tag: 'checkPitch'; active: true; changed: false), - ( tag: 'rearrangeNote'; active: true; changed: false), - ( tag: 'solfaNoteNames'; active: false; changed: false), - ( tag: 'pedanticWarnings'; active: false; changed: false), - ( tag: 'ignoreErrors'; active: false; changed: false), - ( tag: 'instrumentNames'; active: false; changed: false), - ( tag: 'beVerbose'; active: false; changed: false), - ( tag: 'debugMode'; active: false; changed: false) - ); - -procedure printFeatures(anyway: boolean); - var i: feature; -begin for i:=firstFeature to lastFeature do with feat[i] do - if changed or anyway then writeln(tag, ' = ', active) -end; - -function featureNamed(s: string): feature; - var i: feature; -begin for i:=firstFeature to lastFeature do - if equalsIgnoreCase(s,feat[i].tag) then begin featureNamed := i; exit end; - featureNamed := noSuchFeature -end; - -function setFeature(which: string; val: boolean): boolean; - var f: feature; -begin setFeature := false; f := featureNamed(which); - if f <> noSuchFeature then with feat[f] do - begin active := val; changed := true; setFeature := true end; - if (f=FdebugMode) and val then feat[FbeVerbose].active := true; - if (f=FbeVerbose) and not val then feat[FdebugMode].active := false; -end; - -procedure mtxLevel(level: string); -begin - if level<'0.57' then - begin - setFeature('splitShortcut',false); - setFeature('newWordShortcut',false); - end -end; - -{ Feature functions. To add a new feature "newFeature": - 1. Insert a new value "FnewFeature" in the declaration of type "feature". - 2. Insert an entry for it in array "feat". - 3. Copy the template below and change "FEATURE" into "newFeature". - 4. Copy the function header to the interface section. - 5. (Optional) Insert code into "mtxLevel" to enable/disable the feature. - -function FEATURE: boolean; -begin FEATURE := feat[FFEATURE].active end; -} - -function checkPitch: boolean; -begin checkPitch := feat[FcheckPitch].active end; - -function countMacro: boolean; -begin countMacro := feat[FcountMacro].active end; - -function expandMacro: boolean; -begin expandMacro := feat[FexpandMacro].active end; - -function insertDuration: boolean; -begin insertDuration := feat[FinsertDuration].active end; - -function rearrangeNote: boolean; -begin rearrangeNote := feat[FrearrangeNote].active end; - -function beVerbose: boolean; -begin beVerbose := feat[FbeVerbose].active end; - -function debugMode: boolean; -begin debugMode := feat[FdebugMode].active end; - -function instrumentNames: boolean; -begin instrumentNames := feat[FinstrumentNames].active end; - -function hideBlindSlurs: boolean; -begin hideBlindSlurs := feat[FhideBlindSlurs].active end; - -function doLyrics: boolean; -begin doLyrics := feat[FdoLyrics].active end; - -function ignoreErrors: boolean; -begin ignoreErrors := feat[FignoreErrors].active end; - -function pedanticWarnings: boolean; -begin pedanticWarnings := feat[FpedanticWarnings].active end; - -function solfaNoteNames: boolean; -begin solfaNoteNames := feat[FsolfaNoteNames].active end; - -function uptextOnRests: boolean; -begin uptextOnRests := feat[FuptextOnRests].active end; - -function unbeamVocal: boolean; -begin unbeamVocal := feat[FunbeamVocal].active end; - -function doChords: boolean; -begin doChords := feat[FdoChords].active end; - -function doUptext: boolean; -begin doUptext := feat[FdoUptext].active end; - -function newWordShortcut: boolean; -begin newWordShortcut := feat[FnewWordShortcut].active end; - -function splitShortcut: boolean; -begin splitShortcut := feat[FsplitShortcut].active end; - -function multiFile: boolean; -begin multiFile := feat[FmultiFile].active end; - -end. - diff --git a/Build/source/utils/mtx/mtx-0.60d/files.c b/Build/source/utils/mtx/mtx-0.60d/files.c deleted file mode 100644 index 48aacc7aae7..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/files.c +++ /dev/null @@ -1,379 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "files.pas" */ - - -#include "p2c.h" - - -#define FILES_G -#include "files.h" - - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -#define param_leader '-' - - -Static Char stylefilename[256] = "mtxstyle.txt"; - -Static short teststyle; - - -boolean endOfInfile() -{ - return (eofAll()); -} - - -Void tex3(s) -Char *s; -{ - Char STR1[256], STR2[256]; - - if (!pmx_preamble_done) { - putLine(s); - return; - } - if (s[0] == '%') { - putLine(s); - return; - } - if (first_paragraph) { - sprintf(STR2, "\\%s\\", s); - putLine(STR2); - } else { - sprintf(STR1, "\\\\%s\\", s); - putLine(STR1); - } -} - - -Void putLine(line) -Char *line; -{ - if (outlen + strlen(line) >= PMXlinelength) - putc('\n', outfile); - fprintf(outfile, "%s\n", line); - outlen = 0; -} - - -Void put(line_, putspace_) -Char *line_; -boolean putspace_; -{ - Char line[256]; - short l; - Char STR1[256]; - - strcpy(line, line_); - l = strlen(line); - if (l > PMXlinelength) - error("Item longer than PMX line length", print); - if (outlen + l >= PMXlinelength) { - putLine(""); - put(line, false); - return; - } - if (putspace_ && outlen > 0 && line[0] != ' ') - sprintf(line, " %s", strcpy(STR1, line)); - fputs(line, outfile); - outlen += l; -} - - -boolean styleFileFound() -{ - return (teststyle != 0); -} - - -Static Void helpmessage() -{ - printf("Usage: prepmx [-bcfnhimtuvwDH0123456789] MTXFILE [TEXDIR] [STYLEFILE]\n"); -} - - -Static Void bighelpmessage() -{ - helpmessage(); - printf("\nMTXFILE: name of .mtx file without its extension\n"); - printf("TEXDIR: directory where the TeX file made by PMX goes, default is ./\n"); - printf("STYLEFILE: name of a file containing style definitions. Default is\n"); - printf(" mtxstyle.txt. This feature is now deprecated; use Include: STYLEFILE\n"); - printf(" in the preamble of the .mtx file instead.\n"); - printf("Options: (can also be entered separately: -b -c ...)\n"); - printf(" -b: disable unbeamVocal\n"); - printf(" -c: disable doChords\n"); - printf(" -f: enable solfaNoteNames\n"); - printf(" -h: display this message and quit\n"); - printf(" -i: enable ignoreErrors\n"); - printf(" -m: disable doLyrics\n"); - printf(" -n: enable instrumentNames\n"); - printf(" -t: disable doUptext\n"); - printf(" -u: disable uptextOnRests\n"); - printf(" -v: enable beVerbose\n"); - printf(" -w: enable pedanticWarnings\n"); - printf(" -D: enable debugMode\n"); - printf(" -0123456789: select Case\n"); - printf(" -H: print enabled status of all options\n"); - printf("All the above, and some other, options can be enabled or disabled\n"); - printf(" in the preamble. What you do there overrides what you do here.\n"); -} - - -Void processOption(j) -Char j; -{ - switch (j) { - - case 'b': - setFeature("unbeamVocal", false); - break; - - case 'c': - setFeature("doChords", false); - break; - - case 'f': - setFeature("solfaNoteNames", true); - break; - - case 'h': - bighelpmessage(); - _Escape(255); - break; - - case 'i': - setFeature("ignoreErrors", true); - break; - - case 'm': - setFeature("doLyrics", false); - break; - - case 'n': - setFeature("instrumentNames", true); - break; - - case 't': - setFeature("doUptext", false); - break; - - case 'u': - setFeature("uptextOnRests", false); - break; - - case 'v': - setFeature("beVerbose", true); - break; - - case 'w': - setFeature("pedanticWarnings", true); - break; - - case 'D': - setFeature("debugMode", true); - break; - - case 'H': - printFeatures(true); - break; - - default: - if (isdigit(j)) - choice = j; - else { - putchar(j); - error(": invalid option", !print); - } - break; - } -} - - -/* Local variables for OpenFiles: */ -struct LOC_OpenFiles { - short testin; - Char basename[256]; -} ; - -Local Void checkExistingFile(LINK) -struct LOC_OpenFiles *LINK; -{ - FILE *tryfile; - Char tryfile_NAME[_FNSIZE]; - - strcpy(tryfile_NAME, LINK->basename); - tryfile = fopen(tryfile_NAME, "r+b"); - _SETIO(tryfile != NULL, FileNotFound); - LINK->testin = P_ioresult; - if (LINK->testin != 0) - return; - if (tryfile != NULL) - fclose(tryfile); - printf("There exists a file named %s. I am treating this\n", - LINK->basename); - error(" as a fatal error unless you specify -i", !print); -} - - -Void OpenFiles() -{ - struct LOC_OpenFiles V; - short i, j, l; - short fileid = 0; - Char infilename[256], outfilename[256], param[256], ext[256]; - short FORLIM1; - Char STR3[256]; - - line_no = 0; - paragraph_no = 0; - for (i = 1; i <= P_argc - 1; i++) { - strcpy(param, P_argv[i]); - if (param[0] == param_leader) { - FORLIM1 = strlen(param); - for (j = 1; j <= FORLIM1 - 1; j++) - processOption(param[j]); - } else if (fileid == 0) - fileid = i; - else if (*texdir == '\0') - strcpy(texdir, param); - else - strcpy(stylefilename, param); - } - if (fileid == 0) { - helpmessage(); - printf("Try \"prepmx -h\" for more information.\n"); - _Escape(255); - } - strcpy(V.basename, P_argv[fileid]); - l = strlen(V.basename); - if (l > 4 && V.basename[l-4] == '.') { - substr_(ext, V.basename, l - 2, 3); - toUpper(ext); - if (!strcmp(ext, "MTX")) { - warning(".mtx extension deleted from basename", !print); - shorten(V.basename, l - 4); - } - } - if (pos1('.', V.basename) > 0) - checkExistingFile(&V); - sprintf(infilename, "%s.mtx", V.basename); - sprintf(outfilename, "%s.pmx", V.basename); - pushFile(infilename); - strcpy(outfile_NAME, outfilename); - if (outfile != NULL) - outfile = freopen(outfile_NAME, "wb", outfile); - else - outfile = fopen(outfile_NAME, "wb"); - _SETIO(outfile != NULL, FileNotFound); - strcpy(stylefile_NAME, stylefilename); - if (stylefile != NULL) - stylefile = freopen(stylefile_NAME, "r", stylefile); - else - stylefile = fopen(stylefile_NAME, "r"); - _SETIO(stylefile != NULL, FileNotFound); - teststyle = P_ioresult; - if (teststyle != 0 && strcmp(stylefilename, "mtxstyle.txt")) - _SETIO(printf("Can't read %s\n", stylefilename) >= 0, FileWriteError); - if (fileError()) { - sprintf(STR3, "Input file %s not found", infilename); - fatalerror(STR3); - } - outfile_open = true; - printf("Writing to %s.pmx\n", V.basename); -} - - -Void CloseFiles() -{ - if (outfile != NULL) - fclose(outfile); - outfile = NULL; - closeAll(); - if (teststyle != 0) - return; - if (stylefile != NULL) - fclose(stylefile); - stylefile = NULL; -} - - -Void readParagraph(P, no, L) -Char (*P)[256]; -short *no; -paragraph_index0 *L; -{ - boolean another; - Char filename[256], buffer[256]; - Char STR1[256], STR3[256]; - - *L = 0; - readData(buffer); - line_no = currentLineNo(); - if (isEmpty(buffer)) - return; - if (debugMode()) - printf(">>>> %s\n", buffer); - paragraph_no++; - /* Handle directives affecting the processing of the input file */ - do { - another = false; - if (startsWithIgnoreCase(buffer, "SUSPEND")) { - ignore_input = true; - another = true; - if (beVerbose()) - printf("-->> Suspending input file %s at line %d\n", - currentFilename(STR3), line_no); - } - if (startsWithIgnoreCase(buffer, "RESUME")) { - ignore_input = false; - another = true; - if (beVerbose()) - printf("-->> Resuming input file %s at line %d\n", - currentFilename(STR1), line_no); - } - if (startsWithIgnoreCase(buffer, "INCLUDE:")) { - predelete(buffer, 8); - NextWord(filename, buffer, ' ', ' '); - pushFile(filename); - another = true; - } - if (another) { - readLine(buffer); - line_no = currentLineNo(); - } - } while (another); - /* Normal paragraph input*/ - do { - if (*L < lines_in_paragraph) { - (*L)++; - strcpy(P[*L - 1], buffer); - *buffer = '\0'; - no[*L - 1] = line_no; - } else - warning("Paragraph too long: skipping line", !print); - readLine(buffer); - line_no = currentLineNo(); - if (debugMode()) - printf("%d >> %s\n", line_no, buffer); - } while (!isEmpty(buffer)); - skipBlanks(); /* needed to identify final paragraph */ -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/files.h b/Build/source/utils/mtx/mtx-0.60d/files.h deleted file mode 100644 index 66e978f78ca..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/files.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Header for module files, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef FILES_H -#define FILES_H - - -/* Open and close files, interpret command line, do input, do most output*/ - -#ifndef GLOBALS_H -#include "globals.h" -#endif - -#ifndef MULTFILE_H -#include "multfile.h" -#endif - - -#ifdef FILES_G -# define vextern -#else -# define vextern extern -#endif - -extern Void readParagraph PP((Char (*P)[256], short *no, paragraph_index0 *L)); -extern boolean styleFileFound PV(); -extern Void processOption PP((int j)); -extern Void OpenFiles PV(); -extern Void CloseFiles PV(); -extern Void putLine PP((Char *line)); -extern Void put PP((Char *line, int putspace_)); -extern Void tex3 PP((Char *s)); -extern boolean endOfInfile PV(); - - -#undef vextern - -#endif /*FILES_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/files.pas b/Build/source/utils/mtx/mtx-0.60d/files.pas deleted file mode 100644 index 8762f7e6e2d..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/files.pas +++ /dev/null @@ -1,196 +0,0 @@ -unit files; -{ Open and close files, interpret command line, do input, do most output} - -interface uses globals, multfile; - -procedure readParagraph (var P: paragraph; var no: line_nos; - var L: paragraph_index0); -function styleFileFound: boolean; -procedure processOption(j: char); -procedure OpenFiles; -procedure CloseFiles; -procedure putLine (line: string); -procedure put(line: string; putspace: boolean); -procedure tex3 (s: string); -function endOfInfile: boolean; - -implementation uses control, strings, utility; - -const param_leader = '-'; - stylefilename: string = 'mtxstyle.txt'; - -var teststyle: integer; - -function endOfInfile: boolean; - begin endOfInfile:=eofAll; end; - -procedure tex3 (s: string); - begin - if pmx_preamble_done then - if s[1]='%' then putLine(s) - else if first_paragraph then putLine('\'+s+'\') - else putLine('\\'+s+'\') - else putLine(s); - end; - -procedure putLine (line: string); - begin if outlen+length(line) > pmxlinelength-1 then writeln(outfile); - writeln(outfile,line); outlen:=0; - end; - -procedure put(line: string; putspace: boolean); - var l: integer; - begin l:=length(line); - if l>pmxlinelength then error('Item longer than PMX line length',print); - if outlen+l > pmxlinelength-1 then - begin putLine(''); put(line,false) end - else begin if putspace and (outlen>0) and (line[1]<>' ') then - line:=' '+line; - write(outfile,line); inc(outlen,l); - end - end; - -function styleFileFound: boolean; -begin styleFileFound := teststyle<>0; end; - -procedure helpmessage; -begin - writeln('Usage: prepmx [-bcfnhimtuvwDH0123456789] MTXFILE [TEXDIR] [STYLEFILE]') -end; - -procedure bighelpmessage; -begin helpmessage; writeln; - writeln('MTXFILE: name of .mtx file without its extension'); - writeln('TEXDIR: directory where the TeX file made by PMX goes, default is ./'); - writeln('STYLEFILE: name of a file containing style definitions. Default is'); - writeln(' mtxstyle.txt. This feature is now deprecated; use Include: STYLEFILE'); - writeln(' in the preamble of the .mtx file instead.'); - writeln('Options: (can also be entered separately: -b -c ...)'); - writeln(' -b: disable unbeamVocal'); - writeln(' -c: disable doChords'); - writeln(' -f: enable solfaNoteNames'); - writeln(' -h: display this message and quit'); - writeln(' -i: enable ignoreErrors'); - writeln(' -m: disable doLyrics'); - writeln(' -n: enable instrumentNames'); - writeln(' -t: disable doUptext'); - writeln(' -u: disable uptextOnRests'); - writeln(' -v: enable beVerbose'); - writeln(' -w: enable pedanticWarnings'); - writeln(' -D: enable debugMode'); - writeln(' -0123456789: select Case'); - writeln(' -H: print enabled status of all options'); - writeln('All the above, and some other, options can be enabled or disabled'); - writeln(' in the preamble. What you do there overrides what you do here.') -end; - -procedure processOption(j: char); - begin case j of - 'b': setFeature('unbeamVocal',false); - 'c': setFeature('doChords',false); - 'f': setFeature('solfaNoteNames',true); - 'h': begin bighelpmessage; halt(255) end; - 'i': setFeature('ignoreErrors',true); - 'm': setFeature('doLyrics',false); - 'n': setFeature('instrumentNames',true); - 't': setFeature('doUptext',false); - 'u': setFeature('uptextOnRests',false); - 'v': setFeature('beVerbose',true); - 'w': setFeature('pedanticWarnings',true); - 'D': setFeature('debugMode',true); - '0'..'9': choice:=j; - 'H': printFeatures(true); - else write(j); error(': invalid option',not print); - end; -end; - -procedure OpenFiles; -var i, j, l, fileid, testin: integer; - infilename, outfilename, basename, param, ext: string; - procedure checkExistingFile; - var tryfile: file; - begin -{$I-} - assign(tryfile,basename); reset(tryfile); testin := ioresult; -{$I+} - if testin<>0 then exit else close(tryfile); - writeln('There exists a file named ',basename,'. I am treating this'); - error(' as a fatal error unless you specify -i',not print); - end; -begin - fileid:=0; line_no:=0; paragraph_no:=0; - for i:=1 to ParamCount do - begin param:=ParamStr(i); - if param[1]=param_leader then - for j:=2 to length(param) do processOption(param[j]) - else if fileid=0 then fileid:=i - else if texdir='' then texdir:=param - else stylefilename:=param; - end; - if fileid=0 then - begin helpmessage; writeln('Try "prepmx -h" for more information.'); halt(255) end - else basename:=paramstr(fileid); - l:=length(basename); - if (l>4) and (basename[l-3]='.') then - begin ext:=substr(basename,l-2,3); toUpper(ext); if ext='MTX' then - begin warning('.mtx extension deleted from basename',not print); - shorten(basename,l-4); - end; - end; - if pos1('.',basename)>0 then checkExistingFile; - infilename := basename+'.mtx'; outfilename := basename+'.pmx'; -{$I-} - pushFile(infilename); - assign(outfile,outfilename); rewrite(outfile); - assign(stylefile,stylefilename); reset(stylefile); teststyle := ioresult; - if (teststyle<>0) and (stylefilename<>'mtxstyle.txt') then - writeln('Can''t read ',stylefilename); -{$I+} - if fileError then fatalError('Input file '+infilename+' not found'); - outfile_open := true; writeln('Writing to ',basename,'.pmx'); -end; - -procedure CloseFiles; -begin close(outfile); closeAll; if teststyle=0 then close(stylefile); -end; - -procedure readParagraph (var P: paragraph; var no: line_nos; - var L: paragraph_index0); - var another: boolean; - filename, buffer: string; -begin - L:=0; buffer:=readData; line_no:=currentLineNo; - if isEmpty(buffer) then exit; - if debugMode then writeln('>>>> ',buffer); - inc(paragraph_no); -{ Handle directives affecting the processing of the input file } - repeat another:=false; - if startsWithIgnoreCase(buffer,'SUSPEND') then - begin ignore_input:=true; another:=true; if beVerbose then - writeln('-->> Suspending input file ',currentFilename, - ' at line ', line_no); - end; - if startsWithIgnoreCase(buffer,'RESUME') then - begin ignore_input:=false; another:=true; if beVerbose then - writeln('-->> Resuming input file ',currentFilename, - ' at line ', line_no); - end; - if startsWithIgnoreCase(buffer,'INCLUDE:') then - begin predelete(buffer,8); filename:=nextWord(buffer,' ',' '); - pushfile(filename); another:=true; - end; - if another then begin buffer:=readLine; line_no:=currentLineNo; end; - until not another; -{ Normal paragraph input} - repeat - if L> ', buffer); - until isEmpty(buffer); - skipBlanks; { needed to identify final paragraph } -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/globals.c b/Build/source/utils/mtx/mtx-0.60d/globals.c deleted file mode 100644 index eba3ab3e00d..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/globals.c +++ /dev/null @@ -1,348 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "globals.pas" */ - - -#include "p2c.h" - - -#define GLOBALS_G -#include "globals.h" - - -Char double_comment[3] = "%%"; -Char durations[ndurs + 1] = "90248136"; -Char terminators[256] = ".x"; -Char has_duration[9] = "abcdefgr"; -Char solfa_names[8] = "drmfslt"; -Char choice = ' '; -boolean outfile_open = false; -Char texdir[256] = ""; -Char old_meter_word[256] = ""; -short outlen = 0; -boolean ignore_input = false; - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -boolean isNoteOrRest(w) -Char *w; -{ - return (pos1(w[0], has_duration) > 0); -} - - -boolean isPause(note) -Char *note; -{ - return (startsWith(note, pause)); -} - - -Void cancel(num, denom, lowest) -short *num, *denom, lowest; -{ - while (((*num) & 1) == 0 && *denom > lowest) { - *num /= 2; - *denom /= 2; - } -} - - -Char *meterWord(Result, num, denom, pnum, pdenom) -Char *Result; -short num, denom, pnum, pdenom; -{ - Char STR1[256], STR2[256], STR4[256], STR5[256]; - - sprintf(Result, "m%s/%s/%s/%s", - toString(STR1, num), toString(STR2, denom), toString(STR4, pnum), - toString(STR5, pdenom)); - return Result; -} - - -Char *meterChange(Result, n1, n2, blind) -Char *Result; -short n1, n2; -boolean blind; -{ - short f = 64; - short l; - - if (!blind) - return (meterWord(Result, n1, PMXmeterdenom(n2), 0, 0)); - /* CMO: process denominator value with function PMXmeterdenom */ - l = n1 * (64 / n2); - cancel(&l, &f, meterdenom); - /* CMO: process denominator value with function PMXmeterdenom */ - meterWord(Result, l, PMXmeterdenom(f), 0, 0); - if (meternum > 0) - printf("Blind meter change to %d/%d on line %d\n", l, f, line_no); - return Result; -} - - -Void setSpace(line_) -Char *line_; -{ - Char line[256]; - short i = 0; - Char word[256]; - - strcpy(line, line_); - while (i < ninstr) { - GetNextWord(word, line, blank, dummy); - if (*word == '\0') - return; - i++; - getNum(word, &nspace[i-1]); - } -} - - -Static Void onumber(s, j, n1) -Char *s; -short *j, *n1; -{ - if (s[*j - 1] == 'o') - *n1 = 1; - else if (s[*j - 1] == '1') { - *n1 = digit(s[*j]) + 10; - (*j)++; - } else - *n1 = digit(s[*j - 1]); - (*j)++; -} - - -Static Void extractNumber(s, k) -Char *s; -short *k; -{ - Char w[256]; - - GetNextWord(w, s, '/', dummy); - getNum(w, k); -} - - -Static Void readMeter(meter_, meternum, meterdenom, pmnum, pmdenom) -Char *meter_; -short *meternum, *meterdenom, *pmnum, *pmdenom; -{ - Char meter[256]; - short j; - - strcpy(meter, meter_); - if (meter[0] == 'm') { - if (pos1('/', meter) == 0) { - j = 2; - onumber(meter, &j, meternum); - onumber(meter, &j, meterdenom); - onumber(meter, &j, pmnum); - onumber(meter, &j, pmdenom); - return; - } - predelete(meter, 1); - extractNumber(meter, meternum); - extractNumber(meter, meterdenom); - extractNumber(meter, pmnum); - extractNumber(meter, pmdenom); - return; - } - getTwoNums(meter, meternum, meterdenom); - *pmnum = *meternum; - *pmdenom = *meterdenom; -} - - -Void getMeter(line_, meternum, meterdenom, pmnum, pmdenom) -Char *line_; -short *meternum, *meterdenom, *pmnum, *pmdenom; -{ - Char line[256]; - Char meter[256]; - Char STR1[256]; - - strcpy(line, line_); - GetNextWord(meter, line, blank, dummy); - if (!strcmp(meter, "C/") || !strcmp(meter, "mC/")) { - *meternum = 2; - *meterdenom = 2; - *pmdenom = 5; - *pmnum = 0; - } else if (!strcmp(meter, "C") || !strcmp(meter, "mC")) { - *meternum = 4; - *meterdenom = 4; - *pmdenom = 6; - *pmnum = 0; - } else - readMeter(meter, meternum, meterdenom, pmnum, pmdenom); - if (*meterdenom == 0) { - sprintf(STR1, "%s: Meter denominator must be nonzero", meter); - error(STR1, print); - } - /* CMO: Convert PMX syntax meter denominator '0' to '1' to be used for - prepmx duration checks */ - /* if meterdenom=0 then meterdenom:=1; */ -} - - -Static short whereInParagraph(l) -short l; -{ - short Result = 0; - short j, FORLIM; - - FORLIM = para_len; - for (j = 1; j <= FORLIM; j++) { - if (orig_line_no[j-1] == l) - return j; - } - return Result; -} - - -Void fatalerror(message) -Char *message; -{ - setFeature("ignoreErrors", false); - error(message, !print); -} - - -Void error(message, printLine) -Char *message; -boolean printLine; -{ - short j; - - printf("%s: ERROR on line %d\n", message, line_no); - j = whereInParagraph(line_no); - if (j > 0 && printLine) - puts(P[j-1]); - if (ignoreErrors()) - return; - if (outfile_open) { - if (outfile != NULL) - fclose(outfile); - outfile = NULL; - outfile = fopen(outfile_NAME, "wb"); - if (outfile == NULL) - _EscIO2(FileNotFound, outfile_NAME); - fclose(outfile); - outfile = NULL; - } - if (line_no == 0) - line_no = 10000; - _Escape(line_no); -} - - -Void warning(message, printLine) -Char *message; -boolean printLine; -{ - short j; - - if (line_no <= 0) { - printf("%s: WARNING in preamble\n", message); - return; - } - printf("%s: WARNING on line %d\n", message, line_no); - if (!printLine) - return; - j = whereInParagraph(line_no); - if (j > 0) - puts(P[j-1]); -} - - -short PMXinstr(stave) -short stave; -{ - return (ninstr - instr[stave-1] + 1); -} - - -Void setDefaultDuration(meterdenom) -short meterdenom; -{ - switch (meterdenom) { - - case 1: - default_duration = '0'; - break; - - case 2: - default_duration = '2'; - break; - - case 4: - default_duration = '4'; - break; - - case 8: - default_duration = '8'; - break; - - case 16: - default_duration = '1'; - break; - - case 32: - default_duration = '3'; - break; - - case 64: - default_duration = '6'; - break; - } -} - - -short PMXmeterdenom(denom) -short denom; -{ - short Result; - - /* CMO: Convert M-Tx meter denominators to PMX syntax */ - switch (denom) { - - case 1: - Result = 0; - break; - - case 16: - Result = 1; - break; - - case 32: - Result = 3; - break; - - case 64: - Result = 6; - break; - - default: - Result = denom; - break; - } - return Result; -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/globals.h b/Build/source/utils/mtx/mtx-0.60d/globals.h deleted file mode 100644 index 1e0988edf25..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/globals.h +++ /dev/null @@ -1,154 +0,0 @@ -/* Header for module globals, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef GLOBALS_H -#define GLOBALS_H - - -#ifdef GLOBALS_G -# define vextern -#else -# define vextern extern -#endif - - -/* 1. All global variables. - 2. Miscellaneous other procedures required by several Units. -*/ - -/* CMO: addition/change by Christian Mondrup */ - - -#define PMXlinelength 128 -/* !!! One or more of the following constants should be reduced if this - program is to be compiled by a 16-bit compiler (e.g. Turbo Pascal), - otherwise you get a "Data segment too large" error */ -#define lines_in_paragraph 100 -#define max_words 128 -#define max_notes 128 -/* Christian Mondrup's suggestion to reduce data segment size: - lines_in_paragraph = 50; - max_words = 64; - max_notes = 64; -*/ -#define max_bars 16 -#define maxstaves 15 -#define maxvoices 15 -#define maxgroups 3 -#define standardPMXvoices 12 - -#define max_lyrics_line_length (PMXlinelength - 4) - -#define inf 32000 -#define unspec 1000 -#define default_size 20 - -#define start_beam '[' -#define stop_beam ']' -#define rest 'r' - -#define pause "rp" - -#define dotcode 'd' -#define grace_group 'G' -#define multi_group 'x' -#define barsym '|' -#define comment '%' -#define blank ' ' -#define dot '.' -#define comma ',' -#define colon ':' -#define tilde '~' -#define atsign '@' -#define dummy '\0' - -#define ndurs 8 - -#define unspecified '5' /* Not a valid duration */ - -#define whole 2 /* position of '0' in durations */ - -#define digits "123456789" -#define digitsdot "0123456789." - -#define putspace true -#define nospace false -#define print true - - -typedef char paragraph_index; - -typedef char voice_index; - -typedef char stave_index; - -typedef char bar_index0; - -typedef uchar word_index0; - -typedef char paragraph_index0; - -typedef char voice_index0; - -typedef char stave_index0; - -typedef Char paragraph[lines_in_paragraph][256]; -typedef short line_nos[lines_in_paragraph]; - - -extern Char double_comment[3]; -extern Char durations[ndurs + 1]; -extern Char terminators[256]; -extern Char has_duration[9]; -extern Char solfa_names[8]; - -extern Char choice; -extern boolean outfile_open; -extern Char texdir[256]; -extern Char old_meter_word[256]; -extern short outlen; -extern boolean ignore_input; -vextern Char voice_label[maxvoices][256]; -vextern Char clef[maxstaves]; -vextern voice_index0 instr[maxstaves], stave[maxstaves], - first_on_stave[maxstaves], number_on_stave[maxstaves]; -vextern short nspace[maxstaves], stave_size[maxstaves]; -vextern voice_index0 nvoices, nstaves, ninstr, bottom, top; -vextern short one_beat, full_bar, line_no, short_note, musicsize, meternum, - meterdenom, pmnum, pmdenom, paragraph_no, bar_no, pickup, nbars, - nleft; -vextern paragraph_index0 para_len; -vextern double xmtrnum0; -vextern paragraph P; -vextern line_nos orig_line_no; -vextern FILE *infile, *outfile, *stylefile; -vextern Char default_duration; -vextern Char fracindent[256], this_version[256], this_version_date[256]; -vextern boolean pmx_preamble_done, first_paragraph, final_paragraph, - must_respace, must_restyle, multi_bar_rest, some_vocal; -vextern Char infile_NAME[_FNSIZE]; -vextern Char outfile_NAME[_FNSIZE]; -vextern Char stylefile_NAME[_FNSIZE]; - - -extern Void error PP((Char *message, int printLine)); -extern Void fatalerror PP((Char *message)); -extern Void warning PP((Char *message, int printLine)); -extern short PMXinstr PP((int stave)); -extern Void setDefaultDuration PP((int meterdenom)); -extern Void getMeter PP((Char *line, short *meternum, short *meterdenom, - short *pmnum, short *pmdenom)); -extern Void setSpace PP((Char *line)); -extern Char *meterChange PP((Char *Result, int n1, int n2, int blind)); -extern Char *meterWord PP((Char *Result, int num, int denom, int pnum, - int pdenom)); -extern Void cancel PP((short *num, short *denom, int lowest)); -extern boolean isNoteOrRest PP((Char *w)); -extern boolean isPause PP((Char *note)); -/* CMO: */ -extern short PMXmeterdenom PP((int denom)); - - -#undef vextern - -#endif /*GLOBALS_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/globals.pas b/Build/source/utils/mtx/mtx-0.60d/globals.pas deleted file mode 100644 index ad53376438f..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/globals.pas +++ /dev/null @@ -1,247 +0,0 @@ -unit globals; - -{ 1. All global variables. - 2. Miscellaneous other procedures required by several Units. -} - -interface - -const PMXlinelength = 128; -{ !!! One or more of the following constants should be reduced if this - program is to be compiled by a 16-bit compiler (e.g. Turbo Pascal), - otherwise you get a "Data segment too large" error } - lines_in_paragraph = 100; - max_words = 128; - max_notes = 128; -{ Christian Mondrup's suggestion to reduce data segment size: - lines_in_paragraph = 50; - max_words = 64; - max_notes = 64; -} - max_bars = 16; - maxstaves = 15; - maxvoices = 15; - maxgroups = 3; - standardPMXvoices = 12; - max_lyrics_line_length = PMXlinelength-4; - inf = 32000; - unspec = 1000; - default_size = 20; - - start_beam = '['; - stop_beam = ']'; - rest = 'r'; - pause = 'rp'; - dotcode = 'd'; - grace_group = 'G'; - multi_group = 'x'; - barsym = '|'; - comment = '%'; - double_comment: string[2] = '%%'; - blank = ' '; - dot = '.'; - comma = ','; - colon = ':'; - tilde = '~'; - atsign = '@'; - dummy = #0; - - ndurs = 8; - durations: string[ndurs] = '90248136'; - unspecified = '5'; { Not a valid duration } - whole = 2; { position of '0' in durations } - terminators: string = '.x'; - digits = '123456789'; - digitsdot = '0123456789.'; - has_duration: string[8] = 'abcdefgr'; - solfa_names: string[7] = 'drmfslt'; - - choice: char = ' '; - outfile_open: boolean = false; - texdir: string = ''; - old_meter_word: string = ''; - outlen: integer = 0; - putspace = true; - nospace = false; - ignore_input: boolean = false; - print = true; - -type - paragraph_index = 1..lines_in_paragraph; - voice_index = 1..maxvoices; - stave_index = 1..maxstaves; - bar_index0 = 0..max_bars; - word_index0 = 0..max_words; - paragraph_index0 = 0..lines_in_paragraph; - voice_index0 = 0..maxvoices; - stave_index0 = 0..maxstaves; - paragraph = array[paragraph_index] of string; - line_nos = array[paragraph_index] of integer; - -var voice_label: array[voice_index] of string; - clef: array[stave_index] of char; - instr, stave, first_on_stave, number_on_stave: - array[stave_index] of voice_index0; - nspace, stave_size: array[stave_index] of integer; - nvoices, nstaves, ninstr, bottom, top: voice_index0; - one_beat, full_bar, line_no, short_note, musicsize, - meternum, meterdenom, pmnum, pmdenom, paragraph_no, - bar_no, pickup, nbars, nleft: integer; - para_len: paragraph_index0; - xmtrnum0: real; - P: paragraph; - orig_line_no: line_nos; - infile, outfile, stylefile: text; - default_duration: char; - fracindent, this_version, this_version_date: string; - pmx_preamble_done, first_paragraph, final_paragraph, must_respace, - must_restyle, multi_bar_rest, some_vocal: boolean; - -procedure error(message: string; printLine: boolean); -procedure fatalerror(message: string); -procedure warning(message: string; printLine: boolean); -function PMXinstr (stave: integer): integer; -procedure setDefaultDuration(meterdenom: integer); -procedure getMeter(line: string; - var meternum, meterdenom, pmnum, pmdenom: integer); -procedure setSpace(line: string); -function meterChange(n1, n2: integer; blind: boolean): string; -function meterWord (num, denom, pnum, pdenom: integer): string; -procedure cancel(var num,denom: integer; lowest: integer); -function isNoteOrRest(w: string): boolean; -function isPause(note: string): boolean; - -implementation uses strings, control, utility; - -function isNoteOrRest(w: string): boolean; -begin isNoteOrRest := pos1(w[1],has_duration)>0; end; - -function isPause(note: string): boolean; -begin isPause:=startsWith(note,pause); end; - -procedure cancel(var num,denom: integer; lowest: integer); -begin while (num mod 2 = 0) and (denom>lowest) do - begin num:=num div 2; denom:=denom div 2; end; -end; - -function meterWord (num,denom,pnum,pdenom: integer): string; -begin meterWord := 'm' + toString(num) + '/' + toString(denom) + - '/' + toString(pnum) + '/' + toString(pdenom); -end; - -function meterChange(n1, n2: integer; blind: boolean): string; - var f, l: integer; -begin - if blind then - begin f:=64; l:=n1 * (64 div n2); - cancel(l,f,meterdenom); meterChange := meterWord (l,f,0,0); - if meternum>0 then - writeln('Blind meter change to ', l, '/', f, ' on line ', line_no); - end - else meterChange := meterWord(n1,n2,0,0); -end; - -procedure setSpace(line: string); - var i: integer; - word: string; - begin i:=0; - while i0) and printline then writeln(P[j]); - if not ignoreErrors then - begin if outfile_open then - begin close(outfile); rewrite(outfile); close(outfile); end; - if line_no=0 then line_no:=10000; - halt(line_no); - end; -end; - -procedure warning(message: string; printline: boolean); - var j: integer; -begin - if line_no>0 then - begin writeln (message, ': WARNING on line ', line_no); - if not printline then exit; - j:=whereInParagraph(line_no); if j>0 then writeln(P[j]) - end - else writeln (message, ': WARNING in preamble'); -end; - -function PMXinstr (stave: integer): integer; -begin PMXinstr := ninstr + 1 - instr[stave]; end; - -procedure setDefaultDuration(meterdenom: integer); -begin - case meterdenom of - 1: default_duration:='0'; - 2: default_duration:='2'; - 4: default_duration:='4'; - 8: default_duration:='8'; - 16: default_duration:='1'; - 32: default_duration:='3'; - 64: default_duration:='6'; - end; -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/libp2c/COPYING b/Build/source/utils/mtx/mtx-0.60d/libp2c/COPYING deleted file mode 100644 index e77696ae8dd..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/libp2c/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 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. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, 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 software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, 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 redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -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 give any other recipients of the Program a copy of this License -along with the Program. - -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 Program or any portion -of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -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 Program, 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 Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) 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; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, 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 executable. 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. - -If distribution of executable or 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 counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. 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 Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program 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. - - 7. 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 Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program 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 Program. - -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. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program 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. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 Program -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 Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, 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 - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. 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. - - - Copyright (C) 19yy - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/Build/source/utils/mtx/mtx-0.60d/libp2c/ChangeLog b/Build/source/utils/mtx/mtx-0.60d/libp2c/ChangeLog deleted file mode 100644 index 17e4bc2dbc5..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/libp2c/ChangeLog +++ /dev/null @@ -1,390 +0,0 @@ -Wed Mar 10 15:03:20 1999 Alexander L. Belikoff - - * src/p2c.h: DOUBLE defined as double - -Tue Mar 31 14:57:26 1998 Alexander L. Belikoff - - * src/trans.h: - Magic limits (MININT, MAXINT), causing random p2c bugs on the Alpha replaced - with LONG-MIN/MAX from limits.h (integers in Pascal include longs in C, - according to p2c) - -Tue Sep 23 09:14:22 1997 Harvey J. Stein - - * src/p2c.proto, src/funcs.c, src/p2c.hdrs: - Adjustments to get pad to work correctly. - -Thu Jul 3 20:41:55 1997 Harvey J. Stein - - * src/p2c.proto, src/sys.p2crc, src/trans.h, src/expr.c, src/funcs.c, src/p2c.hdrs: - Bug: Consider: - - procedure foo(x: array[i..j : integer] of varying[k] of char); - ... - var z : array[3..12] of varying[20] of char; - ... - foo(z); - - This should become something like: - - foo(int i, int j, int k, char x[j-i+1][k]) - ... - char z[10][20]; - ... - foo(3, 12, 20, z); - - Instead, it was generating: - - foo(3, 12, 255, z); - - which totally screws up accessing z. - - Analysis: To do this correctly, p2c has to keep dereferencing z as it - processes the hidden arguments i, j, & k so that it's working on an - expression of the appropriate type each time it tries to find either - the size of the string or the start & end points of arrays. Instead, - it just wasn't. - - Fix done: I couldn't figure out exactly how to do the above. But, p2c - calls strmax_func to get the length of the character string. I just - built some additional dereferencing into it so that it gets the - correct length in the above sort of situation. So, changed - strmax_func in expr.c. - - - Bug: Index(x,y) is a common pascal extension for finding a substring - in a string. p2c handles it but it wasn't working right on Dec code. - - Analysis: Some dialects of pascal consider x to be the string and y - to be the substring. Others switch x & y. p2c supports (substring, - string), and Dec pascal supports the opposite. - - Fix: There was some support for switching index argument order, but it - was tightly coupled to HP compiler directive support. I added a - comment switch ("IndexOrder") for additional control of this feature. - Changed func_strpos in funcs.c, and added the switch in trans.h. - -Fri Jun 13 07:22:26 1997 Harvey J. Stein - - * src/p2c.hdrs, src/p2c.proto, src/pexpr.c, src/decl.c, src/funcs.c: - Fixed bug in [truncate] handling - I didn't clear the new Meaning - fields (fakenumargs & truncated) at meaning creation time, so they - were sometimes showing up on non-truncated variables. Changed - initmeaning (decl.c). - - Moved hidden number_of_args from beginning to end of arg list. At the - beginning it was interfering with the return hidden variable, - causing return to not be generated. Changes were in p_funcdecl - (decl.c), func_present (funcs.c), and p_funcarglist (pexpr.c). Added - has_truncate function to pexpr.c to check whether an arg list has the - truncated attribute. - - Argument variables were sometimes getting shadowed just because - they're initialized. Problem was in var_reference, which clones - Meanings that have constdefns. But arg variables don't need to be - cloned since the constants are handled by p_funcarglist. So skipped - cloning if Meaning's kind is MK_PARAM or MK_VARPARAM. Previous fix of - always cloning, but only copying meanings if not MK_PARAM seems to - have been incorrect. - -Sun Jun 1 13:15:06 1997 Harvey J. Stein - - * src/sys.p2crc, src/trans.h, src/pexpr.c, src/parse.c, src/lex.c, src/p2c.hdrs, src/p2c.proto, src/funcs.c, src/decl.c: - Enhancements: - - Added support for [truncate]. This involved: - 1. Added a truncated flag & a fakenumargs flag to the Meaning - structure. - 2. In p_funcdecl (decl.c), recognizing the [truncate] attribute in - argument lists. If it's seen, the argument's truncated flag is - set, and it and all arguments following are given default values - (assuming that they don't already have default values). The - default values gets p2c to automatically generate the correct - number of arguments for calling the subroutine when some are - left out. - 3. In p_funcdecl (decl.c), if any of the args are tagged with - [truncate], then add a hidden argument to the front of the - argument list - number_of_args. Flag it with fakenumargs. - 4. In p_funcarglist (pexpr.c), when the fcn has a fakenumargs - parameter as the first parameter, (and truncateisdefalt is zero) - compute the index of the last argument supplied, and pass it as - the first argument in the call. - 5. In funcs.c, added func_present to handle the PRESENT(x) calls. - It parses the call, figures out the index of the argument in the - fcns calling sequence (say n), and generates an expression - (number_of_args >= n) to be the output for the PRESENT(x) call. - 6. Added new config parameter - TruncateIsDefault to turn off - PRESENT support (in case one doesn't want the extra arg to be - generated). - - Added support for CONTINUE & BREAK. Just had to basically declare - them as keywords in lex.c, and recognize them in parse.c, and declare - their tokens in trans.h (since p2c already supported them internally). - - Added descriptions for SkipReIncludes, NoOutput, and TruncateIsDefault - to sys.p2crc. - - Bug fixes: - - Bug: args with default values which are also used in local functions - lose their default values. - - Attempted fix: in var_reference (pexpr.c), don't zero out the - constdefn when the arg is cloned if the arg is a parameter. - - Problems: This works, but it sometimes causes bogus declarations of - the old variable to be output. - -Wed May 14 14:27:32 1997 Harvey J. Stein - - * src/stuff.c, src/p2c.hdrs, src/p2c.proto, src/out.c, src/expr.c, p2c.patch: - (Updated p2c.patch for last set of changes) - - Bug: p2c was seg faulting when given expressions such as: - there := - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'; - - and: - - there := - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + - '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' + where; - - when there is VARYING [XXX] OF CHAR; - - Analysis: There seem to be all sorts of fixed length character arrays - around the code. It seems that especially long expressions and/or - character strings can cause them to overflow. - - Fix: I upped some of the limits, which at least avoided core dumps on - the code I'm currently processing, but really one needs to go through - and properly keep track of the amount copied into strings so as to - avoid buffer overruns. But, this is a real pain in the ass because of - the shitty semantics of the standard C library. - - Basically, the stack allocated ones that I noticed in expr.c and out.c - I upped to length 2000, and in stuff.c, I upped the size of the - strings in formatbuf[] to 4000. - -Tue May 13 19:27:00 1997 Harvey J. Stein - - * src/lex.c, src/p2c.hdrs, src/p2c.proto, src/trans.c, src/Makefile, src/decl.c, src/expr.c, src/funcs.c: - Minor fixes/changes: - -Was calling close in handle_include (lex.c) when it should have - been fclose. - -Modified src/Makefile to allow for using insure on the source code - (to catch memory bugs). - - - Major fixes: - - Bug: p2c occasionally was freeing memory that was already freed. - - Analysis: This seems to occur sometimes on constant string - definitions because mp->val.s might point to the same string as - mp->constdefn->val.s, and forget_ctx tries to free them both. - - Fix: In decl.c, in forget_ctx: After calling free_value(&mp->val) when - mp->kind == MK_CONST, instead of always calling - freexpr(mp->constdefn), only call it when mp->kind != MK_CONST, - or when mp->constdefn->val.s != mp->val.s. - - I also tried to fix this by copying mp->val.s in p_constdecl when - creating mp->constdefn->val.s, but never got this to work - correctly, so I commented it out. - - - Bug: p2c core dumped on: - - readv(data, short_string); - - when data is a packed array[1..7] of char, and - short_string is a packed array[1..3] of char. - - Analysis: What was happening was that in handleread_text (funcs.c), - when the readv argument is an array, it was checking - ord_range(ex->val.type->indextype, ...), and ex was NULL. - - Fix: It seems like this was a typo, so I change it to check - var->... instead of ex->... - - - Bug: p2c core dumped on: - - WRITELN('%SQLMOD ', msg); - - when msg was of type varying[x] of char. - - Analysis: Some part of the code was converting the above string to - "%%SQLMOD %s". It seems that cleansprintf (from expr.c) didn't - realize that % is escaped by %%, so it thought that there should - be 2 arguments (maybe 3?) for the above printf string instead of - one, and thus was going off of the end of the args list (i.e. - - ex->args[j] out of range). - - Fix: Inside the for loop, if the next character is also a %, then - skip arg processing, and skip the next character (just copy it - into fmtbuf). - - - Bug: p2c core dumps on: - - readv(c, i); - - when c is a char and i is an integer. - - Analysis: In funcs.c, in handleread_text, var is never getting - initialized - it's getting passed in as NULL, and it only gets - set if isstrread is true. Since c is a char, fex->val.type->kind - is TK_CHAR, not TK_STRING, so isstrread is false, so var fails to - get initialized. - - Fix: After the case that var is set when isstrread is true, if it's - still NULL, we set it to p_expr(NULL). This prevents the core - dump, but produces incorrect code! It outputs: - - fscanf(c, "%ld", &i); - - when it should more likely be something along the lines of - sscanf(&c, ...) (but safer). - -Mon May 5 15:23:04 1997 Harvey J. Stein - - * src/out.c, src/p2c.hdrs, src/p2c.proto, src/trans.h, src/decl.c, src/lex.c, p2c.patch: - New features (out.c, trans.h): - New parameter NoOutput - setting it to 1 stops p2c from generating - output. Useful when trying to simulate Dec style modules via - include files - just convert INHERIT to %include, and put - {*NoOutput=1} at the top of each include file, and p2c does the - right thing. This was done by not pushing characters into the - output stream when nooutput is 1. The real code changes occur in - out.c, in putc_outf, and puts_outf. Accumulating the output, but - turning off writes (i.e. - wiring it into flush_outfilebuf) failed - because of timing differences btw when comment directives are - processed and when output occurs. - - Bug fixes: - - Bug: Some variable declarations weren't getting output. Most - noticable were the automatically generated Return variables. - - Analysis: When using the {INTF-ONLY} directive in include files - then the fwd declaration of fcns was being interpreted as the fcn - definition, and so the variables generated when the declaration was - seen were marked as "wasdeclared". Then, when the code for the - function was being generated, these variables weren't getting - output because "wasdeclared" was 1. This was most visible from the - automatically generated Return variable, but occasionally happened - to other variables. - - Fix: in decl.c:activatemeaning - added resetting of "wasdeclared" - if we can identify that the variable is the autogenerated return - variable. Detected them by snarfing code from isretvar. But this - was a lousy fix because as mentioned above, there are other - variables which are occasionally affected. And, it's no longer - needed because of the new NoOutput feature, so I commented out the - change, but left the code there as a reminder of the problem. - - - Bug: Comments weren't getting output in the correct places. This - is a serious problem when using {EMBED comments to insert C code - into the output stream. Sometimes code from the {EMBED comment - given in an include file showed up in the includer. Sometimes the - code didn't get emitted at all because of mistiming against - {nooutput} directives. - - Analysis: p2c builds up a comment string structure as it parses - the code, and hangs it off of the code's internal representation. - Presumably this is so that when doing code transformations, the - comments are output in the correct places. However, this seems to - sometimes fail when using %include files. It seems that the - comments weren't getting processed & output until the current block - was finished. Included files don't start a new block because one - could conceivably include random snippets of code anywhere you want - (inside of RECORD declarations, for example). Thus, sometimes - comments from inside the include file don't get processed & output - until well after the include file itself is finished being - processed. - - Fix: Added the call flushcomments(NULL, -1, -1) to both push_input - and pop_input (in lex.c). This seems to have fixed it with no - noticable side effects. - -Tue Apr 29 18:36:51 1997 Harvey J. Stein - - * src/p2c.hdrs, src/p2c.proto, src/lex.c: - Added recognition of AND_THEN and OR_ELSE. - - * src/trans.h, src/lex.c, src/p2c.hdrs, src/p2c.proto: - Added tracking of files that have been included so that they can - optionally be ignored the second time they're seen. This is needed - because a module (say X) can inherit from two other modules (say Y and - Z), both of whom inherit from a fourth module (say Z). Converting the - inherits to includes thus gets Z included twice. If it's not ignored, - it causes p2c to start renaming procedures so as to avoid name - clashes. - - Added an rc file parameter (skipreincludes) for controling the above - action. - - * src/decl.c, src/p2c.hdrs, src/p2c.proto, src/parse.c: - Various adjustments & bug fixes suggested by Dave Gillespie: - - decl.c: Call format_s so that we work with a copy of the string - when removing dollar signs - a little more robust. - - Missing ! on strcicmp caused bogus externs to be emitted on - some variable declarations. - - parse.c: Sprinkle afew p_attributes around p_block so that p2c - properly parses attributes in front of declaration blocks. - In particular, this fixes the problem where p2c was choking - on [hidden] followed by TYPE, which appears in analytic.pas. - -Wed Apr 23 12:17:08 1997 Harvey J. Stein - - * src/p2c.proto, src/decl.c, src/p2c.hdrs: - Modified addfield so that it removes dollar signs from record field - identifiers. This is more consistent with the handling of other - identifiers, and also needed by much of the Pascal code. - -Mon Apr 21 10:41:53 1997 Harvey J. Stein - - * p2c.patch: Submitted new patch to Dave G. - - * src/p2c.proto, src/lex.c, src/p2c.cat, src/p2c.hdrs, src/Makefile: - Changed VALUE from a keyword to a possible keyword when working with - Dec Pascal code. Original code set it to be a keyword for Dec, and a - possible keyword otherwise. However, if it's a keyword, then p2c - doesn't accept it the name of a slot in a record. Since Dec accepts - this usage, I figured that VALUE should always be a possible keyword - instead of a keyword. - -Thu Apr 17 11:33:22 1997 Harvey J. Stein - - * p2c.patch: patches generated & mailed to Dave Gillespie - -Wed Apr 16 16:26:07 1997 Harvey J. Stein - - * src/p2c.hdrs, src/p2c.proto, .cvsignore, examples/.cvsignore, src/.cvsignore, src/decl.c, src/p2c.cat: - Parser didn't expect a ( after the OTHERWISE keyword. Modified - decl.c to expect it. - - * src/INSTALL, src/citmods.c, src/comment.c, src/decl.c, src/dir.c, src/expr.c, src/funcs.c, src/hpmods.c, src/lex.c, src/loc.p2clib.c, src/loc.p2crc, src/makeproto.c, src/out.c, src/p2c.cat, src/p2c.h, src/p2c.hdrs, src/p2c.proto, src/p2cc.cat, src/p2cc.man, src/p2cc.perl, src/p2clib.c, src/parse.c, src/pexpr.c, src/string.pas, src/system.imp, src/system.m2, src/trans.h, src/turbo.imp: - Import of p2c 1.21alpha2 - - * src/INSTALL, src/citmods.c, src/comment.c, src/decl.c, src/dir.c, src/expr.c, src/funcs.c, src/hpmods.c, src/lex.c, src/loc.p2clib.c, src/loc.p2crc, src/makeproto.c, src/out.c, src/p2c.cat, src/p2c.h, src/p2c.hdrs, src/p2c.proto, src/p2cc.cat, src/p2cc.man, src/p2cc.perl, src/p2clib.c, src/parse.c, src/pexpr.c, src/string.pas, src/system.imp, src/system.m2, src/trans.h, src/turbo.imp: - Initial revision - - * HP/import/asm.imp, HP/import/fs.imp, HP/import/general_0.imp, HP/import/general_1.imp, HP/import/general_2.imp, HP/import/general_3.imp, HP/import/general_4.imp, HP/import/hpib_0.imp, HP/import/hpib_1.imp, HP/import/hpib_2.imp, HP/import/hpib_3.imp, HP/import/iodecl.imp, HP/import/misc.imp, HP/import/rnd.imp, HP/import/sysdevs.imp, HP/import/sysglobals.imp, HP/include/asm.h, HP/include/fs.h, HP/include/general_0.h, HP/include/general_1.h, HP/include/general_2.h, HP/include/general_3.h, HP/include/general_4.h, HP/include/hpib_0.h, HP/include/hpib_1.h, HP/include/hpib_2.h, HP/include/hpib_3.h, HP/include/iodecl.h, HP/include/misc.h, HP/include/rnd.h, HP/include/sysdevs.h, HP/include/sysglobals.h, Makefile, README, examples/Makefile, examples/README, examples/basic.doc, examples/basic.p, examples/c/basic.c, examples/c/cref.c, examples/c/e.c, examples/c/fact.c, examples/c/self.c, examples/cref.p, examples/e.p, examples/fact.p, examples/p2crc, examples/self.p, ftp.README, src/COPYING, src/HISTORY, src/Makefile, src/NOTES, src/README, src/p2c.man, src/stuff.c, src/sys.p2crc, src/trans.c: - Import of p2c 1.21alpha2 - - * HP/import/asm.imp, HP/import/fs.imp, HP/import/general_0.imp, HP/import/general_1.imp, HP/import/general_2.imp, HP/import/general_3.imp, HP/import/general_4.imp, HP/import/hpib_0.imp, HP/import/hpib_1.imp, HP/import/hpib_2.imp, HP/import/hpib_3.imp, HP/import/iodecl.imp, HP/import/misc.imp, HP/import/rnd.imp, HP/import/sysdevs.imp, HP/import/sysglobals.imp, HP/include/asm.h, HP/include/fs.h, HP/include/general_0.h, HP/include/general_1.h, HP/include/general_2.h, HP/include/general_3.h, HP/include/general_4.h, HP/include/hpib_0.h, HP/include/hpib_1.h, HP/include/hpib_2.h, HP/include/hpib_3.h, HP/include/iodecl.h, HP/include/misc.h, HP/include/rnd.h, HP/include/sysdevs.h, HP/include/sysglobals.h, Makefile, README, examples/Makefile, examples/README, examples/basic.doc, examples/basic.p, examples/c/basic.c, examples/c/cref.c, examples/c/e.c, examples/c/fact.c, examples/c/self.c, examples/cref.p, examples/e.p, examples/fact.p, examples/p2crc, examples/self.p, ftp.README, src/COPYING, src/HISTORY, src/Makefile, src/NOTES, src/README, src/p2c.man, src/stuff.c, src/sys.p2crc, src/trans.c: - Initial revision - diff --git a/Build/source/utils/mtx/mtx-0.60d/libp2c/Makefile.am b/Build/source/utils/mtx/mtx-0.60d/libp2c/Makefile.am deleted file mode 100644 index fd208029eef..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/libp2c/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -noinst_LIBRARIES = libp2c.a -libp2c_a_SOURCES = p2c.h p2clib.c diff --git a/Build/source/utils/mtx/mtx-0.60d/libp2c/README b/Build/source/utils/mtx/mtx-0.60d/libp2c/README deleted file mode 100644 index 47a102c88d2..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/libp2c/README +++ /dev/null @@ -1,31 +0,0 @@ - -This directory contains "p2c", a Pascal to C translator. - -"p2c" Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. - -Written and maintained by: Dave Gillespie - c/o Synaptics, Inc. - 2698 Orchard Parkway - San Jose CA 95134 - daveg@synaptics.com, uunet!synaptx!daveg - - -This program is distributed under the terms of the GNU License Agreement. -See the file src/COPYING for details. - -The GNU License Agreement restrictions do _not_ apply to code generated -by p2c, nor to the p2c run-time files "p2clib.c" and "p2c.h". - -NO WARRANTY: - The program in this directory was developed for internal use at - Caltech and thus absolutely no guarantee is made that the program - will compile or run on other systems or that it will produce correct - code. P2c is _not_ a compiler, it is a translator; it strives to - produce correct code but reserves the right to sacrifice correctness - in extreme cases for readability in the general case. P2c is designed - to be extended (see funcs.c, hpmods.c and citmods.c for examples), but - some of the main code is pretty messy since the translator has grown - considerably beyond its original planned scale. Bug reports are - welcome at daveg@synaptics.com, but I may not have time to respond - to them immediately. Suggestions are welcome, too! - diff --git a/Build/source/utils/mtx/mtx-0.60d/libp2c/p2c.h b/Build/source/utils/mtx/mtx-0.60d/libp2c/p2c.h deleted file mode 100644 index c8216a6002c..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/libp2c/p2c.h +++ /dev/null @@ -1,533 +0,0 @@ -#ifndef P2C_H -#define P2C_H - - -/* Header file for code generated by "p2c", the Pascal-to-C translator */ - -/* "p2c" Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation. - * By Dave Gillespie, daveg@synaptics.com. Version 1.21alpha-07.Dec.93. - * This file may be copied, modified, etc. in any way. It is not restricted - * by the licence agreement accompanying p2c itself. - */ - - -#include - -#define DOUBLE double - - - -/* If the following heuristic fails, compile -DBSD=0 for non-BSD systems, - or -DBSD=1 for BSD systems. */ - -#ifdef M_XENIX -# define BSD 0 -#endif - -#ifdef vms -# define BSD 0 -# ifndef __STDC__ -# define __STDC__ 1 -# endif -#endif - -#ifdef __TURBOC__ -# define MSDOS 1 -#endif - -#ifdef MSDOS -# define BSD 0 -#endif - -#ifdef FILE /* a #define in BSD, a typedef in SYSV (hp-ux, at least) */ -# ifndef BSD /* (a convenient, but horrible kludge!) */ -# define BSD 1 -# endif -#endif - -#ifdef BSD -# if !BSD -# undef BSD -# endif -#endif - - -#if (defined(__STDC__) && !defined(M_XENIX)) || defined(__TURBOC__) -# include -# include -# define HAS_STDLIB -# if defined(vms) || defined(__TURBOC__) -# define NON_ANSI_CAT -# endif -#else -# ifndef BSD -# ifndef __TURBOC__ -# include -# endif -# endif -# ifdef hpux -# ifdef _INCLUDE__STDC__ -# include -# include -# define HAS_STDLIB -# endif -# endif -# include -# if !defined(MSDOS) || defined(__TURBOC__) -# define NON_ANSI_CAT -# endif -#endif - -#if defined(NON_ANSI_CAT) && !defined(ANSI_CAT) -# ifdef NON_ANSI_CAT_ALTERNATE -# define __CAT__(a,b)a/**/b -# else -# define __ID__(a)a -# define __CAT__(a,b)__ID__(a)b -# endif -#else -# define __CAT__(a,b)a##b -#endif - - -#ifdef BSD -# include -# define memcpy(a,b,n) (bcopy(b,a,n),a) -# define memcmp(a,b,n) bcmp(a,b,n) -# define strchr(s,c) index(s,c) -# define strrchr(s,c) rindex(s,c) -#else -# include -#endif - -#include -#include -#include -#include - - -#ifndef NO_LACK -#ifdef vms - -#define LACK_LABS -#define LACK_MEMMOVE -#define LACK_MEMCPY - -#else - -#define LACK_LABS /* Undefine these if your library has these */ -#define LACK_MEMMOVE - -#endif -#endif - - -typedef struct __p2c_jmp_buf { - struct __p2c_jmp_buf *next; - jmp_buf jbuf; -} __p2c_jmp_buf; - - -/* Warning: The following will not work if setjmp is used simultaneously. - This also violates the ANSI restriction about using vars after longjmp, - but a typical implementation of longjmp will get it right anyway. */ - -#ifndef FAKE_TRY -# define TRY(x) do { __p2c_jmp_buf __try_jb; \ - __try_jb.next = __top_jb; \ - if (!setjmp((__top_jb = &__try_jb)->jbuf)) { -# define RECOVER(x) __top_jb = __try_jb.next; } else { -# define RECOVER2(x,L) __top_jb = __try_jb.next; } else { \ - if (0) { L: __top_jb = __try_jb.next; } -# define ENDTRY(x) } } while (0) -#else -# define TRY(x) if (1) { -# define RECOVER(x) } else do { -# define RECOVER2(x,L) } else do { L: ; -# define ENDTRY(x) } while (0) -#endif - - - -#ifdef M_XENIX /* avoid compiler bug */ -# define SHORT_MAX (32767) -# define SHORT_MIN (-32768) -#endif - - -/* The following definitions work only on twos-complement machines */ -#ifndef SHORT_MAX -# define SHORT_MAX ((short)(((unsigned short) -1) >> 1)) -# define SHORT_MIN (~SHORT_MAX) -#endif - -#ifndef INT_MAX -# define INT_MAX ((int)(((unsigned int) -1) >> 1)) -# define INT_MIN (~INT_MAX) -#endif - -#ifndef LONG_MAX -# define LONG_MAX ((long)(((unsigned long) -1) >> 1)) -# define LONG_MIN (~LONG_MAX) -#endif - -#ifndef SEEK_SET -# define SEEK_SET 0 -# define SEEK_CUR 1 -# define SEEK_END 2 -#endif - -#ifndef EXIT_SUCCESS -# ifdef vms -# define EXIT_SUCCESS 1 -# define EXIT_FAILURE (02000000000L) -# else -# define EXIT_SUCCESS 0 -# define EXIT_FAILURE 1 -# endif -#endif - - -#define SETBITS 32 - - -#if defined(__STDC__) || defined(__TURBOC__) -# if !defined(vms) && !defined(M_LINT) -# define Signed signed -# else -# define Signed -# endif -# define Void void /* Void f() = procedure */ -# ifndef Const -# define Const const -# endif -# ifndef Volatile -# define Volatile volatile -# endif -# ifdef M_LINT -# define PP(x) () -# define PV() () -typedef char *Anyptr; -# else -# define PP(x) x /* function prototype */ -# define PV() (void) /* null function prototype */ -typedef void *Anyptr; -# endif -#else -# define Signed -# define Void void -# ifndef Const -# define Const -# endif -# ifndef Volatile -# define Volatile -# endif -# define PP(x) () -# define PV() () -typedef char *Anyptr; -#endif - -#ifdef __GNUC__ -# define Inline inline -#else -# define Inline -#endif - -#define Register register /* Register variables */ -#define Char char /* Characters (not bytes) */ - -#ifndef Static -# define Static static /* Private global funcs and vars */ -#endif - -#ifndef Local -# define Local static /* Nested functions */ -#endif - -typedef Signed char schar; -typedef unsigned char uchar; -typedef unsigned char boolean; - -#ifndef NO_DECLARE_ALFA -typedef Char alfa[10]; -#endif - -#ifndef true -# define true 1 -# define false 0 -#endif - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - - -typedef struct { - Anyptr proc, link; -} _PROCEDURE; - -#ifndef _FNSIZE -# define _FNSIZE 120 -#endif - - -extern Void PASCAL_MAIN PP( (int, Char **) ); -extern Char **P_argv; -extern int P_argc; -extern short P_escapecode; -extern int P_ioresult; -extern __p2c_jmp_buf *__top_jb; - - -#ifdef P2C_H_PROTO /* if you have Ansi C but non-prototyped header files */ -extern Char *strcat PP( (Char *, Const Char *) ); -extern Char *strchr PP( (Const Char *, int) ); -extern int strcmp PP( (Const Char *, Const Char *) ); -extern Char *strcpy PP( (Char *, Const Char *) ); -extern size_t strlen PP( (Const Char *) ); -extern Char *strncat PP( (Char *, Const Char *, size_t) ); -extern int strncmp PP( (Const Char *, Const Char *, size_t) ); -extern Char *strncpy PP( (Char *, Const Char *, size_t) ); -extern Char *strrchr PP( (Const Char *, int) ); - -extern Anyptr memchr PP( (Const Anyptr, int, size_t) ); -extern Anyptr memmove PP( (Anyptr, Const Anyptr, size_t) ); -extern Anyptr memset PP( (Anyptr, int, size_t) ); -#ifndef memcpy -extern Anyptr memcpy PP( (Anyptr, Const Anyptr, size_t) ); -extern int memcmp PP( (Const Anyptr, Const Anyptr, size_t) ); -#endif - -extern int atoi PP( (Const Char *) ); -extern double atof PP( (Const Char *) ); -extern long atol PP( (Const Char *) ); -extern double strtod PP( (Const Char *, Char **) ); -extern long strtol PP( (Const Char *, Char **, int) ); -#endif /*P2C_H_PROTO*/ - -#ifndef HAS_STDLIB -#ifndef NO_DECLARE_MALLOC -extern Anyptr malloc PP( (size_t) ); -extern Void free PP( (Anyptr) ); -#endif -#endif - -extern int _OutMem PV(); -extern int _CaseCheck PV(); -extern int _NilCheck PV(); -extern int _Escape PP( (int) ); -extern int _EscIO PP( (int) ); -extern int _EscIO2 PP( (int, Char *) ); - -extern long ipow PP( (long, long) ); -extern long P_imax PP( (long, long) ); -extern long P_imin PP( (long, long) ); -extern double P_rmax PP( (double, double) ); -extern double P_rmin PP( (double, double) ); -extern Char *strsub PP( (Char *, Char *, int, int) ); -extern Char *strltrim PP( (Char *) ); -extern Char *strrtrim PP( (Char *) ); -extern Char *strrpt PP( (Char *, Char *, int) ); -extern Char *strpad PP( (Char *, Char *, int, int) ); -extern int strpos2 PP( (Char *, Char *, int) ); -extern long memavail PV(); -extern int P_peek PP( (FILE *) ); -extern int P_eof PP( (FILE *) ); -extern int P_eoln PP( (FILE *) ); -extern Void P_readpaoc PP( (FILE *, Char *, int) ); -extern Void P_readlnpaoc PP( (FILE *, Char *, int) ); -extern long P_maxpos PP( (FILE *) ); -extern Char *P_trimname PP( (Char *, int) ); -extern long *P_setunion PP( (long *, long *, long *) ); -extern long *P_setint PP( (long *, long *, long *) ); -extern long *P_setdiff PP( (long *, long *, long *) ); -extern long *P_setxor PP( (long *, long *, long *) ); -extern int P_inset PP( (unsigned, long *) ); -extern int P_setequal PP( (long *, long *) ); -extern int P_subset PP( (long *, long *) ); -extern long *P_addset PP( (long *, unsigned) ); -extern long *P_addsetr PP( (long *, unsigned, unsigned) ); -extern long *P_remset PP( (long *, unsigned) ); -extern long *P_setcpy PP( (long *, long *) ); -extern long *P_expset PP( (long *, long) ); -extern long P_packset PP( (long *) ); -extern int P_getcmdline PP( (int, int, Char *) ); -extern Void TimeStamp PP( (int *, int *, int *, - int *, int *, int *) ); -extern Void P_sun_argv PP( (char *, int, int) ); -extern FILE *_skipspaces PP( (FILE *) ); -extern FILE *_skipnlspaces PP( (FILE *) ); - - -/* I/O error handling */ -#define _CHKIO(cond,ior,val,def) ((cond) ? P_ioresult=0,(val) \ - : P_ioresult=(ior),(def)) -#define _SETIO(cond,ior) (P_ioresult = (cond) ? 0 : (ior)) - -/* Following defines are suitable for the HP Pascal operating system */ -#define FileNotFound 10 -#define FileNotOpen 13 -#define FileWriteError 38 -#define BadInputFormat 14 -#define EndOfFile 30 - -#define FILENOTFOUND 10 -#define FILENOTOPEN 13 -#define FILEWRITEERROR 38 -#define BADINPUTFORMAT 14 -#define ENDOFFILE 30 - -/* Creating temporary files */ -#if (defined(BSD) || defined(NO_TMPFILE)) && !defined(HAVE_TMPFILE) -# define tmpfile() (fopen(tmpnam(NULL), "w+")) -#endif - -/* File buffers */ -#define FILEBUF(f,sc,type) sc int __CAT__(f,_BFLAGS); \ - sc type __CAT__(f,_BUFFER) -#define FILEBUFNC(f,type) int __CAT__(f,_BFLAGS); \ - type __CAT__(f,_BUFFER) - -#define RESETBUF(f,type) (__CAT__(f,_BFLAGS) = 1) -#define SETUPBUF(f,type) (__CAT__(f,_BFLAGS) = 0) - -#define GETFBUF(f,type) (*((__CAT__(f,_BFLAGS) == 1 && \ - ((__CAT__(f,_BFLAGS) = 2), \ - fread(&__CAT__(f,_BUFFER), \ - sizeof(type),1,(f)))),\ - &__CAT__(f,_BUFFER))) -#define AGETFBUF(f,type) ((__CAT__(f,_BFLAGS) == 1 && \ - ((__CAT__(f,_BFLAGS) = 2), \ - fread(__CAT__(f,_BUFFER), \ - sizeof(type),1,(f)))),\ - __CAT__(f,_BUFFER)) - -#define PUTFBUF(f,type,v) (GETFBUF(f,type) = (v)) -#define CPUTFBUF(f,v) (PUTFBUF(f,char,v)) -#define APUTFBUF(f,type,v) (memcpy(AGETFBUF(f,type), (v), \ - sizeof(__CAT__(f,_BUFFER)))) - -#define GET(f,type) (__CAT__(f,_BFLAGS) == 1 ? \ - fread(&__CAT__(f,_BUFFER),sizeof(type),1,(f)) : \ - (__CAT__(f,_BFLAGS) = 1)) - -#define PUT(f,type) (fwrite(&__CAT__(f,_BUFFER),sizeof(type),1,(f)), \ - (__CAT__(f,_BFLAGS) = 0)) -#define CPUT(f) (PUT(f,char)) - -#define BUFEOF(f) (__CAT__(f,_BFLAGS) != 2 && P_eof(f)) -#define BUFFPOS(f) (ftell(f) - (__CAT__(f,_BFLAGS) == 2)) - -typedef struct { - FILE *f; - int f_BFLAGS; /* FILEBUFNC(f,Char); */ - Char f_BUFFER; - Char name[_FNSIZE]; -} _TEXT; - -/* Memory allocation */ -#ifdef __GCC__ -# define Malloc(n) (malloc(n) ?: (Anyptr)_OutMem()) -#else -extern Anyptr __MallocTemp__; -# define Malloc(n) ((__MallocTemp__ = malloc(n)) ? __MallocTemp__ : (Anyptr)_OutMem()) -#endif -#define FreeR(p) (free((Anyptr)(p))) /* used if arg is an rvalue */ -#define Free(p) (free((Anyptr)(p)), (p)=NULL) - -/* sign extension */ -#define SEXT(x,n) ((x) | -(((x) & (1L<<((n)-1))) << 1)) - -/* packed arrays */ /* BEWARE: these are untested! */ -#define P_getbits_UB(a,i,n,L) ((int)((a)[(i)>>(L)-(n)] >> \ - (((~(i))&((1<<(L)-(n))-1)) << (n)) & \ - (1<<(1<<(n)))-1)) - -#define P_getbits_SB(a,i,n,L) ((int)((a)[(i)>>(L)-(n)] << \ - (16 - ((((~(i))&((1<<(L)-(n))-1))+1) <<\ - (n)) >> (16-(1<<(n)))))) - -#define P_putbits_UB(a,i,x,n,L) ((a)[(i)>>(L)-(n)] |= \ - (x) << (((~(i))&((1<<(L)-(n))-1)) << (n))) - -#define P_putbits_SB(a,i,x,n,L) ((a)[(i)>>(L)-(n)] |= \ - ((x) & (1<<(1<<(n)))-1) << \ - (((~(i))&((1<<(L)-(n))-1)) << (n))) - -#define P_clrbits_B(a,i,n,L) ((a)[(i)>>(L)-(n)] &= \ - ~( ((1<<(1<<(n)))-1) << \ - (((~(i))&((1<<(L)-(n))-1)) << (n))) ) - -/* small packed arrays */ -#define P_getbits_US(v,i,n) ((int)((v) >> ((i)<<(n)) & (1<<(1<<(n)))-1)) -#define P_getbits_SS(v,i,n) ((int)((long)(v) << (SETBITS - (((i)+1) << (n))) >> (SETBITS-(1<<(n))))) -#define P_putbits_US(v,i,x,n) ((v) |= (x) << ((i) << (n))) -#define P_putbits_SS(v,i,x,n) ((v) |= ((x) & (1<<(1<<(n)))-1) << ((i)<<(n))) -#define P_clrbits_S(v,i,n) ((v) &= ~( ((1<<(1<<(n)))-1) << ((i)<<(n)) )) - -#define P_max(a,b) ((a) > (b) ? (a) : (b)) -#define P_min(a,b) ((a) < (b) ? (a) : (b)) - - -/* Fix ANSI-isms */ - -#ifdef LACK_LABS -# ifndef labs -# define labs my_labs - extern long my_labs PP( (long) ); -# endif -#endif - -#ifdef LACK_MEMMOVE -# ifndef memmove -# define memmove my_memmove - extern Anyptr my_memmove PP( (Anyptr, Const Anyptr, size_t) ); -# endif -#endif - -#ifdef LACK_MEMCPY -# ifndef memcpy -# define memcpy my_memcpy - extern Anyptr my_memcpy PP( (Anyptr, Const Anyptr, size_t) ); -# endif -# ifndef memcmp -# define memcmp my_memcmp - extern int my_memcmp PP( (Const Anyptr, Const Anyptr, size_t) ); -# endif -# ifndef memset -# define memset my_memset - extern Anyptr my_memset PP( (Anyptr, int, size_t) ); -# endif -#endif - -/* Fix toupper/tolower on Suns and other stupid BSD systems */ -#ifdef toupper -# undef toupper -# undef tolower -# define toupper(c) my_toupper(c) -# define tolower(c) my_tolower(c) -#endif - -#ifndef _toupper -# if 'A' == 65 && 'a' == 97 -# define _toupper(c) ((c)-'a'+'A') -# define _tolower(c) ((c)-'A'+'a') -# else -# ifdef toupper -# undef toupper /* hope these are shadowing real functions, */ -# undef tolower /* because my_toupper calls _toupper! */ -# endif -# define _toupper(c) toupper(c) -# define _tolower(c) tolower(c) -# endif -#endif - - -#endif /* P2C_H */ - - - -/* End. */ - - diff --git a/Build/source/utils/mtx/mtx-0.60d/libp2c/p2clib.c b/Build/source/utils/mtx/mtx-0.60d/libp2c/p2clib.c deleted file mode 100644 index 98a00edf41b..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/libp2c/p2clib.c +++ /dev/null @@ -1,1117 +0,0 @@ - -/* Run-time library for use with "p2c", the Pascal to C translator */ - -/* "p2c" Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation. - * By Dave Gillespie, daveg@synaptics.com. Version --VERSION--. - * This file may be copied, modified, etc. in any way. It is not restricted - * by the licence agreement accompanying p2c itself. - */ - - - -#include "p2c.h" - - -#ifndef NO_TIME -# include -#endif - - -#define Isspace(c) isspace(c) /* or "((c) == ' ')" if preferred */ - - - - -int P_argc; -char **P_argv; - -short P_escapecode; -int P_ioresult; - -long EXCP_LINE; /* Used by Pascal workstation system */ - -Anyptr __MallocTemp__; - -__p2c_jmp_buf *__top_jb; - - - - -void PASCAL_MAIN(argc, argv) -int argc; -char **argv; -{ - P_argc = argc; - P_argv = argv; - __top_jb = NULL; - -#ifdef LOCAL_INIT - LOCAL_INIT(); -#endif -} - - - - - -/* In case your system lacks these... */ - -long my_labs(x) -long x; -{ - return((x > 0) ? x : -x); -} - - -#ifdef __STDC__ -Anyptr my_memmove(Anyptr d, Const Anyptr s, size_t n) -#else -Anyptr my_memmove(d, s, n) -Anyptr d, s; -register int n; -#endif -{ - register char *dd = (char *)d, *ss = (char *)s; - if (dd < ss || dd - ss >= n) { -#if defined(bcopy) && defined(memcpy) - my_memcpy(dd, ss, n); -#else - memcpy(dd, ss, n); -#endif - } else if (n > 0) { - dd += n; - ss += n; - while (n-- > 0) - *--dd = *--ss; - } - return d; -} - - -#ifdef __STDC__ -Anyptr my_memcpy(Anyptr d, Const Anyptr s, size_t n) -#else -Anyptr my_memcpy(d, s, n) -Anyptr d, s; -register int n; -#endif -{ - register char *ss = (char *)s, *dd = (char *)d; - while (n-- > 0) - *dd++ = *ss++; - return d; -} - -#ifdef __STDC__ -int my_memcmp(Const Anyptr s1, Const Anyptr s2, size_t n) -#else -int my_memcmp(s1, s2, n) -Anyptr s1, s2; -register int n; -#endif -{ - register char *a = (char *)s1, *b = (char *)s2; - register int i; - while (n-- > 0) - if ((i = (*a++) - (*b++)) != 0) - return i; - return 0; -} - -#ifdef __STDC__ -Anyptr my_memset(Anyptr d, int c, size_t n) -#else -Anyptr my_memset(d, c, n) -Anyptr d; -register int c; -register int n; -#endif -{ - register char *dd = (char *)d; - while (n-- > 0) - *dd++ = c; - return d; -} - - -int my_toupper(c) -int c; -{ - if (islower(c)) - return _toupper(c); - else - return c; -} - - -int my_tolower(c) -int c; -{ - if (isupper(c)) - return _tolower(c); - else - return c; -} - - - - -long ipow(a, b) -long a, b; -{ - long v; - - if (a == 0 || a == 1) - return a; - if (a == -1) - return (b & 1) ? -1 : 1; - if (b < 0) - return 0; - if (a == 2) - return 1L << b; - v = (b & 1) ? a : 1; - while ((b >>= 1) > 0) { - a *= a; - if (b & 1) - v *= a; - } - return v; -} - - -long P_imax(a, b) -long a, b; -{ - if (a > b) - return a; - else - return b; -} - -long P_imin(a, b) -long a, b; -{ - if (a < b) - return a; - else - return b; -} - - -double P_rmax(a, b) -double a, b; -{ - if (a > b) - return a; - else - return b; -} - -double P_rmin(a, b) -double a, b; -{ - if (a < b) - return a; - else - return b; -} - - - - -/* Common string functions: */ - -/* Store in "ret" the substring of length "len" starting from "pos" (1-based). - Store a shorter or null string if out-of-range. Return "ret". */ - -char *strsub(ret, s, pos, len) -register char *ret, *s; -register int pos, len; -{ - register char *s2; - - if (--pos < 0 || len <= 0) { - *ret = 0; - return ret; - } - while (pos > 0) { - if (!*s++) { - *ret = 0; - return ret; - } - pos--; - } - s2 = ret; - while (--len >= 0) { - if (!(*s2++ = *s++)) - return ret; - } - *s2 = 0; - return ret; -} - - -/* Return the index of the first occurrence of "pat" as a substring of "s", - starting at index "pos" (1-based). Result is 1-based, 0 if not found. */ - -int strpos2(s, pat, pos) -char *s; -register char *pat; -register int pos; -{ - register char *cp, ch; - register int slen; - - if (--pos < 0) - return 0; - slen = strlen(s) - pos; - cp = s + pos; - if (!(ch = *pat++)) - return 0; - pos = strlen(pat); - slen -= pos; - while (--slen >= 0) { - if (*cp++ == ch && !strncmp(cp, pat, pos)) - return cp - s; - } - return 0; -} - - -/* Case-insensitive version of strcmp. */ - -int strcicmp(s1, s2) -register char *s1, *s2; -{ - register unsigned char c1, c2; - - while (*s1) { - if (*s1++ != *s2++) { - if (!s2[-1]) - return 1; - c1 = toupper(s1[-1]); - c2 = toupper(s2[-1]); - if (c1 != c2) - return c1 - c2; - } - } - if (*s2) - return -1; - return 0; -} - - - - -/* HP and Turbo Pascal string functions: */ - -/* Trim blanks at left end of string. */ - -char *strltrim(s) -register char *s; -{ - while (Isspace(*s++)) ; - return s - 1; -} - - -/* Trim blanks at right end of string. */ - -char *strrtrim(s) -register char *s; -{ - register char *s2 = s; - - if (!*s) - return s; - while (*++s2) ; - while (s2 > s && Isspace(*--s2)) - *s2 = 0; - return s; -} - - -/* Store in "ret" "num" copies of string "s". Return "ret". */ - -char *strrpt(ret, s, num) -char *ret; -register char *s; -register int num; -{ - register char *s2 = ret; - register char *s1; - - while (--num >= 0) { - s1 = s; - while ((*s2++ = *s1++)) ; - s2--; - } - return ret; -} - - -/* Store in "ret" string "s" with enough pad chars added to reach "size". */ - -char *strpad(ret, s, padchar, num) -char *ret; -register char *s; -register int padchar, num; -{ - register char *d = ret; - - if (s == d) { - while (*d++) ; - } else { - while ((*d++ = *s++)) ; - } - num -= (--d - ret); - while (--num >= 0) - *d++ = padchar; - *d = 0; - return ret; -} - - -/* Copy the substring of length "len" from index "spos" of "s" (1-based) - to index "dpos" of "d", lengthening "d" if necessary. Length and - indices must be in-range. */ - -void strmove(len, s, spos, d, dpos) -register char *s, *d; -register int len, spos, dpos; -{ - s += spos - 1; - d += dpos - 1; - while (*d && --len >= 0) - *d++ = *s++; - if (len > 0) { - while (--len >= 0) - *d++ = *s++; - *d = 0; - } -} - - -/* Delete the substring of length "len" at index "pos" from "s". - Delete less if out-of-range. */ - -void strdelete(s, pos, len) -register char *s; -register int pos, len; -{ - register int slen; - - if (--pos < 0) - return; - slen = strlen(s) - pos; - if (slen <= 0) - return; - s += pos; - if (slen <= len) { - *s = 0; - return; - } - while ((*s = s[len])) s++; -} - - -/* Insert string "src" at index "pos" of "dst". */ - -void strinsert(src, dst, pos) -register char *src, *dst; -register int pos; -{ - register int slen, dlen; - - if (--pos < 0) - return; - dlen = strlen(dst); - dst += dlen; - dlen -= pos; - if (dlen <= 0) { - strcpy(dst, src); - return; - } - slen = strlen(src); - do { - dst[slen] = *dst; - --dst; - } while (--dlen >= 0); - dst++; - while (--slen >= 0) - *dst++ = *src++; -} - - - - -/* File functions */ - -/* Peek at next character of input stream; return EOF at end-of-file. */ - -int P_peek(f) -FILE *f; -{ - int ch; - - ch = getc(f); - if (ch == EOF) - return EOF; - ungetc(ch, f); - return (ch == '\n') ? ' ' : ch; -} - - -/* Check if at end of file, using Pascal "eof" semantics. End-of-file for - stdin is broken; remove the special case for it to be broken in a - different way. */ - -int P_eof(f) -FILE *f; -{ - register int ch; - - if (feof(f)) - return 1; -#ifdef HAVE_ISATTY - if (isatty(fileno(f))) -#else - if (f == stdin) -#endif - return 0; /* not safe to look-ahead on the keyboard! */ - ch = getc(f); - if (ch == EOF) - return 1; - ungetc(ch, f); - return 0; -} - - -/* Check if at end of line (or end of entire file). */ - -int P_eoln(f) -FILE *f; -{ - register int ch; - - ch = getc(f); - if (ch == EOF) - return 1; - ungetc(ch, f); - return (ch == '\n'); -} - - -/* Skip whitespace (including newlines) in a file. */ - -FILE *_skipnlspaces(f) -FILE *f; -{ - register int ch; - - do { - ch = getc(f); - } while (ch == ' ' || ch == '\t' || ch == '\n'); - if (ch != EOF) - ungetc(ch, f); - return f; -} - - -/* Skip whitespace (not including newlines) in a file. */ - -FILE *_skipspaces(f) -FILE *f; -{ - register int ch; - - do { - ch = getc(f); - } while (ch == ' ' || ch == '\t'); - if (ch != EOF) - ungetc(ch, f); - return f; -} - - -/* Read a packed array of characters from a file. */ - -Void P_readpaoc(f, s, len) -FILE *f; -char *s; -int len; -{ - int ch; - - for (;;) { - if (len <= 0) - return; - ch = getc(f); - if (ch == EOF || ch == '\n') - break; - *s++ = ch; - --len; - } - while (--len >= 0) - *s++ = ' '; - if (ch != EOF) - ungetc(ch, f); -} - -Void P_readlnpaoc(f, s, len) -FILE *f; -char *s; -int len; -{ - int ch; - - for (;;) { - ch = getc(f); - if (ch == EOF || ch == '\n') - break; - if (len > 0) { - *s++ = ch; - --len; - } - } - while (--len >= 0) - *s++ = ' '; -} - - -/* Compute maximum legal "seek" index in file (0-based). */ - -long P_maxpos(f) -FILE *f; -{ - long savepos = ftell(f); - long val; - - if (fseek(f, 0L, SEEK_END)) - return -1; - val = ftell(f); - if (fseek(f, savepos, SEEK_SET)) - return -1; - return val; -} - - -/* Use packed array of char for a file name. */ - -Char *P_trimname(fn, len) -register Char *fn; -register int len; -{ - static Char fnbuf[256]; - register Char *cp = fnbuf; - - while (--len >= 0 && *fn && !isspace(*fn)) - *cp++ = *fn++; - *cp = 0; - return fnbuf; -} - - - - -/* Pascal's "memavail" doesn't make much sense in Unix with virtual memory. - We fix memory size as 10Meg as a reasonable compromise. */ - -long memavail() -{ - return 10000000; /* worry about this later! */ -} - -long maxavail() -{ - return memavail(); -} - - - - -/* Sets are stored as an array of longs. S[0] is the size of the set; - S[N] is the N'th 32-bit chunk of the set. S[0] equals the maximum - I such that S[I] is nonzero. S[0] is zero for an empty set. Within - each long, bits are packed from lsb to msb. The first bit of the - set is the element with ordinal value 0. (Thus, for a "set of 5..99", - the lowest five bits of the first long are unused and always zero.) */ - -/* (Sets with 32 or fewer elements are normally stored as plain longs.) */ - -long *P_setunion(d, s1, s2) /* d := s1 + s2 */ -register long *d, *s1, *s2; -{ - long *dbase = d++; - register int sz1 = *s1++, sz2 = *s2++; - while (sz1 > 0 && sz2 > 0) { - *d++ = *s1++ | *s2++; - sz1--, sz2--; - } - while (--sz1 >= 0) - *d++ = *s1++; - while (--sz2 >= 0) - *d++ = *s2++; - *dbase = d - dbase - 1; - return dbase; -} - - -long *P_setint(d, s1, s2) /* d := s1 * s2 */ -register long *d, *s1, *s2; -{ - long *dbase = d++; - register int sz1 = *s1++, sz2 = *s2++; - while (--sz1 >= 0 && --sz2 >= 0) - *d++ = *s1++ & *s2++; - while (--d > dbase && !*d) ; - *dbase = d - dbase; - return dbase; -} - - -long *P_setdiff(d, s1, s2) /* d := s1 - s2 */ -register long *d, *s1, *s2; -{ - long *dbase = d++; - register int sz1 = *s1++, sz2 = *s2++; - while (--sz1 >= 0 && --sz2 >= 0) - *d++ = *s1++ & ~*s2++; - if (sz1 >= 0) { - while (sz1-- >= 0) - *d++ = *s1++; - } - while (--d > dbase && !*d) ; - *dbase = d - dbase; - return dbase; -} - - -long *P_setxor(d, s1, s2) /* d := s1 / s2 */ -register long *d, *s1, *s2; -{ - long *dbase = d++; - register int sz1 = *s1++, sz2 = *s2++; - while (sz1 > 0 && sz2 > 0) { - *d++ = *s1++ ^ *s2++; - sz1--, sz2--; - } - while (--sz1 >= 0) - *d++ = *s1++; - while (--sz2 >= 0) - *d++ = *s2++; - while (--d > dbase && !*d) ; - *dbase = d - dbase; - return dbase; -} - - -int P_inset(val, s) /* val IN s */ -register unsigned val; -register long *s; -{ - register int bit; - bit = val % SETBITS; - val /= SETBITS; - if (val < *s++ && ((1L< size) { - s += size; - while (val > size) - *++s = 0, size++; - *sbase = size; - } else - s += val; - *s |= 1L< (int)v2) - return sbase; - b1 = v1 % SETBITS; - v1 /= SETBITS; - b2 = v2 % SETBITS; - v2 /= SETBITS; - size = *s; - v1++; - if (++v2 > size) { - while (v2 > size) - s[++size] = 0; - s[v2] = 0; - *s = v2; - } - s += v1; - if (v1 == v2) { - *s |= (~((-2L)<<(b2-b1))) << b1; - } else { - *s++ |= (-1L) << b1; - while (++v1 < v2) - *s++ = -1; - *s |= ~((-2L) << b2); - } - return sbase; -} - - -long *P_remset(s, val) /* s := s - [val] */ -register long *s; -register unsigned val; -{ - register int bit; - bit = val % SETBITS; - val /= SETBITS; - if (++val <= *s) { - if (!(s[val] &= ~(1L<= 0) { - if (*s1++ != *s2++) - return 0; - } - return 1; -} - - -int P_subset(s1, s2) /* s1 <= s2 */ -register long *s1, *s2; -{ - register int sz1 = *s1++, sz2 = *s2++; - if (sz1 > sz2) - return 0; - while (--sz1 >= 0) { - if (*s1++ & ~*s2++) - return 0; - } - return 1; -} - - -long *P_setcpy(d, s) /* d := s */ -register long *d, *s; -{ - register long *save_d = d; - -#ifdef SETCPY_MEMCPY - memcpy(d, s, (*s + 1) * sizeof(long)); -#else - register int i = *s + 1; - while (--i >= 0) - *d++ = *s++; -#endif - return save_d; -} - - -/* s is a "smallset", i.e., a 32-bit or less set stored - directly in a long. */ - -long *P_expset(d, s) /* d := s */ -register long *d; -register long s; -{ - if (s) { - d[1] = s; - *d = 1; - } else - *d = 0; - return d; -} - - -long P_packset(s) /* convert s to a small-set */ -register long *s; -{ - if (*s++) - return *s; - else - return 0; -} - - - - - -/* Oregon Software Pascal extensions, courtesy of William Bader */ - -int P_getcmdline(l, h, line) -int l, h; -Char *line; -{ - int i, len; - char *s; - - h = h - l + 1; - len = 0; - for(i = 1; i < P_argc; i++) { - s = P_argv[i]; - while (*s) { - if (len >= h) return len; - line[len++] = *s++; - } - if (len >= h) return len; - line[len++] = ' '; - } - return len; -} - -Void TimeStamp(Day, Month, Year, Hour, Min, Sec) -int *Day, *Month, *Year, *Hour, *Min, *Sec; -{ -#ifndef NO_TIME - struct tm *tm; - long clock; - - time(&clock); - tm = localtime(&clock); - *Day = tm->tm_mday; - *Month = tm->tm_mon + 1; /* Jan = 0 */ - *Year = tm->tm_year; - if (*Year < 1900) - *Year += 1900; /* year since 1900 */ - *Hour = tm->tm_hour; - *Min = tm->tm_min; - *Sec = tm->tm_sec; -#endif -} - -Void VAXdate(s) -char *s; -{ - long clock; - char *c; - int i; - static int where[] = {8, 9, 0, 4, 5, 6, 0, 20, 21, 22, 23}; - - time(&clock); - c = ctime(&clock); - for (i = 0; i < 11; i++) - s[i] = my_toupper(c[where[i]]); - s[2] = '-'; - s[6] = '-'; -} - -Void VAXtime(s) -char *s; -{ - long clock; - char *c; - int i; - - time(&clock); - c = ctime(&clock); - for (i = 0; i < 8; i++) - s[i] = c[i+11]; - s[8] = '.'; - s[9] = '0'; - s[10] = '0'; -} - - - - -/* SUN Berkeley Pascal extensions */ - -Void P_sun_argv(s, len, n) -register char *s; -register int len, n; -{ - register char *cp; - - if ((unsigned)n < P_argc) - cp = P_argv[n]; - else - cp = ""; - while (*cp && --len >= 0) - *s++ = *cp++; - while (--len >= 0) - *s++ = ' '; -} - - - - -int _OutMem() -{ - return _Escape(-2); -} - -int _CaseCheck() -{ - return _Escape(-9); -} - -int _NilCheck() -{ - return _Escape(-3); -} - - - - - -/* The following is suitable for the HP Pascal operating system. - It might want to be revised when emulating another system. */ - -char *_ShowEscape(buf, code, ior, prefix) -char *buf, *prefix; -int code, ior; -{ - char *bufp; - - if (prefix && *prefix) { - strcpy(buf, prefix); - strcat(buf, ": "); - bufp = buf + strlen(buf); - } else { - bufp = buf; - } - if (code == -10) { - sprintf(bufp, "Pascal system I/O error %d", ior); - switch (ior) { - case 3: - strcat(buf, " (illegal I/O request)"); - break; - case 7: - strcat(buf, " (bad file name)"); - break; - case FileNotFound: /*10*/ - strcat(buf, " (file not found)"); - break; - case FileNotOpen: /*13*/ - strcat(buf, " (file not open)"); - break; - case BadInputFormat: /*14*/ - strcat(buf, " (bad input format)"); - break; - case 24: - strcat(buf, " (not open for reading)"); - break; - case 25: - strcat(buf, " (not open for writing)"); - break; - case 26: - strcat(buf, " (not open for direct access)"); - break; - case 28: - strcat(buf, " (string subscript out of range)"); - break; - case EndOfFile: /*30*/ - strcat(buf, " (end-of-file)"); - break; - case FileWriteError: /*38*/ - strcat(buf, " (file write error)"); - break; - } - } else { - sprintf(bufp, "Pascal system error %d", code); - switch (code) { - case -2: - strcat(buf, " (out of memory)"); - break; - case -3: - strcat(buf, " (reference to NIL pointer)"); - break; - case -4: - strcat(buf, " (integer overflow)"); - break; - case -5: - strcat(buf, " (divide by zero)"); - break; - case -6: - strcat(buf, " (real math overflow)"); - break; - case -8: - strcat(buf, " (value range error)"); - break; - case -9: - strcat(buf, " (CASE value range error)"); - break; - case -12: - strcat(buf, " (bus error)"); - break; - case -20: - strcat(buf, " (stopped by user)"); - break; - } - } - return buf; -} - - -int _Escape(code) -int code; -{ - char buf[100]; - - P_escapecode = code; - if (__top_jb) { - __p2c_jmp_buf *jb = __top_jb; - __top_jb = jb->next; - longjmp(jb->jbuf, 1); - } - if (code == 0) - exit(EXIT_SUCCESS); - if (code == -1) - exit(EXIT_FAILURE); - fprintf(stderr, "%s\n", _ShowEscape(buf, P_escapecode, P_ioresult, "")); - exit(EXIT_FAILURE); -} - -int _EscIO(code) -int code; -{ - P_ioresult = code; - return _Escape(-10); -} - -int _EscIO2(code, name) -int code; -char *name; -{ - P_ioresult = code; - if (!__top_jb && name && *name) { - char buf[100]; - fprintf(stderr, "%s: %s\n", - name, _ShowEscape(buf, P_escapecode, P_ioresult, "")); - exit(EXIT_FAILURE); - } - return _Escape(-10); -} - - - -/* End. */ - - - diff --git a/Build/source/utils/mtx/mtx-0.60d/lyrics.c b/Build/source/utils/mtx/mtx-0.60d/lyrics.c deleted file mode 100644 index c38cdeffddf..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/lyrics.c +++ /dev/null @@ -1,869 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "lyrics.pas" */ - - -#include "p2c.h" - - -#define LYRICS_G -#include "lyrics.h" - - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef STATUS_H -#include "status.h" -#endif - -#ifndef MULTFILE_H -#include "multfile.h" -#endif - -#ifndef FILES_H -#include "files.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -/* Symbols used in strings of melismatype */ - -#define beam_melisma '[' -#define inhibit_beam_melisma '<' -#define slur_melisma '(' -#define inhibit_slur_melisma '{' - - -typedef char other_index; - -typedef char other_index0; - -typedef Char melismatype[256]; - -typedef enum { - nolyr, haslyr -} haslyrtype; -typedef enum { - normal, aux -} auxtype; -typedef enum { - asbefore, newassign -} assigntype; -typedef enum { - virgin, active -} inittype; - -typedef struct lyrinfotype { - short lyr_adjust, slur_level, slur_change, beam_level, beam_change; - melismatype melisma; - boolean numbered; -} lyrinfotype; - -typedef enum { - none_given, global_lyrics, local_lyrics -} lyrlinetype; - -typedef struct lyrtagtype { - lyrlinetype lyrsource; - haslyrtype has_lyrics; - auxtype auxiliary; - assigntype new_assign; - inittype initialized; - short linecount; - Char tags[256]; -} lyrtagtype; - - -#define maxLyrNums 64 -#define lyrtaglength 40 - - -#define lyr_adjust_undef (-12345) -#define interstave 24 - - -Static short LyrNum = 0; - -Static boolean lyrmodealter[maxstaves], oldlyrmodealter[maxstaves]; -Static lyrtagtype tag[maxvoices], oldtag[maxvoices]; -Static lyrinfotype lyrinfo[maxvoices]; -Static Char numberedParagraph[maxLyrNums][lyrtaglength + 1]; - - -/* Information flow for verse numbers: at the SetLyrics stage, the first -line of each lyrics paragraph is checked for a verse number, and if -found, the paragraph tag is remembered. At the AssignLyrics stage, -the first time that paragraph is encountered, the particular voice -is marked in lyrinfo as being numbered. When that voice is later processed, -the mark in lyrinfo is interrogated and turned off: if it was on, the -mtxVerse pre-TeX string is put into the output. */ - -boolean hasVerseNumber(voice) -voice_index voice; -{ - boolean Result; - - Result = lyrinfo[voice-1].numbered; - lyrinfo[voice-1].numbered = false; - return Result; -} - - -Static boolean isNumberedLyricsParagraph(tag) -Char *tag; -{ - short i, FORLIM; - - FORLIM = LyrNum; - for (i = 0; i <= FORLIM - 1; i++) { - if (!strcmp(tag, numberedParagraph[i])) - return true; - } - return false; -} - - -Static boolean anyTagNumbered(tags_) -Char *tags_; -{ - boolean Result; - Char tags[256]; - Char s[256]; - - strcpy(tags, tags_); -/* p2c: lyrics.pas: Note: Eliminated unused assignment statement [338] */ - if (curtail(tags, '}') > 0) - delete1(tags, 1); - do { - GetNextWord(s, tags, ',', dummy); - if (*s == '\0') - return false; - if (isNumberedLyricsParagraph(s)) - return true; - } while (true); - return false; -} - - -/* Save the tag in the numberedParagraph list, stripping off braces if any */ -Static Void markNumbered(tag_) -Char *tag_; -{ - Char tag[256]; - - strcpy(tag, tag_); - if (LyrNum >= maxLyrNums) { - error("Too many numbered lines in the lyrics", !print); - return; - } - LyrNum++; - if (curtail(tag, '}') > 0) - delete1(tag, 1); - strcpy(numberedParagraph[LyrNum-1], tag); -/* p2c: lyrics.pas, line 104: - * Note: Possible string truncation in assignment [145] */ -} - - -/* --- end of procedures to keep track of verse numbering --- */ - -Void lyricsParagraph() -{ - Char first[256], w[256]; - paragraph_index0 l, line; - other_index0 i; - other_index0 nother = 0; - Char other_[10][lyrtaglength + 1]; - boolean numbered; - Char STR1[256], STR3[256]; - paragraph_index0 FORLIM; - Char STR4[256]; - Char STR5[256]; - - if (!doLyrics()) - return; - NextWord(w, P[0], blank, dummy); - l = strlen(w); - line_no = orig_line_no[0]; - if (w[l-1] != '}') - strcat(w, "}"); - GetNextWord(first, w, dummy, '}'); - while (*w != '\0') { - if (w[0] == '=') - predelete(w, 1); - if (w[0] != '{') - sprintf(w, "{%s", strcpy(STR1, w)); - nother++; - GetNextWord(other_[nother-1], w, dummy, '}'); -/* p2c: lyrics.pas, line 122: - * Note: Possible string truncation in assignment [145] */ - } - if (beVerbose()) { - printf("---- Paragraph %d starting at line %d has lyrics headed %s", - paragraph_no, line_no, first); - for (i = 0; i <= nother - 1; i++) - printf("=%s", other_[i]); - putchar('\n'); - } - sprintf(STR5, "%c Paragraph %s line %s bar %s", - comment, toString(STR1, paragraph_no), toString(STR3, line_no), - toString(STR4, bar_no)); - tex3(STR5); - sprintf(STR3, "\\mtxSetLyrics%s{%%", first); - tex3(STR3); - FORLIM = para_len; - for (line = 2; line <= FORLIM; line++) { - lyrTranslate(P[line-1], &numbered); - if (numbered) { - if (line > 2) - warning("Verse number not in first line of paragraph treated as lyrics", - print); - else { - markNumbered(first); - for (i = 0; i <= nother - 1; i++) - markNumbered(other_[i]); - } - } - line_no = orig_line_no[line-1]; - if (strlen(P[line-1]) > max_lyrics_line_length && pmx_preamble_done) - error("Lyrics line too long", print); - if (pmx_preamble_done) { - if (line == 2) { - sprintf(STR3, "\\\\\\:%s", P[line-1]); - put(STR3, putspace); - } else { - sprintf(STR3, "\\\\\\ %s", P[line-1]); - put(STR3, putspace); - } - } else - put(P[line-1], putspace); - if (line < para_len) { - if (pmx_preamble_done) - putLine(" %\\"); - else - putLine(" %"); - } else if (pmx_preamble_done) - putLine("}\\"); - else - putLine("}"); - } - for (i = 0; i <= nother - 1; i++) { - sprintf(STR1, "\\mtxCopyLyrics%s%s", first, other_[i]); - tex3(STR1); - } -} - - -Static Char *songraise(Result, voice) -Char *Result; -voice_index voice; -{ - Char s[256]; - lyrtagtype *WITH; - lyrinfotype *WITH1; - Char STR1[256], STR3[256]; - - WITH = &tag[voice-1]; - WITH1 = &lyrinfo[voice-1]; - if (WITH->initialized == virgin && WITH1->lyr_adjust == 0) - return strcpy(Result, ""); - else { - if (WITH->auxiliary == aux) - strcpy(s, "Aux"); - else - *s = '\0'; - sprintf(Result, "\\mtx%sLyricsAdjust{%s}{%s}", - s, toString(STR1, PMXinstr(voiceStave(voice))), - toString(STR3, WITH1->lyr_adjust)); - return Result; - } -} - - -Char *lyricsReport(Result, voice) -Char *Result; -voice_index voice; -{ - Char l[256]; - lyrtagtype *WITH; - - WITH = &tag[voice-1]; - if (WITH->has_lyrics == nolyr || - WITH->lyrsource == none_given && *WITH->tags == '\0') - return strcpy(Result, " but has no own lyrics"); - else { - strcpy(l, " with "); - if (WITH->auxiliary == aux) - strcat(l, "auxiliary "); - strcat(l, "lyrics "); - if (WITH->lyrsource == local_lyrics) - strcat(l, "locally defined as \""); - else - strcat(l, "labelled \""); - sprintf(l + strlen(l), "%s\"", WITH->tags); - if (anyTagNumbered(WITH->tags)) - strcat(l, " with verse numbers"); - return strcpy(Result, l); - } -} - - -Void initLyrics() -{ - /* at the start only */ - stave_index stave; - voice_index voice, FORLIM; - lyrinfotype *WITH; - lyrtagtype *WITH1; - stave_index FORLIM1; - - FORLIM = nvoices; - for (voice = 0; voice <= FORLIM - 1; voice++) { - WITH = &lyrinfo[voice]; - WITH1 = &tag[voice]; - WITH1->has_lyrics = nolyr; - WITH->lyr_adjust = lyr_adjust_undef; - *WITH->melisma = '\0'; - WITH->slur_level = 0; - WITH->beam_level = 0; - WITH1->auxiliary = aux; - WITH1->lyrsource = none_given; - WITH1->new_assign = asbefore; - WITH1->initialized = virgin; - } - FORLIM1 = nstaves; - for (stave = 0; stave <= FORLIM1 - 1; stave++) - oldlyrmodealter[stave] = false; -} - - -Static Void registerLyrics(voice, w) -voice_index voice; -Char *w; -{ - lyrtagtype *WITH; - - WITH = &tag[voice-1]; - strcpy(oldtag[voice-1].tags, WITH->tags); - oldtag[voice-1].lyrsource = WITH->lyrsource; - WITH->lyrsource = global_lyrics; - switch (strlen(w)) { - - case 0: - *WITH->tags = '\0'; - break; - - case 1: - fatalerror("M-Tx system error in registerLyrics"); - break; - - default: - strcpy(WITH->tags, w); - break; - } -} - - -Void extractLyrtag(voice, note) -voice_index voice; -Char *note; -{ - /* inline lyrics change */ - lyrtagtype *WITH; - Char STR1[256], STR2[256]; - - WITH = &tag[voice-1]; - if (WITH->has_lyrics == nolyr) { - error3(voice, "Inline lyrics change on no-lyrics line"); - return; - } - registerLyrics(voice, note); /* was: ''); */ - sprintf(note, "\\mtxAssignLyrics{%s}%s", - toString(STR1, PMXinstr(voiceStave(voice))), strcpy(STR2, note)); - if (WITH->auxiliary == aux) - sprintf(note, "\\mtxAuxLyr{%s}\\", strcpy(STR2, note)); - else - strcat(note, "\\"); -} - - -Void clearTags() -{ - /* at start of paragraph analyis */ - voice_index voice, FORLIM; - lyrtagtype *WITH; - - memcpy(oldtag, tag, maxvoices * sizeof(lyrtagtype)); - FORLIM = nvoices; - for (voice = 0; voice <= FORLIM - 1; voice++) { - WITH = &tag[voice]; - WITH->lyrsource = none_given; - *WITH->tags = '\0'; - WITH->linecount = 0; - } -} - - -#define maxlyrlen (PMXlinelength - 15) - - -Local Void convertlyrics(lyn, voice, mx) -Char *lyn; -voice_index voice; -auxtype mx; -{ - static Char setlyr[256] = "%%\\\\\\mtxSetLyrics"; - Char btag[256], thistag[256], w[256]; - boolean numbered; - Char STR1[256]; - lyrtagtype *WITH; - Char STR2[256]; - - NextWord(w, lyn, blank, dummy); - WITH = &tag[voice-1]; - if (*w == '\0') { - *WITH->tags = '\0'; - return; - } - WITH->has_lyrics = haslyr; - WITH->auxiliary = mx; - if (w[0] == '{') { - registerLyrics(voice, w); - return; - } - WITH->lyrsource = local_lyrics; - WITH->linecount++; - toString(thistag, voice * 10 + WITH->linecount); - sprintf(btag, "{%s}", thistag); - if (*WITH->tags == '\0') - strcpy(WITH->tags, btag); - else { - WITH->tags[strlen(WITH->tags) - 1] = ','; - sprintf(WITH->tags + strlen(WITH->tags), "%s}", thistag); - } - trim(lyn); - lyrTranslate(lyn, &numbered); - if (numbered) - markNumbered(thistag); - if (strlen(lyn) + strlen(btag) > maxlyrlen) - sprintf(lyn, "%s%s{\\\n\\\\\\:%s}\\", setlyr, btag, strcpy(STR2, lyn)); - else - sprintf(lyn, "%s%s{%s}\\", setlyr, btag, strcpy(STR1, lyn)); -} - -#undef maxlyrlen - - -Void maybeLyrics(voice, parline, w_) -voice_index voice; -paragraph_index parline; -Char *w_; -{ - /* during paragraph analysis, parline had L:, already stripped */ - Char w[256]; - voice_index0 k; - - /** Labelled lyrics line -- */ - strcpy(w, w_); - if (!doLyrics()) - return; - if (strlen(w) == 1 && voice == 0) - warning("Lyrics line above top voice should be labelled", print); - if (strlen(w) == 1) { /** Standard lyrics line -------- */ - k = voice; - if (k == 0) - k = 1; - convertlyrics(P[parline-1], k, normal); - return; - } - predelete(w, 1); - k = findVoice(w); - if (k == 0) - error("Lyrics line belongs to unknown voice", print); - else - convertlyrics(P[parline-1], k, aux); -} - - -Void reviseLyrics() -{ - /* after paragraph analysis */ - voice_index voice; - stave_index stave; - voice_index FORLIM; - lyrtagtype *WITH; - stave_index FORLIM1; - - FORLIM = nvoices; - for (voice = 0; voice <= FORLIM - 1; voice++) { - WITH = &tag[voice]; - if (oldtag[voice].lyrsource == global_lyrics && - WITH->lyrsource == none_given) { - strcpy(WITH->tags, oldtag[voice].tags); - WITH->lyrsource = global_lyrics; - } - WITH->new_assign = (assigntype)(WITH->has_lyrics == haslyr && - strcmp(WITH->tags, oldtag[voice].tags)); - if (*WITH->tags == '\0') - WITH->has_lyrics = nolyr; - strcpy(oldtag[voice].tags, WITH->tags); - oldtag[voice].lyrsource = WITH->lyrsource; - } - FORLIM1 = nstaves; - for (stave = 1; stave <= FORLIM1; stave++) { - WITH = &tag[first_on_stave[stave-1] - 1]; - lyrmodealter[stave-1] = (!aloneOnStave(stave) && - WITH->has_lyrics == haslyr && - WITH->auxiliary == normal); - } -} - - -Void assignLyrics(stave, lyrassign) -stave_index stave; -Char *lyrassign; -{ - /* at start of new block */ - Char atag[256], instr[256], l[256]; - voice_index v1, v2, voice; - lyrtagtype *WITH; - Char STR2[256]; - lyrinfotype *WITH1; - - *lyrassign = '\0'; - toString(instr, PMXinstr(stave)); - v1 = first_on_stave[stave-1]; - v2 = v1 + number_on_stave[stave-1] - 1; - /* don't reassign if other voice takes over */ - if (tag[v1-1].auxiliary == tag[v2-1].auxiliary && - tag[v1-1].has_lyrics != tag[v2-1].has_lyrics) { - for (voice = v1 - 1; voice <= v2 - 1; voice++) { - WITH = &tag[voice]; - if (WITH->new_assign == newassign) - WITH->new_assign = (assigntype)WITH->has_lyrics; - } - } - for (voice = v1 - 1; voice <= v2 - 1; voice++) - lyrinfo[voice].numbered = false; - for (voice = v1; voice <= v2; voice++) { - WITH = &tag[voice-1]; - if (WITH->new_assign == newassign) { - strcpy(atag, WITH->tags); - if (*atag == '\0') - strcpy(atag, "{}"); - sprintf(l, "\\mtxAssignLyrics{%s}%s", instr, atag); - if (WITH->auxiliary == aux) - sprintf(l, "\\mtxAuxLyr{%s}", strcpy(STR2, l)); - strcat(lyrassign, l); - if (*WITH->tags == '\0') - WITH->has_lyrics = nolyr; - if (WITH->has_lyrics == haslyr && WITH->initialized == virgin) { - WITH1 = &lyrinfo[voice-1]; - if (WITH->auxiliary == aux && upper(voice)) - WITH1->lyr_adjust = interstave; - else - WITH1->lyr_adjust = 0; - strcat(lyrassign, songraise(STR2, voice)); - WITH->initialized = active; - } - if (anyTagNumbered(atag)) - lyrinfo[voice-1].numbered = true; - } - } - if (lyrmodealter[stave-1] == oldlyrmodealter[stave-1]) - return; - if (lyrmodealter[stave-1]) - sprintf(lyrassign + strlen(lyrassign), "\\mtxLyrModeAlter{%s}", instr); - else - sprintf(lyrassign + strlen(lyrassign), "\\mtxLyrModeNormal{%s}", instr); - oldlyrmodealter[stave-1] = lyrmodealter[stave-1]; -} - - -Void lyricsAdjust(voice, note) -voice_index voice; -Char *note; -{ - /* inline at-word */ - short adj; - boolean force, put_above, put_below; - lyrinfotype *WITH; - lyrtagtype *WITH1; - Char STR2[256]; - - WITH = &lyrinfo[voice-1]; - WITH1 = &tag[voice-1]; - predelete(note, 1); - force = (note[0] == '='); - if (force) - predelete(note, 1); - put_above = (note[0] == '^'); - if (put_above) - predelete(note, 1); - put_below = (note[0] == 'v'); - if (put_below) - predelete(note, 1); - if (*note != '\0') - getNum(note, &adj); - else - adj = 0; - if (WITH1->has_lyrics == nolyr) { - *note = '\0'; - return; - } - if (put_above) - WITH->lyr_adjust = interstave; - else if (put_below) - WITH->lyr_adjust = 0; - if (force) - WITH->lyr_adjust = adj; - else - WITH->lyr_adjust += adj; - songraise(note, voice); - if (*note != '\0') - sprintf(note, "\\\\%s\\", strcpy(STR2, note)); -} - - -Void lyrTranslate(P, numbered) -Char *P; -boolean *numbered; -{ /* Test for starting number */ - short k, l, number; - Char Q[256], w[256]; - - NextWord(w, P, blank, dummy); - *numbered = false; - if (endsWith(w, ".")) { - getNum(w, &number); - *numbered = (number != 0); - } - /*Translate lyrics link */ - *Q = '\0'; - l = strlen(P); - for (k = 1; k <= l - 1; k++) { - if (P[k-1] != '_' || P[k] == '_' || P[k] == ' ' || pos1(P[k], digits) > 0) - sprintf(Q + strlen(Q), "%c", P[k-1]); - else if (k > 1 && P[k-2] == '\\') - strcat(Q, "mtxLowLyrlink "); - else - strcat(Q, "\\mtxLyrlink "); - } - sprintf(Q + strlen(Q), "%c", P[l-1]); - strcpy(P, Q); -} - - -typedef enum { - beam, slur -} melismaEnd; - - -Static Char removeLast(s, t) -Char *s; -Char *t; -{ - Char Result; - short i, l; - - l = strlen(s); - for (i = l; i >= 1; i--) { - if (pos1(s[i-1], t) > 0) { - Result = s[i-1]; - delete1(s, i); - return Result; - } - } - return dummy; -} - - -Static boolean OpenMelisma(s) -Char *s; -{ - return (pos1(slur_melisma, s) > 0 || pos1(beam_melisma, s) > 0); -} - - -/* Local variables for getSyllable: */ -struct LOC_getSyllable { - voice_index voice; - boolean BM, EM; -} ; - -Local Void startMelismas(t, LINK) -Char *t; -struct LOC_getSyllable *LINK; -{ - boolean open_before, open_now; - short i, k; - lyrinfotype *WITH; - - k = strlen(t); - for (i = 0; i <= k - 1; i++) { - WITH = &lyrinfo[LINK->voice-1]; - open_before = OpenMelisma(WITH->melisma); - sprintf(WITH->melisma + strlen(WITH->melisma), "%c", t[i]); - open_now = OpenMelisma(WITH->melisma); - LINK->BM = (LINK->BM || open_now && !open_before); - } -} - -Local boolean endMelisma(voice, LINK) -short voice; -struct LOC_getSyllable *LINK; -{ - Char found; - short i; - short count[2]; - melismaEnd t; - short FORLIM1; - lyrinfotype *WITH; - Char STR1[4]; - - LINK->EM = false; - count[(long)slur] = -lyrinfo[voice-1].slur_change; - count[(long)beam] = -lyrinfo[voice-1].beam_change; - for (t = beam; (long)t <= (long)slur; t = (melismaEnd)((long)t + 1)) { - FORLIM1 = count[(long)t]; - for (i = 1; i <= FORLIM1; i++) { - WITH = &lyrinfo[voice-1]; - switch (t) { - - case slur: - sprintf(STR1, "%c%c", slur_melisma, inhibit_slur_melisma); - found = removeLast(WITH->melisma, STR1); - break; - - case beam: - sprintf(STR1, "%c%c", beam_melisma, inhibit_beam_melisma); - found = removeLast(WITH->melisma, STR1); - break; - } - if (found == dummy) - error3(voice, "Ending a melisma that was never started"); - LINK->EM = (LINK->EM || - (!OpenMelisma(WITH->melisma) && - pos1(found, (sprintf(STR1, "%c%c", slur_melisma, beam_melisma), - STR1)) > 0)); - } - } - return LINK->EM; -} - -Local Void startSlurMelisma(voice, LINK) -voice_index voice; -struct LOC_getSyllable *LINK; -{ - static Char start[2] = { - slur_melisma, inhibit_slur_melisma - }; - - Char slurs[256]; - short k, FORLIM; - Char STR1[256]; - - *slurs = '\0'; - FORLIM = lyrinfo[voice-1].slur_change; - for (k = 1; k <= FORLIM; k++) - sprintf(slurs, "%c%s", - start[noSlurMelisma(voice, 1 - k)], strcpy(STR1, slurs)); - startMelismas(slurs, LINK); -} - -Local Void startBeamMelisma(voice, LINK) -voice_index voice; -struct LOC_getSyllable *LINK; -{ - static Char start[2] = { - beam_melisma, inhibit_beam_melisma - }; - - Char beams[256]; - short k, FORLIM; - Char STR1[256]; - - *beams = '\0'; - FORLIM = lyrinfo[voice-1].beam_change; - for (k = 1; k <= FORLIM; k++) - sprintf(beams, "%c%s", start[noBeamMelisma(voice)], strcpy(STR1, beams)); - startMelismas(beams, LINK); -} - -Local boolean startMelisma(voice, LINK) -short voice; -struct LOC_getSyllable *LINK; -{ - LINK->BM = false; - startSlurMelisma(voice, LINK); - startBeamMelisma(voice, LINK); - return LINK->BM; -} - - -/* Append mtxBM or mtxEM to pretex when appropriate */ -Void getSyllable(voice_, pretex) -voice_index voice_; -Char *pretex; -{ - struct LOC_getSyllable V; - short t; - lyrtagtype *WITH; - lyrinfotype *WITH1; - - V.voice = voice_; - WITH = &tag[V.voice-1]; - WITH1 = &lyrinfo[V.voice-1]; - if (WITH->has_lyrics != haslyr) - return; - t = WITH1->slur_level; - WITH1->slur_level = slurLevel(V.voice); - WITH1->slur_change = WITH1->slur_level - t; - t = WITH1->beam_level; - WITH1->beam_level = beamLevel(V.voice); - WITH1->beam_change = WITH1->beam_level - t; - if (startMelisma(V.voice, &V)) { - if (WITH->auxiliary == aux) - strcat(pretex, "\\mtxAuxBM"); - else - strcat(pretex, "\\mtxBM"); - } - if (!endMelisma(V.voice, &V)) - return; - if (WITH->auxiliary == aux) - strcat(pretex, "\\mtxAuxEM"); - else - strcat(pretex, "\\mtxEM"); -} - - -Static Void getSyllable1(voice, pretex) -voice_index voice; -Char *pretex; -{ - lyrinfotype *WITH; - - WITH = &lyrinfo[voice-1]; - printf("voice=%d, slurchange=%d, melisma=%s, beamchange=%d\n", - voice, WITH->slur_change, WITH->melisma, WITH->beam_change); - getSyllable1(voice, pretex); - if (*pretex != '\0') - printf("pretex = %s\n", pretex); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/lyrics.h b/Build/source/utils/mtx/mtx-0.60d/lyrics.h deleted file mode 100644 index f225cb0d760..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/lyrics.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Header for module lyrics, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef LYRICS_H -#define LYRICS_H - - -/* Everything related to lyrics */ - -#ifndef GLOBALS_H -#include "globals.h" -#endif - - -#ifdef LYRICS_G -# define vextern -#else -# define vextern extern -#endif - -extern Void initLyrics PV(); -extern Void clearTags PV(); -extern Void reviseLyrics PV(); -extern Void lyrTranslate PP((Char *P, boolean *numbered)); -extern Void getSyllable PP((int voice, Char *pretex)); -extern Char *lyricsReport PP((Char *Result, int voice)); -extern Void maybeLyrics PP((int voice, int parline, Char *w)); -extern Void extractLyrtag PP((int voice, Char *note)); -extern Void lyricsAdjust PP((int voice, Char *note)); -extern Void assignLyrics PP((int stave, Char *lyrassign)); -extern Void lyricsParagraph PV(); -extern boolean hasVerseNumber PP((int voice)); - - -#undef vextern - -#endif /*LYRICS_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/lyrics.pas b/Build/source/utils/mtx/mtx-0.60d/lyrics.pas deleted file mode 100644 index 14d7f5046eb..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/lyrics.pas +++ /dev/null @@ -1,455 +0,0 @@ -unit lyrics; -{ Everything related to lyrics } - -interface uses globals; - -procedure initLyrics; -procedure clearTags; -procedure reviseLyrics; -procedure lyrTranslate(var P: string; var numbered: boolean); -procedure getSyllable(voice: voice_index; var pretex: string); -function lyricsReport (voice: voice_index): string; -procedure maybeLyrics (voice: voice_index; parline: paragraph_index; - w: string); -procedure extractLyrtag (voice: voice_index; var note: string); -procedure lyricsAdjust (voice: voice_index; var note: string); -procedure assignLyrics(stave: stave_index; var lyrassign: string); -procedure lyricsParagraph; -function hasVerseNumber(voice: voice_index): boolean; - -implementation uses control, strings, mtxline, status, files, utility; - -{ Symbols used in strings of melismatype } -const - beam_melisma = '['; - inhibit_beam_melisma = '<'; - slur_melisma = '('; - inhibit_slur_melisma = '{'; - -type - other_index = 1..10; - other_index0 = 0..10; - melismatype = string; - haslyrtype = (nolyr, haslyr); - auxtype= (normal, aux); - assigntype = (asbefore, newassign); - inittype = (virgin,active); - lyrinfotype = record - lyr_adjust, slur_level, slur_change, beam_level, beam_change: integer; - melisma: melismatype; - numbered: boolean; - end; - - lyrlinetype = (none_given, global_lyrics, local_lyrics); - lyrtagtype = record - lyrsource: lyrlinetype; - has_lyrics: haslyrtype; - auxiliary: auxtype; - new_assign: assigntype; - initialized: inittype; - linecount: integer; - tags: string; - end; - -const maxLyrNums=64; - lyrtaglength=40; - LyrNum: integer=0; - -var lyrmodealter, oldlyrmodealter: array[stave_index] of boolean; - tag, oldtag: array[voice_index] of lyrtagtype; - lyrinfo: array[voice_index] of lyrinfotype; - numberedParagraph: array[1..maxLyrNums] of string[lyrtaglength]; - -const lyr_adjust_undef = -12345; - interstave = 24; - -{ Information flow for verse numbers: at the SetLyrics stage, the first -line of each lyrics paragraph is checked for a verse number, and if -found, the paragraph tag is remembered. At the AssignLyrics stage, -the first time that paragraph is encountered, the particular voice -is marked in lyrinfo as being numbered. When that voice is later processed, -the mark in lyrinfo is interrogated and turned off: if it was on, the -mtxVerse pre-TeX string is put into the output. } - -function hasVerseNumber(voice: voice_index): boolean; -begin hasVerseNumber:=lyrinfo[voice].numbered; - lyrinfo[voice].numbered:=false; -end; - -function isNumberedLyricsParagraph(tag: string): boolean; - var i: integer; -begin - for i:=1 to LyrNum do if tag=numberedParagraph[i] then - begin isNumberedLyricsParagraph:=true; exit; end; - isNumberedLyricsParagraph:=false; -end; - -function anyTagNumbered(tags: string): boolean; - var s: string; -begin anyTagNumbered:=false; - if curtail(tags,'}')>0 then delete1(tags,1); - repeat s:=getNextWord(tags,',',dummy); - if s='' then exit; - if isNumberedLyricsParagraph(s) then - begin anyTagNumbered:=true; exit; end; - until false; -end; - -{ Save the tag in the numberedParagraph list, stripping off braces if any } -procedure markNumbered(tag: string); -begin if LyrNum >= maxLyrNums then - begin error('Too many numbered lines in the lyrics',not print); exit; end; - inc(LyrNum); - if curtail(tag,'}')>0 then delete1(tag,1); - numberedParagraph[LyrNum] := tag; -end; - -{ --- end of procedures to keep track of verse numbering --- } - -procedure lyricsParagraph; - var first, w: string; - l, line: paragraph_index0; - i, nother: other_index0; - other: array[other_index] of string[lyrtaglength]; - numbered: boolean; -begin if not doLyrics then exit; - w:=NextWord(P[1],blank,dummy); l:=length(w); line_no := orig_line_no[1]; - if w[l]<>'}' then w:=w+'}'; - first:=GetNextWord(w,dummy,'}'); nother:=0; - while w<>'' do - begin if w[1]='=' then predelete(w,1); - if w[1]<>'{' then w:='{'+w; - inc(nother); other[nother]:=GetNextWord(w,dummy,'}'); - end; - if beVerbose then - begin write('---- Paragraph ', paragraph_no, ' starting at line ', line_no, - ' has lyrics headed ',first); - for i:=1 to nother do write('=',other[i]); writeln; - end; - tex3(comment+' Paragraph '+toString(paragraph_no)+' line '+ - toString(line_no)+' bar '+toString(bar_no)); - tex3('\mtxSetLyrics'+first+'{%'); - for line:=2 to para_len do - begin lyrTranslate(P[line],numbered); - if numbered then if (line>2) then warning( - 'Verse number not in first line of paragraph treated as lyrics',print) - else - begin markNumbered(first); for i:=1 to nother do markNumbered(other[i]); - end; - line_no:=orig_line_no[line]; - if (length(P[line])>max_lyrics_line_length) and pmx_preamble_done - then error('Lyrics line too long',print); - if pmx_preamble_done then - if line=2 then put('\\\:'+P[line],putspace) - else put('\\\ ' + P[line],putspace) - else put(P[line],putspace); - if linemaxlyrlen then - lyn := setlyr + btag + '{\'^J'\\\:' + lyn +'}\' - else lyn:= setlyr + btag + '{' + lyn +'}\'; - end; - end; - end; - end; -begin if not dolyrics then exit; - if (length(w)=1) and (voice=0) then - warning('Lyrics line above top voice should be labelled',print); - if length(w)=1 then {* Standard lyrics line -------- } - begin k:=voice; if k=0 then k:=1; convertlyrics(P[parline],k,normal); - end - else {* Labelled lyrics line -- } - begin predelete(w,1); k:=findVoice(w); - if k=0 then error('Lyrics line belongs to unknown voice',print) - else convertlyrics(P[parline],k,aux); - end; -end; - -procedure reviseLyrics; { after paragraph analysis } - var voice : voice_index; - stave : stave_index; -begin - for voice:=1 to nvoices do with tag[voice] do - begin if (oldtag[voice].lyrsource=global_lyrics) and - (lyrsource=none_given) then - begin tags:=oldtag[voice].tags; lyrsource:=global_lyrics; end; - new_assign := - assigntype(ord((has_lyrics=haslyr) and (tags<>oldtag[voice].tags))); - if tags='' then has_lyrics := nolyr; - oldtag[voice].tags := tags; - oldtag[voice].lyrsource := lyrsource; - end; - for stave:=1 to nstaves do with tag[first_on_stave[stave]] do - lyrmodealter[stave] := not aloneOnStave(stave) and - (has_lyrics=haslyr) and (auxiliary=normal); -end; - -procedure assignLyrics(stave: stave_index; var lyrassign: string); - { at start of new block } - var atag, instr, l: string; - v1, v2, voice: voice_index; - begin lyrassign:=''; instr := toString(pmxinstr(stave)); - v1:=first_on_stave[stave]; v2:=v1+number_on_stave[stave]-1; - if v1tag[v2].has_lyrics) then - for voice:=v1 to v2 do with tag[voice] do - if new_assign=newassign then new_assign:=assigntype(has_lyrics); - for voice:=v1 to v2 do lyrinfo[voice].numbered:=false; - for voice:=v1 to v2 do - with tag[voice] do if new_assign=newassign then - begin atag:=tags; if atag='' then atag:='{}'; - l := '\mtxAssignLyrics{' + instr + '}' + atag; - if auxiliary=aux then l:='\mtxAuxLyr{' + l + '}'; - lyrassign := lyrassign + l; - if tags='' then has_lyrics:=nolyr; - if (has_lyrics=haslyr) and (initialized=virgin) then - with lyrinfo[voice] do - begin if (auxiliary=aux) and upper(voice) then - lyr_adjust:=interstave else lyr_adjust:=0; - lyrassign := lyrassign + songraise(voice); - initialized := active; - end; - if anyTagNumbered(atag) then lyrinfo[voice].numbered:=true; - end; - if lyrmodealter[stave]<>oldlyrmodealter[stave] then - begin if lyrmodealter[stave] then - lyrassign := lyrassign + '\mtxLyrModeAlter{' + instr + '}' - else lyrassign := lyrassign + '\mtxLyrModeNormal{' + instr + '}'; - oldlyrmodealter[stave] := lyrmodealter[stave]; - end; - end; - -procedure lyricsAdjust (voice: voice_index; var note: string); - { inline at-word } - var adj: integer; - force, put_above, put_below: boolean; -begin with lyrinfo[voice] do with tag[voice] do - begin predelete(note,1); - force:=note[1]='='; if force then predelete(note,1); - put_above:=note[1]='^'; if put_above then predelete(note,1); - put_below:=note[1]='v'; if put_below then predelete(note,1); - if note<>'' then getNum(note,adj) else adj:=0; - if has_lyrics=nolyr then begin note:=''; exit; end; - if put_above then lyr_adjust:=interstave - else if put_below then lyr_adjust:=0; - if force then lyr_adjust:=adj else inc(lyr_adjust,adj); - note:=songraise(voice); if note<>'' then note:='\\'+note+'\'; - end -end; - -procedure lyrTranslate(var P: string; var numbered: boolean); - var k, l, number: integer; - Q, w: string; -begin { Test for starting number } w:=NextWord(P,blank,dummy); - numbered:=false; - if endsWith(w,'.') then begin getNum(w,number); numbered:=number<>0 end; - {Translate lyrics link } Q := ''; l:=length(P); - for k:=1 to l-1 do - if (P[k]<>'_') or (P[k+1]='_') or (P[k+1]=' ') or (pos1(P[k+1],digits)>0) - then Q := Q+P[k] - else if (k>1) and (P[k-1]='\') then Q := Q+'mtxLowLyrlink ' - else Q := Q+'\mtxLyrlink '; - Q:=Q+P[l]; - P := Q; -end; - -type melismaEnd = (beam, slur); - -function removeLast(var s: string; t: string): char; - var i,l: integer; -begin l:=length(s); - for i:=l downto 1 do if pos1(s[i],t)>0 then - begin removeLast:=s[i]; delete1(s,i); exit; end; - removeLast := dummy; -end; - -function OpenMelisma(s: string): boolean; -begin OpenMelisma := (pos1(slur_melisma,s)>0) or (pos1(beam_melisma,s)>0); -end; - -{ Append mtxBM or mtxEM to pretex when appropriate } -procedure getSyllable(voice: voice_index; var pretex: string); - var BM, EM: boolean; - procedure startMelismas (t: string); - var open_before, open_now: boolean; - i, k: integer; - begin k:=length(t); - for i:=1 to k do with lyrinfo[voice] do - begin open_before := OpenMelisma(melisma); - melisma := melisma + t[i]; - open_now := OpenMelisma(melisma); - BM := BM or (open_now and not open_before) - end; - end; - function endMelisma(voice: integer): boolean; - var found: char; - i: integer; - count: array[melismaEnd] of integer; - t: melismaEnd; - begin EM := false; - count[slur] := -lyrinfo[voice].slur_change; - count[beam] := -lyrinfo[voice].beam_change; - for t:=beam to slur do for i:=1 to count[t] do with lyrinfo[voice] do - begin - case t of - slur: found := removeLast(melisma,slur_melisma+inhibit_slur_melisma); - beam: found := removeLast(melisma,beam_melisma+inhibit_beam_melisma); - end; - if found=dummy then - error3(voice,'Ending a melisma that was never started'); - EM := EM or (not openMelisma(melisma) - and (pos1(found,slur_melisma+beam_melisma)>0)) - end; - endMelisma := EM - end; - procedure startSlurMelisma(voice: voice_index); - const start: array[boolean] of char = (slur_melisma,inhibit_slur_melisma); - var slurs: string; - k: integer; - begin slurs:=''; - for k:=1 to lyrinfo[voice].slur_change do - slurs:=start[noSlurMelisma(voice,1-k)]+slurs; - startMelismas(slurs) - end; - procedure startBeamMelisma(voice: voice_index); - const start: array[boolean] of char = (beam_melisma,inhibit_beam_melisma); - var beams: string; - k: integer; - begin beams:=''; - for k:=1 to lyrinfo[voice].beam_change do - beams:=start[noBeamMelisma(voice)]+beams; - startMelismas(beams) - end; - function startMelisma(voice: integer): boolean; - begin BM:=false; startSlurMelisma(voice); startBeamMelisma(voice); - startMelisma := BM - end; - var t: integer; -begin with tag[voice] do with lyrinfo[voice] do - begin if has_lyrics<>haslyr then exit; - t:=slur_level; slur_level:=slurLevel(voice); slur_change:=slur_level-t; - t:=beam_level; beam_level:=beamLevel(voice); beam_change:=beam_level-t; - if startMelisma(voice) then if auxiliary=aux - then pretex:=pretex+'\mtxAuxBM' else pretex:=pretex+'\mtxBM'; - if endMelisma(voice) then if auxiliary=aux - then pretex:=pretex+'\mtxAuxEM' else pretex:=pretex+'\mtxEM' - end -end; - -procedure getSyllable1(voice: voice_index; var pretex: string); -begin with lyrinfo[voice] do - begin - writeln('voice=',voice, ', slurchange=',slur_change, - ', melisma=',melisma, ', beamchange=', beam_change) - end; - getSyllable1(voice,pretex); - if pretex<>'' then writeln('pretex = ',pretex) -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/mtx.c b/Build/source/utils/mtx/mtx-0.60d/mtx.c deleted file mode 100644 index f4a85564092..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/mtx.c +++ /dev/null @@ -1,505 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "mtx.pas" */ - - -#include "p2c.h" - - -#define MTX_G -#include "mtx.h" - - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef STATUS_H -#include "status.h" -#endif - -#ifndef NOTES_H -#include "notes.h" -#endif - - -#define flagged "8136" - - -typedef boolean sticky['z' + 1 - 'a']; - - -Static sticky note_attrib[maxvoices], rest_attrib[maxvoices]; - - -Static short logTwo(denom) -short denom; -{ - short l = 0; - - while (denom > 1) { - l++; - denom /= 2; - } - return l; -} - - -Local boolean dotted(n) -short n; -{ - boolean Result; - -/* p2c: mtx.pas: Note: Eliminated unused assignment statement [338] */ - if (n == 0) - return false; - if (n != n / 3 * 3) - return false; - n /= 3; - while ((n & 1) == 0) - n /= 2; - return (n == 1); -} - - -/* RESTS should have a third parameter OFFSET. At present we in effect - assume OFFSET+LENGTH to be a multiple of METERDENOM. */ -Char *rests(Result, len, meterdenom, blind) -Char *Result; -short len, meterdenom; -boolean blind; -{ - Char r[256], bl[256]; - Char STR1[256]; - - if (blind) - strcpy(bl, "b"); - else - *bl = '\0'; - if (len == 0) - return strcpy(Result, ""); - else { - if (len == meterdenom * 128) { - sprintf(Result, "r9%s ", bl); - return Result; - } else { - if (dotted(len)) { - rests(r, len - len / 3, meterdenom, false); - r[2] = 'd'; - sprintf(Result, "%s%s ", r, bl); - return Result; - } else if (len >= 64 / meterdenom) { - sprintf(Result, "%sr%c%s ", - rests(STR1, len - 64 / meterdenom, meterdenom, blind), - durations[whole + logTwo(meterdenom) - 1], bl); - return Result; - } else - return (rests(Result, len, meterdenom * 2, blind)); - } - } -} - - -Local Char *attribs(Result, note) -Char *Result; -Char *note; -{ - Char a[256]; - short i = 2; - short l; - Char n; - - *a = '\0'; - l = strlen(note); - while (i <= l) { - n = note[i-1]; - if (n == 'x') - i = l; - else if (islower(n)) - sprintf(a + strlen(a), "%c", n); - i++; - } - return strcpy(Result, a); -} - - -Static Void checkSticky(note, attrib) -Char *note; -boolean *attrib; -{ - short i = 2; - short l; - Char c; - Char a[256]; - - if (*note == '\0') - return; - l = strlen(note); - while (i <= l) { - c = note[i-1]; - if (islower(c)) { - if (i < l && note[i] == ':') { - delete1(note, i + 1); - l--; - attrib[c - 'a'] = !attrib[c - 'a']; - } else - attrib[c - 'a'] = false; - } - i++; - } - attribs(a, note); - for (c = 'z'; c >= 'a'; c--) { - if (attrib[c - 'a'] && pos1(c, a) == 0) - insertChar(c, note, 3); - } -} - - -/* Routine was patched by Hiroaki Morimoto, revised 2003/08/15. - Rewritten by DPL 2004/05/16 to be more understandable. - octaveCode returns octave adjustments in the order - [absolute or =],[relative] */ -Void checkOctave(voice, note) -voice_index voice; -Char *note; -{ - Char code; - - code = octaveCode(note); - if (code == '=') { - setOctave(voice); - removeOctaveCode(code, note); - } - if (octave(voice) == blank) - return; - code = octaveCode(note); - if (isdigit(code)) { - resetOctave(voice); - return; - } - while (code == '+' || code == '-') { - newOctave(voice, code); - removeOctaveCode(code, note); - code = octaveCode(note); - } - if (code != ' ') - error3(voice, "You may have only one absolute octave assignment"); - insertOctaveCode(octave(voice), note); - resetOctave(voice); -} - - -Void markDebeamed(voice, note) -voice_index voice; -Char *note; -{ - if (isVocal(voice) && afterSlur(voice) == 0 && unbeamVocal() && - pos1(duration(voice), flagged) > 0) - insertChar('a', note, 2); -} - - -Static short barLength(meter) -Char *meter; -{ - short n1, n2, pn1, pn2; - - getMeter(meter, &n1, &n2, &pn1, &pn2); - return (n1 * (64 / n2)); -} - - -Static boolean isMultiBarRest(rest_) -Char *rest_; -{ - boolean Result; - -/* p2c: mtx.pas: Note: Eliminated unused assignment statement [338] */ - if (strlen(rest_) < 3) - return false; - if (rest_[1] != 'm') - return false; - if (multi_bar_rest) - error("Only one multibar rest allowed per line", print); - multi_bar_rest = true; - return true; -} - - -/* Double-length in xtuplet detected by a brute search for D anywhere. - Could be more elegant. */ - -Static short macro_length[20]; - -Static Char macro_ID[20][3] = { - "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", - "15", "16", "17", "18", "19", "20" -}; - - -/* Local variables for scanMusic: */ -struct LOC_scanMusic { - voice_index voice; - Char note[256]; - boolean doublex, store_macro; - short bar, old_length, bar_length, count, l, mlen, ngrace, nmulti, macroID, - playID; - Char macro_type; -} ; - -Local Void decmulti(LINK) -struct LOC_scanMusic *LINK; -{ - if (LINK->doublex) - LINK->nmulti -= 2; - else - LINK->nmulti--; -} - -/* Local variables for countIt: */ -struct LOC_countIt { - struct LOC_scanMusic *LINK; -} ; - -Local Void incbar(nl, LINK) -short nl; -struct LOC_countIt *LINK; -{ - LINK->LINK->bar_length += nl; - if (LINK->LINK->bar_length > LINK->LINK->bar && meternum > 0) - error3(LINK->LINK->voice, "Bar end occurs in mid-note"); -} - -Local Void countIt(LINK) -struct LOC_scanMusic *LINK; -{ - struct LOC_countIt V; - - V.LINK = LINK; - if (LINK->ngrace > 0) { - LINK->ngrace--; - return; - } - if (LINK->nmulti > 0) { - decmulti(LINK); - return; - } - if (LINK->count % 3 != 0 && - (LINK->note[0] != rest && note_attrib[LINK->voice-1]['d' - 'a'] || - LINK->note[0] == rest && rest_attrib[LINK->voice-1]['d' - 'a'])) - LINK->count += LINK->count / 2; -/* p2c: mtx.pas, line 148: - * Note: Using % for possibly-negative arguments [317] */ - incbar(LINK->count, &V); - LINK->l = pos1(multi_group, LINK->note); - if (LINK->l <= 0) - return; - predelete(LINK->note, LINK->l); - getNum(LINK->note, &LINK->nmulti); - decmulti(LINK); -} - -Local Void maybeGroup(LINK) -struct LOC_scanMusic *LINK; -{ - if (LINK->note[0] != grace_group) - return; - if (strlen(LINK->note) == 1) - LINK->ngrace = 1; - else - LINK->ngrace = pos1(LINK->note[1], digits); - /* bug if ngrace>9 */ - if (LINK->ngrace > 0) - LINK->ngrace--; -} - -Local short identifyMacro(s_, LINK) -Char *s_; -struct LOC_scanMusic *LINK; -{ - Char s[256]; - short k; - - strcpy(s, s_); - predelete(s, 2); - for (k = 1; k <= 20; k++) { - if (!strcmp(s, macro_ID[k-1])) - return k; - } - return 0; -} - -Local Void examineMacro(LINK) -struct LOC_scanMusic *LINK; -{ - if (!countMacro()) - return; - if (debugMode()) - printf("%s: ", LINK->note); - if (strlen(LINK->note) == 1) { - LINK->mlen = LINK->bar_length - LINK->old_length; - if (LINK->macroID < 1 || LINK->macroID > 20) - error3(LINK->voice, "Invalid macro ID"); - macro_length[LINK->macroID-1] = LINK->mlen; - if (debugMode()) - printf("Ending macro %d of type %c, length=%d\n", - LINK->macroID, LINK->macro_type, LINK->mlen); - if (LINK->macro_type == 'S') - LINK->bar_length = LINK->old_length; - LINK->store_macro = false; - return; - } - LINK->playID = identifyMacro(LINK->note, LINK); - if (LINK->playID < 1 || LINK->playID > 20) - error3(LINK->voice, "Invalid macro ID"); - if (LINK->note[1] == 'P') { - if (debugMode()) - printf("Playing macro %d of length %d\n", - LINK->playID, macro_length[LINK->playID-1]); - LINK->bar_length += macro_length[LINK->playID-1]; - return; - } - if (pos1(LINK->note[1], "SR") <= 0) - return; - LINK->old_length = LINK->bar_length; - LINK->macro_type = LINK->note[1]; - LINK->macroID = LINK->playID; - LINK->store_macro = true; - if (debugMode()) - printf("Defining macro %d of type %c\n", LINK->macroID, LINK->note[1]); -} - - -Void scanMusic(voice_, left_over) -voice_index voice_; -short *left_over; -{ - struct LOC_scanMusic V; - Char buf[256], enote[256], xnote[256]; - boolean has_next = false, done = false; - Char dur1, lastdur; - music_word nscan; - Char STR1[256]; - - V.voice = voice_; - strcpy(terminators, "d.x"); - resetInfo(V.voice, buf); - *left_over = 0; - V.store_macro = false; - V.bar = full_bar; - V.bar_length = 0; - V.ngrace = 0; - V.nmulti = 0; - if (meternum == 0) - V.bar = 32000; - dur1 = duration(V.voice); - lastdur = dur1; - do { - getNextMusWord(buf, V.note, &nscan); - if (*V.note == '\0') - break; - V.count = 0; - /* if isNoteOrRest(note) and not (isPause(note) or isMultibarRest(note)) - then note:=toStandard(note); */ - V.doublex = (pos1('D', V.note) > 0); - if (nscan == mword) { - if (*V.note == '\0') - error3(V.voice, "You may not end a line with a meter change"); - if (V.bar_length > 0) - error3(V.voice, "Meter change only allowed at start of bar"); - else - V.bar = barLength(V.note); - } else if (nscan == rword) { - if (!(isPause(V.note) || isMultiBarRest(V.note))) { - processNote(V.note, xnote, dur1, &lastdur, &V.count); - checkSticky(V.note, rest_attrib[V.voice-1]); - } - } - if (*V.note != '\0') - appendNote(V.voice, nscan); - strcpy(enote, V.note); - if (nscan == macro || nscan == endmacro) - examineMacro(&V); - if (nscan == abcdefg) { - if (!multi_bar_rest && V.ngrace + V.nmulti == 0) { - processNote(enote, xnote, dur1, &lastdur, &V.count); - if (*xnote != '\0') { - checkSticky(enote, note_attrib[V.voice-1]); - appendToLine(V.voice, enote); - appendNote(V.voice, nscan); - strcpy(enote, xnote); - } - checkSticky(enote, note_attrib[V.voice-1]); - } - } - appendToLine(V.voice, enote); - if (*V.note == '\0') /* !!! else word_bound[here]:=length(line); */ - done = true; - sprintf(STR1, "%c", barsym); - if (!strcmp(V.note, STR1)) { - if (meternum == 0) - error3(V.voice, "You may not use bar lines in barless music"); - else if (V.bar_length == 0) - markBar(V.voice); - else if (numberOfBars(V.voice) == 0 && V.bar_length < V.bar) { - if (has_next) - has_next = false; /*Should check whether pickups are equal*/ - else if (*left_over > 0) - error3(V.voice, "Bar is too short"); - *left_over = V.bar_length; - V.bar_length = 0; - } - } - if (nscan == nextvoice) { - if (V.bar_length > 0) - error3(V.voice, "Next voice before bar is full"); - else - barForward(V.voice, -1); - has_next = true; - } else if (isPause(V.note)) - V.bar_length += V.bar; - else if (!multi_bar_rest) { /*do nothing*/ - if (!done && isNoteOrRest(V.note)) - countIt(&V); - else - maybeGroup(&V); - } - dur1 = lastdur; - if (V.bar_length >= V.bar && V.ngrace + V.nmulti == 0 && !V.store_macro) { - if (debugMode()) - printf("%d %d\n", V.voice, V.bar_length); - barForward(V.voice, V.bar_length / V.bar); - V.bar_length %= V.bar; -/* p2c: mtx.pas, line 266: - * Note: Using % for possibly-negative arguments [317] */ - } - } while (!done); - setExtraLength(V.voice, V.bar_length); - resetDuration(V.voice, dur1); - regroup(V.voice); -} - - -Void initMTX() -{ - voice_index i; - Char j; - - for (i = 0; i <= maxvoices - 1; i++) { - for (j = 'a'; j <= 'z'; j++) - note_attrib[i][j - 'a'] = false; - } - memcpy(rest_attrib, note_attrib, maxvoices * sizeof(sticky)); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/mtx.h b/Build/source/utils/mtx/mtx-0.60d/mtx.h deleted file mode 100644 index 9c4a9811883..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/mtx.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Header for module mtx, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef MTX_H -#define MTX_H - - -/* Details of M-Tx -> PMX translation */ - -#ifndef GLOBALS_H -#include "globals.h" -#endif - - -#ifdef MTX_G -# define vextern -#else -# define vextern extern -#endif - -extern Void scanMusic PP((int voice, short *left_over)); -extern Void markDebeamed PP((int voice, Char *note)); -extern Void checkOctave PP((int voice, Char *note)); -extern Char *rests PP((Char *Result, int len, int meterdenom, int blind)); -extern Void initMTX PV(); - - -#undef vextern - -#endif /*MTX_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/mtx.pas b/Build/source/utils/mtx/mtx-0.60d/mtx.pas deleted file mode 100644 index 474b24521a3..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/mtx.pas +++ /dev/null @@ -1,280 +0,0 @@ -unit mtx; -{ Details of M-Tx -> PMX translation } - -interface uses globals; - -procedure scanMusic(voice: voice_index; var left_over: integer); -procedure markDebeamed(voice: voice_index; var note: string); -procedure checkOctave(voice: voice_index; var note: string); -function rests (len, meterdenom: integer; blind: boolean): string; -procedure initMTX; - -implementation uses control, mtxline, strings, status, notes; - -const flagged = '8136'; - -type sticky = array['a'..'z'] of boolean; - -var note_attrib, rest_attrib: array[voice_index] of sticky; - -function logTwo(denom: integer): integer; - var l: integer; -begin l:=0; while denom>1 do begin inc(l); denom:=denom div 2; end; - logtwo:=l; -end; - -{ RESTS should have a third parameter OFFSET. At present we in effect - assume OFFSET+LENGTH to be a multiple of METERDENOM. } -function rests (len, meterdenom: integer; blind: boolean): string; - var r, bl: string; - function dotted(n: integer): boolean; - begin dotted:=false; if n=0 then exit; - if n<>3*(n div 3) then exit; - n:=n div 3; while n mod 2 = 0 do n:=n div 2; - dotted := n=1; - end; - begin if blind then bl:='b' else bl:=''; - if len=0 then rests:='' else - if len=128*meterdenom then rests:='r9'+bl+' ' else - if dotted(len) then - begin r:=rests(len-len div 3,meterdenom,false); - r[3]:='d'; rests:=r+bl+' '; - end - else if len>=64 div meterdenom then - rests:=rests(len-64 div meterdenom,meterdenom,blind)+'r' - +durations[whole+logtwo(meterdenom)]+bl+' ' - else rests:=rests(len,meterdenom*2,blind); - end; - -procedure checkSticky(var note: string; var attrib: sticky); - var i,l: integer; - c: char; - a: string; - function attribs(note: string): string; - var a: string; - i,l: integer; - n: char; - begin a:=''; i:=2; l:=length(note); - while i<=l do - begin n:=note[i]; - if n='x' then i:=l else if (n>='a') and (n<='z') then a:=a+n; - inc(i); - end; - attribs:=a; - end; -begin if note='' then exit; - l:=length(note); i:=2; - while i<=l do - begin c:=note[i]; - if (c>='a') and (c<='z') then - if (i='0') and (code<='9') then begin resetOctave(voice); exit end; - while (code='+') or (code='-') do - begin - newOctave(voice,code); removeOctaveCode(code,note); code:=octaveCode(note) - end; - if code<>' ' then error3(voice,'You may have only one absolute octave assignment'); - insertOctaveCode(octave(voice),note); resetOctave(voice) -end; - -procedure markDebeamed(voice: voice_index; var note: string); -begin - if isVocal(voice) and (afterSlur(voice)=0) and unbeamVocal - and (pos1(duration(voice),flagged)>0) then insertchar('a',note,2); -end; - -function barLength (meter: string): integer; - var n1, n2, pn1, pn2: integer; -begin - getMeter(meter,n1,n2,pn1,pn2); barLength := n1*(64 div n2); -end; - -function isMultiBarRest(rest: string): boolean; -begin isMultibarRest:=false; if length(rest)<3 then exit; - if rest[2]<>'m' then exit; - if multi_bar_rest then error( - 'Only one multibar rest allowed per line',print); - multi_bar_rest := true; isMultibarRest:=true; -end; - -{ Double-length in xtuplet detected by a brute search for D anywhere. - Could be more elegant. } - -var macro_length: array[1..20] of integer; -const macro_ID: array[1..20] of string[2]=('1','2','3','4','5','6','7','8', - '9','10','11','12','13','14','15','16','17','18','19','20'); - -procedure scanMusic(voice: voice_index; var left_over: integer); - var buf, note, enote, xnote: string; - has_next, done, doublex, store_macro: boolean; - bar, old_length, bar_length, count, l, mlen, ngrace, nmulti, - macroID, playID: integer; - dur1, lastdur, macro_type: char; - nscan: music_word; - - procedure decmulti; - begin if doublex then dec(nmulti,2) else dec(nmulti) - end; - - procedure countIt; - procedure incbar(nl: integer); - begin inc(bar_length,nl); - if (bar_length>bar) and (meternum>0) - then error3(voice,'Bar end occurs in mid-note'); - end; - begin - if ngrace>0 then dec(ngrace) else - if nmulti>0 then decmulti else - begin if (count mod 3<>0) and ( - (note[1]<>rest) and note_attrib[voice,'d'] or - (note[1]=rest) and rest_attrib[voice,'d']) then - inc(count,count div 2); - incbar(count); - l := pos1(multi_group,note); - if l>0 then - begin predelete(note,l); getNum(note,nmulti); decmulti; - end; - end - end; - - procedure maybeGroup; - begin if note[1]=grace_group then - begin if length(note)=1 then ngrace:=1 - else ngrace := pos1(note[2],digits); (* bug if ngrace>9 *) - if ngrace>0 then dec(ngrace); - end; - end; - - function identifyMacro(s: string): integer; - var k: integer; - begin predelete(s,2); for k:=1 to 20 do if s=macro_ID[k] then - begin identifyMacro:=k; exit end; - identifyMacro:=0 - end; - - procedure examineMacro; - begin if not countMacro then exit; - if debugMode then write(note,': '); if length(note)=1 then - begin - mlen:=bar_length-old_length; - if (macroID<1) or (macroID>20) then error3(voice,'Invalid macro ID'); - macro_length[macroID]:=mlen; - if debugMode then - writeln('Ending macro ',macroID,' of type ',macro_type,', length=', mlen); - if macro_type='S' then bar_length:=old_length; store_macro:=false - end - else begin playID:=identifyMacro(note); - if (playID<1) or (playID>20) then error3(voice,'Invalid macro ID'); - if note[2]='P' then - begin if debugMode then - writeln('Playing macro ',playID,' of length ', - macro_length[playID]); - inc(bar_length,macro_length[playID]) - end - else if pos1(note[2],'SR')>0 then - begin old_length:=bar_length; macro_type:=note[2]; macroID:=playID; - store_macro:=true; - if debugMode then writeln('Defining macro ',macroID,' of type ',note[2]) - end - end - end; - -begin - terminators:='d.x'; - resetInfo(voice, buf); has_next := false; left_over:=0; store_macro:=false; - bar:=full_bar; bar_length:=0; ngrace:=0; nmulti:=0; - if meternum=0 then bar:=32000; - dur1:=duration(voice); lastdur:=dur1; - done:=false; - repeat GetNextMusWord(buf,note,nscan); if length(note)=0 then break; count:=0; -{ if isNoteOrRest(note) and not (isPause(note) or isMultibarRest(note)) - then note:=toStandard(note); } - doublex := pos1('D',note)>0; - if nscan=mword then - begin - if length(note)=0 then - Error3(voice,'You may not end a line with a meter change'); - if bar_length>0 then - error3(voice,'Meter change only allowed at start of bar') - else bar:=barLength(note); - end - else if nscan=rword then - if not (isPause(note) or isMultiBarRest(note)) then - begin - processNote(note,xnote,dur1,lastdur,count); - checkSticky(note,rest_attrib[voice]); - end; - if note<>'' then appendNote(voice,nscan); - enote := note; - if (nscan=macro) or (nscan=endMacro) then examineMacro; - if nscan=abcdefg then - if (not multi_bar_rest) and (ngrace + nmulti = 0) then - begin - processNote(enote,xnote,dur1,lastdur,count); - if xnote<>'' then - begin - checkSticky(enote,note_attrib[voice]); - appendToLine(voice,enote); - appendNote(voice,nscan); enote := xnote; - end; - checkSticky(enote,note_attrib[voice]); - end; - appendToLine(voice,enote); - if note='' then done:=true; { !!! else word_bound[here]:=length(line); } - if (note=barsym) then - if meternum=0 then - error3(voice,'You may not use bar lines in barless music') - else if bar_length=0 then markBar(voice) - else if (numberOfBars(voice)=0) and (bar_length0 then error3(voice,'Bar is too short'); - left_over:=bar_length; bar_length := 0; - end; - if nscan=nextvoice then - begin if bar_length>0 then error3(voice, 'Next voice before bar is full') - else barForward(voice,-1); has_next := true; - end - else if isPause(note) then inc(bar_length,bar) - else if multi_bar_rest then {do nothing} - else if not done and isNoteOrRest(note) then countIt - else maybeGroup; - dur1:=lastdur; - if (bar_length>=bar) and (ngrace+nmulti=0) and not store_macro then - begin if debugMode then writeln(voice,' ',bar_length); - barForward(voice,bar_length div bar); bar_length:=bar_length mod bar - end; - until done; - setExtraLength(voice,bar_length); - resetDuration(voice,dur1); - regroup(voice) -end; - -procedure initMTX; - var i: voice_index; j: char; -begin for i:=1 to maxvoices do for j:='a' to 'z' do - note_attrib[i,j] := false; - rest_attrib := note_attrib; -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/mtxline.c b/Build/source/utils/mtx/mtx-0.60d/mtxline.c deleted file mode 100644 index f61cee0e24d..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/mtxline.c +++ /dev/null @@ -1,844 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "mtxline.pas" */ - - -#include "p2c.h" - - -#define MTXLINE_G -#include "mtxline.h" - - -boolean bind_left[22] = { - false, false, true, false, false, true, true, false, true, true, true, - false, true, false, true, false, true, false, false, false, false, false -}; - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef NOTES_H -#include "notes.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -typedef music_word word_scan[max_words]; - -typedef struct line_info { - word_index0 here, nword; - bar_index0 nbar; - paragraph_index0 voice_pos, voice_stave, mus, chord; - short extra; - boolean vocal; - word_index0 bar_bound[max_bars + 1]; - short word_bound[max_words + 1]; - word_scan scan; -} line_info; - - -Static Char name[22][10] = { - "?", "note", "znote", "lyricsTag", "(", ")", ")(", "[", "]", "_", "PMX<", - "macro", "endMacro", "meter", "ornament", "rest", "//", "BAR", "TeX", "@", - "firstonly", "ERROR" -}; - -Static line_info info[maxvoices]; - - -/* ------------------------------------------------------------- */ - -short beatsPerLine(void) -{ - short Result; - voice_index voice, FORLIM; - line_info *WITH; - - FORLIM = nvoices; - for (voice = 1; voice <= FORLIM; voice++) { - WITH = &info[voice-1]; - if (WITH->nbar > 0 || WITH->extra > 0) { - if (WITH->extra % one_beat > 0) { -/* p2c: mtxline.pas, line 99: - * Note: Using % for possibly-negative arguments [317] */ - error3(voice, "Line length not an integer number of beats"); - } - Result = WITH->nbar * meternum + WITH->extra / one_beat; - } - } - return Result; -} - - -void skipChordBar(voice_index voice) -{ - line_info *WITH; - Char STR1[256]; - - WITH = &info[voice-1]; - if (WITH->chord > 0) { - sprintf(STR1, "%c", barsym); - if (!strcmp(P[WITH->chord - 1], STR1)) - predelete(P[WITH->chord - 1], 1); - } -} - - -Char *getBar(Char *Result, voice_index voice, short bar) -{ - line_info *WITH; - - WITH = &info[voice-1]; - return (substr_(Result, P[WITH->mus - 1], - WITH->word_bound[WITH->bar_bound[bar-1]] + 1, - WITH->word_bound[WITH->bar_bound[bar]] - - WITH->word_bound[WITH->bar_bound[bar-1]])); -} - - -Char *musicLine(Char *Result, voice_index voice) -{ - return strcpy(Result, P[musicLineNo(voice) - 1]); -} - - -paragraph_index0 musicLineNo(voice_index voice) -{ - return (info[voice-1].mus); -} - - -void setMusicLineNo(voice_index voice, paragraph_index lno) -{ - info[voice-1].mus = lno; -} - - -paragraph_index0 chordLineNo(voice_index voice) -{ - return (info[voice-1].chord); -} - - -void setChordLineNo(voice_index voice, paragraph_index lno) -{ - info[voice-1].chord = lno; -} - - -void setVocal(voice_index voice, boolean voc) -{ - info[voice-1].vocal = voc; -} - - -boolean isVocal(voice_index voice) -{ - return (info[voice-1].vocal); -} - - -void setStavePos(voice_index voice, stave_index stave, stave_index pos) -{ - line_info *WITH; - - WITH = &info[voice-1]; - WITH->voice_pos = pos; - WITH->voice_stave = stave; -} - - -stave_index voiceStave(voice_index voice) -{ - return (info[voice-1].voice_stave); -} - - -stave_index voicePos(voice_index voice) -{ - return (info[voice-1].voice_pos); -} - - -voice_index companion(voice_index voice) -{ - short s; - - s = info[voice-1].voice_stave; - if (number_on_stave[s-1] == 1) - return voice; - else if (info[voice-1].voice_pos == 1) - return (voice + 1); - else - return (voice - 1); -} - - -void regroup(voice_index voice) -{ - word_index0 i, j; - word_index0 j2 = 0; - line_info *WITH; - word_index0 FORLIM; - - WITH = &info[voice-1]; - if (debugMode()) - printf("Voice %d has %d bars at ", voice, WITH->nbar); - if (debugMode()) { - FORLIM = WITH->nbar + 1; - for (i = 1; i <= FORLIM; i++) - printf("%d ", WITH->bar_bound[i]); - } - FORLIM = WITH->nbar; - for (i = 1; i <= FORLIM; i++) { - j2 = WITH->bar_bound[i]; - j = j2 + 1; - while (j <= WITH->here && - (bind_left[(long)WITH->scan[j-1]] || WITH->scan[j-1] == barword)) { - WITH->bar_bound[i]++; - j++; - } - } - if (WITH->extra > 0) - WITH->bar_bound[WITH->nbar + 1] = WITH->here; - if (debugMode()) { - printf(" regrouped to "); - FORLIM = WITH->nbar + 1; - for (i = 1; i <= FORLIM; i++) - printf("%d ", WITH->bar_bound[i]); - } - if (debugMode()) - putchar('\n'); - WITH->nword = WITH->here; -} - - -void resetInfo(voice_index voice, Char *buf) -{ - line_info *WITH; - - WITH = &info[voice-1]; - strcpy(buf, P[WITH->mus - 1]); - *P[WITH->mus - 1] = '\0'; - WITH->bar_bound[0] = 0; - WITH->word_bound[0] = 0; - WITH->nbar = 0; - WITH->here = 0; -} - - -void clearLabels(void) -{ - voice_index voice, FORLIM; - line_info *WITH; - - FORLIM = nvoices; - for (voice = 0; voice <= FORLIM - 1; voice++) { - WITH = &info[voice]; - WITH->chord = 0; - WITH->mus = 0; - } -} - - -void appendNote(voice_index voice, music_word nscan) -{ - line_info *WITH; - - WITH = &info[voice-1]; - WITH->here++; - if (WITH->here > max_words) - error3(voice, "Words per line limit exceeded"); - WITH->scan[WITH->here - 1] = nscan; -} - - -void appendToLine(voice_index voice, Char *note) -{ - line_info *WITH; - - if (*note == '\0') - return; - WITH = &info[voice-1]; - sprintf(P[WITH->mus - 1] + strlen(P[WITH->mus - 1]), "%s%c", note, blank); - WITH->word_bound[WITH->here] = strlen(P[WITH->mus - 1]); -} - - -void markBar(voice_index voice) -{ - line_info *WITH; - - WITH = &info[voice-1]; - if (WITH->nbar == 0) - error3(voice, "Empty bar"); - else - WITH->bar_bound[WITH->nbar] = WITH->here; -} - - -short numberOfBars(voice_index voice) -{ - return (info[voice-1].nbar); -} - - -void barForward(voice_index voice, short nbars) -{ - line_info *WITH; - - WITH = &info[voice-1]; - if (WITH->nbar + nbars < 0) - error3(voice, "Next voice before bar is full"); - WITH->nbar += nbars; - if (WITH->nbar > max_bars) - error3(voice, "Bars per line limit exceeded"); - if (nbars > 0) - WITH->bar_bound[WITH->nbar] = WITH->here; -} - - -void setExtraLength(voice_index voice, short ext) -{ - line_info *WITH; - - WITH = &info[voice-1]; - WITH->extra = ext; - WITH->scan[WITH->here] = other; -} - - -short ExtraLength(voice_index voice) -{ - return (info[voice-1].extra); -} - - -voice_index0 findVoice(Char *w_) -{ - voice_index0 Result = 0; - Char w[256]; - short i, FORLIM; - - strcpy(w, w_); - curtail(w, ':'); - FORLIM = nvoices; - for (i = 1; i <= FORLIM; i++) { - if (!strcmp(w, voice_label[i-1])) - return i; - } - getNum(w, &i); - if (i == 0) - return Result; - if (i > 0 && i <= nvoices) - return i; - error("Numeric label outside range 1..nvoices", print); - return Result; -} - - -Static void info3(voice_index voice) -{ - line_info *WITH; - - WITH = &info[voice-1]; - printf("In voice \"%s\" near word %d:\n", voice_label[voice-1], WITH->here); - printf("%*cV\n", WITH->word_bound[WITH->here], ' '); -} - - -void error3(voice_index voice, Char *message) -{ - Char STR1[256]; - - info3(voice); - sprintf(STR1, " %s", message); - error(STR1, print); -} - - -void warning3(voice_index voice, Char *message) -{ - Char STR1[256]; - - info3(voice); - sprintf(STR1, " %s", message); - warning(STR1, print); -} - - -Char *nextMusicWord(Char *Result, voice_index voice) -{ - return (MusicWord(Result, voice, info[voice-1].here)); -} - - -Char *MusicWord(Char *Result, short voice, short n) -{ - line_info *WITH; - - WITH = &info[voice-1]; - if (n > 0 && n <= WITH->nword) - return (substr_(Result, P[WITH->mus - 1], WITH->word_bound[n-1] + 1, - WITH->word_bound[n] - WITH->word_bound[n-1] - 1)); - else - return strcpy(Result, ""); -} - - -music_word thisNote(voice_index voice) -{ - line_info *WITH; - - WITH = &info[voice-1]; - return (WITH->scan[WITH->here - 2]); -} - - -music_word nextNote(voice_index voice) -{ - line_info *WITH; - - WITH = &info[voice-1]; - return (WITH->scan[WITH->here - 1]); -} - - -boolean endOfBar(voice_index voice, short bar_no) -{ - line_info *WITH; - - WITH = &info[voice-1]; - return (WITH->here > WITH->bar_bound[bar_no]); -} - - -void gotoBar(voice_index voice, short bar_no) -{ - line_info *WITH; - - WITH = &info[voice-1]; - WITH->here = WITH->bar_bound[bar_no-1] + 1; -} - - -Char *getMusicWord(Char *Result, voice_index voice) -{ - line_info *WITH; - - WITH = &info[voice-1]; - line_no = orig_line_no[WITH->mus - 1]; - MusicWord(Result, voice, WITH->here); - WITH->here++; - return Result; -} - - -boolean maybeMusicLine(Char *l_) -{ - Char l[256]; - Char w[256]; - music_word nscan; - - strcpy(l, l_); - GetNextWord(w, l, blank, dummy); -/* p2c: mtxline.pas: Note: Eliminated unused assignment statement [338] */ - if (pos1(w[0], "abcdefgr()[]{}CMm") == 0) - return false; - if (pos1(':', w) == 0) - return true; - getNextMusWord(w, l, &nscan); - return (nscan == abcdefg); -} - - -#define nmacros 99 - - -Static boolean macro_initialized = false; -Static Char macro_text[nmacros][256]; - - -Static void macroInit(void) -{ - short i; - - if (macro_initialized) - return; - macro_initialized = true; - for (i = 0; i <= nmacros - 1; i++) - *macro_text[i] = '\0'; -} - - -Static short identifyMacro(Char *s_) -{ - Char s[256]; - short k; - - strcpy(s, s_); - predelete(s, 2); - getNum(s, &k); - return k; -} - - -/* Local variables for getNextMusWord: */ -struct LOC_getNextMusWord { - Char *buf, *note; -} ; - -Local void expandThisMacro(struct LOC_getNextMusWord *LINK) -{ - Char playtag[11]; - short playID; - Char w[256]; - Char STR1[72]; - Char STR2[42]; - Char STR3[68]; - Char STR4[54]; - Char STR5[256], STR7[256]; - - macroInit(); - if (strlen(LINK->note) == 1) - error("Can't terminate a macro that has not been started", print); - playID = identifyMacro(LINK->note); - toString(playtag, playID); -/* p2c: mtxline.pas, line 310: - * Note: Possible string truncation in assignment [145] */ - if (playID < 1 || playID > 99) { - sprintf(STR2, "Macro ID %s is not in range 1..99", playtag); - error(STR2, print); - } - if (LINK->note[1] == 'P') { - if (*macro_text[playID-1] == '\0') { - sprintf(STR3, - "Macro %s inserts empty text: did you define it before use?", - playtag); - warning(STR3, print); - } - if (strlen(macro_text[playID-1]) + strlen(LINK->buf) <= 255) { - if (debugMode()) - printf("Inserting macro %s text \"%s\"\n", - playtag, macro_text[playID-1]); - printf("Buffer before insert: %s\n", LINK->buf); - sprintf(LINK->buf, "%s%s", - macro_text[playID-1], strcpy(STR5, LINK->buf)); - return; - } - sprintf(STR4, "Expansion of macro %s causes buffer overflow", playtag); - error(STR4, print); - } - if (pos1(LINK->note[1], "SR") == 0) { - sprintf(STR4, "Second character %c of macro word should be in \"PRS\"", - LINK->note[1]); - error(STR4, print); - } - *macro_text[playID-1] = '\0'; - do { - GetNextWord(w, LINK->buf, blank, dummy); - if (*w == '\0') { - sprintf(STR1, - "Macro definition %s should be terminated on the same input line", - playtag); - error(STR1, print); - } - if (!strcmp(w, "M")) { - if (debugMode()) - printf("Macro %s is: %s\n", playtag, macro_text[playID-1]); - break; - } - if (w[0] == 'M' && strlen(w) > 1) { - if (w[1] != 'P' || identifyMacro(w) == playID) { - sprintf(STR7, "%s not allowed inside macro definition %s", w, playtag); - error(STR7, print); - } - } - sprintf(macro_text[playID-1] + strlen(macro_text[playID-1]), "%s ", w); - } while (true); - if (LINK->note[1] == 'R') { - LINK->note[1] = 'P'; - sprintf(LINK->buf, "%s %s", LINK->note, strcpy(STR7, LINK->buf)); - } -} - - -void getNextMusWord(Char *buf_, Char *note_, music_word *nscan) -{ - struct LOC_getNextMusWord V; - Char maybe_error[256]; - Char STR2[256]; - - V.buf = buf_; - V.note = note_; - GetNextWord(V.note, V.buf, blank, dummy); - if (*V.note == '\0') - return; - if (V.note[0] == 'M' && expandMacro()) { - expandThisMacro(&V); - getNextMusWord(V.buf, V.note, nscan); - return; - } - if (V.note[0] == '\\') { - *maybe_error = '\0'; - if (V.note[strlen(V.note) - 1] != '\\') - strcpy(maybe_error, V.note); - while (*V.buf != '\0' && V.note[strlen(V.note) - 1] != '\\') - sprintf(V.note + strlen(V.note), " %s", - GetNextWord(STR2, V.buf, blank, dummy)); - if (V.note[strlen(V.note) - 1] != '\\') - error("Unterminated TeX literal", print); - *nscan = texword; - if (*maybe_error != '\0') { - sprintf(STR2, "Possible unterminated TeX literal: %s", maybe_error); - warning(STR2, print); - } - return; - } - if (solfaNoteNames()) { - translateSolfa(V.note); - if (V.note[0] == '"') - predelete(V.note, 1); - } - switch (V.note[0]) { - - case '_': - *nscan = pmxprefix; - delete1(V.note, 1); - break; - - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - *nscan = abcdefg; - break; - - case 'z': - *nscan = zword; - break; - - case '(': - *nscan = lparen; - break; - - case '{': - if (V.note[strlen(V.note) - 1] == '}') - *nscan = lyrtag; - else - *nscan = lparen; - break; - - case ')': - if (pos1('(', V.note) == 0) - *nscan = rparen; - else - *nscan = rlparen; - break; - - case '}': - if (pos1('{', V.note) == 0) - *nscan = rparen; - else - *nscan = rlparen; - break; - - case '[': - *nscan = lbrac; - break; - - case ']': - *nscan = rbrac; - break; - - case '@': - *nscan = atword; - break; - - case 'm': - *nscan = mword; - break; - - case 'r': - *nscan = rword; - break; - - case '#': - case '-': - case 'n': - case 'x': - case '?': - case 's': - case 't': - case 'D': - *nscan = pmxl; - break; - - case 'M': - if (!strcmp(V.note, "M")) - *nscan = endmacro; - else - *nscan = macro; - break; - - case 'G': - if (pos1('A', V.note) > 0) - *nscan = pmxl; - else - *nscan = other; - break; - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (pos1('/', V.note) > 0) - *nscan = mword; - else - *nscan = pmxl; - break; - - case 'o': - *nscan = oword; - break; - - case 'A': - case 'V': - *nscan = FirstOnly; - break; - - case '/': - if (!strcmp(V.note, "//")) - *nscan = nextvoice; - else if (!strcmp(V.note, "/")) { - strcpy(V.note, "//"); - warning("/ changed to //", print); - *nscan = nextvoice; - } else { - error("Word starts with /: do you mean \\?", print); - *nscan = err; - } - break; - - default: - if (pos1('|', V.note) > 0) - *nscan = barword; - else - *nscan = other; - break; - } -} - - -boolean upper(voice_index voice) -{ - line_info *WITH; - - WITH = &info[voice-1]; - if (WITH->voice_pos == 1 && voice < nvoices) - return (WITH->voice_stave == info[voice].voice_stave); - else - return false; -} - - -void describeVoice(voice_index voice, Char *describe_lyr) -{ - short bar, w; - line_info *WITH; - Char STR1[256]; - line_info *WITH1; - short FORLIM; - - WITH = &info[voice-1]; - printf("Voice `%s' is on line %d", voice_label[voice-1], WITH->mus); - if (WITH->vocal) { - printf(", is vocal"); - puts(describe_lyr); - } else { - if (WITH->chord > 0) - printf(" and has chords on line %d", WITH->chord); - putchar('\n'); - } - if (!debugMode()) - return; - WITH1 = &info[voice-1]; - printf("Line has %d bars", WITH1->nbar); - if (WITH1->extra > 0) - printf(" + %d/64 notes\n", WITH1->extra); - else - putchar('\n'); - printf("Bars:"); - FORLIM = WITH1->nbar; - for (bar = 1; bar <= FORLIM; bar++) - printf(" %s ", getBar(STR1, voice, bar)); - printf("\nWord types:"); - FORLIM = WITH1->nword; - for (w = 0; w <= FORLIM - 1; w++) - printf(" %s", name[(long)WITH1->scan[w]]); - putchar('\n'); -} - - -boolean aloneOnStave(stave_index stave) -{ - voice_index v; - - if (number_on_stave[stave-1] != 2) - return true; - else { - v = first_on_stave[stave-1]; - return (info[v-1].mus == 0 || info[v].mus == 0); - } -} - - -void selectVoices(Char *line_) -{ - Char line[256]; - short i = 0; - short k; - Char word[256]; - short FORLIM; - - strcpy(line, line_); - FORLIM = nvoices; - for (k = 0; k <= FORLIM - 1; k++) - selected[k] = false; - printf("Voice change to: %s = ", line); - while (i < nvoices) { - GetNextWord(word, line, blank, dummy); - if (*word == '\0') { - putchar('\n'); - return; - } - i++; - printf("%s ", word); - k = findVoice(word); - if (k == 0) - error("This voice is not in the style", print); - selected[k-1] = true; - } - putchar('\n'); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/mtxline.h b/Build/source/utils/mtx/mtx-0.60d/mtxline.h deleted file mode 100644 index 23fc05be32c..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/mtxline.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Header for module mtxline, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef MTXLINE_H -#define MTXLINE_H - - -/* Break input up into words, classify them. Supply words and - information about them. */ - -#ifndef GLOBALS_H -#include "globals.h" -#endif - - -#ifdef MTXLINE_G -# define vextern -#else -# define vextern extern -#endif - - -typedef enum { - other, abcdefg, zword, lyrtag, lparen, rparen, rlparen, lbrac, rbrac, - pmxprefix, pmxl, macro, endmacro, mword, oword, rword, nextvoice, barword, - texword, atword, FirstOnly, err -} music_word; - - -extern boolean bind_left[22]; - -/* changed bind_left[barword] to false */ - -vextern boolean selected[maxvoices]; - - -extern void error3(voice_index voice, Char *message); -extern void warning3(voice_index voice, Char *message); -extern void getNextMusWord(Char *buf, Char *note, music_word *nscan); -extern Char *MusicWord(Char *Result, short voice, short n); -extern Char *nextMusicWord(Char *Result, voice_index voice); -extern music_word thisNote(voice_index voice); -extern music_word nextNote(voice_index voice); -extern Char *getMusicWord(Char *Result, voice_index voice); -extern void gotoBar(voice_index voice, short bar_no); -extern boolean endOfBar(voice_index voice, short bar_no); -extern Char *getBar(Char *Result, voice_index voice, short bar); -extern boolean upper(voice_index voice); -extern void clearLabels(void); -extern voice_index0 findVoice(Char *w); -extern void selectVoices(Char *line); -extern void resetInfo(voice_index voice, Char *buf); -extern void setVocal(voice_index voice, boolean voc); -extern boolean isVocal(voice_index voice); -extern void setStavePos(voice_index voice, stave_index stave, stave_index pos); -extern stave_index voiceStave(voice_index voice); -extern stave_index voicePos(voice_index voice); -extern boolean aloneOnStave(stave_index stave); -extern voice_index companion(voice_index voice); -extern void appendNote(voice_index voice, music_word nscan); -extern void appendToLine(voice_index voice, Char *note); -extern void markBar(voice_index voice); -extern short numberOfBars(voice_index voice); -extern void barForward(voice_index voice, short nbars); -extern void regroup(voice_index voice); - -extern short beatsPerLine(void); -extern void setExtraLength(voice_index voice, short ext); -extern short ExtraLength(voice_index voice); -extern paragraph_index0 musicLineNo(voice_index voice); -extern void setMusicLineNo(voice_index voice, paragraph_index lno); -extern paragraph_index0 chordLineNo(voice_index voice); -extern void setChordLineNo(voice_index voice, paragraph_index lno); -extern void skipChordBar(voice_index voice); - -extern void describeVoice(voice_index voice, Char *describe_lyr); -extern boolean maybeMusicLine(Char *l); -extern Char *musicLine(Char *Result, voice_index voice); - - -#undef vextern - -#endif /*MTXLINE_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/mtxline.pas b/Build/source/utils/mtx/mtx-0.60d/mtxline.pas deleted file mode 100644 index cd3e0b27bcc..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/mtxline.pas +++ /dev/null @@ -1,447 +0,0 @@ -unit mtxline; -{ Break input up into words, classify them. Supply words and - information about them. } - -interface uses globals; - -type - music_word = (other, abcdefg, zword, lyrtag, - lparen, rparen, rlparen, lbrac, rbrac, - pmxl, macro, endmacro, mword, oword, rword, nextvoice, - barword, texword, atword, FirstOnly, err ); - -const - bind_left: array[music_word] of boolean = ( - false, false, true, false, - false, true, true, false, true, - true, false, true, false, true, false, true, - false, false, false, false, false ); -{ changed bind_left[barword] to false } - -var selected: array[voice_index] of boolean; - -procedure error3(voice: voice_index; message: string ); -procedure warning3(voice: voice_index; message: string ); -procedure getNextMusWord (var buf, note: string; var nscan: music_word); -function MusicWord(voice, n: integer): string; -function nextMusicWord(voice: voice_index): string; -function thisNote(voice: voice_index): music_word; -function nextNote(voice: voice_index): music_word; -function getMusicWord(voice: voice_index): string; -procedure gotoBar(voice: voice_index; bar_no: integer); -function endOfBar(voice: voice_index; bar_no: integer): boolean; -function getBar(voice:voice_index; bar: integer): string; -function upper(voice: voice_index): boolean; -procedure clearLabels; -function findVoice(w: string): voice_index0; -procedure selectVoices(line: string); -procedure resetInfo(voice: voice_index; var buf: string); -procedure setVocal(voice: voice_index; voc: boolean); -function isVocal(voice: voice_index): boolean; -procedure setStavePos(voice: voice_index; stave, pos: stave_index); -function voiceStave(voice: voice_index): stave_index; -function voicePos(voice: voice_index): stave_index; -function aloneOnStave(stave: stave_index): boolean; -function companion(voice: voice_index): voice_index; -procedure appendNote(voice: voice_index; nscan: music_word); -procedure appendToLine(voice: voice_index; note: string); -procedure markBar(voice: voice_index); -function numberOfBars(voice: voice_index): integer; -procedure barForward(voice: voice_index; nbars: integer); -procedure regroup(voice: voice_index); - -function beatsPerLine: integer; -procedure setExtraLength(voice: voice_index; ext: integer); -function ExtraLength(voice: voice_index): integer; -function musicLineNo(voice: voice_index): paragraph_index0; -procedure setMusicLineNo(voice: voice_index; lno: paragraph_index); -function chordLineNo(voice: voice_index): paragraph_index0; -procedure setChordLineNo(voice: voice_index; lno: paragraph_index); -procedure skipChordBar(voice: voice_index); - -procedure describeVoice(voice: voice_index; describe_lyr: string); -function maybeMusicLine(l: string): boolean; -function musicLine(voice: voice_index): string; - -implementation uses strings, notes, control, utility; - -const - - name: array[music_word] of string[9] = ( - '?', 'note', 'znote', 'lyricsTag', - '(', ')', ')(', '[', ']', - 'PMX<', 'macro', 'endMacro', 'meter', 'ornament', 'rest', '//', - 'BAR', 'TeX', '@', 'firstonly', 'ERROR'); - -type - word_scan = array[1..max_words] of music_word; - - line_info = record - here, nword: word_index0; - nbar: bar_index0; - voice_pos, voice_stave, mus, chord: paragraph_index0; - extra: integer; - vocal: boolean; - bar_bound: array[bar_index0] of word_index0; - word_bound: array[word_index0] of integer; - scan: word_scan; - end; - -var info: array[voice_index] of line_info; - -{ ------------------------------------------------------------- } - -function beatsPerLine: integer; - var voice: voice_index; -begin for voice:=1 to nvoices do with info[voice] do - if (nbar>0) or (extra>0) then - begin - if extra mod one_beat > 0 - then error3(voice,'Line length not an integer number of beats'); - beatsPerLine := nbar*meternum + extra div one_beat; - end; -end; - -procedure skipChordBar(voice: voice_index); -begin with info[voice] do - if chord>0 then if P[chord]=barsym then predelete(P[chord],1); -end; - -function getBar(voice: voice_index; bar: integer): string; -begin with info[voice] do - getBar := substr(P[mus],word_bound[bar_bound[bar-1]]+1, - word_bound[bar_bound[bar]]-word_bound[bar_bound[bar-1]]); -end; - -function musicLine(voice: voice_index): string; -begin musicLine:=P[musicLineNo(voice)]; end; - -function musicLineNo(voice: voice_index): paragraph_index0; -begin musicLineNo := info[voice].mus; end; - -procedure setMusicLineNo(voice: voice_index; lno: paragraph_index); -begin info[voice].mus := lno; end; - -function chordLineNo(voice: voice_index): paragraph_index0; -begin chordLineNo := info[voice].chord; end; - -procedure setChordLineNo(voice: voice_index; lno: paragraph_index); -begin info[voice].chord := lno; end; - -procedure setVocal(voice: voice_index; voc: boolean); -begin info[voice].vocal:=voc; end; - -function isVocal(voice: voice_index): boolean; -begin isVocal := info[voice].vocal; end; - -procedure setStavePos(voice: voice_index; stave, pos: stave_index); -begin with info[voice] do begin voice_pos:=pos; voice_stave:=stave; end; -end; - -function voiceStave(voice: voice_index): stave_index; -begin voiceStave:=info[voice].voice_stave; end; - -function voicePos(voice: voice_index): stave_index; -begin voicePos:=info[voice].voice_pos; end; - -function companion(voice: voice_index): voice_index; - var s: integer; -begin s:=info[voice].voice_stave; - if number_on_stave[s]=1 then companion:=voice - else if info[voice].voice_pos=1 then companion:=voice+1 - else companion:=voice-1; -end; - -procedure regroup(voice: voice_index); - var i, j, j2: word_index0; -begin j2 := 0; with info[voice] do - begin if debugMode then write('Voice ',voice,' has ',nbar,' bars at '); - if debugMode then for i:=1 to nbar+1 do write(bar_bound[i],' '); - for i:=1 to nbar do - begin j2:=bar_bound[i]; j:=j2+1; - while (j<=here) and (bind_left[scan[j]] or (scan[j]=barword)) do - begin inc(bar_bound[i]); inc(j) end; - end; - if extra>0 then bar_bound[nbar+1]:=here; - if debugMode then - begin write(' regrouped to '); - for i:=1 to nbar+1 do write(bar_bound[i],' ') - end; - if debugMode then writeln; - nword := here - end; -end; - -procedure resetInfo(voice: voice_index; var buf: string); -begin with info[voice] do - begin buf := P[mus]; P[mus]:=''; - bar_bound[0]:=0; word_bound[0]:=0; nbar:=0; here := 0; - end; -end; - -procedure clearLabels; - var voice: voice_index; -begin for voice:=1 to nvoices do with info[voice] do - begin chord:=0; mus:=0; end; -end; - -procedure appendNote(voice: voice_index; nscan: music_word); -begin with info[voice] do - begin inc(here); if here>max_words then - error3(voice,'Words per line limit exceeded'); - scan[here]:=nscan; end; -end; - -procedure appendToLine(voice: voice_index; note: string); -begin if note<>'' then with info[voice] do - begin P[mus]:=P[mus]+note+blank; word_bound[here]:=length(P[mus]); end; -end; - -procedure markBar(voice: voice_index); -begin with info[voice] do - if nbar=0 then error3(voice,'Empty bar') else bar_bound[nbar]:=here -end; - -function numberOfBars(voice: voice_index): integer; -begin numberOfBars := info[voice].nbar; end; - -procedure barForward(voice: voice_index; nbars: integer); -begin with info[voice] do - begin - if (nbar+nbars<0) then error3(voice, 'Next voice before bar is full'); - inc(nbar,nbars); - if nbar>max_bars then error3(voice,'Bars per line limit exceeded'); - if nbars>0 then bar_bound[nbar]:=here; - end; -end; - -procedure setExtraLength(voice: voice_index; ext: integer); -begin with info[voice] do begin extra:=ext; scan[here+1]:=other; end; -end; - -function ExtraLength(voice: voice_index): integer; -begin ExtraLength := info[voice].extra; end; - -function findVoice(w: string): voice_index0; - var i: integer; -begin curtail(w,':'); findVoice:=0; - for i:=1 to nvoices do - if w=voice_label[i] then begin findVoice:=i; exit end; - getNum(w,i); if i=0 then exit; - if (i>0) and (i<=nvoices) then findVoice:=i - else error('Numeric label outside range 1..nvoices',print); -end; - -procedure info3(voice: voice_index); -begin with info[voice] do - begin - writeln ('In voice "', voice_label[voice], '" near word ', here, ':'); - writeln(' ':word_bound[here],'V') - end -end; - -procedure error3(voice: voice_index; message: string ); -begin info3(voice); error(' '+message,print) end; - -procedure warning3(voice: voice_index; message: string ); -begin info3(voice); warning(' '+message,print) end; - -function nextMusicWord(voice: voice_index): string; -begin nextMusicWord := MusicWord(voice,info[voice].here); end; - -function MusicWord(voice, n: integer): string; - begin with info[voice] do if (n>0) and (n<=nword) then - MusicWord := substr(P[mus],word_bound[n-1]+1, - word_bound[n]-word_bound[n-1]-1) - else MusicWord := ''; - end; - -function thisNote(voice: voice_index): music_word; -begin with info[voice] do thisNote := scan[here-1]; end; - -function nextNote(voice: voice_index): music_word; -begin with info[voice] do nextNote := scan[here]; end; - -function endOfBar(voice: voice_index; bar_no: integer): boolean; -begin with info[voice] do endOfBar := here > bar_bound[bar_no]; end; - -procedure gotoBar(voice: voice_index; bar_no: integer); -begin with info[voice] do here := bar_bound[bar_no-1]+1; end; - -function getMusicWord(voice: voice_index): string; -begin with info[voice] do - begin line_no := orig_line_no[mus]; - GetMusicWord := MusicWord(voice,here); inc(here); - end -end; - -function maybeMusicLine(l: string): boolean; - var w: string; - nscan: music_word; -begin w:=GetNextWord(l,blank,dummy); maybeMusicLine := false; - if pos1(w[1],'abcdefgr()[]{}CMm')=0 then begin maybeMusicLine := false; exit end; - if pos1(':',w)=0 then begin maybeMusicLine := true; exit end; - GetNextMusWord(w,l,nscan); maybeMusicLine := nscan=abcdefg; -end; - -const macro_initialized: boolean=false; - nmacros = 99; -var macro_text: array[1..nmacros] of string; -procedure macroInit; - var i: integer; -begin if macro_initialized then exit else macro_initialized:=true; - for i:=1 to nmacros do macro_text[i]:='' -end; - -function identifyMacro(s: string): integer; - var k: integer; -begin predelete(s,2); getNum(s,k); identifyMacro:=k -end; - -procedure GetNextMusWord (var buf, note: string; var nscan: music_word); - var maybe_error: string; - - procedure expandThisMacro; - var playtag: string[10]; - playID: integer; - w: string; - begin macroInit; if length(note)=1 then - error('Can''t terminate a macro that has not been started',print); - playID:=identifyMacro(note); playtag:=toString(playID); - if (playID<1) or (playID>99) then - error('Macro ID '+playtag+' is not in range 1..99',print); - if note[2]='P' then - begin if macro_text[playID]='' then - warning('Macro '+playtag+ - ' inserts empty text: did you define it before use?',print); - if length(macro_text[playID])+length(buf)>255 - then error('Expansion of macro '+playtag+' causes buffer overflow',print) - else begin if debugMode then writeln('Inserting macro '+playtag+' text "' - +macro_text[playID]+'"'); - writeln('Buffer before insert: ',buf); - buf:=macro_text[playID]+buf; exit - end - end; - if pos1(note[2],'SR')=0 then error('Second character '+note[2]+ - ' of macro word should be in "PRS"',print); - macro_text[playID]:=''; - repeat w:=getNextWord(buf,blank,dummy); - if w='' then error('Macro definition '+playtag+ - ' should be terminated on the same input line',print); - if w='M' then begin - if debugMode then writeln('Macro '+playtag+' is: '+macro_text[playID]); - break - end; - if (w[1]='M') and (length(w)>1) then - if (w[2]<>'P') or (identifyMacro(w)=playID) then - error(w+' not allowed inside macro definition '+playtag,print); - macro_text[playID]:=macro_text[playID]+w+' ' - until false; - if note[2]='R' then begin note[2]:='P'; buf:=note+' '+buf end - end; - - begin note:=GetNextWord(buf,blank,dummy); - if note='' then exit; - if (note[1]='M') and expandMacro then - begin expandThisMacro; GetNextMusWord(buf,note,nscan); exit end; - if note[1]='\' then - begin maybe_error:=''; - if note[length(note)]<>'\' then maybe_error:=note; - while (buf<>'') and (note[length(note)]<>'\') do - note:=note+' '+GetNextWord(buf,blank,dummy); - if note[length(note)]<>'\' then - error('Unterminated TeX literal',print); - nscan:=texword; - if maybe_error<>'' then - warning('Possible unterminated TeX literal: '+maybe_error,print); - exit; - end; - if solfaNoteNames then - begin translateSolfa(note[1]); if note[1]='"' then predelete(note,1); - end; - case note[1] of -'a'..'g': nscan:=abcdefg; -'z': nscan:=zword; -'(': nscan:=lparen; -'{': if note[length(note)]='}' then nscan:=lyrtag else nscan:=lparen; -')': if pos1('(',note)=0 then nscan:=rparen else nscan:=rlparen; -'}': if pos1('{',note)=0 then nscan:=rparen else nscan:=rlparen; -'[': nscan:=lbrac; -']': nscan:=rbrac; -'@': nscan:=atword; -'m': nscan:=mword; -'r': nscan:=rword; -'#','-','n','x','?','s','t','D': nscan:=pmxl; -'M': if note='M' then nscan:=endMacro else nscan:=macro; -'G': if pos1('A',note)>0 then nscan:=pmxl else nscan:=other; -'1'..'9': if pos1('/',note)>0 then nscan:=mword else nscan:=pmxl; -'o': nscan:=oword; -'A', 'V': nscan:=FirstOnly; -'/': if note='//' then nscan:=nextvoice - else if note='/' then - begin note:='//'; warning('/ changed to //',print); nscan:=nextvoice; - end - else begin error('Word starts with /: do you mean \?',print); - nscan:=err; - end; - else if pos1('|',note)>0 then nscan:=barword else - nscan:=other; - end; - end; - -function upper(voice: voice_index): boolean; -begin with info[voice] do - if (voice_pos=1) and (voice0 then write(' and has chords on line ',chord); - writeln; - end; - if debugMode then with info[voice] do - begin write('Line has ', nbar, ' bars'); - if extra>0 then writeln(' + ', extra, '/64 notes') else writeln; - write('Bars:'); - for bar:=1 to nbar do write(' ',getBar(voice,bar),' '); - writeln; write('Word types:'); - for w:=1 to nword do write(' ',name[scan[w]]); writeln; - end; - end; -end; - -function aloneOnStave(stave: stave_index): boolean; - var v: voice_index; -begin - if number_on_stave[stave]<>2 then aloneOnStave:=true else - begin v:=first_on_stave[stave]; - aloneOnStave:= (info[v].mus=0) or (info[v+1].mus=0) - end -end; - -procedure selectVoices(line: string); - var i, k: integer; - word: string; - begin - for k:=1 to nvoices do selected[k]:=false; - write('Voice change to: ',line,' = '); - i:=0; - while iname)) - return true; - previous = previous->prev; - } - return false; -} - - -void pushFile(Char *filename) -{ - filenode *newnode; - Char STR3[256]; - - if (recursive(filename)) { - printf("===! Ignoring recursive include of file %s\n", filename); - return; - } - newnode = malloc(sizeof(filenode)); - newnode->actualfile = NULL; - strcpy(newnode->name, filename); - newnode->prev = current; - newnode->lineno = 0; - strcpy(newnode->actualfile_NAME, filename); - if (newnode->actualfile != NULL) - newnode->actualfile = freopen(newnode->actualfile_NAME, "r", - newnode->actualfile); - else - newnode->actualfile = fopen(newnode->actualfile_NAME, "r"); - _SETIO(newnode->actualfile != NULL, FileNotFound); - inputerror = (P_ioresult != 0); - if (inputerror) - Free(newnode); - else - current = newnode; - if (!inputerror && (reportitem & reportnewfile) > 0) - printf("==>> Input from file %s\n", currentFilename(STR3)); - if (inputerror && (reportitem & reporterror) > 0) - printf("==!! Could not open file %s\n", filename); -} - - -void popFile(void) -{ - filenode *previous; - Char STR2[256]; - Char STR3[256]; - - if (current == NULL) - return; - if ((reportitem & reportclose) > 0) - printf("==>> Closing file %s at line number %d\n", - currentFilename(STR2), currentLineNo()); - if (current->actualfile != NULL) - fclose(current->actualfile); - current->actualfile = NULL; - previous = current->prev; - Free(current); - current = previous; - if (current != NULL && (reportitem & reportoldfile) > 0) - printf("==>> Resuming input from file %s at line number %d\n", - currentFilename(STR3), currentLineNo()); -} - - -void closeAll(void) -{ - do { - popFile(); - } while (current != NULL); -} - - -boolean eofCurrent(void) -{ - return P_eof(current->actualfile); -} - - -Char *readLine(Char *Result) -{ - Char s[256]; - Char *TEMP; - Char STR2[256]; - - if (*nextData != '\0') { - strcpy(Result, nextData); - *nextData = '\0'; - return Result; - } - if (eofAll()) - return strcpy(Result, ""); - _SETIO(fgets(s, 256, current->actualfile) != NULL, EndOfFile); - TEMP = strchr(s, '\n'); - if (TEMP != NULL) - *TEMP = 0; - strcpy(Result, s); - inputerror = (P_ioresult != 0); - if (!inputerror) - current->lineno++; - if (inputerror && (reportitem & reporterror) > 0) - printf("==!! Could not read from file %s\n", currentFilename(STR2)); - return Result; -} - - -boolean isEmpty(Char *s) -{ - short i, FORLIM; - - if (*s == '\0') - return true; - FORLIM = strlen(s); - for (i = 0; i <= FORLIM - 1; i++) { - if (s[i] != ' ') - return false; - } - return true; -} - - -Char *readData(Char *Result) -{ - Char s[256]; - - if (!isEmpty(nextData)) { - strcpy(Result, nextData); - *nextData = '\0'; - return Result; - } - while (!eofAll()) { - readLine(s); - if (!isEmpty(s)) - return strcpy(Result, s); - } - return strcpy(Result, ""); -} - - -void skipBlanks(void) -{ - while (*nextData == '\0') { - readData(nextData); - if (eofAll()) - return; - } -} - - -boolean eofAll(void) -{ - boolean Result; - -/* p2c: multfile.pas: Note: Eliminated unused assignment statement [338] */ - if (current == NULL) - return true; - if (eofCurrent()) { - popFile(); - return (eofAll()); - } - return false; -} - - -short currentLineNo(void) -{ - if (current == NULL) - return 0; - else - return (current->lineno); -} - - -Char *currentFilename(Char *Result) -{ - if (current == NULL) - return strcpy(Result, "No file open yet"); - else - return strcpy(Result, current->name); -} - - -boolean fileError(void) -{ - return inputerror; -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/multfile.h b/Build/source/utils/mtx/mtx-0.60d/multfile.h deleted file mode 100644 index aaa094cdae7..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/multfile.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Header for module multfile, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef MULTFILE_H -#define MULTFILE_H - - -#ifdef MULTFILE_G -# define vextern -#else -# define vextern extern -#endif -/* DPL 2004-03-06 -(* Support for including files into an input stream. -(* Intended for an application that does not require Pascal formatting, -(* but reads complete lines one at a time. -(* You never actually work with any files, except by supplying the -( filename when the file is opened. -(* At any stage, you can switch the input to a new file. -(* When the new file is at EOF, and a "read" is issued, the file is -(* closed and the previous one resumed transparently. This inclusion -(* can be nested to any level, memory permitting. -(* --- Normal mode of operation, replacing the usual Pascal style --- - Instead of: assign(textfile,filename); reset(textfile) - use: pushFile(filename) - When another file should be included before the current file is done, - use: pushFile(newfilename) - Instead of: readln(textfile,line) - use: line:=readLine - Instead of: eof(textfilen) - or: eofAll; {Are all files at EOF?} -(* --- Abnormal mode of operation --- - To abort a file before EOF is reached: - use: popFile; - To abort all files: - use: closeAll; - To test whether only the current file is at EOF: - use: eofCurrent; -(* Additional features: - fileError: boolean function, was there an error during file open or read? - currentFilename: string function, name of current file - currentLineNo: integer function, number of line just read from current file - isEmpty(var s: string): boolean function, is s empty? - readData: string function, like readLine, but continue reading until - a non-blank line is found, return blank only at EOF - skipBlanks: skip blank lines in input: next call to readLine will be - non-blank unless EOF is encountered - report(items): procedure to control which messages are printed, - "items" is the sum of the following options - (constants with the appropriate values are defined in the interface) - 1: reportnewfile - file is opened - 2: reportoldfile - file is resumed - 4: reportclose - file is closed - 8: reporterror - a file error is encountered - 16: reportrecursive - there is a recursive include - The default value is items=27 (all the above except reportclose) - At present you cannot turn reportrecursive off. - */ - -extern void pushFile(Char *filename); -extern void popFile(void); -extern void closeAll(void); -extern void report(short items); -extern Char *currentFilename(Char *Result); -extern boolean eofAll(void); -extern boolean eofCurrent(void); -extern boolean fileError(void); -extern Char *readLine(Char *Result); -extern Char *readData(Char *Result); -extern boolean isEmpty(Char *s); -extern short currentLineNo(void); -extern void skipBlanks(void); - - -#define reportnewfile 1 -#define reportoldfile 2 -#define reportclose 4 -#define reporterror 8 -#define reportrecursive 16 - - -extern Char nextData[256]; - - -#undef vextern - -#endif /*MULTFILE_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/multfile.pas b/Build/source/utils/mtx/mtx-0.60d/multfile.pas deleted file mode 100644 index 6c272992a3f..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/multfile.pas +++ /dev/null @@ -1,196 +0,0 @@ -unit multfile; (* DPL 2004-03-06 -(* Support for including files into an input stream. -(* Intended for an application that does not require Pascal formatting, -(* but reads complete lines one at a time. -(* You never actually work with any files, except by supplying the -( filename when the file is opened. -(* At any stage, you can switch the input to a new file. -(* When the new file is at EOF, and a "read" is issued, the file is -(* closed and the previous one resumed transparently. This inclusion -(* can be nested to any level, memory permitting. -(* --- Normal mode of operation, replacing the usual Pascal style --- - Instead of: assign(textfile,filename); reset(textfile) - use: pushFile(filename) - When another file should be included before the current file is done, - use: pushFile(newfilename) - Instead of: readln(textfile,line) - use: line:=readLine - Instead of: eof(textfilen) - or: eofAll; {Are all files at EOF?} -(* --- Abnormal mode of operation --- - To abort a file before EOF is reached: - use: popFile; - To abort all files: - use: closeAll; - To test whether only the current file is at EOF: - use: eofCurrent; -(* Additional features: - fileError: boolean function, was there an error during file open or read? - currentFilename: string function, name of current file - currentLineNo: integer function, number of line just read from current file - isEmpty(var s: string): boolean function, is s empty? - readData: string function, like readLine, but continue reading until - a non-blank line is found, return blank only at EOF - skipBlanks: skip blank lines in input: next call to readLine will be - non-blank unless EOF is encountered - report(items): procedure to control which messages are printed, - "items" is the sum of the following options - (constants with the appropriate values are defined in the interface) - 1: reportnewfile - file is opened - 2: reportoldfile - file is resumed - 4: reportclose - file is closed - 8: reporterror - a file error is encountered - 16: reportrecursive - there is a recursive include - The default value is items=27 (all the above except reportclose) - At present you cannot turn reportrecursive off. - *) -interface - - procedure pushFile(filename: string); - procedure popFile; - procedure closeAll; - procedure report(items: integer); - function currentFilename: string; - function eofAll: boolean; - function eofCurrent: boolean; - function fileError: boolean; - function readLine: string; - function readData: string; - function isEmpty(var s: string): boolean; - function currentLineNo: integer; - procedure skipBlanks; - const nextData: string = ''; - -const - reportnewfile = 1; - reportoldfile = 2; - reportclose = 4; - reporterror = 8; - reportrecursive = 16; - -implementation - - type - pfilenode = ^filenode; - filenode = record - name: string; - actualfile: text; - prev: pfilenode; - lineno: integer; - end; - - const current: pfilenode = NIL; - inputerror: boolean = false; - reportitem: integer = reportnewfile + reportoldfile - + reporterror + reportrecursive; - - procedure report(items: integer); begin reportitem := items end; - - function recursive (filename: string): boolean; - var previous: pfilenode; - begin if current=NIL then begin recursive:=false; exit; end; - previous := current; recursive:=true; - while previous <> NIL do - begin - if filename=previous^.name then exit; - previous := previous^.prev; - end; - recursive:=false - end; - - procedure pushFile(filename: string); - var newnode: pfilenode; - begin - if recursive(filename) then - begin writeln('===! Ignoring recursive include of file ',filename); exit; - end; - new(newnode); newnode^.name := filename; newnode^.prev := current; - newnode^.lineno := 0; -{$I-} - assign(newnode^.actualfile,filename); reset(newnode^.actualfile); -{$I+} - inputerror := ioresult<>0; - if inputerror then dispose(newnode) else current := newnode; - if not inputerror and ((reportitem and reportnewfile)>0) then writeln - ('==>> Input from file ',currentFilename); - if inputerror and ((reportitem and reporterror)>0) then writeln - ('==!! Could not open file ',filename); - end; - - procedure popFile; - var previous: pfilenode; - begin if current=NIL then exit; - if (reportitem and reportclose)>0 then writeln - ('==>> Closing file ',currentFilename,' at line number ', currentLineNo:1); - close(current^.actualfile); previous := current^.prev; dispose(current); - current := previous; - if (current<>NIL) and ((reportitem and reportoldfile)>0) then writeln - ('==>> Resuming input from file ',currentFilename,' at line number ', - currentLineNo:1); - end; - - procedure closeAll; begin repeat popFile until current=NIL; end; - - function eofCurrent: boolean; - begin eofCurrent := eof(current^.actualfile); - end; - - function readLine: string; - var s: string; - begin if nextData<>'' then - begin readLine:=nextData; nextData:=''; exit end; - if eofAll then begin readLine:=''; exit end; -{$I-} - readln(current^.actualfile,s); readLine:=s; -{$I+} - inputerror := ioresult<>0; - if not inputerror then inc(current^.lineno); - if inputerror and ((reportitem and reporterror)>0) then writeln - ('==!! Could not read from file ',currentFilename); - end; - - function isEmpty(var s: string): boolean; - var i: integer; - begin if length(s)=0 then begin isEmpty:=true; exit; end; - for i:=1 to length(s) do if s[i]<>' ' then - begin isEmpty:=false; exit; end; - isEmpty:=true - end; - - function readData: string; - var s: string; - begin if not isEmpty(nextData) then - begin readData:=nextData; nextData:=''; exit end; - while not eofAll do - begin s:=readLine; - if not isEmpty(s) then begin readData:=s; exit end; - end; - readData:=''; - end; - - procedure skipBlanks; - begin while nextData='' do - begin nextData:=readData; if eofAll then exit - end - end; - - function eofAll: boolean; - begin eofAll := true; - if current=NIL then exit else - if eofCurrent then begin popFile; eofAll:=eofAll; exit end; - eofAll:=false - end; - - function currentLineNo: integer; - begin if current = NIL then currentLineNo := 0 - else currentLineNo := current^.lineno; - end; - - function currentFilename: string; - begin if current = NIL then currentFilename := 'No file open yet' - else currentFilename := current^.name; - end; - - function fileError: boolean; begin fileError := inputerror; end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/notes.c b/Build/source/utils/mtx/mtx-0.60d/notes.c deleted file mode 100644 index c212896cf90..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/notes.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "notes.pas" */ - - -#include "p2c.h" - - -#define NOTES_G -#include "notes.h" - - -short count64['9' + 1 - '0'] = { - 64, 4, 32, 2, 16, 0, 1, 0, 8, 128 -}; - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef GLOBALS_H -#include "globals.h" -#endif - - -typedef struct parsedNote { - Char name; - Char duration[2]; - Char octave[9]; - Char accidental[17], whatever[17], dotgroup[17], xtuplet[17]; - Char shortcut[33]; -} parsedNote; - - -Static Void printNote(n) -parsedNote n; -{ - printf("%c|%s|%s|%s|%s|%s|%s|%s\n", - n.name, n.duration, n.octave, n.accidental, n.whatever, n.dotgroup, - n.xtuplet, n.shortcut); -} - - -/* If rearrangeNote is TRUE, translate original note to the following form: - 1. Note name. - 2. Duration. - 3. Octave adjustments. - 4. Everything except the other six items. - 5. Accidental with adjustments (rest: height adjustment) - 6. Dot with adjustments. - 7. Xtuplet group. -*/ - -Void translateSolfa(nt) -Char *nt; -{ - short k; - - if (!solfaNoteNames()) - return; - k = pos1(*nt, solfa_names); - if (k > 0) - *nt = has_duration[k-1]; -} - - -Char durationCode(note) -Char *note; -{ - Char Result = unspecified; - Char code; - - if (strlen(note) <= 1) - return Result; - code = note[1]; - if (pos1(code, durations) > 0) - return code; - return Result; -} - - -Static Char half(dur) -Char dur; -{ - Char Result; - short k; - Char STR1[20]; - Char STR2[24]; - - k = pos1(dur, durations); - Result = dur; - if (k == 0) { - sprintf(STR1, "Invalid duration %c", dur); - error(STR1, print); - return Result; - } - if (k <= ndurs) - return (durations[k]); - sprintf(STR2, "%c is too short to halve", dur); - error(STR2, print); - return Result; -} - - -Static Void addDuration(note, dur) -Char *note; -Char dur; -{ - if (insertDuration()) - insertChar(dur, note, 2); -} - - -/* Extract procedures. All of these remove part of "note" (sometimes - the part is empty) and put it somewhere else. The part may be anywhere - in "note", except when otherwise specified.*/ - -/* Unconditionally extracts the first character. */ - -Static Void extractFirst(note, first) -Char *note; -Char *first; -{ - *first = note[0]; - predelete(note, 1); -} - - -/* Extracts at most one of the characters in "hits". */ - -Static Void extractOneOf(note, hits, hit) -Char *note; -Char *hits; -Char *hit; -{ - short i, l; - - l = strlen(note); - *hit = '\0'; - for (i = 1; i <= l; i++) { - if (pos1(note[i-1], hits) > 0) { - sprintf(hit, "%c", note[i-1]); - delete1(note, i); - return; - } - } -} - - -/* Extracts contiguous characters in "hits" until no more are found. - There may be more later. */ - -Static Void extractContiguous(note, hits, hit) -Char *note; -Char *hits; -Char *hit; -{ - short i, l, len; - - l = strlen(note); - len = l; - *hit = '\0'; - for (i = 1; i <= l; i++) { - if (pos1(note[i-1], hits) > 0) { - do { - if (pos1(note[i-1], hits) == 0) - return; - sprintf(hit + strlen(hit), "%c", note[i-1]); - delete1(note, i); - len--; - } while (len >= i); - return; - } - } -} - - -/* Extracts the specified character and everything after it. */ - -Static Void extractAfter(note, delim, tail) -Char *note; -Char delim; -Char *tail; -{ - short newlen; - - newlen = pos1(delim, note); - *tail = '\0'; - if (newlen == 0) - return; - newlen--; - strcpy(tail, note); - predelete(tail, newlen); - note[(long)((int)newlen)] = '\0'; -/* p2c: notes.pas, line 108: - * Note: Modification of string length may translate incorrectly [146] */ -} - - -/* Extracts the dot shortcut part of a note: comma shortcut is no problem - because a comma cannot be part of a number. */ - -Static Void extractDotShortcut(note, tail) -Char *note, *tail; -{ - Char names[256], tail2[256]; - short l = 1; - short lt; - Char ch; - - extractAfter(note, '.', tail); - lt = strlen(tail); - if (l < lt && tail[1] == '.') - l = 2; - if (solfaNoteNames()) - strcpy(names, solfa_names); - else - strcpy(names, has_duration); - if (l < lt && pos1(tail[l], names) > 0) { - translateSolfa(&tail[l]); - return; - } - if (l == 2) - error("\"..\" followed by non-note", print); - if (l >= lt) { - strcat(note, tail); - *tail = '\0'; - return; - } - ch = tail[0]; - predelete(tail, 1); - extractDotShortcut(tail, tail2); - sprintf(note + strlen(note), "%c%s", ch, tail); - strcpy(tail, tail2); -} - - -/* Extracts a signed number. */ - -Static Void extractSignedNumber(note, number) -Char *note, *number; -{ - short k; - Char note0[256]; - - k = pos1('+', note); - if (k == 0) - k = pos1('-', note); - *number = '\0'; - if (k == 0) - return; - strcpy(note0, note); - do { - sprintf(number + strlen(number), "%c", note[k-1]); - delete1(note, k); - } while (k <= strlen(note) && - (note[k-1] == '0' || pos1(note[k-1], digits) != 0)); - if (strlen(number) == 1) { - strcpy(note, note0); - *number = '\0'; - } -} - - -/* Local variables for extractGroup: */ -struct LOC_extractGroup { - Char *group; - short gl, k; - boolean probe, nonumber; -} ; - -Local Void tryMore(LINK) -struct LOC_extractGroup *LINK; -{ - while (LINK->k <= LINK->gl && LINK->group[LINK->k-1] == LINK->group[0]) - LINK->k++; -} - -Local Void try_(s, LINK) -Char *s; -struct LOC_extractGroup *LINK; -{ - LINK->probe = (LINK->k < LINK->gl && pos1(LINK->group[LINK->k-1], s) > 0); - if (LINK->probe) - LINK->k++; -} - -Local Void tryNumber(LINK) -struct LOC_extractGroup *LINK; -{ - boolean dot_ = false; - - LINK->nonumber = true; - while (LINK->k <= LINK->gl && pos1(LINK->group[LINK->k-1], digitsdot) > 0) { - LINK->k++; - if (LINK->group[LINK->k-1] == '.') { - if (dot_) - error("Extra dot in number", print); - else - dot_ = true; - } else - LINK->nonumber = false; - } -} - - -/* Extracts a symbol followed by optional +- or <> shift indicators */ - -Static Void extractGroup(note, delim, group_) -Char *note; -Char delim; -Char *group_; -{ - struct LOC_extractGroup V; - short k0; - Char tail[256]; - - V.group = group_; - extractAfter(note, delim, V.group); - if (*V.group == '\0') - return; - V.gl = strlen(V.group); - V.k = 2; - if (V.gl > 1 && V.group[1] == ':') - V.k = 3; - else { - tryMore(&V); - k0 = V.k; - try_("+-<>", &V); - if (V.probe) - tryNumber(&V); - if (V.nonumber) - V.k = k0; - k0 = V.k; - try_("+-<>", &V); - if (V.probe) - tryNumber(&V); - if (V.nonumber) - V.k = k0; - } - strcpy(tail, V.group); - V.k--; - V.group[(long)((int)V.k)] = '\0'; -/* p2c: notes.pas, line 169: - * Note: Modification of string length may translate incorrectly [146] */ - predelete(tail, V.k); - strcat(note, tail); -} - - -Static Void parseNote(note_, pnote) -Char *note_; -parsedNote *pnote; -{ - Char note[256]; - Char onlymidi[256]; - Char STR1[256]; - Char STR2[10]; - - strcpy(note, note_); - *pnote->shortcut = '\0'; - *pnote->xtuplet = '\0'; - *pnote->accidental = '\0'; - *pnote->dotgroup = '\0'; - *pnote->duration = '\0'; - *pnote->octave = '\0'; - *onlymidi = '\0'; - extractFirst(note, &pnote->name); - extractAfter(note, 'x', pnote->xtuplet); - extractAfter(note, ',', pnote->shortcut); - if (*pnote->shortcut == '\0') - extractDotShortcut(note, pnote->shortcut); - if (pnote->name != rest) { - extractGroup(note, 's', pnote->accidental); - if (*pnote->accidental == '\0') - extractGroup(note, 'f', pnote->accidental); - if (*pnote->accidental == '\0') - extractGroup(note, 'n', pnote->accidental); - } - /* Look for 'i' or 'c' anywhere in what is left of note.*/ - if (*pnote->accidental != '\0') { - extractOneOf(note, "ic", onlymidi); - strcat(pnote->accidental, onlymidi); -/* p2c: notes.pas, line 191: - * Note: Possible string truncation in assignment [145] */ - } - extractGroup(note, 'd', pnote->dotgroup); - if (pnote->name == rest) - extractSignedNumber(note, pnote->accidental); - extractOneOf(note, durations, pnote->duration); - sprintf(STR1, "%c", rest); - if (strcmp(note, STR1)) - extractContiguous(note, "=+-", pnote->octave); - if (*note != '\0' && isdigit(note[0])) { - sprintf(STR2, "%c%s", note[0], pnote->octave); - strcpy(pnote->octave, STR2); -/* p2c: notes.pas, line 197: - * Note: Possible string truncation in assignment [145] */ - delete1(note, 1); - } - strcpy(pnote->whatever, note); -/* p2c: notes.pas, line 199: - * Note: Possible string truncation in assignment [145] */ -} - - -/* On input: "note" is a note word; "dur1" is the default duration. - On output: "note" has possibly been modified; - possibly been split into two parts, the second being "shortcut"; - "dur" is the suggested new default duration; - "count" is the count of the total of "note" and "shortcut" */ -Void processNote(note, xnote, dur1, dur, count) -Char *note, *xnote; -Char dur1, *dur; -short *count; -{ - Char sc[3], origdur[3]; - short multiplicity, l; - parsedNote pnote; - Char STR1[36]; - Char STR3[256]; - - *xnote = '\0'; - *dur = dur1; - if (*note == '\0' || !isNoteOrRest(note) || isPause(note)) - return; - parseNote(note, &pnote); - if (debugMode()) { - printf("%s => ", note); - printNote(pnote); - } - if (pos1('.', pnote.whatever) > 0) { - sprintf(STR3, "Suspicious dot in word %s", note); - warning(STR3, print); - } - strcpy(origdur, pnote.duration); - if (*pnote.duration == '\0') - *dur = dur1; - else - *dur = pnote.duration[0]; - *count = count64[*dur - '0']; - if (*pnote.dotgroup != '\0') { - *count += *count / 2; - if (startsWith(pnote.dotgroup, "dd")) - *count += *count / 6; - } - sprintf(pnote.duration, "%c", *dur); - if (*pnote.shortcut != '\0') { - if (*pnote.dotgroup != '\0') - error("You may not explicitly dot a note with a shortcut", print); - sprintf(sc, "%c", pnote.shortcut[0]); - predelete(pnote.shortcut, 1); - if (!strcmp(sc, ".")) { - multiplicity = 1; - if (pnote.shortcut[0] == '.') { - multiplicity++; - predelete(pnote.shortcut, 1); - strcat(sc, "."); -/* p2c: notes.pas, line 233: - * Note: Possible string truncation in assignment [145] */ - } - *count += *count; - dur1 = pnote.duration[0]; - for (l = 1; l <= multiplicity; l++) { - sprintf(pnote.dotgroup + strlen(pnote.dotgroup), "%c", dotcode); -/* p2c: notes.pas, line 236: - * Note: Possible string truncation in assignment [145] */ - dur1 = half(dur1); - } - addDuration(pnote.shortcut, dur1); - } else { - addDuration(pnote.shortcut, half(pnote.duration[0])); - *count += *count / 2; - } - } - if (!insertDuration()) { - strcpy(pnote.duration, origdur); -/* p2c: notes.pas, line 243: - * Note: Possible string truncation in assignment [145] */ - } - if (rearrangeNote()) - sprintf(note, "%c%s%s%s%s%s%s", - pnote.name, pnote.duration, pnote.octave, pnote.whatever, - pnote.accidental, pnote.dotgroup, pnote.xtuplet); - else - strcpy(pnote.shortcut, " "); - if (!insertDuration() && *pnote.shortcut != '\0') { - sprintf(STR1, "%s%s", sc, pnote.shortcut); - strcpy(pnote.shortcut, STR1); -/* p2c: notes.pas, line 248: - * Note: Possible string truncation in assignment [145] */ - } - strcpy(xnote, pnote.shortcut); -} - - -Char octaveCode(note) -Char *note; -{ /*if debugMode then write('Octave code in note "',note,'" is ');*/ - parsedNote pnote; - - parseNote(note, &pnote); - /*if debugMode then writeln('"',octave,'"');*/ - if (*pnote.octave == '\0') - return ' '; - else - return (pnote.octave[0]); -} - - -Void removeOctaveCode(code, note) -Char code; -Char *note; -{ /*if debugMode then writeln('remove ',code,' from ',note);*/ - short k, l; - - l = strlen(note); - for (k = 1; k <= l; k++) { - if (note[k-1] == code) { - if (k == l || note[k] < '0' || note[k] > '9') { - delete1(note, k); - return; - } - } - } - fatalerror("Code not found in note"); -} - - -Void insertOctaveCode(code, note) -Char code; -Char *note; -{ /*if debugMode then writeln('insert ',code,' into ',note); */ - short l; - - l = strlen(note); - if (l < 2 || note[1] < '0' || note[1] > '9') - fatalerror("Trying to insert octave into note without duration"); - if (l <= 2 || note[2] < '0' || note[2] > '9') - insertChar(code, note, 3); - else - printf("Not inserting \"%c\", note already has octave code\"\n", code); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/notes.h b/Build/source/utils/mtx/mtx-0.60d/notes.h deleted file mode 100644 index 1b534b44186..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/notes.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Header for module notes, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef NOTES_H -#define NOTES_H - - -#ifndef CONTROL_H -#include "control.h" -#endif - - -#ifdef NOTES_G -# define vextern -#else -# define vextern extern -#endif - - -extern short count64['9' + 1 - '0']; - - -extern Void processNote PP((Char *note, Char *xnote, int dur1, Char *dur, - short *count)); -extern Char durationCode PP((Char *note)); -extern Char octaveCode PP((Char *note)); -extern Void removeOctaveCode PP((int code, Char *note)); -extern Void insertOctaveCode PP((int code, Char *note)); -extern Void translateSolfa PP((Char *nt)); - - -#undef vextern - -#endif /*NOTES_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/notes.pas b/Build/source/utils/mtx/mtx-0.60d/notes.pas deleted file mode 100644 index 3fdb9edb3c2..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/notes.pas +++ /dev/null @@ -1,280 +0,0 @@ -unit notes; - -interface uses control; - -const count64: array['0'..'9'] of integer = - ( 64, 4, 32, 2, 16, 0, 1, 0, 8, 128 ); - -procedure processNote(var note, xnote: string; dur1: char; var dur: char; - var count: integer); -function durationCode (note: string): char; -function octaveCode (note: string): char; -procedure removeOctaveCode(code: char; var note: string); -procedure insertOctaveCode(code: char; var note: string); -procedure translateSolfa(var nt: char); - -implementation uses strings, globals; - -type - -parsedNote = record - name: char; - duration: string[1]; - octave: string[8]; - accidental, whatever, dotgroup, xtuplet: string[16]; - shortcut: string[32]; -end; - -procedure printNote(n: parsedNote); -begin with n do writeln(name,'|',duration,'|',octave,'|',accidental,'|', - whatever,'|',dotgroup,'|',xtuplet,'|',shortcut) -end; - -{ If rearrangeNote is TRUE, translate original note to the following form: - 1. Note name. - 2. Duration. - 3. Octave adjustments. - 4. Everything except the other six items. - 5. Accidental with adjustments (rest: height adjustment) - 6. Dot with adjustments. - 7. Xtuplet group. -} - -procedure translateSolfa(var nt: char); - var k: integer; -begin if solfaNoteNames then - begin k:=pos1(nt,solfa_names); if k>0 then nt:=has_duration[k] - end -end; - -function durationCode (note: string): char; - var code: char; - begin durationCode:=unspecified; if length(note)>1 then - begin code:=note[2]; if pos1(code,durations)>0 then durationCode:=code - end - end; - -function half ( dur: char ) : char; - var k: integer; - begin k:= pos1 (dur, durations ); half := dur; - if k=0 then error ('Invalid duration '+dur,print) - else if k>ndurs then error (dur+' is too short to halve',print) - else half := durations[k+1]; - end; - -procedure addDuration ( var note: string; dur: char); -begin if insertDuration then insertchar(dur,note,2); end; - -{ Extract procedures. All of these remove part of "note" (sometimes - the part is empty) and put it somewhere else. The part may be anywhere - in "note", except when otherwise specified.} - -{ Unconditionally extracts the first character. } - -procedure extractFirst(var note: string; var first: char); -begin first:=note[1]; predelete(note,1) -end; - -{ Extracts at most one of the characters in "hits". } - -procedure extractOneOf(var note: string; hits: string; var hit: string); - var i, l: integer; -begin l:=length(note); hit:=''; - for i:=1 to l do if pos1(note[i],hits)>0 then - begin hit:=note[i]; delete1(note,i); exit; - end; -end; - -{ Extracts contiguous characters in "hits" until no more are found. - There may be more later. } - -procedure extractContiguous(var note: string; hits: string; var hit: string); - var i, l, len: integer; -begin l:=length(note); len:=l; hit:=''; - for i:=1 to l do if pos1(note[i],hits)>0 then - begin - repeat if pos1(note[i],hits)=0 then exit; - hit:=hit+note[i]; delete1(note,i); dec(len) - until len0) then - begin translateSolfa(tail[l+1]); exit end; - if l=2 then error('".." followed by non-note',print); - if l>=lt then begin note:=note+tail; tail:=''; exit end; - ch:=tail[1]; predelete(tail,1); - extractDotShortcut(tail,tail2); note:=note+ch+tail; tail:=tail2; -end; - -{ Extracts a signed number. } - -procedure extractSignedNumber(var note, number: string); - var k: integer; - note0: string; -begin k:=pos1('+',note); if k=0 then k:=pos1('-',note); - number:=''; if k=0 then exit; - note0:=note; - repeat number:=number+note[k]; delete1(note,k) - until (k>length(note)) or (note[k]<>'0') and (pos1(note[k],digits)=0); - if length(number)=1 then begin note:=note0; number:='' end -end; - -{ Extracts a symbol followed by optional +- or <> shift indicators } - -procedure extractGroup(var note: string; delim: char; var group: string); - var gl, k, k0: integer; - probe, nonumber: boolean; - tail: string; - procedure tryMore; - begin while (k<=gl) and (group[k]=group[1]) do inc(k) end; - procedure try(s: string); - begin probe:=(k0); if probe then inc(k) - end; - procedure tryNumber; - var dot: boolean; - begin nonumber:=true; dot:=false; - while (k<=gl) and (pos1(group[k],digitsdot)>0) do - begin inc(k); if group[k]='.' then - if dot then error('Extra dot in number',print) else dot:=true - else nonumber:=false - end - end; -begin extractAfter(note,delim,group); if group='' then exit; - gl:=length(group); k:=2; - if (gl>1) and (group[2]=':') then k:=3 else - begin tryMore; - k0:=k; try('+-<>'); if probe then tryNumber; if nonumber then k:=k0; - k0:=k; try('+-<>'); if probe then tryNumber; if nonumber then k:=k0; - end; - tail:=group; dec(k); group[0]:=char(k); predelete(tail,k); - note:=note+tail -end; - -procedure parseNote(note: string; var pnote: parsedNote); -var onlymidi: string; -begin with pnote do - begin - shortcut:=''; xtuplet:=''; accidental:=''; dotgroup:=''; - duration:=''; octave:=''; onlymidi:=''; - extractFirst(note,name); - extractAfter(note,'x',xtuplet); - extractAfter(note,',',shortcut); - if shortcut='' then extractDotShortcut(note,shortcut); - if name<>rest then - begin extractGroup(note,'s',accidental); - if accidental='' then extractGroup(note,'f',accidental); - if accidental='' then extractGroup(note,'n',accidental); - end; -{ Look for 'i' or 'c' anywhere in what is left of note.} - if accidental<>'' then - begin extractOneOf(note,'ic',onlymidi); accidental:=accidental+onlymidi - end; - extractGroup(note,'d',dotgroup); - if name=rest then extractSignedNumber(note,accidental); - extractOneOf(note,durations,duration); - if note<>rest then extractContiguous(note,'=+-',octave); - if (length(note)>0) and (note[1]>='0') and (note[1]<='9') - then begin octave:=note[1]+octave; delete1(note,1) end; - whatever := note - end -end; - -{ On input: "note" is a note word; "dur1" is the default duration. - On output: "note" has possibly been modified; - possibly been split into two parts, the second being "shortcut"; - "dur" is the suggested new default duration; - "count" is the count of the total of "note" and "shortcut" } -procedure processNote(var note, xnote: string; dur1: char; var dur: char; - var count: integer); -var sc, origdur: string[2]; - multiplicity, l: integer; - pnote: parsedNote; -begin xnote:=''; dur:=dur1; - if (note='') or not isNoteOrRest(note) or isPause(note) then exit; - parseNote(note, pnote); - if debugMode then begin write(note,' => '); printNote(pnote) end; - with pnote do - begin - if pos1('.',whatever)>0 then warning('Suspicious dot in word '+note,print); - origdur := duration; - if duration='' then dur:=dur1 else dur:=duration[1]; - count:=count64[dur]; if dotgroup<>'' then - begin inc(count,count div 2); - if startswith(dotgroup,'dd') then inc(count,count div 6) - end; - duration:=dur; if shortcut<>'' then - begin - if dotgroup<>'' then - error('You may not explicitly dot a note with a shortcut',print); - sc:=shortcut[1]; predelete(shortcut,1); - if sc='.' then - begin multiplicity:=1; - if shortcut[1]='.' then - begin inc(multiplicity); predelete(shortcut,1); sc:=sc+'.' end; - inc(count,count); dur1:=duration[1]; - for l:=1 to multiplicity do - begin dotgroup:=dotgroup+dotcode; dur1:=half(dur1) end; - addDuration(shortcut,dur1); - end else - begin addDuration(shortcut,half(duration[1])); - inc(count,count div 2) - end - end; - if not insertDuration then duration := origdur; - if rearrangeNote - then note := name + duration + octave + whatever - + accidental + dotgroup + xtuplet - else shortcut:=' '; - if not insertDuration and (shortcut<>'') then shortcut:=sc+shortcut; - xnote:=shortcut - end -end; - -function octaveCode (note: string): char; - var pnote: parsedNote; -begin {if debugMode then write('Octave code in note "',note,'" is ');} - parseNote(note,pnote); with pnote do - begin {if debugMode then writeln('"',octave,'"');} - if octave='' then octaveCode:=' ' else octaveCode:=octave[1]; end -end; - -procedure removeOctaveCode(code: char; var note: string); - var k, l: integer; -begin {if debugMode then writeln('remove ',code,' from ',note);} l:=length(note); - for k:=1 to l do if note[k]=code then - if (k=l) or (note[k+1]<'0') or (note[k+1]>'9') then - begin delete1(note,k); exit end; - fatalError('Code not found in note') -end; - -procedure insertOctaveCode(code: char; var note: string); - var l: integer; -begin {if debugMode then writeln('insert ',code,' into ',note); } - l:=length(note); - if (l<2) or (note[2]<'0') or (note[2]>'9') then - fatalError('Trying to insert octave into note without duration'); - if (l<=2) or (note[3]<'0') or (note[3]>'9') then insertChar(code,note,3) - else writeln('Not inserting "',code,'", note already has octave code"') -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/preamble.c b/Build/source/utils/mtx/mtx-0.60d/preamble.c deleted file mode 100644 index 53e4a5b4576..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/preamble.c +++ /dev/null @@ -1,1134 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "preamble.pas" */ - - -#include "p2c.h" - - -#define PREAMBLE_G -#include "preamble.h" - - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef MULTFILE_H -#include "multfile.h" -#endif - -#ifndef FILES_H -#include "files.h" -#endif - -#ifndef STATUS_H -#include "status.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -/* fpc mistakenly thinks CONTROL is not used */ - -#define blank_ ' ' -#define colon_ ':' -#define semicolon ';' -#define comma_ ',' - -#define max_styles 24 - - -typedef enum { - none, title, composer, pmx, options, msize, bars, shortnote, style, sharps, - flats, meter, space, pages, systems, enable, disable, name, indent, poet, - part, only, octave_, start -} command_type; - -typedef enum { - unknown, colon_line, command_line, comment_line, plain_line -} line_type; - -typedef char style_index; - -typedef char style_index0; - - -#define c1 title -#define cn start - - -Static short known_styles = 12; -Static boolean warn_redefine = false; - -Static Char commands[24][17] = { - "NONE", "TITLE", "COMPOSER", "PMX", "OPTIONS", "SIZE", "BARS/LINE", "SHORT", - "STYLE", "SHARPS", "FLATS", "METER", "SPACE", "PAGES", "SYSTEMS", "ENABLE", - "DISABLE", "NAME", "INDENT", "POET", "PART", "ONLY", "OCTAVE", "START" -}; - -Static Char cline[24][256] = { - "", "", "", "", "", "", "", "1/4", "", "0", "", "C", "", "1", "1", "", "", - "", "", "", "", "", "", "" -}; - -Static boolean redefined[24] = { - false, false, false, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, false, false, false, - false, false -}; - -/** Known styles */ - -Static Char known_style[max_styles][256] = { - "SATB: Voices S,A T,B; Choral; Clefs G F", - "SATB4: Voices S A T B; Choral; Clefs G G G8 F", - "SINGER: Voices Voice; Vocal; Clefs G", - "PIANO: Voices RH LH; Continuo; Clefs G F", - "ORGAN: Voices RH LH Ped; Continuo; Clefs G F F", - "SOLO: Voices V; Clefs G", "DUET: Voices V1 Vc; Clefs G F", - "TRIO: Voices V1 Va Vc; Clefs G C F", - "QUARTET: Voices V1 V2 Va Vc; Clefs G G C F", - "QUINTET: Voices V1 V2 Va Vc1 Vc2; Clefs G G C F F", - "SEXTET: Voices V1 V2 Va1 Va2 Vc1 Vc2; Clefs G G C C F F", - "SEPTET: Voices V1 V2 Va1 Va2 Vc1 Vc2 Cb; Clefs G G C C F F F", "", "", "", - "", "", "", "", "", "", "", "", "" -}; - -Static style_index old_known_styles; -Static boolean style_used[max_styles]; -Static boolean omit_line[lines_in_paragraph]; -Static style_index0 orig_style_line[max_styles]; - -Static short nclefs, n_pages, n_systems, n_sharps, ngroups; -Static Char part_line[256], title_line[256], composer_line[256], - pmx_line[256], options_line[256], start_line[256], voices[256], - clefs[256]; -Static short group_start[maxgroups], group_stop[maxgroups]; -Static Char instr_name[maxstaves][41]; -Static boolean style_supplied; - - -/* ------------------ Styles ------------------ */ - -Static voice_index0 voiceCount(s_) -Char *s_; -{ - Char s[256]; - short i, l; - - strcpy(s, s_); - l = strlen(s); - for (i = 0; i <= l - 1; i++) { - if (s[i] == comma_) - s[i] = blank_; - } - return (wordCount(s)); -} - - -Static style_index0 findStyle(s_) -Char *s_; -{ - style_index0 Result = 0; - Char s[256]; - style_index0 i = 0; - - strcpy(s, s_); - sprintf(s + strlen(s), "%c", colon_); - while (i < known_styles) { - i++; - if (startsWithIgnoreCase(known_style[i-1], s)) - return i; - } - return Result; -} - - -Static Void addStyle(S) -Char *S; -{ - style_index0 sn; - Char STR1[256]; - - sn = findStyle(NextWord(STR1, S, colon_, dummy)); - if (sn > 0) { - strcpy(known_style[sn-1], S); - return; - } - if (known_styles < max_styles) { - known_styles++; - strcpy(known_style[known_styles-1], S); - } else - error("Can't add another style - table full", print); -} - - -Static Void readStyles() -{ - boolean eofstyle; - Char S[256]; - style_index0 l = 0; - Char *TEMP; - - if (styleFileFound()) - eofstyle = true; - else - eofstyle = P_eof(stylefile); - while (!eofstyle) { - fgets(S, 256, stylefile); - TEMP = strchr(S, '\n'); - if (TEMP != NULL) - *TEMP = 0; - if (*S != '\0') { - addStyle(S); - l++; - orig_style_line[known_styles-1] = l; - } - eofstyle = P_eof(stylefile); - } -} - - -Static Void applyStyle(s_, stylename, first_inst, first_stave) -Char *s_, *stylename; -stave_index first_inst, first_stave; -{ - Char s[256]; - Char clef[256], subline[256], subcommand[256]; - stave_index0 i, last_inst, last_stave; - boolean continuo = false, toosoon = false, vocal = false; - Char STR2[256]; - - strcpy(s, s_); - last_inst = first_inst - 1; - GetNextWord(subline, s, blank_, colon_); - while (*s != '\0') { - GetNextWord(subline, s, semicolon, dummy); - i = curtail(subline, semicolon); - GetNextWord(subcommand, subline, blank_, dummy); - if (equalsIgnoreCase(subcommand, "VOICES")) { - sprintf(voices + strlen(voices), " %s", subline); - last_stave = first_stave + wordCount(subline) - 1; - last_inst = first_inst + voiceCount(subline) - 1; - } else if (equalsIgnoreCase(subcommand, "CLEFS")) { - strcpy(clef, subline); - sprintf(clefs + strlen(clefs), " %s", clef); - } else if (equalsIgnoreCase(subcommand, "VOCAL")) { - if (last_inst < first_inst) - toosoon = true; - else { - some_vocal = true; - vocal = true; - for (i = first_inst; i <= last_inst; i++) - setVocal(i, true); - } - } else if (equalsIgnoreCase(subcommand, "CHORAL") || - equalsIgnoreCase(subcommand, "GROUP")) { - if (last_inst < first_inst) - toosoon = true; - else { - if (equalsIgnoreCase(subcommand, "CHORAL")) { - some_vocal = true; - vocal = true; - for (i = first_inst; i <= last_inst; i++) - setVocal(i, true); - } - if (ngroups == maxgroups) - error("Too many groups", print); - else { - ngroups++; - group_start[ngroups-1] = first_stave; - group_stop[ngroups-1] = last_stave; - } - } - } else if (equalsIgnoreCase(subcommand, "CONTINUO")) - continuo = true; - else { - sprintf(STR2, "Subcommand %s in STYLE unknown", subcommand); - error(STR2, print); - } - if (toosoon) { - sprintf(STR2, "You must first give VOICES before specifying %s", - subcommand); - error(STR2, print); - } - } - if (vocal && continuo) - error("A continuo instrument may not be vocal", print); - if (wordCount(clef) != last_stave - first_stave + 1) - error("Number of clefs does not match number of voices", print); - if (first_stave == last_stave || continuo) { - strcpy(instr_name[first_stave-1], stylename); -/* p2c: preamble.pas, line 184: - * Note: Possible string truncation in assignment [145] */ - } else { - for (i = first_stave - 1; i <= last_stave - 1; i++) - *instr_name[i] = '\0'; - } - if (continuo) { - ninstr++; - stave[ninstr-1] = first_stave; - for (i = first_stave - 1; i <= last_stave - 1; i++) - instr[i] = ninstr; - return; - } - for (i = first_stave; i <= last_stave; i++) { - ninstr++; - stave[ninstr-1] = i; - instr[i-1] = ninstr; - } -} - - -Static Void applyStyles() -{ - short n1, n2, sn; - Char s[256]; - Char STR2[256]; - - *voices = '\0'; - *clefs = '\0'; - ninstr = 0; - while (*cline[(long)style] != '\0') { - n1 = voiceCount(voices) + 1; - n2 = wordCount(voices) + 1; - GetNextWord(s, cline[(long)style], blank_, comma_); - curtail(s, comma_); - sn = findStyle(s); - if (sn == 0) { - sprintf(STR2, "Style %s unknown", s); - error(STR2, print); - } - line_no = orig_style_line[sn-1]; - applyStyle(known_style[sn-1], s, n1, n2); - style_used[sn-1] = true; - } -} - - -/* ------------------------------------------------------------- */ - -Static Void wipeCommands() -{ - command_type c; - - for (c = c1; (long)c <= (long)cn; c = (command_type)((long)c + 1)) - *cline[(long)c] = '\0'; -} - - -boolean omitLine(line) -paragraph_index line; -{ - if (line == 0) - return true; - else - return (omit_line[line-1]); -} - - -Static Void setName() -{ - short i, FORLIM; - - if (!redefined[(long)name]) - return; - setFeature("instrumentNames", true); - FORLIM = ninstr; - for (i = 0; i <= FORLIM - 1; i++) { - GetNextWord(instr_name[i], cline[(long)name], blank_, dummy); -/* p2c: preamble.pas, line 224: - * Note: Possible string truncation in assignment [145] */ - } -} - - -Static Void setIndent() -{ - if (redefined[(long)indent]) - strcpy(fracindent, cline[(long)indent]); -} - - -Static Void setInitOctave() -{ - if (redefined[(long)octave_]) - initOctaves(cline[(long)octave_]); -} - - -Local Void checkLabel(w) -Char *w; -{ - voice_index j, FORLIM; - Char STR1[256], STR2[256]; - - FORLIM = nvoices; - for (j = 0; j <= FORLIM - 1; j++) { - if (!strcmp(w, voice_label[j])) { - sprintf(STR2, "Voice label %s not unique", w); - warning(STR2, print); - return; - } - } - if (strlen(w) > 2) - return; - if (pos1(w[0], "CLU") > 0) { - if (strlen(w) > 1) { - if (pos1(w[1], "123456789") == 0) - return; - } - } else if (pos1(w[0], "123456789") == 0) - return; - sprintf(STR1, "Voice label %s conflicts with reserved label", w); - error(STR1, print); -} - - -Static Void setVoices(line) -Char *line; -{ - short k; - Char s[256], w[256]; - Char STR1[256]; - short FORLIM; - - nvoices = 0; - nstaves = 0; - do { - GetNextWord(s, line, blank_, dummy); - if (*s != '\0') { - nstaves++; - k = 0; - first_on_stave[nstaves-1] = nvoices + 1; - do { - GetNextWord(w, s, blank_, comma_); - curtail(w, comma_); - if (*w != '\0') { - k++; - if (k <= 2) { - nvoices++; - checkLabel(w); - strcpy(voice_label[nvoices-1], w); - if (*instr_name[nstaves-1] == '\0') { - strcpy(instr_name[nstaves-1], w); -/* p2c: preamble.pas, line 264: - * Note: Possible string truncation in assignment [145] */ - } - setStavePos(nvoices, nstaves, k); - } - } - } while (*w != '\0'); - if (k > 2) { - sprintf(STR1, "More than two voices per stave: %s", s); - error(STR1, print); - } - if (k == 2) { - sprintf(instr_name[nstaves-1], "\\mtxTwoInstruments{%s}{%s}", - voice_label[nvoices-2], voice_label[nvoices-1]); -/* p2c: preamble.pas, line 271: - * Note: Possible string truncation in assignment [145] */ - } - number_on_stave[nstaves-1] = k; - } - } while (*line != '\0'); - FORLIM = nvoices; - for (k = 0; k <= FORLIM - 1; k++) - selected[k] = true; -} - - -Static Void setClefs(line_) -Char *line_; -{ - Char line[256]; - Char s[256]; - - strcpy(line, line_); - nclefs = 0; - do { - GetNextWord(s, line, blank_, dummy); - if (*s != '\0') { - nclefs++; - if (strlen(s) == 1) - clef[nclefs-1] = s[0]; - else - clef[nclefs-1] = s[1]; - } - } while (*s != '\0'); -} - - -Static Void setSize(line_) -Char *line_; -{ - Char line[256]; - stave_index0 i = 0; - Char word[256]; - stave_index0 FORLIM; - - strcpy(line, line_); - while (i < ninstr) { - GetNextWord(word, line, blank_, dummy); - if (*word == '\0') - break; - i++; - getNum(word, &musicsize); - stave_size[i-1] = musicsize; - } - if ((unsigned)musicsize >= 32 || ((1L << musicsize) & 0x110000L) == 0) { - FORLIM = ninstr; - for (i = 0; i <= FORLIM - 1; i++) { - if (stave_size[i] == unspec) - stave_size[i] = musicsize; - } - } - if (musicsize < 16) - musicsize = 16; - else if (musicsize > 20) - musicsize = 20; -} - - -Static command_type findCommand(command) -Char *command; -{ - command_type j; - - curtail(command, ':'); - if (equalsIgnoreCase(command, "STYLE")) - style_supplied = true; - for (j = c1; (long)j <= (long)cn; j = (command_type)((long)j + 1)) { - if (equalsIgnoreCase(command, commands[(long)j])) - return j; - } - return none; -} - - -boolean isCommand(command_) -Char *command_; -{ - Char command[256]; - - strcpy(command, command_); - return (findCommand(command) != none); -} - - -Static Void doEnable(line, choice) -Char *line; -boolean choice; -{ - Char word[256]; - Char STR1[256]; - - do { - GetNextWord(word, line, blank_, dummy); - if (*word != '\0') { - if (!setFeature(word, choice)) { - sprintf(STR1, "No such feature: %s", word); - error(STR1, !print); - } - } - } while (*word != '\0'); -} - - -Static line_type doCommand(line_) -Char *line_; -{ - line_type Result; - Char line[256]; - Char command[256]; - command_type last_command; - boolean starts_with_note; - Char STR1[256], STR2[256]; - - strcpy(line, line_); - if (line[0] == comment) - return comment_line; - starts_with_note = maybeMusicLine(line); - GetNextWord(command, line, blank_, colon_); - sprintf(STR1, "%c", colon_); - if (endsWith(command, STR1)) { - last_command = findCommand(command); - Result = command_line; - if (last_command == enable) - doEnable(line, true); - else if (last_command == disable) - doEnable(line, false); - if (last_command != none) { - strcpy(cline[(long)last_command], line); - if (last_command == start) - strcpy(start_line, line); - if (warn_redefine && redefined[(long)last_command]) { - sprintf(STR2, "You have redefined preamble command %s", command); - warning(STR2, print); - } - redefined[(long)last_command] = true; - return Result; - } - Result = colon_line; - sprintf(STR2, "%s%c %s", command, colon_, line); - addStyle(STR2); - orig_style_line[known_styles-1] = line_no; - return Result; - } else if (starts_with_note) - return plain_line; - else - return unknown; - return Result; -} - - -Void setOnly(line_) -Char *line_; -{ - Char line[256]; - short num, num1, num2, l; - Char s[256]; - Char STR1[256]; - - strcpy(line, line_); - if (*line == '\0') - return; - if (startsWithIgnoreCase(line, "only")) - GetNextWord(STR1, line, colon_, dummy); - for (l = 0; l <= lines_in_paragraph - 1; l++) - omit_line[l] = true; - do { - GetNextWord(s, line, blank_, comma_); - if (*s == '\0') - return; - curtail(s, comma_); - if (pos1('-', s) == 0) { - getNum(s, &num); - if (num > 0 && num <= lines_in_paragraph) - omit_line[num-1] = false; - else - warning("Invalid line number in Only: is skipped", print); - } else { - getTwoNums(s, &num1, &num2); - if (num1 > 0 && num2 <= lines_in_paragraph) { - for (num = num1 - 1; num <= num2 - 1; num++) - omit_line[num] = false; - } else - warning("Invalid line range in Only: is skipped", print); - } - } while (true); -} - - -Void interpretCommands() -{ - short i, num, den, nbars; - Char STR2[256]; - short FORLIM; - - strcpy(title_line, cline[(long)title]); - strcpy(part_line, cline[(long)part]); - if (*cline[(long)poet] != '\0' || *cline[(long)composer] != '\0') - sprintf(composer_line, "\\mtxComposerLine{%s}{%s}", - cline[(long)poet], cline[(long)composer]); - else - *composer_line = '\0'; - strcpy(pmx_line, cline[(long)pmx]); - GetNextWord(options_line, cline[(long)options], blank_, dummy); - FORLIM = known_styles; - for (i = 0; i <= FORLIM - 1; i++) - style_used[i] = false; - applyStyles(); - setVoices(voices); - FORLIM = known_styles; - for (i = old_known_styles; i <= FORLIM - 1; i++) { - if (!style_used[i]) { - warning("The following style was supplied but not used", !print); - puts(known_style[i]); - } - } - setClefs(clefs); - if (!redefined[(long)meter]) { - sprintf(STR2, "You have not defined Meter, assuming \"%s\" ", - cline[(long)meter]); - warning(STR2, !print); - } - getMeter(cline[(long)meter], &meternum, &meterdenom, &pmnum, &pmdenom); - setDefaultDuration(meterdenom); - if (meternum == 0 && - !(redefined[(long)pages] || redefined[(long)systems] || - redefined[(long)bars])) { - strcpy(cline[(long)bars], "1"); - redefined[(long)bars] = true; - } - if (redefined[(long)pages] || redefined[(long)systems]) { - if (redefined[(long)bars]) - warning("BARS/LINE ignored since you specified PAGES or SYSTEMS", print); - if (redefined[(long)systems]) - getNum(cline[(long)systems], &n_systems); - else - warning("PAGES specified but not SYSTEMS", !print); - if (redefined[(long)pages]) - getNum(cline[(long)pages], &n_pages); - else - warning("SYSTEMS specified but not PAGES", !print); - } else if (redefined[(long)bars]) { - getNum(cline[(long)bars], &nbars); - if (nbars > 0) { - n_pages = 0; - n_systems = nbars; - } - } - getNum(cline[(long)sharps], &n_sharps); - setSpace(cline[(long)space]); - setSize(cline[(long)msize]); - getTwoNums(cline[(long)shortnote], &num, &den); - if (den == 0) - den = 1; - short_note = num * 64 / den; - if (*cline[(long)flats] != '\0') { - getNum(cline[(long)flats], &n_sharps); - n_sharps = -n_sharps; - } - setName(); - setIndent(); - setInitOctave(); - setOnly(cline[(long)only]); - if (*options_line != '\0') { - warning("\"Options\" is cryptic and obsolescent.", !print); - printf(" Use \"Enable\" and \"Disable\" instead.\n"); - } - FORLIM = strlen(options_line); - for (i = 0; i <= FORLIM - 1; i++) - processOption(options_line[i]); -} - - -Void preambleDefaults() -{ - short i; - - xmtrnum0 = 0.0; - strcpy(fracindent, "0"); - musicsize = 20; - *start_line = '\0'; - some_vocal = false; - ngroups = 0; - style_supplied = false; - for (i = 1; i <= maxvoices; i++) - setVocal(i, false); - for (i = 0; i <= maxstaves - 1; i++) { - nspace[i] = unspec; - stave_size[i] = unspec; - } - n_pages = 1; - n_systems = 1; - readStyles(); - old_known_styles = known_styles; - for (i = 0; i <= lines_in_paragraph - 1; i++) - omit_line[i] = false; -} - - -Static Void preambleGuess(maybe_voices) -voice_index maybe_voices; -{ - switch (maybe_voices) { - - case 1: - strcpy(cline[(long)style], "Solo"); - break; - - case 2: - strcpy(cline[(long)style], "Duet"); - break; - - case 3: - strcpy(cline[(long)style], "Trio"); - break; - - case 4: - strcpy(cline[(long)style], "Quartet"); - break; - - case 5: - strcpy(cline[(long)style], "Quintet"); - break; - - case 6: - strcpy(cline[(long)style], "Sextet"); - break; - - case 7: - strcpy(cline[(long)style], "Septet"); - break; - - default: - error("I cannot guess a style", !print); - return; - break; - } - printf("I guess this piece is a %s for strings in C major.\n", - cline[(long)style]); - printf(" Why not provide a STYLE in the setup paragraph to make sure?\n"); -} - - -/* ------------------------------------------------------------------ */ - -Void nonMusic() -{ - paragraph_index i, FORLIM; - - FORLIM = para_len; - for (i = 0; i <= FORLIM - 1; i++) - doCommand(P[i]); - setOnly(cline[(long)only]); - wipeCommands(); -} - - -boolean thisCase() -{ - boolean Result; - -/* p2c: preamble.pas: Note: Eliminated unused assignment statement [338] */ - if (!startsWithIgnoreCase(P[0], "case:")) - return true; - Result = (choice != ' ' && pos1(choice, P[0]) > 0); - strcpy(P[0], "%"); - return Result; -} - - -Void augmentPreamble(control_para) -boolean control_para; -{ - paragraph_index i; - line_type l; - short s[5]; - paragraph_index FORLIM; - - if (!thisCase()) - return; - for (l = unknown; (long)l <= (long)plain_line; l = (line_type)((long)l + 1)) - s[(long)l] = 0; - FORLIM = para_len; - for (i = 0; i <= FORLIM - 1; i++) { - line_no = orig_line_no[i]; - l = doCommand(P[i]); - s[(long)l]++; - if (l == comment_line && P[i][1] == comment) { - predelete(P[i], 2); - putLine(P[i]); - } - if (!control_para && l == unknown) - error("Unidentifiable line", print); - } - if (!control_para && s[(long)command_line] > 0 && s[(long)plain_line] > 0) - error("Mixture of preamble commands and music", !print); -} - - -Void doPreamble() -{ - paragraph_index i; - voice_index0 maybe_voices = 0; - paragraph_index FORLIM; - - if (style_supplied) /*augmentPreamble(not known);*/ - return; - if (true) - warning("No STYLE supplied", !print); - FORLIM = para_len; - for (i = 0; i <= FORLIM - 1; i++) { - if (maybeMusicLine(P[i])) - maybe_voices++; - } - if (maybe_voices > 0) - preambleGuess(maybe_voices); - else - error("No voices found", !print); -} - - -Void respace() -{ - stave_index i, j; - Char STR1[256]; - Char STR2[256], STR3[256]; - - for (i = ninstr; i >= 2; i--) { - j = ninstr - i + 1; - if (nspace[j-1] != unspec) { - sprintf(STR3, "\\mtxInterInstrument{%s}{%s}", - toString(STR1, i - 1), toString(STR2, nspace[j-1])); - tex3(STR3); - } - } - if (nspace[ninstr-1] != unspec) { - sprintf(STR3, "\\mtxStaffBottom{%s}", toString(STR1, nspace[ninstr-1])); - tex3(STR3); - } - must_respace = false; -} - - -Void restyle() -{ - must_restyle = false; -} - - -Static short clefno(cl) -Char cl; -{ - short Result; - - switch (cl) { - - case 'G': - case '0': - case 't': - case '8': - Result = 0; - break; - - case 's': - case '1': - Result = 1; - break; - - case 'm': - case '2': - Result = 2; - break; - - case 'a': - case '3': - Result = 3; - break; - - case 'n': - case '4': - Result = 4; - break; - - case 'r': - case '5': - Result = 5; - break; - - case 'F': - case 'b': - case '6': - Result = 6; - break; - - case 'C': - Result = 3; - break; - - default: - warning("Unknown clef code - replaced by treble", print); - Result = 0; - break; - } - return Result; -} - - -Static Void doTenorClefs() -{ - voice_index i; - Char c; - voice_index FORLIM; - Char STR1[256]; - Char STR3[256]; - - FORLIM = nclefs; - for (i = 1; i <= FORLIM; i++) { - c = clef[i-1]; - if (c == '8' || c == 't') { - sprintf(STR3, "\\\\mtxTenorClef{%s}\\", toString(STR1, PMXinstr(i))); - putLine(STR3); - } - } -} - - -Local Char *pmxMeter(Result) -Char *Result; -{ - short denom, num; - Char STR1[256], STR3[256], STR4[256], STR5[256]; - - if (meternum == 0) { - num = beatsPerLine(); /** denom := 0; **/ - meterChange(old_meter_word, num, meterdenom, true); - } else - num = meternum; /** denom := pmdenom; **/ - /* CMO: unconditonally assign value of pmdenom to denom */ - denom = pmdenom; - sprintf(Result, "%s %s %s %s", - toString(STR1, num), toString(STR3, PMXmeterdenom(meterdenom)), - toString(STR4, pmnum), toString(STR5, denom)); - return Result; -} - -Local Char *sizecode(Result, k) -Char *Result; -short k; -{ - strcpy(Result, "\\mtxNormalSize"); - switch (k) { - - case 13: - if (musicsize == 20) - strcpy(Result, "\\mtxTinySize"); - else - strcpy(Result, "\\mtxSmallSize"); - break; - - case 16: - if (musicsize == 20) - strcpy(Result, "\\mtxSmallSize"); - break; - - case 20: - if (musicsize == 16) - strcpy(Result, "\\mtxLargeSize"); - break; - - case 24: - if (musicsize == 20) - strcpy(Result, "\\mtxLargeSize"); - else - strcpy(Result, "\\mtxHugeSize"); - break; - - case 29: - strcpy(Result, "\\mtxHugeSize"); - break; - - default: - error("Valid sizes are 13, 16, 20, 24, 29", print); - break; - } - return Result; -} - - -Void doPMXpreamble() -{ - static Char clefcode[9] = "0123456"; - short i, j; - Char clefs[256]; - Char STR1[256]; - Char STR2[256]; - Char STR3[58]; - short FORLIM; - Char STR5[256]; - - if (*composer_line != '\0') - putLine(composer_line); - if (*title_line != '\0') { - sprintf(STR2, "\\mtxTitleLine{%s}", title_line); - putLine(STR2); - } - putLine("---"); - if (instrumentNames() && !redefined[(long)indent]) - strcpy(fracindent, "0.12"); - fprintf(outfile, "%d", nstaves); - fprintf(outfile, " %d", -ninstr); - stave[ninstr] = nstaves + 1; - for (j = ninstr; j >= 1; j--) - fprintf(outfile, " %d", stave[j] - stave[j-1]); - fprintf(outfile, " %s %8.5f %d %d %d %d %s\n", - pmxMeter(STR1), xmtrnum0, n_sharps, n_pages, n_systems, musicsize, - fracindent); - FORLIM = ninstr; - for (i = 1; i <= FORLIM; i++) { - if (!instrumentNames()) - putLine(""); - else { - sprintf(STR3, "\\mtxInstrName{%s}", instr_name[ninstr - i]); - putLine(STR3); - } - } - *clefs = '\0'; - for (i = nclefs - 1; i >= 0; i--) - sprintf(clefs + strlen(clefs), "%c", clefcode[clefno(clef[i])]); - putLine(clefs); - if (*texdir == '\0') - strcpy(texdir, "./"); - putLine(texdir); - - pmx_preamble_done = true; - respace(); - - FORLIM = ngroups; - for (j = 1; j <= FORLIM; j++) - fprintf(outfile, "\\\\mtxGroup{%s}{%s}{%s}\\\n", - toString(STR1, j), toString(STR2, ninstr - group_start[j-1] + 1), - toString(STR5, ninstr - group_stop[j-1] + 1)); - FORLIM = ninstr; - for (j = 1; j <= FORLIM; j++) { - if (stave_size[j-1] != unspec) { - sprintf(STR5, "\\\\mtxSetSize{%s}{%s}\\", - toString(STR1, ninstr - j + 1), - sizecode(STR2, stave_size[j-1])); - putLine(STR5); - } - } - if (*part_line != '\0') { - putLine("Ti"); - putLine(part_line); - } - if (*title_line != '\0') { - putLine("Tt"); - putLine("\\mtxTitle"); - } - if (*composer_line != '\0') { - putLine("Tc"); - putLine("\\mtxPoetComposer"); - } - if (*pmx_line != '\0') - putLine(pmx_line); - doTenorClefs(); - wipeCommands(); -} - - -Char *startString(Result, voice) -Char *Result; -voice_index0 voice; -{ - Char s[256], w[256]; - voice_index j; - - strcpy(s, start_line); - for (j = 1; j <= voice; j++) - GetNextWord(w, s, dummy, ';'); - curtail(w, ';'); - if (*w != '\0') { - sprintf(Result, "%s ", w); - return Result; - } else - return strcpy(Result, w); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/preamble.h b/Build/source/utils/mtx/mtx-0.60d/preamble.h deleted file mode 100644 index ef854aa0dcb..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/preamble.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Header for module preamble, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef PREAMBLE_H -#define PREAMBLE_H - - -/*$X+*/ -/* Interpret preamble paragraph, compose PMX preamble */ - -#ifndef GLOBALS_H -#include "globals.h" -#endif - - -#ifdef PREAMBLE_G -# define vextern -#else -# define vextern extern -#endif - -extern boolean thisCase PV(); -extern Void preambleDefaults PV(); -extern Void interpretCommands PV(); -extern Void doPreamble PV(); -extern Void doPMXpreamble PV(); -extern Void respace PV(); -extern Void restyle PV(); -extern Char *startString PP((Char *Result, int voice)); -extern Void augmentPreamble PP((int control_para)); -extern boolean omitLine PP((int line)); -extern Void nonMusic PV(); -extern Void setOnly PP((Char *line)); -extern boolean isCommand PP((Char *command)); - - -#define known true - - -#undef vextern - -#endif /*PREAMBLE_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/preamble.pas b/Build/source/utils/mtx/mtx-0.60d/preamble.pas deleted file mode 100644 index 9ece7d67adc..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/preamble.pas +++ /dev/null @@ -1,624 +0,0 @@ -unit preamble; -{$X+} -{ Interpret preamble paragraph, compose PMX preamble } - -interface uses globals; - -function thisCase: boolean; -procedure preambleDefaults; -procedure interpretCommands; -procedure doPreamble; -procedure doPMXpreamble; -procedure respace; -procedure restyle; -function startString(voice: voice_index0): string; -procedure augmentPreamble(control_para: boolean); -function omitLine(line: paragraph_index): boolean; -procedure nonMusic; -procedure setOnly(line: string); -function isCommand(command: string): boolean; - -const known = true; - -implementation uses control, mtxline, strings, files, status, utility; -{ fpc mistakenly thinks CONTROL is not used } - -const blank = ' '; - colon = ':'; - semicolon = ';'; - comma = ','; - known_styles: integer = 12; - max_styles = 24; - warn_redefine: boolean = false; - -type command_type = - ( none, title, composer, pmx, options, msize, bars, shortnote, - style, sharps, flats, meter, space, pages, systems, - enable, disable, name, indent, - poet, part, only, octave, start ); - - line_type = ( unknown, colon_line, command_line, comment_line, - plain_line ); - - style_index = 1..max_styles; - style_index0 = 0..max_styles; - -const c1 = title; cn = start; - commands: array[command_type] of string[16] = - ( 'NONE', 'TITLE', 'COMPOSER', 'PMX', 'OPTIONS', - 'SIZE', 'BARS/LINE', 'SHORT', - 'STYLE', 'SHARPS', 'FLATS', 'METER', 'SPACE', 'PAGES', 'SYSTEMS', - 'ENABLE', 'DISABLE', - 'NAME', 'INDENT', 'POET', 'PART', 'ONLY', 'OCTAVE', 'START'); - cline: array[command_type] of string = - ( '', '', '', '', '', '', '', '1/4', - '', '0', '', 'C', '', '1', '1', '', '', '', '', '', '', '', '', '' ); - redefined: array[command_type] of boolean = - ( false, false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, false, - false, false, false, false, false, false ); - -(** Known styles *) - known_style: array[style_index] of string = ( -'SATB: Voices S,A T,B; Choral; Clefs G F', -'SATB4: Voices S A T B; Choral; Clefs G G G8 F', -'SINGER: Voices Voice; Vocal; Clefs G', -'PIANO: Voices RH LH; Continuo; Clefs G F', -'ORGAN: Voices RH LH Ped; Continuo; Clefs G F F', -'SOLO: Voices V; Clefs G', -'DUET: Voices V1 Vc; Clefs G F', -'TRIO: Voices V1 Va Vc; Clefs G C F', -'QUARTET: Voices V1 V2 Va Vc; Clefs G G C F', -'QUINTET: Voices V1 V2 Va Vc1 Vc2; Clefs G G C F F', -'SEXTET: Voices V1 V2 Va1 Va2 Vc1 Vc2; Clefs G G C C F F', -'SEPTET: Voices V1 V2 Va1 Va2 Vc1 Vc2 Cb; Clefs G G C C F F F', -'', '', '', '', '', '', '', '', '', '', '', ''); - -var old_known_styles: style_index; - style_used: array[style_index] of boolean; - omit_line: array[paragraph_index] of boolean; - orig_style_line: array[style_index] of style_index0; - -var nclefs, n_pages, n_systems, n_sharps, ngroups: integer; - part_line, title_line, composer_line, pmx_line, options_line, - start_line, voices, clefs: string; - group_start, group_stop: array[1..maxgroups] of integer; - instr_name: array[stave_index] of string[40]; - style_supplied: boolean; - -{ ------------------ Styles ------------------ } - -function voiceCount(s: string): voice_index0; - var i, l: integer; - begin l:=length(s); for i:=1 to l do if s[i]=comma then s[i]:=blank; - voiceCount:=wordCount(s); - end; - -function findStyle(s: string): style_index0; - var i: style_index0; -begin - i:=0; s:=s+colon; findStyle:=0; - while i0 then known_style[sn] := S - else if known_styles < max_styles then - begin inc(known_styles); - known_style[known_styles] := S; - end - else error('Can''t add another style - table full',print); -end; - -procedure readStyles; - var eofstyle: boolean; - S: string; - l: style_index0; -begin if styleFileFound then eofstyle:=true else eofstyle := eof(stylefile); - l:=0; - while not eofstyle do - begin readln(stylefile,S); if S<>'' then - begin addStyle(S); inc(l); orig_style_line[known_styles]:=l; end; - eofstyle := eof(stylefile); - end; -end; - -procedure applyStyle(s, stylename: string; - first_inst, first_stave: stave_index); - var clef, subline, subcommand: string; - i, last_inst, last_stave: stave_index0; - continuo, toosoon, vocal: boolean; - begin last_inst:=first_inst-1; - toosoon := false; continuo:=false; vocal := false; - subline:=GetNextWord(s,blank,colon); - while s<>'' do - begin subline:=GetNextWord(s,semicolon,dummy); - i:=curtail(subline,semicolon); - subcommand:=GetNextWord(subline,blank,dummy); - if equalsIgnoreCase(subcommand,'VOICES') then - begin voices:=voices+' '+subline; - last_stave := first_stave + wordCount(subline) - 1; - last_inst := first_inst + voiceCount(subline) - 1; - end - else if equalsIgnoreCase(subcommand,'CLEFS') - then - begin clef:=subline; clefs:=clefs+' '+clef; end - else if equalsIgnoreCase(subcommand,'VOCAL') then - if last_instlast_stave-first_stave+1 then error( - 'Number of clefs does not match number of voices',print); - if (first_stave=last_stave) or continuo - then instr_name[first_stave]:=stylename - else for i:=first_stave to last_stave do instr_name[i]:=''; - if continuo then - begin inc(ninstr); stave[ninstr] := first_stave; - for i:=first_stave to last_stave do instr[i]:=ninstr; - end - else for i:=first_stave to last_stave do - begin inc(ninstr); stave[ninstr] := i; instr[i] := ninstr; - end; - end; - -procedure applyStyles; - var n1, n2, sn: integer; - s: string; - begin voices:=''; clefs:=''; ninstr:=0; - while cline[style]<>'' do - begin n1:=voiceCount(voices)+1; - n2:=wordCount(voices)+1; - s:=GetNextWord(cline[style],blank,comma); - curtail(s,comma); - sn:=findStyle(s); if sn=0 then error ('Style ' + s +' unknown',print); - line_no := orig_style_line[sn]; applyStyle(known_style[sn],s,n1,n2); - style_used[sn] := true; - end; - end; - -{ ------------------------------------------------------------- } - -procedure wipeCommands; - var c: command_type; -begin for c:=c1 to cn do cline[c]:=''; -end; - -function omitLine(line: paragraph_index): boolean; -begin if line=0 then omitLine:=true else omitLine:=omit_line[line] end; - -procedure setName; - var i: integer; -begin if not redefined[name] then exit; - setFeature('instrumentNames',true); - for i:=1 to ninstr do - instr_name[i] := getNextWord(cline[name],blank,dummy); -end; - -procedure setIndent; -begin if redefined[indent] then fracindent := cline[indent]; -end; - -procedure setInitOctave; -begin if redefined[octave] then initOctaves(cline[octave]); -end; - -procedure setVoices(var line: string); - var k: integer; - s, w: string; - procedure checkLabel(w: string); - var j: voice_index; - begin - for j:=1 to nvoices do if w=voice_label[j] then - begin warning('Voice label '+w+' not unique',print); exit; - end; - if length(w)>2 then exit; - if pos1(w[1],'CLU')>0 then - if length(w)>1 then if pos1(w[2],'123456789')=0 then exit - else - else - else if pos1(w[1],'123456789')=0 then exit; - error('Voice label '+w+' conflicts with reserved label',print); - end; -begin nvoices:=0; nstaves:=0; - repeat s:=GetNextWord(line,blank,dummy); - if length(s)>0 then - begin inc(nstaves); k:=0; - first_on_stave[nstaves] := nvoices + 1; - repeat - w:=GetNextWord(s,blank,comma); curtail(w, comma); - if w<>'' then - begin - inc(k); if k<=2 then - begin inc(nvoices); checkLabel(w); - voice_label[nvoices]:=w; - if instr_name[nstaves]='' then instr_name[nstaves]:=w; - setStavePos(nvoices,nstaves,k); - end - end; - until w=''; - if k>2 then error('More than two voices per stave: ' + s,print); - if k=2 then instr_name[nstaves]:='\mtxTwoInstruments{' - + voice_label[nvoices-1] + '}{'+ voice_label[nvoices] + '}'; - number_on_stave[nstaves] := k; - end - until length(line)=0; - for k:=1 to nvoices do selected[k]:=true; -end; - -procedure setClefs(line: string); - var s: string; -begin - nclefs:=0; - repeat - s:=getnextword(line,blank,dummy); - if s<>'' then - begin inc(nclefs); - if length(s)=1 then clef[nclefs]:=s[1] else clef[nclefs]:=s[2]; - end; - until s=''; -end; - -procedure setSize(line: string); - var i: stave_index0; - word: string; - begin i:=0; - while i20 then musicsize:=20; - end; - -function findCommand(var command: string): command_type; - var j: command_type; -begin curtail(command,':'); - if equalsIgnoreCase(command,'STYLE') then style_supplied := true; - for j:=c1 to cn do if equalsIgnoreCase(command,commands[j]) then - begin findCommand:=j; exit; end; - findCommand:=none; -end; - -function isCommand(command: string): boolean; -begin isCommand:=findCommand(command)<>none end; - -procedure doEnable(var line: string; choice: boolean); - var word: string; -begin - repeat word:=GetNextWord(line,blank,dummy); - if word<>'' then if not setFeature(word,choice) then - Error('No such feature: '+word,not print) - until word='' -end; - -function doCommand(line: string): line_type; - var command: string; - last_command: command_type; - starts_with_note: boolean; -begin - if line[1]=comment then begin doCommand:=comment_line; exit; end; - starts_with_note := maybeMusicLine(line); - command:=GetNextWord(line,blank,colon); - if endsWith(command,colon) then - begin last_command:=findCommand(command); - doCommand:=command_line; - if last_command = enable then doEnable(line,true) - else if last_command = disable then doEnable(line,false); - if last_command<>none then - begin cline[last_command]:=line; - if last_command=start then start_line:=line; - if warn_redefine and redefined[last_command] then - warning('You have redefined preamble command '+command,print); - redefined[last_command]:=true; - end - else begin doCommand:=colon_line; addStyle(command+colon+' '+line); - orig_style_line[known_styles] := line_no; - end - end - else if starts_with_note then doCommand:=plain_line - else doCommand:=unknown; -end; - -procedure setOnly(line: string); - var num, num1, num2, l: integer; - s: string; -begin if line='' then exit; - if startsWithIgnoreCase(line,'only') then GetNextWord(line,colon,dummy); - for l:=1 to lines_in_paragraph do omit_line[l]:=true; - repeat s:=GetNextWord(line,blank,comma); if s='' then exit; - curtail(s, comma); - if pos1('-',s)=0 then - begin getNum(s,num); - if (num>0) and (num<=lines_in_paragraph) then omit_line[num]:=false - else warning('Invalid line number in Only: is skipped',print); - end else - begin getTwoNums(s,num1,num2); - if (num1>0) and (num2<=lines_in_paragraph) then - for num:=num1 to num2 do omit_line[num]:=false - else warning('Invalid line range in Only: is skipped',print); - end; - until false; -end; - -procedure interpretCommands; - var i, num, den, nbars: integer; -begin - title_line := cline[title]; - part_line := cline[part]; - if (cline[poet]<>'') or (cline[composer]<>'') then - composer_line:='\mtxComposerLine{'+cline[poet]+'}{'+cline[composer]+'}' - else composer_line:=''; - pmx_line := cline[pmx]; - options_line := GetNextWord(cline[options],blank,dummy); - for i:=1 to known_styles do style_used[i] := false; - applyStyles; setVoices(voices); - for i:=old_known_styles+1 to known_styles do - if not style_used[i] then - begin warning('The following style was supplied but not used',not print); - writeln(known_style[i]); - end; - setClefs(clefs); - if not redefined[meter] then warning( - 'You have not defined Meter, assuming "'+cline[meter]+'" ',not print); - getMeter(cline[meter],meternum, meterdenom, pmnum, pmdenom); - setDefaultDuration(meterdenom); - if (meternum=0) and - not (redefined[pages] or redefined[systems] or redefined[bars]) - then begin cline[bars] := '1'; redefined[bars]:=true; end; - if redefined[pages] or redefined[systems] then - begin if redefined[bars] then - warning('BARS/LINE ignored since you specified PAGES or SYSTEMS',print); - if redefined[systems] then getNum(cline[systems],n_systems) - else warning('PAGES specified but not SYSTEMS',not print); - if redefined[pages] then getNum(cline[pages],n_pages) - else warning('SYSTEMS specified but not PAGES',not print); - end - else if redefined[bars] then - begin getNum(cline[bars],nbars); if nbars>0 then - begin n_pages:=0; n_systems:=nbars end; - end; - getNum(cline[sharps],n_sharps); - setSpace(cline[space]); - setSize(cline[msize]); - getTwoNums(cline[shortnote],num, den); if den=0 then den:=1; - short_note := (num*64) div den; - if cline[flats]<>'' then - begin getNum(cline[flats],n_sharps); n_sharps:=-n_sharps; end; - setName; setIndent; setInitOctave; setOnly(cline[only]); - if options_line <>'' then begin - warning('"Options" is cryptic and obsolescent.', not print); - writeln(' Use "Enable" and "Disable" instead.') - end; - for i:=1 to length(options_line) do processOption(options_line[i]); -end; - -procedure preambleDefaults; - var i: integer; -begin - xmtrnum0:=0; fracindent:='0'; musicsize:=20; start_line:=''; - some_vocal:=false; ngroups:=0; - style_supplied := false; - for i:=1 to maxvoices do setVocal(i,false); - for i:=1 to maxstaves do - begin nspace[i]:=unspec; stave_size[i]:=unspec; end; - n_pages:=1; n_systems:=1; - readStyles; old_known_styles := known_styles; - for i:=1 to lines_in_paragraph do omit_line[i]:=false; -end; - -procedure preambleGuess(maybe_voices: voice_index); -begin - case maybe_voices of - 1: cline[style] := 'Solo'; - 2: cline[style] := 'Duet'; - 3: cline[style] := 'Trio'; - 4: cline[style] := 'Quartet'; - 5: cline[style] := 'Quintet'; - 6: cline[style] := 'Sextet'; - 7: cline[style] := 'Septet'; - else begin error('I cannot guess a style',not print); exit; end; - end; - writeln('I guess this piece is a ',cline[style], - ' for strings in C major.'); - writeln(' Why not provide a STYLE in the setup paragraph to make sure?'); -end; - -{ ------------------------------------------------------------------ } - -procedure nonMusic; - var i: paragraph_index; -begin for i:=1 to para_len do doCommand(P[i]); - setOnly(cline[only]); wipeCommands; -end; - -function thisCase: boolean; -begin thisCase:=true; - if not startsWithIgnoreCase(P[1],'case:') then exit; - thisCase:=(choice<>' ') and (pos1(choice,P[1])>0); P[1]:='%'; -end; - -procedure augmentPreamble(control_para: boolean); - var i: paragraph_index; - l: line_type; - s: array[line_type] of integer; -begin - if not thisCase then exit; - for l:=unknown to plain_line do s[l]:=0; - for i:=1 to para_len do - begin line_no:=orig_line_no[i]; l:=doCommand(P[i]); - inc(s[l]); - if (l=comment_line) and (P[i,2]=comment) - then begin predelete(P[i],2); putLine(P[i]); end; - if not control_para and (l=unknown) then - error('Unidentifiable line',print); - end; - if not control_para and (s[command_line]>0) and (s[plain_line]>0) - then error('Mixture of preamble commands and music',not print); -end; - -procedure doPreamble; - var i: paragraph_index; - maybe_voices: voice_index0; -begin maybe_voices:=0; - if not style_supplied then - begin {augmentPreamble(not known);} - if not style_supplied then warning('No STYLE supplied',not print); - for i:=1 to para_len do if maybeMusicLine(P[i]) then - inc(maybe_voices); - if maybe_voices>0 then preambleGuess(maybe_voices) - else error('No voices found',not print); - end -end; - -procedure respace; - var i, j: stave_index; - begin - for i:=ninstr downto 2 do - begin j:=ninstr-i+1; - if nspace[j]<>unspec then tex3('\mtxInterInstrument{'+toString(i-1)+ - '}{'+toString(nspace[j])+'}'); - end; - if nspace[ninstr]<>unspec then tex3('\mtxStaffBottom{'+ - toString(nspace[ninstr])+'}'); - must_respace:=false; - end; - -procedure restyle; -begin - must_restyle:=false; -end; - -function clefno ( cl: char ): integer; -begin - case cl of -'G','0','t','8': clefno:=0; -'s','1': clefno:=1; -'m','2': clefno:=2; -'a','3': clefno:=3; -'n','4': clefno:=4; -'r','5': clefno:=5; -'F','b','6': clefno:=6; -'C': clefno:=3; - else - begin warning('Unknown clef code - replaced by treble',print); - clefno:=0; - end; - end -end; - -procedure doTenorClefs; - var i: voice_index; - c: char; -begin for i:=1 to nclefs do - begin - c:=clef[i]; if (c='8') or (c='t') then - putLine('\\mtxTenorClef{' + toString(PMXinstr(i)) + '}\' ); - end; -end; - -procedure doPMXpreamble; - const clefcode: string[8]='0123456'; - var i, j: integer; - clefs: string; - function pmxMeter: string; - var denom, num: integer; - begin if meternum=0 then - begin num := beatsPerLine; denom := 0; - old_meter_word := meterChange(num,meterdenom,true); - end - else begin num := meternum; denom := pmdenom; end; - pmxMeter := toString(num) + ' ' + toString(meterdenom) + - ' ' + toString(pmnum) + ' ' + toString(denom); - end; - function sizecode(k: integer): string; - begin sizecode:='\mtxNormalSize'; - case k of -13: if musicsize=20 then sizecode:='\mtxTinySize' else sizecode:='\mtxSmallSize'; -16: if musicsize=20 then sizecode:='\mtxSmallSize'; -20: if musicsize=16 then sizecode:='\mtxLargeSize'; -24: if musicsize=20 then sizecode:='\mtxLargeSize' else sizecode:='\mtxHugeSize'; -29: sizecode:='\mtxHugeSize'; - else error('Valid sizes are 13, 16, 20, 24, 29',print); - end; - end; -begin - if composer_line <> '' then putline(composer_line); - if title_line <> '' then putline('\mtxTitleLine{'+title_line+'}'); - putLine('---'); - if instrumentNames and not redefined[indent] then fracindent:='0.12'; - write(outfile, nstaves); - write(outfile, ' ', -ninstr); - stave[ninstr+1]:=nstaves+1; - for j:=ninstr downto 1 do write(outfile, ' ', stave[j+1] - stave[j]); - writeln(outfile, ' ', pmxMeter, ' ',xmtrnum0:8:5, ' ',n_sharps, - ' ', n_pages, ' ',n_systems, ' ',musicsize, ' ',fracindent); - for i:=1 to ninstr do if not instrumentNames then putLine('') - else putLine('\mtxInstrName{'+instr_name[ninstr+1-i]+'}'); - clefs:=''; - for i:=nclefs downto 1 do clefs:=clefs+clefcode[1+clefno(clef[i])]; - putLine(clefs); - if texdir='' then texdir := './'; - putLine(texdir); - - pmx_preamble_done:=true; respace; - - for j:=1 to ngroups do - writeln(outfile,'\\mtxGroup{'+toString(j)+'}{' - +toString(ninstr+1-group_start[j])+'}{' - +toString(ninstr+1-group_stop[j])+'}\'); - for j:=1 to ninstr do - if (stave_size[j]<>unspec) then - putLine( - '\\mtxSetSize{'+toString(ninstr+1-j)+'}{'+sizecode(stave_size[j])+'}\'); - if part_line <> '' then - begin putLine('Ti'); putLine(part_line); end; - if title_line <> '' then - begin putLine('Tt'); putLine('\mtxTitle'); end; - if composer_line <> '' then - begin putLine('Tc'); putLine('\mtxPoetComposer'); end; - if pmx_line <> '' then putLine(pmx_line); - doTenorClefs; - wipeCommands; -end; - -function startString(voice: voice_index0): string; - var s, w: string; - j: voice_index; -begin s:=start_line; - for j:=1 to voice do w:=getNextWord(s,dummy,';'); - curtail(w,';'); if w<>'' then startString:=w+' ' else startString:=w; -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/prepmx.c b/Build/source/utils/mtx/mtx-0.60d/prepmx.c deleted file mode 100644 index ba186a63e13..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/prepmx.c +++ /dev/null @@ -1,887 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "prepmx.pas" */ - - -#include "p2c.h" - - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef GLOBALS_H -#include "globals.h" -#endif - -#ifndef PREAMBLE_H -#include "preamble.h" -#endif - -#ifndef LYRICS_H -#include "lyrics.h" -#endif - -#ifndef MTX_H -#include "mtx.h" -#endif - -#ifndef ANALYZE_H -#include "analyze.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef STATUS_H -#include "status.h" -#endif - -#ifndef UPTEXT_H -#include "uptext.h" -#endif - -#ifndef NOTES_H -#include "notes.h" -#endif - -#ifndef MULTFILE_H -#include "multfile.h" -#endif - -#ifndef FILES_H -#include "files.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -/* fpc mistakenly thinks CONTROL and GLOBALS are not used */ - -/* CMO: addition/change by Christian Mondrup */ - -/** M-Tx preprocessor to PMX Dirk Laurie */ - -#define version "0.60d" -#define version_date "<11 October 2008>" - -/** See file "Corrections" for updates later than those listed below -*/ - -/** Changes since 0.52b - Uses mtx.tex file - More than one # or % per word treated correctly in uptext - Better way of handling line numbers in lyrics -*/ - -/** To do next: - Take notice of recent improvements in musixtex, pmx and musixlyr -{* Current bugs: -{* Old bugs: - Does not check PMX syntax -{* Weaknesses that may later cause bugs: - Decisions sometimes made on note, sometimes on scan - Can 'here' overrun? - Where does one note stop and the next begin? - See comment on '!' in uptext -*/ - -#define chord_flat 't' -#define chord_left 'l' - -#define blind true -#define visible false - - -Static boolean last_bar; -Static Char multibar[256]; -Static Char repeat_sign[256]; -Static short bar_of_line, bars_of_rest, rest_spacing; - - -/* --------------- Bars and rests --------------- */ - -Static Void writeRepeat(bar) -Char *bar; -{ - Char repcode[256]; - Char STR1[256]; - - if (*bar == '\0') - return; - *repcode = '\0'; - if (!strcmp(bar, "||")) - strcpy(repcode, "Rd"); - else if (!strcmp(bar, "|]")) - strcpy(repcode, "RD"); - else if (!strcmp(bar, "|:")) - strcpy(repcode, "Rl"); - else if (!strcmp(bar, ":|:")) - strcpy(repcode, "Rlr"); - else if (!strcmp(bar, ":|")) - strcpy(repcode, "Rr"); - else if (last_bar && !strcmp(bar, "|")) - strcpy(repcode, "Rb"); - if (*repcode != '\0') { - sprintf(STR1, " %s", repcode); - putLine(STR1); - } - *bar = '\0'; -} - - -Static Void supplyRests(voice) -voice_index voice; -{ - Char STR2[4]; - Char STR3[256]; - - if (multi_bar_rest) { - put(multibar, putspace); - return; - } - if (bar_of_line == 1 && pedanticWarnings()) { - printf("Bar %d Voice %d", bar_no, voice); - warning(" Filling missing voice with rests", !print); - } - if (pickup > 0) - put(rests(STR3, pickup, meterdenom, visible), nospace); - sprintf(STR2, "%s ", pause); - put(STR2, putspace); -} - - -Static Void countBars(note_) -Char *note_; -{ - Char note[256]; - short k, adjust; - short sign = 1; - - strcpy(note, note_); - predelete(note, 2); - k = pos1('+', note); - if (k == 0) { - k = pos1('-', note); - if (k > 0) - sign = -1; - } - if (k > 0) { - note[k-1] = '/'; - getTwoNums(note, &bars_of_rest, &adjust); - } else { - getNum(note, &bars_of_rest); - adjust = 0; - } - rest_spacing = adjust * sign + 14; -} - - -/* FIXME This procedure had a serious bug. It now has a smaller bug. - Basically there should be a test on whether a break between staves - is a break between instruments, in which case the procedure is (now) - right; or a break between staves of the same instrument, in which - case a '|' instead of a '&' should be output (as it was). If the Space - feature is not used, the bug does not show up. */ -Static Void putMBRest() -{ - stave_index i, FORLIM; - Char STR1[256]; - Char STR2[256], STR3[256]; - - put("\\\\\\def\\atnextbar{\\znotes", nospace); - FORLIM = nstaves; - for (i = 1; i <= FORLIM; i++) { - sprintf(STR3, "\\mbrest{%s}{%s}0", - toString(STR1, bars_of_rest), toString(STR2, rest_spacing)); - put(STR3, nospace); - if (i < nstaves) - put("&", nospace); - else - putLine("\\en}\\"); - } - sprintf(STR3, "\\\\\\advance\\barno%s\\", toString(STR1, bars_of_rest - 1)); - putLine(STR3); - bar_no += bars_of_rest - 1; -} - - -/* Local variables for processLine: */ -struct LOC_processLine { - voice_index voice; - Char chords[256], note[256], cutnote[256], pretex[256]; - short ngrace, nmulti; - boolean no_chords, no_uptext; - - short l; - boolean in_group; -} ; - -Local Void output(note_, LINK) -Char *note_; -struct LOC_processLine *LINK; -{ - Char note[256]; - Char STR2[256]; - - strcpy(note, note_); - if (*note != '\0') - { /* pretex is saved up until a spacing note or rest comes */ - if (endsWith(note, "\\") && note[1] != '\\') { - curtail(note, '\\'); - strcat(LINK->pretex, note); - *note = '\0'; - return; - } - if (*LINK->pretex != '\0' && isNoteOrRest(note)) { - sprintf(note, "%s\\ %s", LINK->pretex, strcpy(STR2, note)); - *LINK->pretex = '\0'; - } - if (outlen > 0 && note[0] != ' ') - sprintf(note, " %s", strcpy(STR2, note)); - put(note, nospace); - } - if (thisNote(LINK->voice) == nextvoice) - putLine(""); -} - -Local Void maybeDotted(note, LINK) -Char *note; -struct LOC_processLine *LINK; -{ - if (strlen(note) < 2) - return; - if (note[1] == '"') { - note[1] = note[0]; - strcat(LINK->pretex, "\\mtxDotted"); - } -} - -/* Local variables for addChords: */ -struct LOC_addChords { - struct LOC_processLine *LINK; - Char nt[256], labels[256]; - boolean tieme; - Char lab; - int5 pitches; -} ; - -Local Void outChord(LINK) -struct LOC_addChords *LINK; -{ - short k; - Char STR2[256]; - short FORLIM; - - if (*LINK->nt == '\0') - return; - LINK->tieme = (LINK->nt[0] == '{'); - if (LINK->tieme) - predelete(LINK->nt, 1); - if (*LINK->nt == '\0' || LINK->nt[0] < 'a' || LINK->nt[0] > 'g') { - sprintf(STR2, "Must have a note name at the start of \"%s\", not \"%c\"", - LINK->nt, LINK->nt[0]); - error(STR2, print); - } - renewChordPitch(LINK->LINK->voice, LINK->nt); - sprintf(LINK->LINK->chords + strlen(LINK->LINK->chords), " z%s", LINK->nt); - *LINK->nt = '\0'; - FORLIM = strlen(LINK->labels); - for (k = 0; k <= FORLIM - 1; k++) { - if (chordPitch(LINK->LINK->voice) == LINK->pitches[k]) { - sprintf(LINK->LINK->chords + strlen(LINK->LINK->chords), " s%ct", - LINK->labels[k]); - LINK->labels[k] = ' '; - } - } - if (LINK->tieme) { - chordTie(LINK->LINK->voice, &LINK->lab); - sprintf(LINK->LINK->chords + strlen(LINK->LINK->chords), " s%ct", - LINK->lab); - } -} - -Local Void addChords(LINK) -struct LOC_processLine *LINK; -{ - struct LOC_addChords V; - Char w[256]; - short j = 1; - short mus_line; - paragraph_index0 chord_line; - boolean arpeggio; - Char STR1[256]; - short FORLIM; - - V.LINK = LINK; - saveStatus(LINK->voice); - getChordTies(LINK->voice, V.pitches, V.labels); - *LINK->chords = '\0'; - chord_line = chordLineNo(LINK->voice); - if (chord_line == 0) - LINK->no_chords = true; - if (LINK->no_chords) - return; - GetNextWord(w, P[chord_line-1], blank, dummy); - sprintf(STR1, "%c", barsym); - if (!strcmp(w, STR1) || *w == '\0') - LINK->no_chords = true; - sprintf(STR1, "%c", tilde); - if (!strcmp(w, STR1) || LINK->no_chords) - return; - mus_line = line_no; - line_no = orig_line_no[chord_line-1]; - arpeggio = (w[0] == '?'); - if (arpeggio) { - strcpy(LINK->chords, " ?"); - predelete(w, 1); - } - *V.nt = '\0'; - while (j <= strlen(w)) { - if (w[j-1] == '{' || strcmp(V.nt, "{") && w[j-1] >= 'a' && w[j-1] <= 'g') - outChord(&V); - else if (w[j-1] == chord_flat) - w[j-1] = 'f'; - else if (w[j-1] == chord_left) - w[j-1] = 'e'; - sprintf(V.nt + strlen(V.nt), "%c", w[j-1]); - j++; - } - if (*V.nt != '\0') - outChord(&V); - if (arpeggio) - strcat(LINK->chords, " ?"); - strcat(LINK->note, LINK->chords); - FORLIM = strlen(V.labels); - for (j = 0; j <= FORLIM - 1; j++) { - if (V.labels[j] != ' ') - error("Tie on chord note started but not finished", print); - } - line_no = mus_line; -} - -Local Char *processOther(Result, note_, LINK) -Char *Result; -Char *note_; -struct LOC_processLine *LINK; -{ - Char note[256]; - - strcpy(note, note_); - switch (thisNote(LINK->voice)) { - - case other: - if (note[0] == grace_group) { - if (strlen(note) == 1) - LINK->ngrace = 1; - else - LINK->ngrace = pos1(note[1], digits); - if (LINK->ngrace > 0) - LINK->ngrace--; - } - break; - - /* For a zword, take note of pitch but do not change the contents */ - /* Add spurious duration because repich expects duration to be present */ - case zword: - strcpy(LINK->cutnote, note); - predelete(LINK->cutnote, 1); - insertChar('4', LINK->cutnote, 2); - checkOctave(LINK->voice, LINK->cutnote); - renewPitch(LINK->voice, LINK->cutnote); - break; - - case lyrtag: - extractLyrtag(LINK->voice, note); - break; - - case rbrac: - endBeam(LINK->voice); - break; - - case rparen: - case rlparen: - endSlur(LINK->voice, note); - break; - - case lbrac: - beginBeam(LINK->voice, note); - break; - - case lparen: - maybeDotted(note, LINK); - beginSlur(LINK->voice, note); - break; - - case mword: - error3(LINK->voice, "Meter change must be the first word of its bar"); - break; - - case atword: - lyricsAdjust(LINK->voice, note); - break; - } - return strcpy(Result, note); -} - -Local Void lookahead(LINK) -struct LOC_processLine *LINK; -{ - Char STR2[256]; - Char STR3[256]; - - while (bind_left[(long)nextNote(LINK->voice)]) - sprintf(LINK->note + strlen(LINK->note), " %s", - processOther(STR2, getMusicWord(STR3, LINK->voice), LINK)); -} - -Local Void processNote_(LINK) -struct LOC_processLine *LINK; -{ - if (hasVerseNumber(LINK->voice)) - strcat(LINK->pretex, "\\mtxVerse"); - LINK->l = pos1(multi_group, LINK->note); - if (LINK->l > 0) - scan1(LINK->note, LINK->l + 1, &LINK->nmulti); - activateBeamsAndSlurs(LINK->voice); - LINK->in_group = false; - if (LINK->ngrace > 0) { - LINK->in_group = true; - LINK->ngrace--; - } else { - if (LINK->nmulti > 0) { - LINK->in_group = true; - LINK->nmulti--; - } - } - checkOctave(LINK->voice, LINK->note); - renewPitch(LINK->voice, LINK->note); - if (!LINK->in_group) { - resetDuration(LINK->voice, durationCode(LINK->note)); - markDebeamed(LINK->voice, LINK->note); - } - lookahead(LINK); - getSyllable(LINK->voice, LINK->pretex); - addUptext(LINK->voice, &LINK->no_uptext, LINK->pretex); - addChords(LINK); -} - - -/* ---------------------------------------------------------------- */ - -Static Void processLine(voice_, bar_no) -voice_index voice_; -short bar_no; -{ - struct LOC_processLine V; - paragraph_index par_line; - Char STR2[256]; - - V.voice = voice_; - *V.pretex = '\0'; - V.no_chords = false; - V.no_uptext = false; - par_line = musicLineNo(V.voice); - V.nmulti = 0; - V.ngrace = 0; - line_no = orig_line_no[par_line-1]; - do { - getMusicWord(V.note, V.voice); - if (*V.note == '\0') - return; - if (debugMode()) - printf("%d %s\n", V.voice, V.note); - switch (thisNote(V.voice)) { - - case rword: - if (multi_bar_rest) { - countBars(V.note); - strcpy(V.note, multibar); - if (uptextOnRests()) - addUptext(V.voice, &V.no_uptext, V.pretex); - } else { - V.l = pos1(multi_group, V.note); - if (V.l > 0) - scan1(V.note, V.l + 1, &V.nmulti); - if (V.nmulti > 0) { - V.in_group = true; - V.nmulti--; - } - if (uptextOnRests()) - addUptext(V.voice, &V.no_uptext, V.pretex); - if (!isPause(V.note)) - resetDuration(V.voice, durationCode(V.note)); - } - break; - - case abcdefg: - processNote_(&V); - break; - - case barword: - if (V.voice == nvoices) { - if (endOfBar(V.voice, bar_no)) - strcpy(repeat_sign, V.note); - else - writeRepeat(V.note); - } - sprintf(STR2, "%c", barsym); - if (strcmp(V.note, STR2)) - *V.note = '\0'; - V.no_chords = false; - break; - - case FirstOnly: - if (V.voice != nvoices) - *V.note = '\0'; - else - strcpy(V.note, processOther(STR2, V.note, &V)); - break; - - default: - strcpy(V.note, processOther(STR2, V.note, &V)); - break; - } - output(V.note, &V); - } while (!endOfBar(V.voice, bar_no)); - if (!V.no_chords) - skipChordBar(V.voice); -} - - -/* ------------------------------------------------------------------- */ - -Static Void getMeterChange(voice, new_meter) -voice_index voice; -Char *new_meter; -{ - short pn1, pn2; - Char w[256], new_command[256]; - - if (nextNote(voice) != mword) - return; - getMusicWord(w, voice); - getMeter(w, &meternum, &meterdenom, &pn1, &pn2); - full_bar = meternum * (64 / meterdenom); - /* CMO: process denominator value with function PMXmeterdenom */ - meterWord(new_command, meternum, PMXmeterdenom(meterdenom), pn1, pn2); - if (*new_meter != '\0' && strcmp(new_meter, new_command)) - error3(voice, "The same meter change must appear in all voices"); - strcpy(new_meter, new_command); -} - - -/* Local variables for musicParagraph: */ -struct LOC_musicParagraph { - Char new_meter[256]; -} ; - -Local Void putPMXlines(LINK) -struct LOC_musicParagraph *LINK; -{ - paragraph_index i, FORLIM; - - FORLIM = para_len; - for (i = 0; i <= FORLIM - 1; i++) { - if (startsWith(P[i], double_comment)) { - predelete(P[i], 2); - putLine(P[i]); - strcpy(P[i], "%"); - } - } -} - -Local Void processOneBar(LINK) -struct LOC_musicParagraph *LINK; -{ - paragraph_index0 m, cm; - short n1, n2; - voice_index voice, cvoice; - boolean ignore_voice; - boolean wrote_repeat = false; - boolean alone; - Char STR2[256]; - Char STR3[256]; - - if (bar_of_line > 1) { - sprintf(STR3, "%cBar %s", comment, toString(STR2, bar_no)); - putLine(STR3); - } - last_bar = (bar_of_line == nbars && final_paragraph); - if (last_bar && !strcmp(repeat_sign, "|")) - *repeat_sign = '\0'; - writeRepeat(repeat_sign); - *LINK->new_meter = '\0'; - for (voice = nvoices; voice >= 1; voice--) { - if (musicLineNo(voice) > 0) { - gotoBar(voice, bar_of_line); - getMeterChange(voice, LINK->new_meter); - } - } - if (last_bar && *LINK->new_meter == '\0' && nleft > pickup && meternum > 0) - meterChange(LINK->new_meter, nleft, 64, true); - if (*LINK->new_meter != '\0') - putLine(LINK->new_meter); - if (multi_bar_rest) { - n1 = meternum * 64; - n2 = meterdenom; - cancel(&n1, &n2, 1); - rests(multibar, n1, n2, blind); - } - for (voice = nvoices; voice >= 1; voice--) { - ignore_voice = !selected[voice-1]; - cvoice = companion(voice); - m = musicLineNo(voice); - cm = musicLineNo(cvoice); - alone = (voice == cvoice || m > 0 && cm == 0 || - m == 0 && cm == 0 && voice < cvoice || !selected[cvoice-1]); - if (selected[voice-1]) { - if (m > 0) - processLine(voice, bar_of_line); - else if (alone) - supplyRests(voice); - else - ignore_voice = true; - if (last_bar && *repeat_sign != '\0' && !wrote_repeat) { - writeRepeat(repeat_sign); - wrote_repeat = true; - } - if (!ignore_voice) { - if (alone || voicePos(voice) == 1) - putLine(" /"); - else - putLine(" //"); - } - } - } - if (multi_bar_rest) - putMBRest(); - bar_no++; - pickup = 0; - putLine(""); -} - -Local Void putMeter(new_meter_word, LINK) -Char *new_meter_word; -struct LOC_musicParagraph *LINK; -{ - if (strcmp(new_meter_word, old_meter_word)) - putLine(new_meter_word); - strcpy(old_meter_word, new_meter_word); -} - - -Static Void musicParagraph() -{ - struct LOC_musicParagraph V; - voice_index0 j, nvoice; - Char lyrassign[256]; - Char STR1[256]; - Char STR2[256]; - Char STR3[256], STR4[256], STR5[256]; - voice_index0 FORLIM; - short FORLIM1; - - paragraphSetup(&nvoice); - if (nvoice == 0) { - nonMusic(); - return; - } - if (nvoice > nvoices) { - if (nvoice == 0) - error("No voices! Did you remember to to supply a Style?", !print); - sprintf(STR4, "Paragraph has %s voices but Style allows only %s", - toString(STR1, nvoice), toString(STR2, nvoices)); - error(STR4, !print); - return; - } - if (first_paragraph) - includeStartString(); - if (pmx_preamble_done && (!final_paragraph || nvoice > 0)) { - sprintf(STR5, "%c Paragraph %s line %s bar %s", - comment, toString(STR1, paragraph_no), - toString(STR2, orig_line_no[0]), toString(STR3, bar_no)); - putLine(STR5); - } - testParagraph(); - rememberDurations(); - if (beVerbose()) - describeParagraph(); - /* ---- Knowing the score, we can start setting music ---------------- */ - if (!pmx_preamble_done) { - doPMXpreamble(); - sprintf(STR3, "%c Paragraph %s line %s bar ", - comment, toString(STR1, paragraph_no), - toString(STR2, orig_line_no[0])); - put(STR3, putspace); - if (pickup > 0) - putLine("0"); - else - putLine("1"); - } - putPMXlines(&V); - if (must_restyle) - restyle(); - if (some_vocal && (nvoice > 0 || !final_paragraph)) { - FORLIM = ninstr; - for (j = 1; j <= FORLIM; j++) { - assignLyrics(j, lyrassign); - if (*lyrassign != '\0') { - sprintf(STR2, "\\\\%s\\", lyrassign); - putLine(STR2); - } - } - } - if (must_respace) - respace(); - if (meternum == 0) - putMeter(meterChange(STR2, beatsPerLine(), meterdenom, true), &V); - if (nleft > 0) - nbars++; - if (nbars == 0 && multi_bar_rest) - nbars = 1; - FORLIM1 = nbars; - for (bar_of_line = 1; bar_of_line <= FORLIM1; bar_of_line++) - processOneBar(&V); - restoreDurations(); -} - - -/* ----------------------------------------------------------------------- */ - -Static boolean no_commands_yet; - - -Static Void doMusic() -{ - Char STR1[256], STR2[256]; - Char STR4[256]; - - first_paragraph = true; - pmx_preamble_done = false; - bar_no = 1; - *repeat_sign = '\0'; - must_respace = false; - must_restyle = false; - do { - final_paragraph = endOfInfile(); - if (para_len > 0 && !ignore_input && thisCase()) { - if (no_commands_yet) { - interpretCommands(); - printFeatures(false); - one_beat = 64 / meterdenom; - full_bar = meternum * one_beat; - if (nvoices > standardPMXvoices) { - sprintf(STR4, "You have %s voices; standard PMX can only handle %s", - toString(STR1, nvoices), toString(STR2, standardPMXvoices)); - warning(STR4, !print); - } - initMTX(); - initUptext(); - initStatus(); - initLyrics(); - no_commands_yet = false; - } - if (startsWithBracedWord(P[0])) - lyricsParagraph(); - else { - musicParagraph(); - first_paragraph = false; - writeRepeat(repeat_sign); - } - } - readParagraph(P, orig_line_no, ¶_len); - } while (para_len != 0); -} - - -Static boolean control_paragraph, no_report_errors; - - -Static boolean isControlParagraph(P, para_len) -Char (*P)[256]; -paragraph_index para_len; -{ - paragraph_index0 commands = 0, labels = 0, voices = 0, guff = 0; - paragraph_index0 i; - Char w[256]; - -/* p2c: prepmx.pas: Note: Eliminated unused assignment statement [338] */ - for (i = 0; i <= para_len - 1; i++) { - if (!startsWith(P[i], "%")) { - NextWord(w, P[i], ' ', ':'); - if (!endsWith(w, ":")) - guff++; - else if (strlen(w) < 3 || findVoice(w) > 0) - voices++; - else if (isCommand(w)) - commands++; - else - labels++; - } - } - if (voices + guff > commands) - return false; - return true; -} - - -Static Void topOfPMXfile() -{ - Char STR2[24]; - Char STR3[34]; - - putLine("---"); - sprintf(STR2, "\\def\\mtxversion{%s}", version); - putLine(STR2); - sprintf(STR3, "\\def\\mtxdate{%s}", version_date); - putLine(STR3); - putLine("\\input mtx"); -} - - -main(argc, argv) -int argc; -Char *argv[]; -{ /* ---- Main program ------------------------ */ - PASCAL_MAIN(argc, argv); - strcpy(this_version, version); - strcpy(this_version_date, version_date); - printf("==> This is M-Tx %s (Music from TeXt) %s\n", version, version_date); - mtxLevel(version); - OpenFiles(); - no_commands_yet = true; - preambleDefaults(); - no_report_errors = false; - topOfPMXfile(); - do { - readParagraph(P, orig_line_no, ¶_len); - control_paragraph = isControlParagraph(P, para_len); - if (control_paragraph) { - augmentPreamble(no_report_errors); - no_report_errors = true; - if (para_len == 0) - error("No music paragraphs!", !print); - } - } while (control_paragraph); - doPreamble(); - doMusic(); - if (!pmx_preamble_done) - error("No music paragraphs!", !print); - putLine("% Coded by M-Tx"); - CloseFiles(); - printf("PrePMX done. Now run PMX.\n"); - _Escape(0); - exit(EXIT_SUCCESS); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/prepmx.pas b/Build/source/utils/mtx/mtx-0.60d/prepmx.pas deleted file mode 100644 index 0b246e04f7d..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/prepmx.pas +++ /dev/null @@ -1,444 +0,0 @@ -program prepmx; -uses control, strings, globals, preamble, lyrics, mtx, analyze, - mtxline, status, uptext, notes, files, utility; -{ fpc mistakenly thinks CONTROL and GLOBALS are not used } - -{* M-Tx preprocessor to PMX Dirk Laurie } -const version = '0.60'; - version_date = '<16 March 2005>'; - -{* See file "Corrections" for updates later than those listed below -} - -{* Changes since 0.52b - Uses mtx.tex file - More than one # or % per word treated correctly in uptext - Better way of handling line numbers in lyrics -} - -{* To do next: - Take notice of recent improvements in musixtex, pmx and musixlyr -{* Current bugs: -{* Old bugs: - Does not check PMX syntax -{* Weaknesses that may later cause bugs: - Decisions sometimes made on note, sometimes on scan - Can 'here' overrun? - Where does one note stop and the next begin? - See comment on '!' in uptext -} - chord_flat = 't'; - chord_left = 'l'; - blind = true; - visible = false; - -var - last_bar: boolean; - multibar: string; - repeat_sign: string; - bar_of_line, bars_of_rest, rest_spacing: integer; - -{ --------------- Bars and rests --------------- } - -procedure writeRepeat(var bar: string); - var repcode: string; - begin if bar='' then exit; - repcode:=''; - if bar='||' then repcode:='Rd' - else if (bar='|]') then repcode:='RD' - else if bar='|:' then repcode:='Rl' - else if bar=':|:' then repcode:='Rlr' - else if bar=':|' then repcode:='Rr' - else if last_bar and (bar='|') then repcode:='Rb'; - if repcode<>'' then putLine(' '+repcode); - bar:=''; - end; - -procedure supplyRests(voice: voice_index); -begin - if multi_bar_rest then - begin put(multibar,putspace); exit; end; - if (bar_of_line=1) and pedanticWarnings then - begin write('Bar ', bar_no, ' Voice ', voice); - warning(' Filling missing voice with rests',not print); - end; - if pickup>0 then - put(rests(pickup,meterdenom,visible),nospace); - put(pause+' ',putspace); -end; - -procedure countBars(note: string); - var k, adjust, sign: integer; -begin predelete(note,2); k:=pos1('+',note); sign:=1; - if k=0 then - begin k:=pos1('-',note); if k>0 then sign:=-1; end; - if k>0 then - begin note[k]:='/'; getTwoNums(note,bars_of_rest,adjust); end - else begin getNum(note,bars_of_rest); adjust:=0; end; - rest_spacing := 14 + adjust*sign; -end; - -(* FIXME This procedure had a serious bug. It now has a smaller bug. - Basically there should be a test on whether a break between staves - is a break between instruments, in which case the procedure is (now) - right; or a break between staves of the same instrument, in which - case a '|' instead of a '&' should be output (as it was). If the Space - feature is not used, the bug does not show up. *) -procedure putMBRest; - var i: stave_index; -begin - put('\\\def\atnextbar{\znotes',nospace); - for i:=1 to nstaves do - begin put('\mbrest{'+toString(bars_of_rest)+'}{'+toString(rest_spacing) - +'}0',nospace); - if i'' then - begin { pretex is saved up until a spacing note or rest comes } - if endsWith(note,'\') and (note[2]<>'\') then - begin curtail(note,'\'); pretex:=pretex+note; note:=''; exit end; - if (pretex<>'') and isNoteOrRest(note) then - begin note:=pretex+'\ '+note; pretex:='' end; - if (outlen>0) and (note[1]<>' ') then note:=' '+note; - put(note,nospace); - end; - if thisNote(voice)=nextvoice then putLine(''); - end; - - procedure maybeDotted(var note: string); - begin if length(note)<2 then exit; - if note[2]='"' then - begin note[2]:=note[1]; pretex:=pretex+'\mtxDotted' end - end; - - procedure addChords; - var w, nt, labels: string; - j, mus_line: integer; - chord_line: paragraph_index0; - arpeggio, tieme: boolean; - lab: char; - pitches: int5; - procedure outChord; - var k: integer; - begin if nt='' then exit; tieme:=nt[1]='{'; if tieme then predelete(nt,1); - if (nt='') or (nt[1]<'a') or (nt[1]>'g') then - error('Must have a note name at the start of "'+nt - +'", not "'+nt[1]+'"',print); - renewChordPitch(voice,nt); - chords := chords+' z'+nt; nt:=''; - for k:=1 to length(labels) do if chordPitch(voice)=pitches[k] then - begin chords:=chords+' s'+labels[k]+'t'; labels[k]:=' ' end; - if tieme then begin chordTie(voice,lab); chords:=chords+' s'+lab+'t' end - end; - begin saveStatus(voice); - getChordTies(voice, pitches, labels); - chords:=''; chord_line:=chordLineNo(voice); - if chord_line=0 then no_chords:=true; - if no_chords then exit; - w := getNextWord(P[chord_line],blank,dummy); - if (w=barsym) or (w='') then no_chords:=true; - if (w=tilde) or no_chords then exit; - mus_line:=line_no; line_no:=orig_line_no[chord_line]; - arpeggio := w[1]='?'; if arpeggio then - begin chords:=' ?'; predelete(w,1); end; - j:=1; nt:=''; - while j<=length(w) do - begin - if (w[j]='{') or ((nt<>'{') and (w[j]>='a') and (w[j]<='g')) then outChord - else if w[j]=chord_flat then w[j]:='f' - else if w[j]=chord_left then w[j]:='e'; - nt:=nt+w[j]; j:=j+1 - end; - if nt<>'' then outChord; if arpeggio then chords:=chords+' ?'; - note:=note+chords; - for j:=1 to length(labels) do if labels[j]<>' ' then - error('Tie on chord note started but not finished',print); - line_no:=mus_line; - end; - - function processOther(note: string): string; - begin - case thisNote(voice) of -other: if note[1]=grace_group then - begin if length(note)=1 then ngrace:=1 - else ngrace := pos1(note[2],digits); - if ngrace>0 then dec(ngrace); - end; -{ For a zword, take note of pitch but do not change the contents } -{ Add spurious duration because repich expects duration to be present } -zword: begin cutnote:=note; predelete(cutnote,1); insertchar('4',cutnote,2); - checkOctave(voice,cutnote); renewPitch(voice,cutnote) - end; -lyrtag: extractLyrtag(voice,note); -rbrac: endBeam(voice); -rparen, rlparen: endSlur(voice,note); -lbrac: beginBeam(voice,note); -lparen: begin maybeDotted(note); beginSlur(voice,note); end; -mword: error3(voice,'Meter change must be the first word of its bar'); -atword: lyricsAdjust(voice, note); - end; - processOther:=note; - end; - - procedure lookahead; - begin while bind_left[nextNote(voice)] do - note:=note+' '+processOther(getMusicWord(voice)); - end; - - var l: integer; - in_group: boolean; - - procedure processNote; - begin - begin if hasVerseNumber(voice) then pretex:=pretex+'\mtxVerse'; - l := pos1(multi_group,note); - if l>0 then scan1(note,l+1,nmulti); - activateBeamsAndSlurs(voice); - in_group:=false; - if ngrace>0 then begin in_group:=true; dec(ngrace) end else - if nmulti>0 then begin in_group:=true; dec(nmulti); end; - checkOctave(voice,note); renewPitch(voice,note); - if not in_group then - begin resetDuration(voice,durationCode(note)); markDebeamed(voice,note) end; - lookahead; getSyllable(voice,pretex); - addUptext(voice, no_uptext, pretex); - addChords; - end; - end; - -begin - pretex:=''; no_chords:=false; no_uptext := false; - par_line:=musicLineNo(voice); - nmulti :=0; ngrace := 0; line_no:=orig_line_no[par_line]; - repeat note:=getMusicWord(voice); if note='' then exit; - if debugMode then writeln(voice,' ',note); - case thisNote(voice) of - rword: begin if multi_bar_rest then - begin countBars(note); note:=multibar; - if uptextOnRests then - addUptext(voice, no_uptext, pretex); - end - else begin - l := pos1(multi_group,note); - if l>0 then scan1(note,l+1,nmulti); - if nmulti>0 then begin in_group:=true; dec(nmulti); end; - if uptextOnRests then - addUptext(voice, no_uptext, pretex); - if not isPause(note) then resetDuration(voice,durationCode(note)); - end - end; - abcdefg: processNote; - barword: begin - if voice=nvoices then - if endOfBar(voice,bar_no) then repeat_sign := note - else writeRepeat(note); - if note<>barsym then note:=''; - no_chords:=false; - end; - FirstOnly: if voice<>nvoices then note:='' else - note:=processOther(note); - else note:=processOther(note); - end; - output(note); - until endOfBar(voice,bar_no); - if not no_chords then skipChordBar(voice); -end; - -{ ------------------------------------------------------------------- } - -procedure getMeterChange(voice: voice_index; var new_meter: string); - var pn1, pn2: integer; - w, new_command: string; -begin if nextNote(voice)<>mword then exit; - w:=getMusicWord(voice); - getMeter(w, meternum, meterdenom, pn1, pn2); - full_bar := meternum*(64 div meterdenom); - new_command := meterWord(meternum, meterdenom, pn1, pn2); - if (new_meter<>'') and (new_meter<>new_command) - then error3(voice,'The same meter change must appear in all voices'); - new_meter:=new_command; -end; - -procedure musicParagraph; - var j, nvoice: voice_index0; - new_meter, lyrassign: string; - - procedure putPMXlines; - var i: paragraph_index; - begin for i:=1 to para_len do - if startsWith(P[i],double_comment) then - begin predelete(P[i],2); putLine(P[i]); P[i]:='%'; end; - end; - - procedure processOneBar; - var m, cm: paragraph_index0; - n1, n2: integer; - voice, cvoice: voice_index; - ignore_voice, wrote_repeat, alone: boolean; - begin - if bar_of_line>1 then putLine(comment+'Bar '+toString(bar_no)); - last_bar := (bar_of_line=nbars) and final_paragraph; - if last_bar and (repeat_sign='|') then repeat_sign:=''; - writeRepeat(repeat_sign); new_meter := ''; - for voice:=nvoices downto 1 do - if musicLineNo(voice)>0 then - begin gotoBar(voice,bar_of_line); getMeterChange(voice,new_meter); - end; - if last_bar and (new_meter='') and (nleft>pickup) and (meternum>0) then - new_meter := meterChange(nleft,64,true); - if new_meter<>'' then putLine(new_meter); - wrote_repeat := false; if multi_bar_rest then - begin n1:=64*meternum; n2:=meterdenom; cancel(n1,n2,1); - multibar:=rests(n1,n2,blind); - end; - for voice:=nvoices downto 1 do - begin ignore_voice:=not selected[voice]; cvoice:=companion(voice); - m:=musicLineNo(voice); cm:=musicLineNo(cvoice); - alone:=(voice=cvoice) or ((m>0) and (cm=0)) - or ((m=0) and (cm=0) and (voice0 then processLine(voice,bar_of_line) - else if alone then supplyRests(voice) else ignore_voice:=true; - if last_bar and (repeat_sign<>'') and not wrote_repeat then - begin writeRepeat(repeat_sign); wrote_repeat := true; end; - if not ignore_voice then - if alone or (voicePos(voice)=1) then putLine(' /') - else putLine(' //'); - end; - end; - if multi_bar_rest then putMBRest; - inc(bar_no); pickup:=0; putLine(''); - end; - - procedure putMeter(new_meter_word: string); - begin if new_meter_word<>old_meter_word then putLine(new_meter_word); - old_meter_word := new_meter_word; - end; - -begin - paragraphSetup(nvoice); - if nvoice=0 then begin nonMusic; exit end - else if nvoice>nvoices then - begin if nvoice=0 then - error('No voices! Did you remember to to supply a Style?',not print); - error('Paragraph has '+toString(nvoice)+ - ' voices but Style allows only '+toString(nvoices),not print); exit; - end; - if first_paragraph then includeStartString; - if pmx_preamble_done and (not final_paragraph or (nvoice>0)) then - putLine(comment +' Paragraph ' + toString(paragraph_no) + - ' line ' + toString(orig_line_no[1]) + ' bar ' + toString(bar_no)); - testParagraph; rememberDurations; - if beVerbose then describeParagraph; - { ---- Knowing the score, we can start setting music ---------------- } - if not pmx_preamble_done then - begin doPMXpreamble; - put( comment + ' Paragraph ' + toString(paragraph_no) + ' line ' + - toString(orig_line_no[1]) + ' bar ',putspace); - if pickup>0 then putLine('0') else putLine('1'); - end; - putPMXlines; - if must_restyle then restyle; - if some_vocal and ((nvoice>0) or not final_paragraph) then - for j:=1 to ninstr do - begin assignLyrics(j,lyrassign); - if lyrassign<>'' then putLine('\\'+lyrassign+'\'); - end; - if must_respace then respace; - if (meternum=0) then putMeter(meterChange(beatsPerLine,meterdenom,true)); - if nleft > 0 then inc(nbars); - if (nbars=0) and multi_bar_rest then nbars:=1; - for bar_of_line:=1 to nbars do - processOneBar; - restoreDurations; -end; - -{ ----------------------------------------------------------------------- } - -var no_commands_yet: boolean; - -procedure doMusic; -begin first_paragraph:=true; pmx_preamble_done:=false; bar_no:=1; - repeat_sign:=''; must_respace:=false; must_restyle:=false; - repeat final_paragraph := endOfInfile; - if (para_len>0) and not ignore_input and thisCase then - begin if no_commands_yet then - begin interpretCommands; printFeatures(false); - one_beat := 64 div meterdenom; full_bar := meternum*one_beat; - if nvoices>standardPMXvoices then warning('You have ' - +toString(nvoices)+' voices; standard PMX can only handle ' - +toString(standardPMXvoices),not print); - initMTX; initUptext; initStatus; initLyrics; - no_commands_yet:=false - end; - if startsWithBracedWord(P[1]) then lyricsParagraph else - begin musicParagraph; first_paragraph:=false; - writeRepeat(repeat_sign); - end - end; - readParagraph(P,orig_line_no,para_len); - until para_len=0; -end; - -var control_paragraph, no_report_errors: boolean; - -function isControlParagraph (var P: paragraph; para_len: paragraph_index) - : boolean; - var commands, labels, voices, guff, i: paragraph_index0; - w: string; -begin isControlParagraph:=true; commands:=0; labels:=0; voices:=0; guff:=0; - for i:=1 to para_len do - if not (startsWith(P[i],'%')) then - begin w:=nextWord(P[i],' ',':'); - if not endsWith(w,':') then inc(guff) - else if (length(w)<3) or (findVoice(w)>0) then inc(voices) - else if isCommand(w) then inc(commands) - else inc(labels) - end; - if (voices+guff>commands) then isControlParagraph:=false -end; - -procedure topOfPMXfile; -begin - putLine('---'); - putLine('\def\mtxversion{'+version+'}'); - putline('\def\mtxdate{'+version_date+'}'); - putline('\input mtx'); -end; - -begin { ---- Main program ------------------------ } - this_version := version; this_version_date := version_date; - writeln ('==> This is M-Tx ' + version + ' (Music from TeXt) ' + - version_date ); - mtxLevel(version); OpenFiles; no_commands_yet:=true; preambleDefaults; - no_report_errors:=false; - topOfPMXfile; - repeat readParagraph(P,orig_line_no,para_len); - control_paragraph:=isControlParagraph(P,para_len); - if control_paragraph then - begin augmentPreamble(no_report_errors); - no_report_errors:=true; - if para_len=0 then error('No music paragraphs!',not print) - end - until not control_paragraph; - doPreamble; doMusic; - if not pmx_preamble_done then error('No music paragraphs!',not print); - putline('% Coded by M-Tx'); - CloseFiles; - writeln ('PrePMX done. Now run PMX.'); halt(0); -end. - diff --git a/Build/source/utils/mtx/mtx-0.60d/status.c b/Build/source/utils/mtx/mtx-0.60d/status.c deleted file mode 100644 index aef14b88a7b..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/status.c +++ /dev/null @@ -1,649 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "status.pas" */ - - -#include "p2c.h" - - -#define STATUS_G -#include "status.h" - - -#ifndef GLOBALS_H -#include "globals.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef CONTROL_H -#include "control.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - -#ifndef NOTES_H -#include "notes.h" -#endif - - -#define lowest_pitch (-9) -#define highest_pitch 61 - - -typedef struct line_status { - short pitch, chord_pitch, octave_adjust, beam_level, slur_level, after_slur; - Char octave, lastnote, chord_lastnote, duration, slurID, tieID; - boolean beamnext, beamed, slurnext, slurred, no_beam_melisma; - boolean no_slur_melisma[12]; - int5 chord_tie_pitch; - Char chord_tie_label[6]; -} line_status; - - -Static Char init_oct[256] = ""; -Static line_status current[maxvoices]; -Static Char lastdur[maxvoices]; - - -Void chordTie(voice, lab) -short voice; -Char *lab; -{ - short n; - line_status *WITH; - - WITH = ¤t[voice-1]; - n = strlen(WITH->chord_tie_label); - if (n == 5) - error3(voice, "Only five slur ties allowed per voice"); - if (n == 0) - *lab = 'T'; - else - *lab = WITH->chord_tie_label[n-1]; - (*lab)++; - sprintf(WITH->chord_tie_label + strlen(WITH->chord_tie_label), "%c", *lab); -/* p2c: status.pas, line 66: - * Note: Possible string truncation in assignment [145] */ - n++; - WITH->chord_tie_pitch[n-1] = WITH->chord_pitch; -} - - -Void getChordTies(voice, pitches, labels) -short voice; -short *pitches; -Char *labels; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - memcpy(pitches, WITH->chord_tie_pitch, sizeof(int5)); - strcpy(labels, WITH->chord_tie_label); - *WITH->chord_tie_label = '\0'; -} - - -Void rememberDurations() -{ - voice_index v, FORLIM; - - FORLIM = nvoices; - for (v = 1; v <= FORLIM; v++) - lastdur[v-1] = duration(v); -} - - -Void restoreDurations() -{ - voice_index v, FORLIM; - - FORLIM = nvoices; - for (v = 1; v <= FORLIM; v++) - resetDuration(v, lastdur[v-1]); -} - - -Char duration(voice) -short voice; -{ - return (current[voice-1].duration); -} - - -Void resetDuration(voice, dur) -short voice; -Char dur; -{ - if (pos1(dur, durations) == 0) { - printf("Trying to set duration to %c; ", dur); - error3(voice, "M-Tx system error: resetDuration"); - } - current[voice-1].duration = dur; -} - - -Void activateBeamsAndSlurs(voice) -short voice; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - if (WITH->beamnext) { - WITH->beamed = true; - WITH->beamnext = false; - } - if (WITH->slurnext) { - WITH->slurred = true; - WITH->slurnext = false; - } - if (WITH->slurred) - WITH->after_slur++; -} - - -Void saveStatus(voice) -short voice; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - WITH->chord_pitch = WITH->pitch; - WITH->chord_lastnote = WITH->lastnote; -} - - -boolean noBeamMelisma(voice) -short voice; -{ - return (current[voice-1].no_beam_melisma); -} - - -short afterSlur(voice) -short voice; -{ - short Result; - line_status *WITH; - - WITH = ¤t[voice-1]; - Result = WITH->after_slur; - if (WITH->after_slur > 0 && WITH->slur_level < 1) - error3(voice, "M-Tx system error: afterSlur and slur_level incompatible)"); - return Result; -} - - -Char octave(voice) -short voice; -{ - return (current[voice-1].octave); -} - - -Void resetOctave(voice) -short voice; -{ - current[voice-1].octave = ' '; -} - - -Void initOctaves(octaves) -Char *octaves; -{ - short i = 1; - - strcpy(init_oct, octaves); - while (i <= strlen(init_oct)) { - if (init_oct[i-1] == ' ') - delete1(init_oct, i); - else - i++; - } -} - - -Static Char initOctave(voice_stave) -stave_index voice_stave; -{ - if (voice_stave > strlen(init_oct)) { - if (pos1(clef[voice_stave-1], "Gt08") > 0) - return '4'; - else - return '3'; - } else - return (init_oct[voice_stave-1]); -} - - -Void setOctave(voice) -short voice; -{ - current[voice-1].octave = initOctave(voiceStave(voice)); -} - - -Void newOctave(voice, dir) -short voice; -Char dir; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - switch (dir) { - - case '+': - WITH->octave++; - break; - - case '-': - WITH->octave--; - break; - } -} - - -Static short newPitch(voice, note_, pitch, lastnote) -short voice; -Char *note_; -short pitch; -Char lastnote; -{ - Char note[256]; - short interval, npitch; - Char oct; - - strcpy(note, note_); - /*if debugMode then - write('New pitch for note ',note,' relative to ',lastnote, - ' at pitch ',pitch);*/ - oct = octaveCode(note); - if (oct == '=') - oct = initOctave(voiceStave(voice)); - if (isdigit(oct)) { - pitch = (oct - '0') * 7 - 3; - lastnote = 'f'; - removeOctaveCode(oct, note); - oct = octaveCode(note); - } - interval = note[0] - lastnote; - if (interval > 3) - interval -= 7; - if (interval < -3) - interval += 7; - npitch = pitch + interval; /*if debugMode then write(' was ',npitch);*/ - while (oct != ' ') { - if (oct == '+') - npitch += 7; - else if (oct == '-') - npitch -= 7; - removeOctaveCode(oct, note); - oct = octaveCode(note); - } - /*if debugMode then writeln(' is ',npitch);*/ - return npitch; -} - - -Local Void delins(note, c1, c2, l) -Char *note; -Char c1, c2; -short l; -{ - short i, n; - - n = strlen(note); - i = pos1(c1, note); - if (i == 0) - i = n + 1; - while (l > 0 && i <= n) { - delete1(note, i); - n--; - l--; - } - i = pos1(c2, note); - if (i == 0) { - if (strlen(note) < 2) - error("M-Tx program error", print); - else - i = 3; - } - while (l > 0) { - insertChar(c2, note, i); - l--; - } -} - - -Static Void repitch(note, diff) -Char *note; -short diff; -{ - diff /= 7; - if (diff > 0) - delins(note, '-', '+', diff); - else - delins(note, '+', '-', -diff); -} - - -Void setUnbeamed(voice) -short voice; -{ - current[voice-1].beamed = false; -} - - -Void setUnslurred(voice) -short voice; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - WITH->slurred = false; - WITH->after_slur = 0; -} - - -Void beginBeam(voice, note) -short voice; -Char *note; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - if (WITH->beamed) - error3(voice, "Starting a forced beam while another is open"); - if (WITH->beam_level > 0) - error3(voice, - "Starting a forced beam while another is open (beamlevel>0)"); - WITH->beam_level++; - WITH->beamnext = true; - WITH->no_beam_melisma = startsWith(note, "[["); - if (WITH->no_beam_melisma) - predelete(note, 1); -} - - -Void endBeam(voice) -short voice; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - if (WITH->beam_level < 1) - error3(voice, "Closing a beam that was never opened"); - WITH->beam_level--; - setUnbeamed(voice); -} - - -short slurLevel(voice) -short voice; -{ - return (current[voice-1].slur_level); -} - - -short beamLevel(voice) -short voice; -{ - return (current[voice-1].beam_level); -} - - -boolean noSlurMelisma(voice, history) -short voice, history; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - return (WITH->no_slur_melisma[WITH->slur_level + history - 1]); -} - - -Static Char *slurLabel(Result, voice, note) -Char *Result; -short voice; -Char *note; -{ - Char sl; - - if (*note == '\0') - return strcpy(Result, ""); - if (strlen(note) < 2) - return strcpy(Result, " "); - if (note[1] >= '0' && note[1] <= 'Z') - sl = note[1]; - else - sl = ' '; - if (sl >= 'I' && sl <= 'T') - warning3(voice, "Slur label in the range I..T may cause conflict"); - sprintf(Result, "%c", sl); - return Result; -} - - -Static Void labelSlur(voice, note) -short voice; -Char *note; -{ - Char sl; - line_status *WITH; - - if (*note == '\0') - return; - WITH = ¤t[voice-1]; - if (note[0] == ')') - WITH->slurID += 2; - else if (note[0] == '}') - WITH->tieID += 2; - /** CMO 0.60a: replace assigning tieID to sl by space charater - if (note[1]='(') or (note[1]=')') then sl:=slurID else sl:=tieID; */ - if (note[0] == '(' || note[0] == ')') - sl = WITH->slurID; - else - sl = ' '; - /** CMO 0.60d: omit insertchar in case of tie - insertchar(sl,note,2); */ - if (note[0] == '(' || note[0] == ')') - insertChar(sl, note, 2); - if (note[0] == '(') - WITH->slurID -= 2; - else if (note[0] == '{') - WITH->tieID -= 2; - if (WITH->slurID < 'I') - warning3(voice, "Too many nested slurs may cause conflict"); - if (WITH->tieID < 'I') - warning3(voice, "Too many nested ties may cause conflict"); -} - - -Void beginSlur(voice, note) -short voice; -Char *note; -{ - short posblind; - line_status *WITH; - Char STR1[256], STR2[256]; - - WITH = ¤t[voice-1]; - WITH->slur_level++; - if (WITH->slur_level > 12) - error3(voice, "Too many open slurs"); - WITH->no_slur_melisma[WITH->slur_level - 1] = (startsWith(note, "((") || - startsWith(note, "{{")); - if (WITH->no_slur_melisma[WITH->slur_level - 1]) - predelete(note, 1); - if (!strcmp(slurLabel(STR1, voice, note), "0")) - delete1(note, 2); - else { - if (!strcmp(slurLabel(STR2, voice, note), " ")) - labelSlur(voice, note); - } - posblind = pos1('~', note); - if (posblind > 0) { - if (hideBlindSlurs()) - *note = '\0'; - else - delete1(note, posblind); - } - WITH->slurnext = true; -} - - -Void endSlur(voice, note) -short voice; -Char *note; -{ - short poscontinue, posblind; - Char contslur[256]; - line_status *WITH; - Char STR1[256], STR2[256]; - - WITH = ¤t[voice-1]; - *contslur = '\0'; - if (WITH->slur_level < 1) - error3(voice, "Ending a slur that was never started"); - if (note[0] == ')') - poscontinue = pos1('(', note); - else if (note[0] == '}') - poscontinue = pos1('{', note); - if (poscontinue == 0) - WITH->slur_level--; - else { - poscontinue--; - strcpy(contslur, note); - predelete(contslur, poscontinue); - shorten(note, poscontinue); - } - if (WITH->slur_level == 0) - setUnslurred(voice); - if (!strcmp(slurLabel(STR1, voice, note), "0")) - delete1(note, 2); - else { - if (!strcmp(slurLabel(STR2, voice, note), " ")) - labelSlur(voice, note); - } - if (!strcmp(slurLabel(STR1, voice, contslur), "0")) - delete1(contslur, 2); - else { - if (!strcmp(slurLabel(STR2, voice, contslur), " ")) - labelSlur(voice, contslur); - } - if (poscontinue > 0) { - if (note[0] == '}') - strcat(note, "t"); - note[0] = 's'; - if (contslur[0] == '{') - strcat(contslur, "t"); - contslur[0] = 's'; - } - posblind = pos1('~', note); - if (posblind > 0) { - if (hideBlindSlurs()) - *note = '\0'; - else - delete1(note, posblind); - } - if (*note != '\0' && *contslur != '\0') - sprintf(note + strlen(note), " %s", contslur); -} - - -Void renewPitch(voice, note) -short voice; -Char *note; -{ - short pstat; - line_status *WITH; - - WITH = ¤t[voice-1]; - pstat = newPitch(voice, note, WITH->chord_pitch, WITH->chord_lastnote); - if (debugMode()) - printf("Current pitch in voice %d is %d, last note was %c, this note is %s", - voice, WITH->pitch, WITH->lastnote, note); - WITH->pitch = newPitch(voice, note, WITH->pitch, WITH->lastnote); - if (WITH->pitch != pstat) - repitch(note, WITH->pitch - pstat); - if (WITH->pitch < lowest_pitch && checkPitch()) { - printf("Pitch of note %s following %c reported as %d", - note, WITH->lastnote, WITH->pitch); - error3(voice, "Pitch too low"); - } - if (WITH->pitch > highest_pitch && checkPitch()) { - printf("Pitch of note %s following %c reported as %d", - note, WITH->lastnote, WITH->pitch); - error3(voice, "Pitch too high"); - } - WITH->lastnote = note[0]; - if (debugMode()) - printf(", repitched to %d\n", WITH->pitch); - if (debugMode() && WITH->pitch != pstat) - printf("Pitch from melodic line = %d from last chordal note = %d\n", - WITH->pitch, pstat); -} - - -short chordPitch(voice) -short voice; -{ - return (current[voice-1].chord_pitch); -} - - -Void renewChordPitch(voice, note) -short voice; -Char *note; -{ - line_status *WITH; - - WITH = ¤t[voice-1]; - WITH->chord_pitch = newPitch(voice, note, WITH->chord_pitch, - WITH->chord_lastnote); - if (WITH->chord_pitch < lowest_pitch) - error3(voice, "Pitch in chord too low"); - if (WITH->chord_pitch > highest_pitch) - error3(voice, "Pitch in chord too high"); - WITH->chord_lastnote = note[0]; -} - - -Void initStatus() -{ - short voice, FORLIM; - line_status *WITH; - - FORLIM = nvoices; - for (voice = 1; voice <= FORLIM; voice++) { - WITH = ¤t[voice-1]; - WITH->duration = default_duration; - WITH->octave_adjust = 0; - WITH->slur_level = 0; - WITH->beam_level = 0; - WITH->beamed = false; - WITH->beamnext = false; - WITH->slurred = false; - WITH->slurnext = false; - WITH->after_slur = 0; - WITH->octave = initOctave(voiceStave(voice)); - WITH->slurID = 'S'; - WITH->tieID = 'T'; - WITH->lastnote = 'f'; - WITH->pitch = (WITH->octave - '0') * 7 - 3; - *WITH->chord_tie_label = '\0'; - saveStatus(voice); - } -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/status.h b/Build/source/utils/mtx/mtx-0.60d/status.h deleted file mode 100644 index 1a81d124398..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/status.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Header for module status, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef STATUS_H -#define STATUS_H - - -#ifdef STATUS_G -# define vextern -#else -# define vextern extern -#endif -/* Keep track of duration, octave, slur and beam status. */ - - -extern Void initStatus PV(); -extern Void saveStatus PP((int voice)); - -extern Void resetDuration PP((int voice, int dur)); -extern Char duration PP((int voice)); - -extern short slurLevel PP((int voice)); -extern short beamLevel PP((int voice)); -extern boolean noBeamMelisma PP((int voice)); -extern boolean noSlurMelisma PP((int voice, int history)); -extern short afterSlur PP((int voice)); -extern Void setUnbeamed PP((int voice)); -extern Void setUnslurred PP((int voice)); -extern Void beginBeam PP((int voice, Char *note)); -extern Void endBeam PP((int voice)); -extern Void beginSlur PP((int voice, Char *note)); -extern Void endSlur PP((int voice, Char *note)); -extern Void activateBeamsAndSlurs PP((int voice)); - -extern Void setOctave PP((int voice)); -extern Void resetOctave PP((int voice)); -extern Char octave PP((int voice)); -extern Void newOctave PP((int voice, int dir)); -extern Void initOctaves PP((Char *octaves)); - -extern Void renewPitch PP((int voice, Char *note)); -extern short chordPitch PP((int voice)); -extern Void renewChordPitch PP((int voice, Char *note)); -extern Void rememberDurations PV(); -extern Void restoreDurations PV(); -extern Void chordTie PP((int voice, Char *lab)); - - -typedef short int5[5]; - - -extern Void getChordTies PP((int voice, short *pitches, Char *labels)); - - -#undef vextern - -#endif /*STATUS_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/status.pas b/Build/source/utils/mtx/mtx-0.60d/status.pas deleted file mode 100644 index 9056dbe1917..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/status.pas +++ /dev/null @@ -1,348 +0,0 @@ -unit status; -{ Keep track of duration, octave, slur and beam status. } - -interface - -procedure initStatus; -procedure saveStatus(voice: integer); - -procedure resetDuration (voice: integer; dur: char); -function duration(voice: integer): char; - -function slurLevel(voice: integer): integer; -function beamLevel(voice: integer): integer; -function noBeamMelisma(voice: integer): boolean; -function noSlurMelisma(voice, history: integer): boolean; -function afterSlur(voice: integer): integer; -procedure setUnbeamed(voice: integer); -procedure setUnslurred(voice: integer); -procedure beginBeam(voice: integer; var note: string); -procedure endBeam(voice: integer); -procedure beginSlur(voice: integer; var note: string); -procedure endSlur(voice: integer; var note: string); -procedure activateBeamsAndSlurs(voice: integer); - -procedure setOctave(voice: integer); -procedure resetOctave(voice: integer); -function octave(voice: integer): char; -procedure newOctave(voice: integer; dir: char); -procedure initOctaves(octaves: string); - -procedure renewPitch (voice: integer; var note: string); -function chordPitch(voice: integer): integer; -procedure renewChordPitch (voice: integer; note: string); -procedure rememberDurations; -procedure restoreDurations; -procedure chordTie(voice: integer; var lab: char); -type int5 = array[1..5] of integer; -procedure getChordTies(voice: integer; var pitches: int5; var labels: string); - -implementation uses globals, strings, mtxline, control, utility, notes; - -const - init_oct: string = ''; - lowest_pitch = -9; - highest_pitch = 61; - -type - line_status = record - pitch, chord_pitch, octave_adjust, beam_level, slur_level, after_slur: integer; - octave, lastnote, chord_lastnote, duration, slurID, tieID: char; - beamnext, beamed, slurnext, slurred, no_beam_melisma: boolean; - no_slur_melisma: array[1..12] of boolean; - chord_tie_pitch: int5; - chord_tie_label: string[5]; - end; - -var current: array[voice_index] of line_status; - lastdur: array[voice_index] of char; - -procedure chordTie(voice: integer; var lab: char); - var n: integer; -begin with current[voice] do - begin n:=length(chord_tie_label); - if n=5 then error3(voice,'Only five slur ties allowed per voice'); - if n=0 then lab:='T' else lab:=chord_tie_label[n]; - inc(lab); chord_tie_label:=chord_tie_label+lab; - inc(n); chord_tie_pitch[n]:=chord_pitch - end -end; - -procedure getChordTies(voice: integer; var pitches: int5; var labels: string); -begin with current[voice] do - begin pitches:=chord_tie_pitch; labels:=chord_tie_label; chord_tie_label:='' end -end; - -procedure rememberDurations; - var v: voice_index; -begin for v:=1 to nvoices do lastdur[v]:=duration(v) end; - -procedure restoreDurations; - var v: voice_index; -begin for v:=1 to nvoices do resetDuration(v,lastdur[v]) end; - -function duration(voice: integer): char; -begin duration := current[voice].duration; end; - -procedure resetDuration(voice: integer; dur: char); -begin if pos1(dur,durations)=0 then - begin write('Trying to set duration to ',dur,'; '); - error3(voice,'M-Tx system error: resetDuration'); - end; - current[voice].duration := dur -end; - - -procedure activateBeamsAndSlurs(voice: integer); -begin with current[voice] do - begin - if beamnext then begin beamed:=true; beamnext:=false; end; - if slurnext then begin slurred:=true; slurnext:=false; end; - if slurred then inc(after_slur); - end -end; - -procedure saveStatus(voice: integer); -begin with current[voice] do - begin chord_pitch := pitch; chord_lastnote := lastnote; end; -end; - -function noBeamMelisma(voice: integer): boolean; -begin noBeamMelisma := current[voice].no_beam_melisma; end; - -function afterSlur(voice: integer): integer; -begin with current[voice] do - begin afterSlur := after_slur; if (after_slur>0) and (slur_level<1) then - error3(voice,'M-Tx system error: afterSlur and slur_level incompatible)') - end -end; - -function octave(voice: integer): char; -begin octave := current[voice].octave; end; - -procedure resetOctave(voice: integer); -begin current[voice].octave := ' '; end; - -procedure initOctaves(octaves: string); - var i: integer; -begin init_oct:=octaves; - i:=1; - while i<=length(init_oct) do - if init_oct[i]=' ' then delete1(init_oct,i) else inc(i); -end; - -function initOctave(voice_stave: stave_index): char; -begin - if voice_stave>length(init_oct) then - if pos1(clef[voice_stave],'Gt08')>0 - then initOctave:='4' else initOctave:='3' - else initOctave:=init_oct[voice_stave]; -end; - -procedure setOctave(voice: integer); -begin current[voice].octave:=initOctave(voiceStave(voice)); end; - -procedure newOctave(voice: integer; dir: char); -begin with current[voice] do case dir of - '+': inc(octave); - '-': dec(octave); - end; -end; - -function newPitch (voice: integer; note: string; pitch: integer; - lastnote: char): integer; - var interval, npitch: integer; - oct: char; -begin {if debugMode then - write('New pitch for note ',note,' relative to ',lastnote, - ' at pitch ',pitch);} - oct:=octaveCode(note); - if oct='=' then oct:=initOctave(voiceStave(voice)); - if (oct>='0') and (oct<='9') then - begin pitch:=7*(ord(oct)-ord('0'))-3; lastnote:='f'; - removeOctaveCode(oct,note); oct:=octaveCode(note) - end; - interval := ord(note[1])-ord(lastnote); - if interval>3 then dec(interval,7); - if interval<-3 then inc(interval,7); - npitch:=pitch+interval; {if debugMode then write(' was ',npitch);} - while oct<>' ' do - begin if oct='+' then inc(npitch,7) else if oct='-' then dec(npitch,7); - removeOctaveCode(oct,note); oct:=octaveCode(note) - end; - {if debugMode then writeln(' is ',npitch);} - newPitch:=npitch -end; - -procedure repitch(var note: string; diff: integer); - procedure delins(var note: string; c1, c2: char; l: integer); - var i, n: integer; - begin n:=length(note); i:=pos1(c1,note); if i=0 then i:=n+1; - while (l>0) and (i<=n) do begin delete1(note,i); dec(n); dec(l); end; - i:=pos1(c2,note); - if i=0 then if length(note)<2 then error('M-Tx program error',print) - else i:=3; - while l>0 do begin insertchar(c2,note,i); dec(l); end; - end; - begin diff:=diff div 7; - if diff>0 then delins(note, '-','+',diff) - else delins(note, '+','-',-diff); - end; - -procedure setUnbeamed(voice: integer); -begin current[voice].beamed:=false end; - -procedure setUnslurred(voice: integer); -begin with current[voice] do - begin slurred:=false; after_slur:=0; end; -end; - -procedure beginBeam(voice: integer; var note: string); -begin with current[voice] do - begin if beamed then - error3(voice, 'Starting a forced beam while another is open'); - if beam_level>0 then error3(voice, - 'Starting a forced beam while another is open (beamlevel>0)'); - inc(beam_level); - beamnext := true; no_beam_melisma:=startsWith(note,'[['); - if no_beam_melisma then predelete(note,1); - end; -end; - -procedure endBeam(voice: integer); -begin with current[voice] do - begin if beam_level<1 then error3(voice, 'Closing a beam that was never opened'); - dec(beam_level) - end; - setUnbeamed(voice) -end; - -function slurLevel(voice: integer): integer; -begin slurLevel := current[voice].slur_level; end; - -function beamLevel(voice: integer): integer; -begin beamLevel := current[voice].beam_level; end; - -function noSlurMelisma(voice, history: integer): boolean; -begin with current[voice] do - noSlurMelisma := no_slur_melisma[slur_level+history]; -end; - -function slurLabel(voice: integer; note: string): string; - var sl: char; -begin if note='' then begin slurLabel:=''; exit end; - if length(note)<2 then begin slurLabel:=' '; exit end; - if (note[2]>='0') and (note[2]<='Z') then sl:=note[2] else sl:=' '; - if (sl>='I') and (sl<='T') then - warning3(voice,'Slur label in the range I..T may cause conflict'); - slurLabel:=sl -end; - -procedure labelSlur(voice: integer; var note: string); - var sl: char; -begin if note='' then exit; - with current[voice] do - begin - if note[1]=')' then inc(slurID,2) else if note[1]='}' then inc(tieID,2); - if (note[1]='(') or (note[1]=')') then sl:=slurID else sl:=tieID; - insertchar(sl,note,2); - if note[1]='(' then dec(slurID,2) else if note[1]='{' then dec(tieID,2); - if slurID<'I' then warning3(voice,'Too many nested slurs may cause conflict'); - if tieID<'I' then warning3(voice,'Too many nested ties may cause conflict') - end -end; - -procedure beginSlur(voice: integer; var note: string); - var posblind: integer; -begin - with current[voice] do - begin - inc(slur_level); if slur_level>12 then Error3(voice,'Too many open slurs'); - no_slur_melisma[slur_level] := startsWith(note,'((') or startsWith(note,'{{'); - if no_slur_melisma[slur_level] then predelete(note,1); - if slurLabel(voice,note)='0' then delete1(note,2) else - if slurLabel(voice,note)=' ' then labelSlur(voice,note); - posblind:=pos1('~',note); if posblind>0 then - if hideBlindSlurs then note:='' else delete1(note,posblind); - slurnext := true; - end; -end; - -procedure endSlur(voice: integer; var note: string); - var poscontinue, posblind: integer; - contslur: string; -begin with current[voice] do - begin contslur:=''; - if slur_level<1 then Error3(voice,'Ending a slur that was never started'); - if note[1]=')' then poscontinue:=pos1('(',note) - else if note[1]='}' then poscontinue:=pos1('{',note); - if poscontinue=0 then dec(slur_level) else - begin dec(poscontinue); contslur:=note; predelete(contslur,poscontinue); - shorten(note,poscontinue); - end; - if slur_level=0 then setUnslurred(voice); - if slurLabel(voice,note)='0' then delete1(note,2) else - if slurLabel(voice,note)=' ' then labelSlur(voice,note); - if slurLabel(voice,contslur)='0' then delete1(contslur,2) else - if slurLabel(voice,contslur)=' ' then labelSlur(voice,contslur); - if poscontinue>0 then - begin if note[1]='}' then note:=note+'t'; note[1]:='s'; - if contslur[1]='{' then contslur:=contslur+'t'; contslur[1]:='s'; - end; - posblind:=pos1('~',note); if posblind>0 then - if hideBlindSlurs then note:='' else delete1(note,posblind); - if (note<>'') and (contslur<>'') then note := note + ' ' + contslur; - end; -end; - -procedure renewPitch (voice: integer; var note: string); - var pstat: integer; -begin with current[voice] do - begin pstat:=newPitch (voice, note, chord_pitch, chord_lastnote); - if debugMode then write('Current pitch in voice ',voice,' is ',pitch, - ', last note was ',lastnote,', this note is ',note); - pitch := newPitch (voice, note, pitch, lastnote); - if pitch<>pstat then repitch(note,pitch-pstat); - if (pitchhighest_pitch) and checkPitch then - begin write('Pitch of note ',note,' following ',lastnote,' reported as ',pitch); - error3(voice,'Pitch too high') - end; - lastnote:=note[1]; - if debugMode then writeln(', repitched to ',pitch); - if debugMode and (pitch<>pstat) then - writeln('Pitch from melodic line = ',pitch, - ' from last chordal note = ', pstat); - end; -end; - -function chordPitch(voice: integer): integer; -begin chordPitch:=current[voice].chord_pitch end; - -procedure renewChordPitch (voice: integer; note: string); -begin with current[voice] do - begin chord_pitch:=newPitch(voice,note,chord_pitch,chord_lastnote); - if chord_pitchhighest_pitch then error3(voice,'Pitch in chord too high'); - chord_lastnote:=note[1]; - end -end; - -procedure initStatus; - var voice: integer; -begin for voice:=1 to nvoices do with current[voice] do - begin duration:=default_duration; - octave_adjust:=0; slur_level:=0; beam_level:=0; - beamed:=false; beamnext:=false; - slurred:=false; slurnext:=false; after_slur:=0; - octave:=initOctave(voiceStave(voice)); slurID:='S'; tieID:='T'; - lastnote:='f'; pitch:=7*(ord(octave)-ord('0'))-3; - chord_tie_label:=''; - saveStatus(voice); - end; -end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/strings.h b/Build/source/utils/mtx/mtx-0.60d/strings.h deleted file mode 100644 index 6e0bcdfae8e..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/strings.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Header for module strings, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef STRINGS_H -#define STRINGS_H - - -#ifdef STRINGS_G -# define vextern -#else -# define vextern extern -#endif -/* String handling primitives. */ -/* These should be recoded in C instead of using the p2c code. */ - - -extern Void scan1 PP((Char *s, int p, short *n)); -/* Read an integer at position p of s */ -extern boolean startsWith PP((Char *s1, Char *s2)); -extern short pos1 PP((int c, Char *s)); -extern short posNot PP((int c, Char *s)); -extern Void insertChar PP((int c, Char *s, int p)); -extern Char *substr_ PP((Char *Result, Char *s, int start, int count)); -extern Void getNum PP((Char *line, short *k)); -extern Void getTwoNums PP((Char *line, short *k1, short *k2)); -extern Void toUpper PP((Char *s)); -extern Void delete1 PP((Char *s, int p)); -extern Void predelete PP((Char *s, int l)); -extern Void shorten PP((Char *s, int new_length)); - - -#undef vextern - -#endif /*STRINGS_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/uptext.c b/Build/source/utils/mtx/mtx-0.60d/uptext.c deleted file mode 100644 index eb5b2772e02..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/uptext.c +++ /dev/null @@ -1,277 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "uptext.pas" */ - - -#include "p2c.h" - - -#define UPTEXT_G -#include "uptext.h" - - -#ifndef GLOBALS_H -#include "globals.h" -#endif - -#ifndef STRINGS_H -#include "strings.h" -#endif - -#ifndef MTXLINE_H -#include "mtxline.h" -#endif - -#ifndef UTILITY_H -#include "utility.h" -#endif - - -typedef struct uptext_info { - short uptext, uptext_adjust, uptext_lcz; - Char uptext_font[256]; -} uptext_info; - - -Static uptext_info U[maxvoices]; - - -short uptextLineNo(voice) -short voice; -{ - return (U[voice-1].uptext); -} - - -Void setUptextLineNo(voice, lno) -short voice, lno; -{ - U[voice-1].uptext = lno; -} - - -Void clearUptext() -{ - voice_index voice, FORLIM; - - FORLIM = nvoices; - for (voice = 0; voice <= FORLIM - 1; voice++) - U[voice].uptext = 0; -} - - -Void initUptext() -{ - voice_index voice, FORLIM; - uptext_info *WITH; - - FORLIM = nvoices; - for (voice = 0; voice <= FORLIM - 1; voice++) { - WITH = &U[voice]; - WITH->uptext_adjust = 0; - WITH->uptext_lcz = 3; - *WITH->uptext_font = '\0'; - } -} - - -Static Void textTranslate(uptext, font) -Char *uptext, *font; -{ - short k; - Char STR1[256], STR2[256], STR3[256], STR4[256]; - short FORLIM; - - if (*uptext == '\0') - return; - do { - k = pos1('%', uptext); - if (k > 0) { - sprintf(STR4, "%s{\\mtxFlat}%s", - substr_(STR1, uptext, 1, k - 1), - substr_(STR3, uptext, k + 1, strlen(uptext) - k)); - strcpy(uptext, STR4); - } - } while (k != 0); - do { - k = pos1('#', uptext); - if (k > 0) { - sprintf(STR2, "%s{\\mtxSharp}%s", - substr_(STR1, uptext, 1, k - 1), - substr_(STR4, uptext, k + 1, strlen(uptext) - k)); - strcpy(uptext, STR2); - } - } while (k != 0); - switch (uptext[0]) { - - case '<': - if (!strcmp(uptext, "<")) - strcpy(uptext, "\\mtxIcresc"); - else if (!strcmp(uptext, "<.")) - strcpy(uptext, "\\mtxTcresc"); - else { - predelete(uptext, 1); - sprintf(uptext, "\\mtxCresc{%s}", strcpy(STR4, uptext)); - } - break; - - case '>': - if (!strcmp(uptext, ">")) - strcpy(uptext, "\\mtxIdecresc"); - else if (!strcmp(uptext, ">.")) - strcpy(uptext, "\\mtxTdecresc"); - else { - predelete(uptext, 1); - sprintf(uptext, "\\mtxDecresc{%s}", strcpy(STR1, uptext)); - } - break; - - default: - FORLIM = strlen(uptext); - for (k = 0; k <= FORLIM - 1; k++) { - if (pos1(uptext[k], "mpfzrs~") == 0) - return; - } - break; - } - strcpy(font, "\\mtxPF"); -} - - -#define default_ 10 -#define under (-14) - - -/* Local variables for addUptext: */ -struct LOC_addUptext { - short voice; - Char w[256]; - short adj; -} ; - -Local Void adjustUptext(LINK) -struct LOC_addUptext *LINK; -{ - Char letter; - boolean force = false; - uptext_info *WITH1; - - delete1(LINK->w, 1); - while (*LINK->w != '\0') { -/* p2c: uptext.pas: Note: Eliminated unused assignment statement [338] */ - letter = LINK->w[0]; - delete1(LINK->w, 1); - WITH1 = &U[LINK->voice-1]; - switch (letter) { - - case '<': - if (WITH1->uptext_lcz > 1) - WITH1->uptext_lcz--; - break; - - case '>': - if (WITH1->uptext_lcz < 3) - WITH1->uptext_lcz++; - break; - - case '^': - WITH1->uptext_adjust = 0; - break; - - case 'v': - WITH1->uptext_adjust = under; - break; - - case '=': - force = true; - break; - - case '+': - case '-': - if (*LINK->w != '\0') - getNum(LINK->w, &LINK->adj); - else - LINK->adj = 0; - if (letter == '-') - LINK->adj = -LINK->adj; - if (force) - WITH1->uptext_adjust = LINK->adj; - else - WITH1->uptext_adjust += LINK->adj; - *LINK->w = '\0'; - break; - - default: - error3(LINK->voice, "Unknown uptext adjustment"); - break; - } - } - strcpy(LINK->w, "!"); -} - - -Void addUptext(voice_, no_uptext, pretex) -short voice_; -boolean *no_uptext; -Char *pretex; -{ - struct LOC_addUptext V; - Char font[256]; - static Char lcz[4] = "lcz"; - uptext_info *WITH; - Char STR1[256], STR2[256], STR3[256]; - - V.voice = voice_; - WITH = &U[V.voice-1]; - if (WITH->uptext == 0) - *no_uptext = true; - if (*no_uptext) - return; - do { - GetNextWord(V.w, P[WITH->uptext - 1], blank, dummy); - sprintf(STR1, "%c", barsym); - if (!strcmp(V.w, STR1) || *V.w == '\0') - *no_uptext = true; - sprintf(STR1, "%c", tilde); - if (!strcmp(V.w, STR1) || *no_uptext) - return; - if (V.w[0] == '!') { - strcpy(WITH->uptext_font, V.w); - WITH->uptext_font[0] = '\\'; - } - if (V.w[0] == '@') - adjustUptext(&V); - } while (V.w[0] == '!'); /* ! is a kludge, will get me in trouble later */ - strcpy(font, WITH->uptext_font); - textTranslate(V.w, font); - if (*font != '\0') - sprintf(V.w, "%s{%s}", font, strcpy(STR1, V.w)); - switch (lcz[WITH->uptext_lcz - 1]) { - - case 'l': - sprintf(V.w, "\\mtxLchar{%s}{%s}", - toString(STR1, default_ + WITH->uptext_adjust), - strcpy(STR3, V.w)); - break; - - case 'c': - sprintf(V.w, "\\mtxCchar{%s}{%s}", - toString(STR1, default_ + WITH->uptext_adjust), - strcpy(STR2, V.w)); - break; - - case 'z': - sprintf(V.w, "\\mtxZchar{%s}{%s}", - toString(STR1, default_ + WITH->uptext_adjust), - strcpy(STR3, V.w)); - break; - } - strcat(pretex, V.w); -} - -#undef default_ -#undef under - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/uptext.h b/Build/source/utils/mtx/mtx-0.60d/uptext.h deleted file mode 100644 index 8a9a1643dea..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/uptext.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Header for module uptext, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef UPTEXT_H -#define UPTEXT_H - - -#ifdef UPTEXT_G -# define vextern -#else -# define vextern extern -#endif -/* Insert and translate uptext */ - - -extern Void initUptext PV(); -extern Void clearUptext PV(); -extern short uptextLineNo PP((int voice)); -extern Void setUptextLineNo PP((int voice, int lno)); -extern Void addUptext PP((int voice, boolean *no_uptext, Char *pretex)); - - -#undef vextern - -#endif /*UPTEXT_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/uptext.pas b/Build/source/utils/mtx/mtx-0.60d/uptext.pas deleted file mode 100644 index 16bebc7556f..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/uptext.pas +++ /dev/null @@ -1,119 +0,0 @@ -unit uptext; -{ Insert and translate uptext } - -interface - -procedure initUptext; -procedure clearUptext; -function uptextLineNo(voice: integer): integer; -procedure setUptextLineNo(voice, lno: integer); -procedure addUptext(voice: integer; var no_uptext: boolean; - var pretex: string); - -implementation uses globals, strings, mtxline, utility; - -type uptext_info = record - uptext, uptext_adjust, uptext_lcz: integer; - uptext_font: string; - end; - -var U: array[voice_index] of uptext_info; - -function uptextLineNo(voice: integer): integer; -begin uptextLineNo := U[voice].uptext; end; - -procedure setUptextLineNo(voice, lno: integer); -begin U[voice].uptext := lno; end; - -procedure clearUptext; - var voice: voice_index; -begin for voice:=1 to nvoices do U[voice].uptext:=0; end; - -procedure initUptext; - var voice: voice_index; -begin for voice:=1 to nvoices do with U[voice] do - begin - uptext_adjust:=0; uptext_lcz:=3; uptext_font:=''; - end; -end; - -procedure textTranslate(var uptext, font: string); - var k: integer; -begin - if uptext='' then exit; - repeat k := pos1('%',uptext); - if k>0 then uptext:= - substr(uptext,1,k-1)+'{\mtxFlat}'+substr(uptext,k+1,length(uptext)-k); - until k=0; - repeat k := pos1('#',uptext); - if k>0 then uptext:= - substr(uptext,1,k-1)+'{\mtxSharp}'+substr(uptext,k+1,length(uptext)-k); - until k=0; - case uptext[1] of - '<': if uptext='<' then uptext:='\mtxIcresc' - else if uptext='<.' then uptext:='\mtxTcresc' - else begin - predelete(uptext,1); uptext:='\mtxCresc{'+uptext+'}' - end; - '>': if uptext='>' then uptext:='\mtxIdecresc' - else if uptext='>.' then uptext:='\mtxTdecresc' - else begin - predelete(uptext,1); uptext:='\mtxDecresc{'+uptext+'}' - end; - else for k:=1 to length(uptext) do if pos1(uptext[k],'mpfzrs~')=0 then exit; - end; - font:='\mtxPF'; -end; - -procedure addUptext(voice: integer; var no_uptext: boolean; - var pretex: string); - var w, font: string; - adj: integer; - const default = 10; under = -14; - lcz: string[3] = 'lcz'; - procedure adjustUptext; - var letter: char; - force: boolean; - begin delete1(w,1); force:=false; - while w<>'' do with U[voice] do - begin letter:=w[1]; delete1(w,1); with U[voice] do - case letter of - '<': if uptext_lcz>1 then dec(uptext_lcz); - '>': if uptext_lcz<3 then inc(uptext_lcz); - '^': uptext_adjust:=0; - 'v': uptext_adjust:=under; - '=': force:=true; -'+','-': begin if w<>'' then getNum(w,adj) else adj:=0; - if letter = '-' then adj := -adj; - if force then uptext_adjust := adj else inc(uptext_adjust,adj); - w:=''; - end; - else error3(voice,'Unknown uptext adjustment'); - end; - end; - w:='!'; - end; - - begin - with U[voice] do begin - if uptext=0 then no_uptext := true; - if no_uptext then exit; - repeat - w := GetNextWord(P[uptext],blank,dummy); - if (w=barsym) or (w='') then no_uptext:=true; - if (w=tilde) or no_uptext then exit; - if w[1]='!' then begin uptext_font:=w; uptext_font[1]:='\'; end; - if w[1]='@' then adjustUptext; - until w[1]<>'!'; { ! is a kludge, will get me in trouble later } - font:=uptext_font; textTranslate(w,font); - if font<>'' then w:=font+'{'+w+'}'; - case lcz[uptext_lcz] of -'l': w:='\mtxLchar{' + toString(default+uptext_adjust) + '}{' + w + '}'; -'c': w:='\mtxCchar{' + toString(default+uptext_adjust) + '}{' + w + '}'; -'z': w:='\mtxZchar{' + toString(default+uptext_adjust) + '}{' + w + '}'; - end; - pretex:=pretex+w; - end; - end; - -end. diff --git a/Build/source/utils/mtx/mtx-0.60d/utility.c b/Build/source/utils/mtx/mtx-0.60d/utility.c deleted file mode 100644 index 225936909d1..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/utility.c +++ /dev/null @@ -1,393 +0,0 @@ -/* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */ -/* From input file "utility.pas" */ - - -#include "p2c.h" - - -#define UTILITY_G -#include "utility.h" - - -#ifndef STRINGS_H -#include "strings.h" -#endif - - -#define blank ' ' -#define dummy '\0' - - -short wordCount(s) -Char *s; -{ - short i, n, FORLIM; - - if (*s == '\0') - return 0; - if (s[0] == blank) - n = 0; - else - n = 1; - FORLIM = strlen(s); - for (i = 1; i <= FORLIM - 1; i++) { - if (s[i-1] == blank && s[i] != blank) - n++; - } - return n; -} - - -Char *GetNextWord(Result, s, Delim, Term) -Char *Result; -Char *s; -Char Delim, Term; -{ - /* A delimiter is a character that separates words, but forms no part - of them. A terminator is a character that appears at the end of - a word. */ - short n = 1; - short start, last; - - last = strlen(s); - while (n <= last && s[n-1] == Delim) - n++; - start = n; - while (n <= last && s[n-1] != Term && s[n-1] != Delim) - n++; - if (n <= last && s[n-1] == Term) - n++; - substr_(Result, s, start, n - start); - while (n <= last && s[n-1] == Delim) - n++; - predelete(s, n - 1); - return Result; -} - - -Char *NextWord(Result, s_, Delim, Term) -Char *Result; -Char *s_; -Char Delim, Term; -{ - Char s[256]; - - strcpy(s, s_); - return (GetNextWord(Result, s, Delim, Term)); -} - - -Char *plural(Result, n) -Char *Result; -short n; -{ - if (n == 1) - return strcpy(Result, ""); - else - return strcpy(Result, "s"); -} - - -short curtail(s, c) -Char *s; -Char c; -{ - short Result = 0; - short l; - - l = strlen(s); - if (s[l-1] == c) { - shorten(s, l - 1); - return l; - } - return Result; -} - - -Char *toString(Result, n) -Char *Result; -short n; -{ - Char s[256]; - - sprintf(s, "%d", n); - return strcpy(Result, s); -} - - -short digit(c) -Char c; -{ - return (c - '0'); -} - - -boolean equalsIgnoreCase(s1_, s2_) -Char *s1_, *s2_; -{ - Char s1[256], s2[256]; - - strcpy(s1, s1_); - strcpy(s2, s2_); - toUpper(s1); - toUpper(s2); - return (strcmp(s1, s2) == 0); -} - - -boolean startsWithIgnoreCase(s1_, s2_) -Char *s1_, *s2_; -{ - Char s1[256], s2[256]; - - strcpy(s1, s1_); - strcpy(s2, s2_); - toUpper(s1); - toUpper(s2); - return (startsWith(s1, s2)); -} - - -boolean startsWithBracedWord(P_) -Char *P_; -{ - Char P[256]; - Char w[256]; - - strcpy(P, P_); - GetNextWord(w, P, blank, dummy); - return (w[0] == '{' && w[strlen(w) - 1] == '}'); -} - - -Void trim(s) -Char *s; -{ - short k; - - k = posNot(blank, s); - if (k > 1) - predelete(s, k - 1); - else if (k == 0) - *s = '\0'; -} - - -boolean endsWith(s1_, s2) -Char *s1_, *s2; -{ - Char s1[256]; - short l1, l2; - - strcpy(s1, s1_); - l1 = strlen(s1); - l2 = strlen(s2); - if (l1 < l2) - return false; - predelete(s1, l1 - l2); - return (strcmp(s1, s2) == 0); -} - - -/* Local variables for grep: */ -struct LOC_grep { - Char *source, *pattern; - short p1[10], p2[10]; - short i, p, s, index; - boolean matching; -} ; - -Local Void remember(s1, s2, LINK) -short s1, s2; -struct LOC_grep *LINK; -{ - if (LINK->index > 9) - _Escape(9999); - LINK->p1[LINK->index] = s1; - LINK->p2[LINK->index] = s2; - LINK->s = s2 + 1; - LINK->index++; -} - -Local Void matchnum(LINK) -struct LOC_grep *LINK; -{ - boolean allowsign = false, allowpoint = false, quit = false; - short s0; - - LINK->matching = false; - s0 = LINK->s; - if (LINK->p < strlen(LINK->pattern)) { - if (LINK->pattern[LINK->p] == '#') { - LINK->p++; - allowsign = true; - if (LINK->p < strlen(LINK->pattern)) { - if (LINK->pattern[LINK->p] == '#') { - LINK->p++; - allowpoint = true; - } - } - } - } - if (allowsign && - (LINK->source[LINK->s-1] == '-' || LINK->source[LINK->s-1] == '+')) { - LINK->s++; - if (LINK->s > strlen(LINK->source)) - return; - } - while (!quit && LINK->s <= strlen(LINK->source)) { - if (LINK->source[LINK->s-1] == '.') { - if (!allowpoint) - quit = true; - else { - LINK->s++; - allowpoint = false; - } - } - if (isdigit(LINK->source[LINK->i-1])) { - LINK->s++; - LINK->matching = true; - } else - quit = true; - } - if (LINK->matching) - remember(s0, LINK->s - 1, LINK); -} - -Local Void matchmeta(LINK) -struct LOC_grep *LINK; -{ - if (LINK->p < strlen(LINK->pattern)) - LINK->p++; - if (LINK->source[LINK->s-1] == LINK->pattern[LINK->p-1]) { - LINK->s++; - LINK->p++; - } else - LINK->matching = false; -} - -Local Void subgrep(LINK) -struct LOC_grep *LINK; -{ - LINK->matching = true; - if (LINK->pattern[LINK->p-1] == '*') { - remember(LINK->s, strlen(LINK->source), LINK); - LINK->p++; - return; - } - if (LINK->pattern[LINK->p-1] == '?') { - remember(LINK->s, LINK->s, LINK); - LINK->p++; - return; - } - if (LINK->pattern[LINK->p-1] == '#') { - matchnum(LINK); - return; - } - if (LINK->pattern[LINK->p-1] == '\\') { - matchmeta(LINK); - return; - } - if (LINK->source[LINK->s-1] == LINK->pattern[LINK->p-1]) { - LINK->s++; - LINK->p++; - } else - LINK->matching = false; -} - - -/*--- Match/Replace package --- */ - -/* Search and replace. Stops when pattern no longer matches source. - Pattern wildcards: - ? Any single character - * Any string - # An unsigned integer - ## A signed integer - ### A signed number maybe with a decimal part - Pattern metacharacters: - \x where x is any character, stands for that character - Target wildcards - \0 to \9 Value of corresponding source wildcard - Target metacharacters - \ When not followed by 0..9 or \, stands for itself - \\ Backslash -*/ -Void grep(source_, pattern_, target) -Char *source_, *pattern_, *target; -{ - struct LOC_grep V; - short j, t, reg; - Char product[256]; - boolean trigger = false; - short FORLIM, FORLIM1; - Char STR2[256]; - - V.source = source_; - V.pattern = pattern_; - V.index = 0; - V.s = 1; - V.p = 1; - for (V.i = 0; V.i <= 9; V.i++) { - V.p1[V.i] = 1; - V.p2[V.i] = 0; - } - while (V.matching && V.p <= strlen(V.pattern) && V.s <= strlen(V.source)) - subgrep(&V); - *product = '\0'; - FORLIM = strlen(target); - for (t = 0; t <= FORLIM - 1; t++) { - if (trigger) { - reg = digit(target[t]); - if ((unsigned)reg <= 9) { - FORLIM1 = V.p2[reg]; - for (j = V.p1[reg] - 1; j <= FORLIM1 - 1; j++) - sprintf(product + strlen(product), "%c", V.source[j]); - } else if (target[t] == '\\') - strcat(product, "\\"); - else - sprintf(product + strlen(product), "\\%c", target[t]); - trigger = false; - } else if (target[t] == '\\' && t + 1 < strlen(target)) - trigger = true; - else - sprintf(product + strlen(product), "%c", target[t]); - } - strcpy(V.source, substr_(STR2, V.source, V.s, strlen(V.source))); - strcpy(V.pattern, substr_(STR2, V.pattern, V.p, strlen(V.pattern))); - strcpy(target, product); -} - - -/* "match" tests whether the source matches the pattern exactly */ -boolean match(source_, pattern_) -Char *source_, *pattern_; -{ - Char source[256], pattern[256]; - static Char target[256] = ""; - - strcpy(source, source_); - strcpy(pattern, pattern_); - grep(source, pattern, target); - return (*source == '\0' && *pattern == '\0'); -} - - -/* "translate" replaces the pattern by the target in the source. */ -Char *translate(Result, source_, pattern_, target_) -Char *Result; -Char *source_, *pattern_, *target_; -{ - Char source[256], pattern[256], target[256]; - - strcpy(source, source_); - strcpy(pattern, pattern_); - strcpy(target, target_); - grep(source, pattern, target); - return strcpy(Result, target); -} - - - - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/utility.h b/Build/source/utils/mtx/mtx-0.60d/utility.h deleted file mode 100644 index eee95a563b7..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/utility.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Header for module utility, generated by p2c 1.21alpha-07.Dec.93 */ -#ifndef UTILITY_H -#define UTILITY_H - - -#ifdef UTILITY_G -# define vextern -#else -# define vextern extern -#endif -/* DPL 2004-03-22 */ - -/* Utilities, mainly aids to parsing */ - - -extern boolean equalsIgnoreCase PP((Char *s1, Char *s2)); -extern boolean startsWithIgnoreCase PP((Char *s1, Char *s2)); -extern boolean endsWith PP((Char *s1, Char *s2)); -extern boolean startsWithBracedWord PP((Char *P)); -extern Char *GetNextWord PP((Char *Result, Char *s, int Delim, int Term)); -extern Char *NextWord PP((Char *Result, Char *s, int Delim, int Term)); -extern short wordCount PP((Char *s)); -extern Char *plural PP((Char *Result, int n)); -extern short curtail PP((Char *s, int c)); -/* Remove last character if it equals c and return its position; - otherwise return 0 */ -extern Char *toString PP((Char *Result, int n)); -extern Void trim PP((Char *s)); -extern short digit PP((int c)); -extern boolean match PP((Char *source, Char *pattern)); -extern Char *translate PP((Char *Result, Char *source, Char *pattern, - Char *target)); -extern Void grep PP((Char *source, Char *pattern, Char *target)); -/* See Implementation for what this currently does. */ - - -#undef vextern - -#endif /*UTILITY_H*/ - -/* End. */ diff --git a/Build/source/utils/mtx/mtx-0.60d/utility.pas b/Build/source/utils/mtx/mtx-0.60d/utility.pas deleted file mode 100644 index 42cc76d15d5..00000000000 --- a/Build/source/utils/mtx/mtx-0.60d/utility.pas +++ /dev/null @@ -1,194 +0,0 @@ -unit utility; { DPL 2004-03-22 } - -{ Utilities, mainly aids to parsing } - -interface - -function equalsIgnoreCase(s1, s2: string): boolean; -function startsWithIgnoreCase(s1, s2: string): boolean; -function endsWith(s1, s2: string): boolean; -function startsWithBracedWord (P: string): boolean; -function GetNextWord (var s: string; Delim, Term: char): string; -function NextWord (s: string; Delim, Term: char): string; -function wordCount (s: string): integer; -function plural (n: integer): string; -function curtail (var s: string; c: char): integer; - { Remove last character if it equals c and return its position; - otherwise return 0 } -function toString(n: integer): string; -procedure trim(var s: string); -function digit(c: char): integer; -function match(source, pattern: string): boolean; -function translate(source, pattern, target: string): string; -procedure grep(var source, pattern, target: string); - { See Implementation for what this currently does. } - -implementation uses strings; - -const blank = ' '; dummy = #0; - -function wordCount (s: string): integer; - var i, n: integer; - begin if length(s)=0 then - begin wordCount:=0; exit; end; - if s[1]=blank then n:=0 else n:=1; - for i:=1 to length(s)-1 do - if (s[i]=blank) and (s[i+1]<>blank) then inc(n); - wordCount:=n; - end; - -function GetNextWord (var s: string; Delim, Term: char): string; -{ A delimiter is a character that separates words, but forms no part - of them. A terminator is a character that appears at the end of - a word. } - var n, start, last: integer; -begin last:=length(s); n:=1; - while (n<=last) and (s[n] = Delim) do inc(n); - start:=n; - while (n<=last) and not (s[n] in [Delim,Term]) do inc(n); - if (n<=last) and (s[n] = Term) then inc(n); - GetNextWord:=substr(s,start,n-start); - while (n<=last) and (s[n] = Delim) do inc(n); - predelete(s,n-1); -end; - -function NextWord (s: string; Delim, Term: char): string; - begin NextWord:=GetNextWord(s,Delim,Term); end; - -function plural (n: integer): string; - begin if n=1 then plural:='' else plural:='s'; end; - -function curtail (var s: string; c: char): integer; - var l: integer; - begin l:=length(s); curtail:=0; - if s[l]=c then begin shorten(s,l-1); curtail:=l; end; - end; - -function toString(n: integer): string; - var s: string; -begin str(n,s); toString:=s; end; - -function digit(c: char): integer; - begin digit:=ord(c)-ord('0'); end; - -function equalsIgnoreCase(s1, s2: string): boolean; -begin toUpper(s1); toUpper(s2); equalsIgnoreCase:=s1=s2; -end; - -function startsWithIgnoreCase(s1, s2: string): boolean; -begin toUpper(s1); toUpper(s2); startsWithIgnoreCase:=startsWith(s1,s2); -end; - -function startsWithBracedWord (P: string): boolean; - var w: string; -begin w := getNextWord(P,blank,dummy); - startsWithBracedWord := (w[1]='{') and (w[length(w)]='}'); -end; - -procedure trim(var s: string); - var k: integer; - begin k:=posnot(blank,s); - if k>1 then predelete(s,k-1) else if k=0 then s:=''; - end; - -function endsWith(s1, s2: string): boolean; - var l1, l2: integer; -begin l1:=length(s1); l2:=length(s2); - if l19 then halt(9999); - p1[index] := s1; p2[index] := s2; s := s2+1; inc(index) - end; - procedure matchnum; - var allowsign, allowpoint, quit: boolean; - s0: integer; - begin allowsign := false; allowpoint := false; matching := false; s0 := s; - if plength(source) then exit end; - quit := false; - while (not quit) and (s<=length(source)) do - begin if source[s]='.' then if not allowpoint then quit := true else - begin inc(s); allowpoint := false end; - if (source[i]>='0') and (source[i]<='9') then - begin inc(s); matching := true end - else quit := true - end; - if matching then remember(s0,s-1) - end; - procedure matchmeta; - begin if p=0) and (reg<=9) then - for j:=p1[reg] to p2[reg] do product := product + source[j] - else if target[t]='\' then product := product + '\' - else product := product + '\' + target[t]; - trigger := false - end - else if (target[t]='\') and (t -# You may freely use, modify and/or distribute this file. - -rm -f mozart* - -cp $srcdir/tests/mozart.mtx . - -set -x - -./prepmx mozart \ - && diff mozart.pmx $srcdir/tests/mozart.pmx \ - || exit 1 - -exit 0 diff --git a/Build/source/utils/mtx/prepmx.1 b/Build/source/utils/mtx/prepmx.1 deleted file mode 100644 index 299591e2e9d..00000000000 --- a/Build/source/utils/mtx/prepmx.1 +++ /dev/null @@ -1,95 +0,0 @@ -.TH prepmx 1 "01 September 2005" "M-Tx Version 0.60" "prepmx Manual Page" -.SH NAME -prepmx \- preprocessor for PMX, easy music typesetting program -.SH SYNOPSIS -.B prepmx -.RI [ options ] -.I jobname -.RI [ outdir/ ] -.RI [ stylefile ] -.SH DESCRIPTION -.B M-Tx -is an easy to use preprocessor language for the -.B PMX -music typesetting program, aimed at people who are not experts. For an -easy example, have a look at the following example: - - c2+ e4 g | b4d- c1 d c2 | - c8 g+ e g c- g+ e g | d g f g c- g+ e g | - -For syntax reference, please look at the M-Tx manual written by Dirk -Laurie, the creator of the M-Tx language and the author of prepmx, its -command line utility. - -.B prepmx -processes the file -.IR jobname .mtx -to generate -.IR jobname .pmx. -You can then process this file using the `pmx' command. -.B PMX -is a preprocessor for MusiXTeX. - -.I outdir/ -is the directory where `pmx' will put the final .tex file. Note that the -trailing slash is mandatory. You can provide a -.I stylefile -for M-Tx. If omitted, the file `mtxstyle.txt' in the current -directory is used, if there is one. -.SH OPTIONS -Options can also be specified in a `Options:' line in the preamble, -which takes precedence over the command line. -.TP -.B \-b -never unbeam eighth notes and shorter -.TP -.B \-c -main music lines only \- ignore chords -.TP -.B \-D -enable debug mode -.TP -.B \-f -use tonic sol\-fa note names -.TP -.B \-i -ignore errors -.TP -.B \-m -music only \- ignore lyrics -.TP -.B \-n -indent first system and print default instrument names -.TP -.B \-t -ignore uptext lines -.TP -.B \-u -uptext synchronizes with notes only, not rests -.TP -.B \-v -verbose progress report -.TP -.B \-w -enable pedantic warnings -.TP -.BI \- n -select specified case of multiple score -.SH EXIT STATUS -If no error was found, -.B prepmx -exits with return code 0. In case of an error, the line number of the -processed line is returned. This may not always be the line containing -the actual error. A return status of 10000 means that the input file was -empty or could not be opened. -.SH SEE ALSO -.B M-Tx -User's Guide (mtx060.pdf) -.br -pmx(1), musixtex(1) -.SH AUTHORS -prepmx was written by Dirk Laurie . -This manual page was written by Roland Stigge for the Debian -project. It was revised and extended by Nis Martensen -, mostly by copying text from Dirk Laurie's M-Tx -User's Guide. diff --git a/Build/source/utils/mtx/tests/mozart.mtx b/Build/source/utils/mtx/tests/mozart.mtx deleted file mode 100644 index 88a4123c24d..00000000000 --- a/Build/source/utils/mtx/tests/mozart.mtx +++ /dev/null @@ -1,7 +0,0 @@ -Title: Riff in C -Composer: W. A. Mozart (1756--1791) -Style: piano - -%% w120m -c2+ e4 g | b4d- c1 d c2 | -c8 g+ e g c- g+ e g | d g f g c- g+ e g | diff --git a/Build/source/utils/mtx/tests/mozart.pmx b/Build/source/utils/mtx/tests/mozart.pmx deleted file mode 100644 index ae55c3f13d9..00000000000 --- a/Build/source/utils/mtx/tests/mozart.pmx +++ /dev/null @@ -1,26 +0,0 @@ ---- -\def\mtxversion{0.60d} -\def\mtxdate{<11 October 2008>} -\input mtx -\mtxComposerLine{}{W. A. Mozart (1756--1791)} -\mtxTitleLine{Riff in C} ---- -2 -1 2 4 4 0 6 0.00000 0 1 1 20 0 - -60 -./ -Tt -\mtxTitle -Tc -\mtxPoetComposer -% Paragraph 2 line 5 bar 1 - w120m -c83 g8+ e8 g8 c8- g8+ e8 g8 | / -c25 e4 g4 | / - -%Bar 2 -d8 g8 f8 g8 c8- g8+ e8 g8 | Rb - / -b4-d c1 d1 c2 | / - -% Coded by M-Tx diff --git a/Build/source/utils/mtx/version.ac b/Build/source/utils/mtx/version.ac deleted file mode 100644 index cfad6555f7b..00000000000 --- a/Build/source/utils/mtx/version.ac +++ /dev/null @@ -1,11 +0,0 @@ -dnl -dnl Copyright (C) 2012 Peter Breitenlohner -dnl -dnl This file is free software; the copyright holder -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl -------------------------------------------------------- -dnl -dnl m4-include this file to define the current mtx version -m4_define([mtx_version], [0.60d]) -- cgit v1.2.3