summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-17 07:20:42 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-17 07:20:42 +0000
commit643f37f986567ca5af6baab87421f8ef22b23403 (patch)
treee6784bed247736f1867b6c3a7b3e670de30b7bc0 /Build
parent76de76558a202700f48fa5aadef763a2be07a730 (diff)
Import m-tx 0.61
git-svn-id: svn://tug.org/texlive/trunk@39128 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/m-tx/ChangeLog4
-rwxr-xr-xBuild/source/utils/m-tx/configure24
-rw-r--r--Build/source/utils/m-tx/configure.ac4
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-01-write-bin27
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-02-malloc24
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/Bugs5
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/Makefile.am13
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/NEWS5
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/README164
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/config.h90
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/config.h.in89
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/configure.ac33
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/control.h52
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING339
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog390
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/libp2c/Makefile.am2
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/libp2c/README31
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/lyrics.h37
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/notes.h34
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/preamble.h42
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/status.h57
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/strings.h34
-rw-r--r--Build/source/utils/m-tx/mtx-0.60d/utility.h41
-rw-r--r--Build/source/utils/m-tx/mtx-src-PATCHES/ChangeLog (renamed from Build/source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog)5
-rw-r--r--Build/source/utils/m-tx/mtx-src-PATCHES/TL-Changes (renamed from Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes)5
-rw-r--r--Build/source/utils/m-tx/mtx-src-PATCHES/patch-01-write-bin11
-rw-r--r--Build/source/utils/m-tx/mtx-src-PATCHES/patch-02-malloc11
-rw-r--r--Build/source/utils/m-tx/mtx-src-PATCHES/patch-03-different-size (renamed from Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-03-different-size)5
-rw-r--r--Build/source/utils/m-tx/mtx-src/AUTHORS (renamed from Build/source/utils/m-tx/mtx-0.60d/AUTHORS)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/Bugs9
-rw-r--r--Build/source/utils/m-tx/mtx-src/COPYING (renamed from Build/source/utils/m-tx/mtx-0.60d/COPYING)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/ChangeLog (renamed from Build/source/utils/m-tx/mtx-0.60d/ChangeLog)7
-rw-r--r--Build/source/utils/m-tx/mtx-src/ChangeLog.C4
-rw-r--r--Build/source/utils/m-tx/mtx-src/Corrections208
-rw-r--r--Build/source/utils/m-tx/mtx-src/INSTALL (renamed from Build/source/utils/m-tx/mtx-0.60d/INSTALL)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/Makefile.am78
-rw-r--r--Build/source/utils/m-tx/mtx-src/Makefile.orig (renamed from Build/source/utils/m-tx/mtx-0.60d/Makefile.orig)31
-rw-r--r--Build/source/utils/m-tx/mtx-src/NEWS (renamed from Build/source/utils/m-tx/mtx-0.60d/README.060d)7
-rw-r--r--Build/source/utils/m-tx/mtx-src/README35
-rw-r--r--Build/source/utils/m-tx/mtx-src/analyze.c (renamed from Build/source/utils/m-tx/mtx-0.60d/analyze.c)37
-rw-r--r--Build/source/utils/m-tx/mtx-src/analyze.h (renamed from Build/source/utils/m-tx/mtx-0.60d/analyze.h)8
-rw-r--r--Build/source/utils/m-tx/mtx-src/analyze.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/analyze.pas)3
-rw-r--r--Build/source/utils/m-tx/mtx-src/cfuncs.c (renamed from Build/source/utils/m-tx/mtx-0.60d/cfuncs.c)16
-rw-r--r--Build/source/utils/m-tx/mtx-src/cfuncs.h (renamed from Build/source/utils/m-tx/mtx-0.60d/cfuncs.h)3
-rw-r--r--Build/source/utils/m-tx/mtx-src/configure.ac39
-rw-r--r--Build/source/utils/m-tx/mtx-src/control.c (renamed from Build/source/utils/m-tx/mtx-0.60d/control.c)57
-rw-r--r--Build/source/utils/m-tx/mtx-src/control.h52
-rw-r--r--Build/source/utils/m-tx/mtx-src/control.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/control.pas)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/files.c (renamed from Build/source/utils/m-tx/mtx-0.60d/files.c)67
-rw-r--r--Build/source/utils/m-tx/mtx-src/files.h (renamed from Build/source/utils/m-tx/mtx-0.60d/files.h)18
-rw-r--r--Build/source/utils/m-tx/mtx-src/files.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/files.pas)18
-rw-r--r--Build/source/utils/m-tx/mtx-src/globals.c (renamed from Build/source/utils/m-tx/mtx-0.60d/globals.c)71
-rw-r--r--Build/source/utils/m-tx/mtx-src/globals.h (renamed from Build/source/utils/m-tx/mtx-0.60d/globals.h)33
-rw-r--r--Build/source/utils/m-tx/mtx-src/globals.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/globals.pas)38
-rw-r--r--Build/source/utils/m-tx/mtx-src/libp2c/p2c.h (renamed from Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/libp2c/p2clib.c (renamed from Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/lyrics.c (renamed from Build/source/utils/m-tx/mtx-0.60d/lyrics.c)107
-rw-r--r--Build/source/utils/m-tx/mtx-src/lyrics.h37
-rw-r--r--Build/source/utils/m-tx/mtx-src/lyrics.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/lyrics.pas)7
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtx.c (renamed from Build/source/utils/m-tx/mtx-0.60d/mtx.c)66
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtx.h (renamed from Build/source/utils/m-tx/mtx-0.60d/mtx.h)10
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtx.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/mtx.pas)6
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtx.test16
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtxline.c (renamed from Build/source/utils/m-tx/mtx-0.60d/mtxline.c)23
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtxline.h (renamed from Build/source/utils/m-tx/mtx-0.60d/mtxline.h)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/mtxline.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/mtxline.pas)32
-rw-r--r--Build/source/utils/m-tx/mtx-src/multfile.c (renamed from Build/source/utils/m-tx/mtx-0.60d/multfile.c)2
-rw-r--r--Build/source/utils/m-tx/mtx-src/multfile.h (renamed from Build/source/utils/m-tx/mtx-0.60d/multfile.h)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/multfile.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/multfile.pas)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/notes.c (renamed from Build/source/utils/m-tx/mtx-0.60d/notes.c)96
-rw-r--r--Build/source/utils/m-tx/mtx-src/notes.h36
-rw-r--r--Build/source/utils/m-tx/mtx-src/notes.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/notes.pas)1
-rw-r--r--Build/source/utils/m-tx/mtx-src/preamble.c (renamed from Build/source/utils/m-tx/mtx-0.60d/preamble.c)253
-rw-r--r--Build/source/utils/m-tx/mtx-src/preamble.h42
-rw-r--r--Build/source/utils/m-tx/mtx-src/preamble.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/preamble.pas)112
-rw-r--r--Build/source/utils/m-tx/mtx-src/prepmx.c (renamed from Build/source/utils/m-tx/mtx-0.60d/prepmx.c)94
-rw-r--r--Build/source/utils/m-tx/mtx-src/prepmx.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/prepmx.pas)21
-rw-r--r--Build/source/utils/m-tx/mtx-src/status.c (renamed from Build/source/utils/m-tx/mtx-0.60d/status.c)213
-rw-r--r--Build/source/utils/m-tx/mtx-src/status.h59
-rw-r--r--Build/source/utils/m-tx/mtx-src/status.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/status.pas)78
-rw-r--r--Build/source/utils/m-tx/mtx-src/strings.h36
-rw-r--r--Build/source/utils/m-tx/mtx-src/strings.pas109
-rw-r--r--Build/source/utils/m-tx/mtx-src/uptext.c (renamed from Build/source/utils/m-tx/mtx-0.60d/uptext.c)23
-rw-r--r--Build/source/utils/m-tx/mtx-src/uptext.h (renamed from Build/source/utils/m-tx/mtx-0.60d/uptext.h)10
-rw-r--r--Build/source/utils/m-tx/mtx-src/uptext.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/uptext.pas)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/utility.c (renamed from Build/source/utils/m-tx/mtx-0.60d/utility.c)67
-rw-r--r--Build/source/utils/m-tx/mtx-src/utility.h41
-rw-r--r--Build/source/utils/m-tx/mtx-src/utility.pas (renamed from Build/source/utils/m-tx/mtx-0.60d/utility.pas)0
-rw-r--r--Build/source/utils/m-tx/mtx-src/version.ac11
-rw-r--r--Build/source/utils/m-tx/prepmx.155
-rw-r--r--Build/source/utils/m-tx/version.ac2
91 files changed, 1767 insertions, 2315 deletions
diff --git a/Build/source/utils/m-tx/ChangeLog b/Build/source/utils/m-tx/ChangeLog
index 57ea63fe0f8..1f72e004d07 100644
--- a/Build/source/utils/m-tx/ChangeLog
+++ b/Build/source/utils/m-tx/ChangeLog
@@ -1,3 +1,7 @@
+2015-12-17 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * Import m-tx 0.61.
+
2015-07-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Better dependencies for 'make check'.
diff --git a/Build/source/utils/m-tx/configure b/Build/source/utils/m-tx/configure
index 9e432ea2fff..b3a5ce9df9d 100755
--- a/Build/source/utils/m-tx/configure
+++ b/Build/source/utils/m-tx/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for m-tx (TeX Live) 0.60d.
+# Generated by GNU Autoconf 2.69 for m-tx (TeX Live) 0.61.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,12 +580,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='m-tx (TeX Live)'
PACKAGE_TARNAME='m-tx--tex-live-'
-PACKAGE_VERSION='0.60d'
-PACKAGE_STRING='m-tx (TeX Live) 0.60d'
+PACKAGE_VERSION='0.61'
+PACKAGE_STRING='m-tx (TeX Live) 0.61'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="mtx-0.60d/analyze.c"
+ac_unique_file="mtx-src/analyze.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -1275,7 +1275,7 @@ 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 (TeX Live) 0.60d to adapt to many kinds of systems.
+\`configure' configures m-tx (TeX Live) 0.61 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1341,7 +1341,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of m-tx (TeX Live) 0.60d:";;
+ short | recursive ) echo "Configuration of m-tx (TeX Live) 0.61:";;
esac
cat <<\_ACEOF
@@ -1438,7 +1438,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-m-tx (TeX Live) configure 0.60d
+m-tx (TeX Live) configure 0.61
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1861,7 +1861,7 @@ 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 (TeX Live) $as_me 0.60d, which was
+It was created by m-tx (TeX Live) $as_me 0.61, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3784,7 +3784,7 @@ fi
# Define the identity of the package.
PACKAGE='m-tx--tex-live-'
- VERSION='0.60d'
+ VERSION='0.61'
cat >>confdefs.h <<_ACEOF
@@ -5289,7 +5289,7 @@ fi
done
-MTX_TREE=mtx-0.60d
+MTX_TREE=mtx-src
ac_config_files="$ac_config_files Makefile"
@@ -5868,7 +5868,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by m-tx (TeX Live) $as_me 0.60d, which was
+This file was extended by m-tx (TeX Live) $as_me 0.61, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5925,7 +5925,7 @@ _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 (TeX Live) config.status 0.60d
+m-tx (TeX Live) config.status 0.61
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/utils/m-tx/configure.ac b/Build/source/utils/m-tx/configure.ac
index bc2257495e4..8936d60eb10 100644
--- a/Build/source/utils/m-tx/configure.ac
+++ b/Build/source/utils/m-tx/configure.ac
@@ -9,7 +9,7 @@ dnl
m4_include([version.ac])[] dnl define mtx_version
AC_INIT([m-tx (TeX Live)], mtx_version, [tex-k@tug.org])
AC_PREREQ([2.65])
-AC_CONFIG_SRCDIR([mtx-]mtx_version[/analyze.c])
+AC_CONFIG_SRCDIR([mtx-src/analyze.c])
AC_CONFIG_AUX_DIR([../../build-aux])
AC_CONFIG_MACRO_DIR([../../m4])
@@ -35,7 +35,7 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([memchr memmove memset strchr strrchr strtol])
-AC_SUBST([MTX_TREE], [mtx-]mtx_version)
+AC_SUBST([MTX_TREE], [mtx-src])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
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
deleted file mode 100644
index a513d56fc3c..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d-PATCHES/patch-02-malloc b/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-02-malloc
deleted file mode 100644
index 071cdd5f833..00000000000
--- a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-02-malloc
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ur mtx-0.60d.orig/cfuncs.c mtx-0.60d/cfuncs.c
---- mtx-0.60d.orig/cfuncs.c 2012-04-05 13:05:08.000000000 +0200
-+++ mtx-0.60d/cfuncs.c 2012-10-04 13:27:57.000000000 +0200
-@@ -18,6 +18,8 @@
- if (x==EOF) return 1;
- ungetc(x,infile); return 0;
- }
-+void *__MallocTemp__;
-+int _OutMem(void) { fprintf(stderr,"Out of memory\n"); exit(-2); return -2; }
- void PASCAL_MAIN (int npars, char ** pars)
- { P_argc = npars; P_argv = pars; }
-
-diff -ur mtx-0.60d.orig/multfile.c mtx-0.60d/multfile.c
---- mtx-0.60d.orig/multfile.c 2012-04-05 14:47:20.000000000 +0200
-+++ mtx-0.60d/multfile.c 2012-10-04 11:56:59.000000000 +0200
-@@ -60,7 +60,7 @@
- printf("===! Ignoring recursive include of file %s\n", filename);
- return;
- }
-- newnode = malloc(sizeof(filenode));
-+ newnode = Malloc(sizeof(filenode));
- newnode->actualfile = NULL;
- strcpy(newnode->name, filename);
- newnode->prev = current;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/Bugs b/Build/source/utils/m-tx/mtx-0.60d/Bugs
deleted file mode 100644
index 1703eee92a2..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/Makefile.am b/Build/source/utils/m-tx/mtx-0.60d/Makefile.am
deleted file mode 100644
index 1fc037408fa..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/NEWS b/Build/source/utils/m-tx/mtx-0.60d/NEWS
deleted file mode 100644
index 1703eee92a2..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/README b/Build/source/utils/m-tx/mtx-0.60d/README
deleted file mode 100644
index 55e006035bf..00000000000
--- a/Build/source/utils/m-tx/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 <dlaurie@na-net.ornl.gov>.
-
-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/config.h b/Build/source/utils/m-tx/mtx-0.60d/config.h
deleted file mode 100644
index 2ce758e1759..00000000000
--- a/Build/source/utils/m-tx/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 <inttypes.h> 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 <memory.h> 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 <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> 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 <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> 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 <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> 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 <sys/types.h> 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
deleted file mode 100644
index 88cd015fb76..00000000000
--- a/Build/source/utils/m-tx/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 <inttypes.h> 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 <memory.h> 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 <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> 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 <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> 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 <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> 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 <sys/types.h> 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
deleted file mode 100644
index a5c59e86466..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/control.h b/Build/source/utils/m-tx/mtx-0.60d/control.h
deleted file mode 100644
index 91ce2c2dfef..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/libp2c/COPYING b/Build/source/utils/m-tx/mtx-0.60d/libp2c/COPYING
deleted file mode 100644
index e77696ae8dd..00000000000
--- a/Build/source/utils/m-tx/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.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- 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.
-
- <signature of Ty Coon>, 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
deleted file mode 100644
index 17e4bc2dbc5..00000000000
--- a/Build/source/utils/m-tx/mtx-0.60d/libp2c/ChangeLog
+++ /dev/null
@@ -1,390 +0,0 @@
-Wed Mar 10 15:03:20 1999 Alexander L. Belikoff <abel@blinky>
-
- * src/p2c.h: DOUBLE defined as double
-
-Tue Mar 31 14:57:26 1998 Alexander L. Belikoff <abel@blinky>
-
- * 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 <hjstein@bfr.co.il>
-
- * 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 <hjstein@bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * 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 <hjstein@blinky.bfr.co.il>
-
- * p2c.patch: patches generated & mailed to Dave Gillespie
-
-Wed Apr 16 16:26:07 1997 Harvey J. Stein <hjstein@blinky.bfr.co.il>
-
- * 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
deleted file mode 100644
index fd208029eef..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/libp2c/README b/Build/source/utils/m-tx/mtx-0.60d/libp2c/README
deleted file mode 100644
index 47a102c88d2..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/lyrics.h b/Build/source/utils/m-tx/mtx-0.60d/lyrics.h
deleted file mode 100644
index f225cb0d760..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/notes.h b/Build/source/utils/m-tx/mtx-0.60d/notes.h
deleted file mode 100644
index 1b534b44186..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/preamble.h b/Build/source/utils/m-tx/mtx-0.60d/preamble.h
deleted file mode 100644
index ef854aa0dcb..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/status.h b/Build/source/utils/m-tx/mtx-0.60d/status.h
deleted file mode 100644
index 1a81d124398..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/strings.h b/Build/source/utils/m-tx/mtx-0.60d/strings.h
deleted file mode 100644
index 6e0bcdfae8e..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d/utility.h b/Build/source/utils/m-tx/mtx-0.60d/utility.h
deleted file mode 100644
index eee95a563b7..00000000000
--- a/Build/source/utils/m-tx/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/m-tx/mtx-0.60d-PATCHES/ChangeLog b/Build/source/utils/m-tx/mtx-src-PATCHES/ChangeLog
index 8ca2124cef6..c5d615389e2 100644
--- a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/ChangeLog
+++ b/Build/source/utils/m-tx/mtx-src-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-17 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * patch-01-write-bin, patch-02-malloc, patch-03-different-size:
+ Update for 0.61.
+
2013-04-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-03-different-size: Avoid 'cast to pointer from integer of
diff --git a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes b/Build/source/utils/m-tx/mtx-src-PATCHES/TL-Changes
index a24ef1965c0..5c42af1ad01 100644
--- a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/TL-Changes
+++ b/Build/source/utils/m-tx/mtx-src-PATCHES/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the mtx-0.60d tree as obtained from:
+Changes applied to the mtx-0.61 tree as obtained from:
http://www.ctan.org/tex-archive/support/m-tx/
Remove:
@@ -8,5 +8,6 @@ Remove:
depcomp
install-sh
missing
- libp2c/Makefile.in
+Move to top directory:
+ tests/*
diff --git a/Build/source/utils/m-tx/mtx-src-PATCHES/patch-01-write-bin b/Build/source/utils/m-tx/mtx-src-PATCHES/patch-01-write-bin
new file mode 100644
index 00000000000..150ebbd6caf
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src-PATCHES/patch-01-write-bin
@@ -0,0 +1,11 @@
+--- mtx-0.61.orig/globals.c Thu Dec 17 04:15:57 2015
++++ mtx-0.61/globals.c Thu Dec 17 08:57:13 2015
+@@ -223,7 +223,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-src-PATCHES/patch-02-malloc b/Build/source/utils/m-tx/mtx-src-PATCHES/patch-02-malloc
new file mode 100644
index 00000000000..d1ba9181f0f
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src-PATCHES/patch-02-malloc
@@ -0,0 +1,11 @@
+--- mtx-0.61.orig/multfile.c Thu Dec 17 04:17:40 2015
++++ mtx-0.61/multfile.c Thu Dec 17 09:03:39 2015
+@@ -60,7 +60,7 @@
+ printf("===! Ignoring recursive include of file %s\n", filename);
+ return;
+ }
+- newnode = malloc(sizeof(filenode));
++ newnode = Malloc(sizeof(filenode));
+ newnode->actualfile = NULL;
+ strcpy(newnode->name, filename);
+ newnode->prev = current;
diff --git a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-03-different-size b/Build/source/utils/m-tx/mtx-src-PATCHES/patch-03-different-size
index 050f564dc87..0eb96f3c8e2 100644
--- a/Build/source/utils/m-tx/mtx-0.60d-PATCHES/patch-03-different-size
+++ b/Build/source/utils/m-tx/mtx-src-PATCHES/patch-03-different-size
@@ -1,6 +1,5 @@
-diff -ur mtx-0.60d.orig/libp2c/p2c.h mtx-0.60d/libp2c/p2c.h
---- mtx-0.60d.orig/libp2c/p2c.h 1999-03-16 16:28:20.000000000 +0100
-+++ mtx-0.60d/libp2c/p2c.h 2013-04-10 17:40:36.000000000 +0200
+--- mtx-0.61.orig/libp2c/p2c.h Wed Mar 17 00:28:20 1999
++++ mtx-0.61/libp2c/p2c.h Thu Dec 17 09:00:24 2015
@@ -428,10 +428,10 @@
/* Memory allocation */
diff --git a/Build/source/utils/m-tx/mtx-0.60d/AUTHORS b/Build/source/utils/m-tx/mtx-src/AUTHORS
index 9fdff1fe9d3..9fdff1fe9d3 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/AUTHORS
+++ b/Build/source/utils/m-tx/mtx-src/AUTHORS
diff --git a/Build/source/utils/m-tx/mtx-src/Bugs b/Build/source/utils/m-tx/mtx-src/Bugs
new file mode 100644
index 00000000000..716a28c5d6e
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/Bugs
@@ -0,0 +1,9 @@
+Lyrics lines when not from same paragraph don't join neatly.
+Problem has been discussed on mailing list and Rainer gave
+a solution. This still (TeXLive 2013) seems to be a little
+unsatisfactory.
+
+Rest in dot and comma shortcuts gives error at PMX stage.
+Not recently (2015-08-04) checked.
+
+
diff --git a/Build/source/utils/m-tx/mtx-0.60d/COPYING b/Build/source/utils/m-tx/mtx-src/COPYING
index 623b6258a13..623b6258a13 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/COPYING
+++ b/Build/source/utils/m-tx/mtx-src/COPYING
diff --git a/Build/source/utils/m-tx/mtx-0.60d/ChangeLog b/Build/source/utils/m-tx/mtx-src/ChangeLog
index c6191aa7874..6169851f3aa 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/ChangeLog
+++ b/Build/source/utils/m-tx/mtx-src/ChangeLog
@@ -1,6 +1,13 @@
Corrections and enhancements to M-Tx starting from 0.53
Newest items at top
+Version 0.61
+ `TeX` preamble command for Type 2 TeX strings.
+ Assertions: Range, Bars.
+ User's Manual thoroughly revised.
+ Misnamed procedure `tex3` is now `TeXtype2`.
+ Page and font macros are included in `mtx.tex`.
+
Version 0.60d
Replaced space character tie label by no label,
status.pas: procedure labelSlur, call procedure insertchar only for slurs.
diff --git a/Build/source/utils/m-tx/mtx-src/ChangeLog.C b/Build/source/utils/m-tx/mtx-src/ChangeLog.C
new file mode 100644
index 00000000000..34a54157f8c
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/ChangeLog.C
@@ -0,0 +1,4 @@
+2012-05-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-01-write-bin (new): Use binary mode for output files.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp> (W32TeX).
diff --git a/Build/source/utils/m-tx/mtx-src/Corrections b/Build/source/utils/m-tx/mtx-src/Corrections
new file mode 100644
index 00000000000..99efcccc19a
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/Corrections
@@ -0,0 +1,208 @@
+Corrections and enhancements to M-Tx starting from 0.53
+=======================================================
+
+Newest items at top. You might also want to look at file `MAINTENANCE`.
+
+Version 0.61
+------------
+
+Mainly aids to the programmer.
+
+1. `TeX` preamble command for Type 2 TeX strings.
+2. Assertions: Range, Bars.
+3. User's Manual thoroughly revised.
+4. Misnamed procedure `tex3` is now `TeXtype2`.
+5. Page and font macros are included in `mtx.tex`.
+6. The part of this file above the horizontal line is in Markdown.
+
+
+----------------------------------------------------------------------
+
+Version 0.60f
+ notes.pas: {$V-} inserted since otherwise Pascal 2.6.2 regards it as an
+ error to pass a var argument of type `string[16]` to a procedure that
+ expects type `string`.
+ lyrics.pas: tests for empty lyrics paragraph
+
+Version 0.60e (RETRACTED)
+ Any bar word starting with `|` terminates a pickup, not only `|`.
+ Actually the manual was clear on this point, so the current version
+ has reverted to 0.60d.
+
+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-src/INSTALL
index 7d1c323beae..7d1c323beae 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/INSTALL
+++ b/Build/source/utils/m-tx/mtx-src/INSTALL
diff --git a/Build/source/utils/m-tx/mtx-src/Makefile.am b/Build/source/utils/m-tx/mtx-src/Makefile.am
new file mode 100644
index 00000000000..02d74dd4527
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/Makefile.am
@@ -0,0 +1,78 @@
+## Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+
+INCLUDES = -I$(srcdir)/libp2c
+AM_CFLAGS = #$(WARNING_CFLAGS)
+
+bin_PROGRAMS = prepmx
+
+## prepmx_SOURCES = config.h
+
+prepmx_SOURCES = \
+ analyze.c \
+ analyze.h \
+ cfuncs.c \
+ cfuncs.h \
+ control.c \
+ control.h \
+ files.c \
+ files.h \
+ globals.c \
+ globals.h \
+ lyrics.c \
+ lyrics.h \
+ mtx.c \
+ mtx.h \
+ mtxline.c \
+ mtxline.h \
+ multfile.c \
+ multfile.h \
+ notes.c \
+ notes.h \
+ preamble.c \
+ preamble.h \
+ prepmx.c \
+ status.c \
+ status.h \
+ strings.h \
+ uptext.c \
+ uptext.h \
+ utility.c \
+ utility.h
+
+EXTRA_DIST = \
+ analyze.pas \
+ control.pas \
+ files.pas \
+ globals.pas \
+ lyrics.pas \
+ mtx.pas \
+ mtxline.pas \
+ multfile.pas \
+ notes.pas \
+ preamble.pas \
+ prepmx.pas \
+ status.pas \
+ strings.pas \
+ uptext.pas \
+ utility.pas
+
+LDADD = libp2c.a
+
+noinst_LIBRARIES = libp2c.a
+
+libp2c_a_SOURCES = \
+ libp2c/p2c.h \
+ libp2c/p2clib.c
+
+## Tests
+##
+TESTS = mtx.test
+EXTRA_DIST += $(TESTS)
+
+## mtx.test
+EXTRA_DIST += tests/mozart.mtx tests/mozart.pmx Makefile.orig Bugs Corrections ChangeLog.C
+EXTRA_DIST += configure.ac Makefile.am
+DISTCLEANFILES = mozart*
+
diff --git a/Build/source/utils/m-tx/mtx-0.60d/Makefile.orig b/Build/source/utils/m-tx/mtx-src/Makefile.orig
index 60cf037cbba..d3d96e4877b 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/Makefile.orig
+++ b/Build/source/utils/m-tx/mtx-src/Makefile.orig
@@ -1,40 +1,47 @@
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
+sfiles = mtx.tex mtxdoc.tex mtxdoc.pdf Makefile Corrections Bugs MAINTENANCE
+
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 \
+ status.o uptext.o cfuncs.o files.o notes.o prepmx.o multfile.o utility.o \
control.o
-prepmx: $(pasfiles)
- fpc -g -B -vnh -So prepmx
+
+SYSTEM=LINUX
+
+prepmx: $(pasfiles)
+ fpc -g -B -vn -So prepmx -T$(SYSTEM)
prepmxc: $(cfiles) $(ofiles)
- cc $(ofiles) -o prepmx
+ gcc $(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
-
+
+
+commit: $(pasfiles) $(sfiles)
+ git add $(pasfiles) $(sfiles)
+ echo Now type: git commit -m \"DESCRIPTION OF_CHANGES\"
+
clean:
- rm *.o *~ *~ core *.pmx *.pml *.log *.dvi
bare: clean
- - rm $(cfiles) $(hfiles) prepmx *.ppu
+ - rm prepmx *.ppu
Pzip:
- zip -ju mtxP`./version` version $(pasfiles) pmxword.pas mtx.tex $(native) \
- Makefile Corrections Bugs README
+ zip -ju mtxP`./version` version $(pasfiles) $(sfiles) 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/README.060d b/Build/source/utils/m-tx/mtx-src/NEWS
index abc347bfd0e..351792d7e10 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/README.060d
+++ b/Build/source/utils/m-tx/mtx-src/NEWS
@@ -1,3 +1,10 @@
+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.
+
+
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
diff --git a/Build/source/utils/m-tx/mtx-src/README b/Build/source/utils/m-tx/mtx-src/README
new file mode 100644
index 00000000000..f57555c8a27
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/README
@@ -0,0 +1,35 @@
+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 and there are no examples. These are included with the stable release available in the TeXLive and MikTeX distributions of TeX. (If you have not installed one of those, you will be unable to do any useful work with `prepmx`.)
+
+You probably got it from <https://github.com/dlaurie/M-Tx>. If not, you should; that may well contain newer code by now.
+
+The development version is provided for people 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 the Werner Icking Music Archive mailing list <tex-music@tug.org> or directly to Dirk Laurie <dirk.laurie@gmail.com>.
+
+You need the Free Pascal compiler. Any version from 1.0.10 onwards should work; 2.4.4 certainly did on 2014-02-01 and 2.6.2 on 2015-04-24. You may get away with other Pascal compilers, including Borland Pascal 7.0 and the Pascal-to-C translator `p2c`, but no effort has been made to retain compliance. Older versions of this README included details, all probably obsolete by now.
+
+"GNU System" means any system on which standard GNU utilities such as "bash" and "make" is available. Typical GNU systems are
+
+- Linux
+- Windows with the Cygwin package installed
+
+You do not need a GNU system to use M-Tx, but it is easier to make the executable on a GNU system.
+
+If your system has GNU Make, simply type
+
+ make
+
+Otherwise, find the line in the Makefile starting with `fpc` and type that into your terminal.
+
+For experts only
+----------------
+
+You can modify the source code as you wish -- this is open source software and the license is MIT. 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.
+
+Or fork the repository.
+
+The Makefile can make various other things. I don't want to document those, since then I would be constrained to maintain them. Use at your peril.
+
diff --git a/Build/source/utils/m-tx/mtx-0.60d/analyze.c b/Build/source/utils/m-tx/mtx-src/analyze.c
index 3003eeb9723..2a7ef8bf0c8 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/analyze.c
+++ b/Build/source/utils/m-tx/mtx-src/analyze.c
@@ -38,7 +38,7 @@
#endif
-Void includeStartString()
+void includeStartString(void)
{
voice_index voice;
paragraph_index0 mus;
@@ -57,9 +57,7 @@ Void includeStartString()
}
-Static Char *describe(Result, nbar, extra)
-Char *Result;
-short nbar, extra;
+Static Char *describe(Char *Result, short nbar, short extra)
{
Char STR1[256];
Char STR3[256];
@@ -71,7 +69,7 @@ short nbar, extra;
}
-Void testParagraph()
+void testParagraph(void)
{
voice_index0 voice;
voice_index0 leader = 0, nv = 0;
@@ -79,7 +77,7 @@ Void testParagraph()
short extra, l, nbar;
voice_index0 FORLIM;
Char STR2[256];
- Char STR3[256];
+ Char STR4[256];
nbars = 0;
pickup = 0;
@@ -116,8 +114,10 @@ Void testParagraph()
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)
+ if (pmx_preamble_done && l > 0 && meternum > 0) {
+ printf("l=%d meternum=%d\n", l, meternum);
error3(voice, "Short bar with no meter change");
+ }
}
}
if (!pmx_preamble_done) {
@@ -136,8 +136,8 @@ Void testParagraph()
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));
+ describe(STR4, numberOfBars(voice), ExtraLength(voice)));
+ puts(musicLine(STR4, voice));
printf("Longest line has %s\n",
describe(STR2, numberOfBars(leader), ExtraLength(leader)));
puts(musicLine(STR2, leader));
@@ -149,7 +149,7 @@ Void testParagraph()
}
-Void describeParagraph()
+void describeParagraph(void)
{
voice_index0 voice;
Char STR2[256];
@@ -172,9 +172,7 @@ struct LOC_paragraphSetup {
boolean is_labelled;
} ;
-Local Void maybeUptext(i, LINK)
-short i;
-struct LOC_paragraphSetup *LINK;
+Local void maybeUptext(short i, struct LOC_paragraphSetup *LINK)
{
if (!doUptext())
return;
@@ -198,9 +196,7 @@ struct LOC_paragraphSetup *LINK;
setUptextLineNo(LINK->k, i);
}
-Local Void maybeChords(i, LINK)
-short i;
-struct LOC_paragraphSetup *LINK;
+Local void maybeChords(short i, struct LOC_paragraphSetup *LINK)
{
if (!doChords())
return;
@@ -222,8 +218,7 @@ struct LOC_paragraphSetup *LINK;
setChordLineNo(LINK->k, i);
}
-Local Void analyzeParagraph(LINK)
-struct LOC_paragraphSetup *LINK;
+Local void analyzeParagraph(struct LOC_paragraphSetup *LINK)
{
paragraph_index i, FORLIM;
@@ -289,8 +284,7 @@ struct LOC_paragraphSetup *LINK;
}
}
-Local Void obliterate(LINK)
-struct LOC_paragraphSetup *LINK;
+Local void obliterate(struct LOC_paragraphSetup *LINK)
{
paragraph_index i;
Char new_only[256];
@@ -316,8 +310,7 @@ struct LOC_paragraphSetup *LINK;
}
-Void paragraphSetup(voice_)
-voice_index0 *voice_;
+void paragraphSetup(voice_index0 *voice_)
{
struct LOC_paragraphSetup V;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/analyze.h b/Build/source/utils/m-tx/mtx-src/analyze.h
index e05b846ebb5..1a01de09170 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/analyze.h
+++ b/Build/source/utils/m-tx/mtx-src/analyze.h
@@ -20,10 +20,10 @@
# define vextern extern
#endif
-extern Void testParagraph PV();
-extern Void describeParagraph PV();
-extern Void paragraphSetup PP((voice_index0 *voice));
-extern Void includeStartString PV();
+extern void testParagraph(void);
+extern void describeParagraph(void);
+extern void paragraphSetup(voice_index0 *voice);
+extern void includeStartString(void);
#undef vextern
diff --git a/Build/source/utils/m-tx/mtx-0.60d/analyze.pas b/Build/source/utils/m-tx/mtx-src/analyze.pas
index 310c5887854..e1ce135992d 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/analyze.pas
+++ b/Build/source/utils/m-tx/mtx-src/analyze.pas
@@ -54,7 +54,10 @@ begin
error(' Line does not end at complete bar',print);
end;
if pmx_preamble_done and (l>0) and (meternum>0) then
+begin
+ writeln('l=',l,' meternum=',meternum);
error3(voice,'Short bar with no meter change');
+end
end
end;
if not pmx_preamble_done then
diff --git a/Build/source/utils/m-tx/mtx-0.60d/cfuncs.c b/Build/source/utils/m-tx/mtx-src/cfuncs.c
index d7d5b81987b..4885ee72a00 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/cfuncs.c
+++ b/Build/source/utils/m-tx/mtx-src/cfuncs.c
@@ -87,5 +87,21 @@ char *substr_(char *Result, char *s, short start, short count)
*R = '\0';
return Result;
}
+
+short strpos2 (char *s1, char *s2, short p)
+{ char *r = strstr (s1+p, s2);
+ if (r == NULL) return 0;
+ else return r-s1;
+}
+
+short nextWordBound(char *s, char trigger, short p)
+{
+ do {
+ p++;
+ } while (p <= strlen(s) && s[p-1] != trigger);
+ while (p < strlen(s) && s[p] != ' ')
+ p++;
+ return p;
+}
# undef CFUNCS_C
diff --git a/Build/source/utils/m-tx/mtx-0.60d/cfuncs.h b/Build/source/utils/m-tx/mtx-src/cfuncs.h
index 5dc1c829fe7..f8f3e0c2d0d 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/cfuncs.h
+++ b/Build/source/utils/m-tx/mtx-src/cfuncs.h
@@ -64,7 +64,8 @@ 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);
-
+extern short strpos2 (char *s1, char *s2, short p);
+extern short nextWordBound(char *s, char trigger, short p);
#undef vextern
diff --git a/Build/source/utils/m-tx/mtx-src/configure.ac b/Build/source/utils/m-tx/mtx-src/configure.ac
new file mode 100644
index 00000000000..6814d0ba88d
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/configure.ac
@@ -0,0 +1,39 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
+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], mtx_version, [rdt@cs.queensu.ca])
+AC_PREREQ([2.63])
+AC_CONFIG_SRCDIR([analyze.c])
+
+AM_INIT_AUTOMAKE(mtx, mtx_version)
+
+dnl Check compiler and flags
+AC_PROG_CC
+
+AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno])
+
+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_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_CHECK_FUNCS([memchr memmove memset strchr strrchr strtol])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/Build/source/utils/m-tx/mtx-0.60d/control.c b/Build/source/utils/m-tx/mtx-src/control.c
index 9dbb2dae1da..ee6907802df 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/control.c
+++ b/Build/source/utils/m-tx/mtx-src/control.c
@@ -77,13 +77,12 @@ Static Tfeature feat[21] = {
};
-Void printFeatures(anyway)
-boolean anyway;
+void printFeatures(boolean anyway)
{
feature i;
Tfeature *WITH;
- for (i = firstFeature; (long)i <= (long)lastFeature; i = (feature)((long)i + 1)) {
+ for (i = firstFeature; i <= lastFeature; i = (feature)((long)i + 1)) {
WITH = &feat[(long)i];
if (WITH->changed || anyway)
printf("%s = %s\n", WITH->tag, WITH->active ? " TRUE" : "FALSE");
@@ -91,12 +90,11 @@ boolean anyway;
}
-Static feature featureNamed(s)
-Char *s;
+Static feature featureNamed(Char *s)
{
feature i;
- for (i = firstFeature; (long)i <= (long)lastFeature; i = (feature)((long)i + 1)) {
+ for (i = firstFeature; i <= lastFeature; i = (feature)((long)i + 1)) {
if (equalsIgnoreCase(s, feat[(long)i].tag))
return i;
}
@@ -104,9 +102,7 @@ Char *s;
}
-boolean setFeature(which, val)
-Char *which;
-boolean val;
+boolean setFeature(Char *which, boolean val)
{
boolean Result = false;
feature f;
@@ -127,8 +123,7 @@ boolean val;
}
-Void mtxLevel(level)
-Char *level;
+void mtxLevel(Char *level)
{
if (strcmp(level, "0.57") < 0) {
setFeature("splitShortcut", false);
@@ -148,121 +143,121 @@ function FEATURE: boolean;
begin FEATURE := feat[FFEATURE].active end;
*/
-boolean checkPitch()
+boolean checkPitch(void)
{
return (feat[(long)FcheckPitch].active);
}
-boolean countMacro()
+boolean countMacro(void)
{
return (feat[(long)FcountMacro].active);
}
-boolean expandMacro()
+boolean expandMacro(void)
{
return (feat[(long)FexpandMacro].active);
}
-boolean insertDuration()
+boolean insertDuration(void)
{
return (feat[(long)FinsertDuration].active);
}
-boolean rearrangeNote()
+boolean rearrangeNote(void)
{
return (feat[(long)FrearrangeNote].active);
}
-boolean beVerbose()
+boolean beVerbose(void)
{
return (feat[(long)FbeVerbose].active);
}
-boolean debugMode()
+boolean debugMode(void)
{
return (feat[(long)FdebugMode].active);
}
-boolean instrumentNames()
+boolean instrumentNames(void)
{
return (feat[(long)FinstrumentNames].active);
}
-boolean hideBlindSlurs()
+boolean hideBlindSlurs(void)
{
return (feat[(long)FhideBlindSlurs].active);
}
-boolean doLyrics()
+boolean doLyrics(void)
{
return (feat[(long)FdoLyrics].active);
}
-boolean ignoreErrors()
+boolean ignoreErrors(void)
{
return (feat[(long)FignoreErrors].active);
}
-boolean pedanticWarnings()
+boolean pedanticWarnings(void)
{
return (feat[(long)FpedanticWarnings].active);
}
-boolean solfaNoteNames()
+boolean solfaNoteNames(void)
{
return (feat[(long)FsolfaNoteNames].active);
}
-boolean uptextOnRests()
+boolean uptextOnRests(void)
{
return (feat[(long)FuptextOnRests].active);
}
-boolean unbeamVocal()
+boolean unbeamVocal(void)
{
return (feat[(long)FunbeamVocal].active);
}
-boolean doChords()
+boolean doChords(void)
{
return (feat[(long)FdoChords].active);
}
-boolean doUptext()
+boolean doUptext(void)
{
return (feat[(long)FdoUptext].active);
}
-boolean newWordShortcut()
+boolean newWordShortcut(void)
{
return (feat[(long)FnewWordShortcut].active);
}
-boolean splitShortcut()
+boolean splitShortcut(void)
{
return (feat[(long)FsplitShortcut].active);
}
-boolean multiFile()
+boolean multiFile(void)
{
return (feat[(long)FmultiFile].active);
}
diff --git a/Build/source/utils/m-tx/mtx-src/control.h b/Build/source/utils/m-tx/mtx-src/control.h
new file mode 100644
index 00000000000..32318eedf7d
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/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(Char *level);
+extern boolean setFeature(Char *which, boolean val);
+/* return TRUE means OK, return FALSE means there is no such feature */
+extern void printFeatures(boolean anyway);
+/* anyway TRUE means print all feature settings, FALSE means only those
+ that were set via setFeature */
+
+extern boolean multiFile(void);
+extern boolean splitShortcut(void);
+extern boolean newWordShortcut(void);
+extern boolean doChords(void);
+extern boolean doUptext(void);
+extern boolean doLyrics(void);
+extern boolean unbeamVocal(void);
+extern boolean uptextOnRests(void);
+extern boolean solfaNoteNames(void);
+extern boolean pedanticWarnings(void);
+extern boolean ignoreErrors(void);
+extern boolean hideBlindSlurs(void);
+extern boolean instrumentNames(void);
+extern boolean beVerbose(void);
+extern boolean debugMode(void);
+extern boolean insertDuration(void);
+extern boolean rearrangeNote(void);
+extern boolean countMacro(void);
+extern boolean expandMacro(void);
+extern boolean checkPitch(void);
+
+
+#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-src/control.pas
index fbe224658a8..fbe224658a8 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/control.pas
+++ b/Build/source/utils/m-tx/mtx-src/control.pas
diff --git a/Build/source/utils/m-tx/mtx-0.60d/files.c b/Build/source/utils/m-tx/mtx-src/files.c
index 48aacc7aae7..972d34ac573 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/files.c
+++ b/Build/source/utils/m-tx/mtx-src/files.c
@@ -2,8 +2,8 @@
/* From input file "files.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define FILES_G
#include "files.h"
@@ -30,16 +30,36 @@ Static Char stylefilename[256] = "mtxstyle.txt";
Static short teststyle;
-boolean endOfInfile()
+boolean endOfInfile(void)
{
return (eofAll());
}
-Void tex3(s)
-Char *s;
+Static void putTeXlines(Char *s_)
+{
+ Char s[256];
+ short p;
+ Char STR1[256], STR3[256];
+
+ strcpy(s, s_);
+ p = pos1('\n', s);
+ while (p > 0) {
+ sprintf(STR3, "\\%s\\", substr_(STR1, s, 1, p - 1));
+ putLine(STR3);
+ predelete(s, p);
+ p = pos1('\n', s);
+ }
+ if (*s != '\0') {
+ sprintf(STR3, "\\%s\\", s);
+ putLine(STR3);
+ }
+}
+
+
+void TeXtype2(Char *s)
{
- Char STR1[256], STR2[256];
+ Char STR2[256];
if (!pmx_preamble_done) {
putLine(s);
@@ -49,18 +69,16 @@ Char *s;
putLine(s);
return;
}
- if (first_paragraph) {
- sprintf(STR2, "\\%s\\", s);
+ if (first_paragraph)
+ putTeXlines(s);
+ else {
+ sprintf(STR2, "\\\\%s\\", s);
putLine(STR2);
- } else {
- sprintf(STR1, "\\\\%s\\", s);
- putLine(STR1);
}
}
-Void putLine(line)
-Char *line;
+void putLine(Char *line)
{
if (outlen + strlen(line) >= PMXlinelength)
putc('\n', outfile);
@@ -69,9 +87,7 @@ Char *line;
}
-Void put(line_, putspace_)
-Char *line_;
-boolean putspace_;
+void put(Char *line_, boolean putspace_)
{
Char line[256];
short l;
@@ -93,19 +109,19 @@ boolean putspace_;
}
-boolean styleFileFound()
+boolean styleFileFound(void)
{
return (teststyle != 0);
}
-Static Void helpmessage()
+Static void helpmessage(void)
{
printf("Usage: prepmx [-bcfnhimtuvwDH0123456789] MTXFILE [TEXDIR] [STYLEFILE]\n");
}
-Static Void bighelpmessage()
+Static void bighelpmessage(void)
{
helpmessage();
printf("\nMTXFILE: name of .mtx file without its extension\n");
@@ -133,8 +149,7 @@ Static Void bighelpmessage()
}
-Void processOption(j)
-Char j;
+void processOption(Char j)
{
switch (j) {
@@ -209,8 +224,7 @@ struct LOC_OpenFiles {
Char basename[256];
} ;
-Local Void checkExistingFile(LINK)
-struct LOC_OpenFiles *LINK;
+Local void checkExistingFile(struct LOC_OpenFiles *LINK)
{
FILE *tryfile;
Char tryfile_NAME[_FNSIZE];
@@ -229,7 +243,7 @@ struct LOC_OpenFiles *LINK;
}
-Void OpenFiles()
+void OpenFiles(void)
{
struct LOC_OpenFiles V;
short i, j, l;
@@ -297,7 +311,7 @@ Void OpenFiles()
}
-Void CloseFiles()
+void CloseFiles(void)
{
if (outfile != NULL)
fclose(outfile);
@@ -311,10 +325,7 @@ Void CloseFiles()
}
-Void readParagraph(P, no, L)
-Char (*P)[256];
-short *no;
-paragraph_index0 *L;
+void readParagraph(Char (*P)[256], short *no, paragraph_index0 *L)
{
boolean another;
Char filename[256], buffer[256];
diff --git a/Build/source/utils/m-tx/mtx-0.60d/files.h b/Build/source/utils/m-tx/mtx-src/files.h
index 66e978f78ca..3f6381db489 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/files.h
+++ b/Build/source/utils/m-tx/mtx-src/files.h
@@ -20,15 +20,15 @@
# 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();
+extern void readParagraph(Char (*P)[256], short *no, paragraph_index0 *L);
+extern boolean styleFileFound(void);
+extern void processOption(Char j);
+extern void OpenFiles(void);
+extern void CloseFiles(void);
+extern void putLine(Char *line);
+extern void put(Char *line, boolean putspace_);
+extern void TeXtype2(Char *s);
+extern boolean endOfInfile(void);
#undef vextern
diff --git a/Build/source/utils/m-tx/mtx-0.60d/files.pas b/Build/source/utils/m-tx/mtx-src/files.pas
index 8762f7e6e2d..446a7041508 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/files.pas
+++ b/Build/source/utils/m-tx/mtx-src/files.pas
@@ -11,7 +11,7 @@ procedure OpenFiles;
procedure CloseFiles;
procedure putLine (line: string);
procedure put(line: string; putspace: boolean);
-procedure tex3 (s: string);
+procedure TeXtype2 (s: string);
function endOfInfile: boolean;
implementation uses control, strings, utility;
@@ -24,11 +24,23 @@ var teststyle: integer;
function endOfInfile: boolean;
begin endOfInfile:=eofAll; end;
-procedure tex3 (s: string);
+procedure putTeXlines(s: string);
+ var p: integer;
+begin p:=pos1(#10,s);
+ while p>0 do
+ begin
+ putLine('\'+substr(s,1,p-1)+'\');
+ predelete(s,p);
+ p:=pos1(#10,s)
+ end;
+ if length(s)>0 then putLine('\'+s+'\');
+end;
+
+procedure TeXtype2 (s: string);
begin
if pmx_preamble_done then
if s[1]='%' then putLine(s)
- else if first_paragraph then putLine('\'+s+'\')
+ else if first_paragraph then putTeXLines(s)
else putLine('\\'+s+'\')
else putLine(s);
end;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/globals.c b/Build/source/utils/m-tx/mtx-src/globals.c
index eba3ab3e00d..1e5a27d93c6 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/globals.c
+++ b/Build/source/utils/m-tx/mtx-src/globals.c
@@ -2,8 +2,8 @@
/* From input file "globals.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define GLOBALS_G
#include "globals.h"
@@ -34,22 +34,19 @@ boolean ignore_input = false;
#endif
-boolean isNoteOrRest(w)
-Char *w;
+boolean isNoteOrRest(Char *w)
{
return (pos1(w[0], has_duration) > 0);
}
-boolean isPause(note)
-Char *note;
+boolean isPause(Char *note)
{
return (startsWith(note, pause));
}
-Void cancel(num, denom, lowest)
-short *num, *denom, lowest;
+void cancel(short *num, short *denom, short lowest)
{
while (((*num) & 1) == 0 && *denom > lowest) {
*num /= 2;
@@ -58,9 +55,8 @@ short *num, *denom, lowest;
}
-Char *meterWord(Result, num, denom, pnum, pdenom)
-Char *Result;
-short num, denom, pnum, pdenom;
+Char *meterWord(Char *Result, short num, short denom, short pnum,
+ short pdenom)
{
Char STR1[256], STR2[256], STR4[256], STR5[256];
@@ -71,10 +67,7 @@ short num, denom, pnum, pdenom;
}
-Char *meterChange(Result, n1, n2, blind)
-Char *Result;
-short n1, n2;
-boolean blind;
+Char *meterChange(Char *Result, short n1, short n2, boolean blind)
{
short f = 64;
short l;
@@ -92,8 +85,7 @@ boolean blind;
}
-Void setSpace(line_)
-Char *line_;
+void setSpace(Char *line_)
{
Char line[256];
short i = 0;
@@ -110,9 +102,7 @@ Char *line_;
}
-Static Void onumber(s, j, n1)
-Char *s;
-short *j, *n1;
+Static void onumber(Char *s, short *j, short *n1)
{
if (s[*j - 1] == 'o')
*n1 = 1;
@@ -125,9 +115,7 @@ short *j, *n1;
}
-Static Void extractNumber(s, k)
-Char *s;
-short *k;
+Static void extractNumber(Char *s, short *k)
{
Char w[256];
@@ -136,9 +124,8 @@ short *k;
}
-Static Void readMeter(meter_, meternum, meterdenom, pmnum, pmdenom)
-Char *meter_;
-short *meternum, *meterdenom, *pmnum, *pmdenom;
+Static void readMeter(Char *meter_, short *meternum, short *meterdenom,
+ short *pmnum, short *pmdenom)
{
Char meter[256];
short j;
@@ -166,9 +153,8 @@ short *meternum, *meterdenom, *pmnum, *pmdenom;
}
-Void getMeter(line_, meternum, meterdenom, pmnum, pmdenom)
-Char *line_;
-short *meternum, *meterdenom, *pmnum, *pmdenom;
+void getMeter(Char *line_, short *meternum, short *meterdenom, short *pmnum,
+ short *pmdenom)
{
Char line[256];
Char meter[256];
@@ -198,8 +184,7 @@ short *meternum, *meterdenom, *pmnum, *pmdenom;
}
-Static short whereInParagraph(l)
-short l;
+Static short whereInParagraph(short l)
{
short Result = 0;
short j, FORLIM;
@@ -213,24 +198,25 @@ short l;
}
-Void fatalerror(message)
-Char *message;
+void fatalerror(Char *message)
{
setFeature("ignoreErrors", false);
error(message, !print);
}
-Void error(message, printLine)
-Char *message;
-boolean printLine;
+void error(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(orig_P[j-1]);
+ printf("%s: ERROR on line %d\n", message, line_no);
+ if (j > 0 && printLine) {
+ printf("The line has been modified internally to:\n");
puts(P[j-1]);
+ }
if (ignoreErrors())
return;
if (outfile_open) {
@@ -249,9 +235,7 @@ boolean printLine;
}
-Void warning(message, printLine)
-Char *message;
-boolean printLine;
+void warning(Char *message, boolean printLine)
{
short j;
@@ -268,15 +252,13 @@ boolean printLine;
}
-short PMXinstr(stave)
-short stave;
+short PMXinstr(short stave)
{
return (ninstr - instr[stave-1] + 1);
}
-Void setDefaultDuration(meterdenom)
-short meterdenom;
+void setDefaultDuration(short meterdenom)
{
switch (meterdenom) {
@@ -311,8 +293,7 @@ short meterdenom;
}
-short PMXmeterdenom(denom)
-short denom;
+short PMXmeterdenom(short denom)
{
short Result;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/globals.h b/Build/source/utils/m-tx/mtx-src/globals.h
index 1e0988edf25..415383c1c18 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/globals.h
+++ b/Build/source/utils/m-tx/mtx-src/globals.h
@@ -57,7 +57,6 @@
#define comma ','
#define colon ':'
#define tilde '~'
-#define atsign '@'
#define dummy '\0'
#define ndurs 8
@@ -117,7 +116,7 @@ vextern short one_beat, full_bar, line_no, short_note, musicsize, meternum,
nleft;
vextern paragraph_index0 para_len;
vextern double xmtrnum0;
-vextern paragraph P;
+vextern paragraph P, orig_P;
vextern line_nos orig_line_no;
vextern FILE *infile, *outfile, *stylefile;
vextern Char default_duration;
@@ -129,22 +128,22 @@ 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));
+extern void error(Char *message, boolean printLine);
+extern void fatalerror(Char *message);
+extern void warning(Char *message, boolean printLine);
+extern short PMXinstr(short stave);
+extern void setDefaultDuration(short meterdenom);
+extern void getMeter(Char *line, short *meternum, short *meterdenom,
+ short *pmnum, short *pmdenom);
+extern void setSpace(Char *line);
+extern Char *meterChange(Char *Result, short n1, short n2, boolean blind);
+extern Char *meterWord(Char *Result, short num, short denom, short pnum,
+ short pdenom);
+extern void cancel(short *num, short *denom, short lowest);
+extern boolean isNoteOrRest(Char *w);
+extern boolean isPause(Char *note);
/* CMO: */
-extern short PMXmeterdenom PP((int denom));
+extern short PMXmeterdenom(short denom);
#undef vextern
diff --git a/Build/source/utils/m-tx/mtx-0.60d/globals.pas b/Build/source/utils/m-tx/mtx-src/globals.pas
index ad53376438f..bf72e3dee03 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/globals.pas
+++ b/Build/source/utils/m-tx/mtx-src/globals.pas
@@ -4,6 +4,8 @@ unit globals;
2. Miscellaneous other procedures required by several Units.
}
+{ CMO: addition/change by Christian Mondrup }
+
interface
const PMXlinelength = 128;
@@ -43,7 +45,6 @@ const PMXlinelength = 128;
comma = ',';
colon = ':';
tilde = '~';
- atsign = '@';
dummy = #0;
ndurs = 8;
@@ -89,7 +90,7 @@ var voice_label: array[voice_index] of string;
bar_no, pickup, nbars, nleft: integer;
para_len: paragraph_index0;
xmtrnum0: real;
- P: paragraph;
+ P, orig_P: paragraph;
orig_line_no: line_nos;
infile, outfile, stylefile: text;
default_duration: char;
@@ -110,6 +111,8 @@ 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;
+{ CMO: }
+function PMXmeterdenom(denom: integer): integer;
implementation uses strings, control, utility;
@@ -134,11 +137,14 @@ function meterChange(n1, n2: integer; blind: boolean): string;
begin
if blind then
begin f:=64; l:=n1 * (64 div n2);
- cancel(l,f,meterdenom); meterChange := meterWord (l,f,0,0);
+ cancel(l,f,meterdenom);
+ { CMO: process denominator value with function PMXmeterdenom }
+ meterChange := meterWord (l,PMXmeterdenom(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);
+ { CMO: process denominator value with function PMXmeterdenom }
+ else meterChange := meterWord(n1,PMXmeterdenom(n2),0,0);
end;
procedure setSpace(line: string);
@@ -192,6 +198,9 @@ begin meter:=GetNextWord(line,blank,dummy);
else readMeter(meter,meternum,meterdenom,pmnum,pmdenom);
if meterdenom=0 then Error
(meter+': Meter denominator must be nonzero',print);
+ { CMO: Convert PMX syntax meter denominator '0' to '1' to be used for
+ prepmx duration checks }
+ { if meterdenom=0 then meterdenom:=1; }
end;
function whereInParagraph(l: integer): integer;
@@ -207,8 +216,14 @@ begin setFeature('ignoreErrors',false); error(message,not print) end;
procedure error(message: string; printline: boolean);
var j: integer;
begin
+ j:=whereInParagraph(line_no); if (j>0) and printline then
+ writeln(orig_P[j]);
writeln (message, ': ERROR on line ', line_no);
- j:=whereInParagraph(line_no); if (j>0) and printline then writeln(P[j]);
+ if (j>0) and printline then
+ begin
+ writeln ('The line has been modified internally to:');
+ writeln(P[j]);
+ end;
if not ignoreErrors then
begin if outfile_open then
begin close(outfile); rewrite(outfile); close(outfile); end;
@@ -244,4 +259,17 @@ begin
end;
end;
+function PMXmeterdenom(denom: integer): integer;
+begin
+ { CMO: Convert M-Tx meter denominators to PMX syntax }
+ case denom of
+ 1 : PMXmeterdenom:=0;
+ 16 : PMXmeterdenom:=1;
+ 32 : PMXmeterdenom:=3;
+ 64 : PMXmeterdenom:=6;
+ else
+ PMXmeterdenom:=denom;
+ end;
+end;
+
end.
diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h b/Build/source/utils/m-tx/mtx-src/libp2c/p2c.h
index 03b95201794..03b95201794 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2c.h
+++ b/Build/source/utils/m-tx/mtx-src/libp2c/p2c.h
diff --git a/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c b/Build/source/utils/m-tx/mtx-src/libp2c/p2clib.c
index 98a00edf41b..98a00edf41b 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/libp2c/p2clib.c
+++ b/Build/source/utils/m-tx/mtx-src/libp2c/p2clib.c
diff --git a/Build/source/utils/m-tx/mtx-0.60d/lyrics.c b/Build/source/utils/m-tx/mtx-src/lyrics.c
index c38cdeffddf..4c56ea18a3d 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/lyrics.c
+++ b/Build/source/utils/m-tx/mtx-src/lyrics.c
@@ -2,8 +2,8 @@
/* From input file "lyrics.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define LYRICS_G
#include "lyrics.h"
@@ -110,8 +110,7 @@ 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 hasVerseNumber(voice_index voice)
{
boolean Result;
@@ -121,8 +120,7 @@ voice_index voice;
}
-Static boolean isNumberedLyricsParagraph(tag)
-Char *tag;
+Static boolean isNumberedLyricsParagraph(Char *tag)
{
short i, FORLIM;
@@ -135,8 +133,7 @@ Char *tag;
}
-Static boolean anyTagNumbered(tags_)
-Char *tags_;
+Static boolean anyTagNumbered(Char *tags_)
{
boolean Result;
Char tags[256];
@@ -158,8 +155,7 @@ Char *tags_;
/* Save the tag in the numberedParagraph list, stripping off braces if any */
-Static Void markNumbered(tag_)
-Char *tag_;
+Static void markNumbered(Char *tag_)
{
Char tag[256];
@@ -179,7 +175,7 @@ Char *tag_;
/* --- end of procedures to keep track of verse numbering --- */
-Void lyricsParagraph()
+void lyricsParagraph(void)
{
Char first[256], w[256];
paragraph_index0 l, line;
@@ -194,6 +190,8 @@ Void lyricsParagraph()
if (!doLyrics())
return;
+ if (para_len < 2)
+ fatalerror("empty lyrics paragraph");
NextWord(w, P[0], blank, dummy);
l = strlen(w);
line_no = orig_line_no[0];
@@ -207,7 +205,7 @@ Void lyricsParagraph()
sprintf(w, "{%s", strcpy(STR1, w));
nother++;
GetNextWord(other_[nother-1], w, dummy, '}');
-/* p2c: lyrics.pas, line 122:
+/* p2c: lyrics.pas, line 123:
* Note: Possible string truncation in assignment [145] */
}
if (beVerbose()) {
@@ -220,9 +218,9 @@ Void lyricsParagraph()
sprintf(STR5, "%c Paragraph %s line %s bar %s",
comment, toString(STR1, paragraph_no), toString(STR3, line_no),
toString(STR4, bar_no));
- tex3(STR5);
+ TeXtype2(STR5);
sprintf(STR3, "\\mtxSetLyrics%s{%%", first);
- tex3(STR3);
+ TeXtype2(STR3);
FORLIM = para_len;
for (line = 2; line <= FORLIM; line++) {
lyrTranslate(P[line-1], &numbered);
@@ -261,14 +259,12 @@ Void lyricsParagraph()
}
for (i = 0; i <= nother - 1; i++) {
sprintf(STR1, "\\mtxCopyLyrics%s%s", first, other_[i]);
- tex3(STR1);
+ TeXtype2(STR1);
}
}
-Static Char *songraise(Result, voice)
-Char *Result;
-voice_index voice;
+Static Char *songraise(Char *Result, voice_index voice)
{
Char s[256];
lyrtagtype *WITH;
@@ -292,9 +288,7 @@ voice_index voice;
}
-Char *lyricsReport(Result, voice)
-Char *Result;
-voice_index voice;
+Char *lyricsReport(Char *Result, voice_index voice)
{
Char l[256];
lyrtagtype *WITH;
@@ -320,7 +314,7 @@ voice_index voice;
}
-Void initLyrics()
+void initLyrics(void)
{
/* at the start only */
stave_index stave;
@@ -349,9 +343,7 @@ Void initLyrics()
}
-Static Void registerLyrics(voice, w)
-voice_index voice;
-Char *w;
+Static void registerLyrics(voice_index voice, Char *w)
{
lyrtagtype *WITH;
@@ -376,9 +368,7 @@ Char *w;
}
-Void extractLyrtag(voice, note)
-voice_index voice;
-Char *note;
+void extractLyrtag(voice_index voice, Char *note)
{
/* inline lyrics change */
lyrtagtype *WITH;
@@ -399,7 +389,7 @@ Char *note;
}
-Void clearTags()
+void clearTags(void)
{
/* at start of paragraph analyis */
voice_index voice, FORLIM;
@@ -419,10 +409,7 @@ Void clearTags()
#define maxlyrlen (PMXlinelength - 15)
-Local Void convertlyrics(lyn, voice, mx)
-Char *lyn;
-voice_index voice;
-auxtype mx;
+Local void convertlyrics(Char *lyn, voice_index voice, auxtype mx)
{
static Char setlyr[256] = "%%\\\\\\mtxSetLyrics";
Char btag[256], thistag[256], w[256];
@@ -466,10 +453,7 @@ auxtype mx;
#undef maxlyrlen
-Void maybeLyrics(voice, parline, w_)
-voice_index voice;
-paragraph_index parline;
-Char *w_;
+void maybeLyrics(voice_index voice, paragraph_index parline, Char *w_)
{
/* during paragraph analysis, parline had L:, already stripped */
Char w[256];
@@ -497,7 +481,7 @@ Char *w_;
}
-Void reviseLyrics()
+void reviseLyrics(void)
{
/* after paragraph analysis */
voice_index voice;
@@ -531,9 +515,7 @@ Void reviseLyrics()
}
-Void assignLyrics(stave, lyrassign)
-stave_index stave;
-Char *lyrassign;
+void assignLyrics(stave_index stave, Char *lyrassign)
{
/* at start of new block */
Char atag[256], instr[256], l[256];
@@ -592,9 +574,7 @@ Char *lyrassign;
}
-Void lyricsAdjust(voice, note)
-voice_index voice;
-Char *note;
+void lyricsAdjust(voice_index voice, Char *note)
{
/* inline at-word */
short adj;
@@ -637,9 +617,7 @@ Char *note;
}
-Void lyrTranslate(P, numbered)
-Char *P;
-boolean *numbered;
+void lyrTranslate(Char *P, boolean *numbered)
{ /* Test for starting number */
short k, l, number;
Char Q[256], w[256];
@@ -671,9 +649,7 @@ typedef enum {
} melismaEnd;
-Static Char removeLast(s, t)
-Char *s;
-Char *t;
+Static Char removeLast(Char *s, Char *t)
{
Char Result;
short i, l;
@@ -690,8 +666,7 @@ Char *t;
}
-Static boolean OpenMelisma(s)
-Char *s;
+Static boolean OpenMelisma(Char *s)
{
return (pos1(slur_melisma, s) > 0 || pos1(beam_melisma, s) > 0);
}
@@ -703,9 +678,7 @@ struct LOC_getSyllable {
boolean BM, EM;
} ;
-Local Void startMelismas(t, LINK)
-Char *t;
-struct LOC_getSyllable *LINK;
+Local void startMelismas(Char *t, struct LOC_getSyllable *LINK)
{
boolean open_before, open_now;
short i, k;
@@ -721,9 +694,7 @@ struct LOC_getSyllable *LINK;
}
}
-Local boolean endMelisma(voice, LINK)
-short voice;
-struct LOC_getSyllable *LINK;
+Local boolean endMelisma(short voice, struct LOC_getSyllable *LINK)
{
Char found;
short i;
@@ -736,7 +707,7 @@ struct LOC_getSyllable *LINK;
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)) {
+ for (t = beam; t <= slur; t = (melismaEnd)((long)t + 1)) {
FORLIM1 = count[(long)t];
for (i = 1; i <= FORLIM1; i++) {
WITH = &lyrinfo[voice-1];
@@ -763,9 +734,7 @@ struct LOC_getSyllable *LINK;
return LINK->EM;
}
-Local Void startSlurMelisma(voice, LINK)
-voice_index voice;
-struct LOC_getSyllable *LINK;
+Local void startSlurMelisma(voice_index voice, struct LOC_getSyllable *LINK)
{
static Char start[2] = {
slur_melisma, inhibit_slur_melisma
@@ -783,9 +752,7 @@ struct LOC_getSyllable *LINK;
startMelismas(slurs, LINK);
}
-Local Void startBeamMelisma(voice, LINK)
-voice_index voice;
-struct LOC_getSyllable *LINK;
+Local void startBeamMelisma(voice_index voice, struct LOC_getSyllable *LINK)
{
static Char start[2] = {
beam_melisma, inhibit_beam_melisma
@@ -802,9 +769,7 @@ struct LOC_getSyllable *LINK;
startMelismas(beams, LINK);
}
-Local boolean startMelisma(voice, LINK)
-short voice;
-struct LOC_getSyllable *LINK;
+Local boolean startMelisma(short voice, struct LOC_getSyllable *LINK)
{
LINK->BM = false;
startSlurMelisma(voice, LINK);
@@ -814,9 +779,7 @@ struct LOC_getSyllable *LINK;
/* Append mtxBM or mtxEM to pretex when appropriate */
-Void getSyllable(voice_, pretex)
-voice_index voice_;
-Char *pretex;
+void getSyllable(voice_index voice_, Char *pretex)
{
struct LOC_getSyllable V;
short t;
@@ -849,9 +812,7 @@ Char *pretex;
}
-Static Void getSyllable1(voice, pretex)
-voice_index voice;
-Char *pretex;
+Static void getSyllable1(voice_index voice, Char *pretex)
{
lyrinfotype *WITH;
diff --git a/Build/source/utils/m-tx/mtx-src/lyrics.h b/Build/source/utils/m-tx/mtx-src/lyrics.h
new file mode 100644
index 00000000000..89ab1532cb6
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/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(void);
+extern void clearTags(void);
+extern void reviseLyrics(void);
+extern void lyrTranslate(Char *P, boolean *numbered);
+extern void getSyllable(voice_index voice, Char *pretex);
+extern Char *lyricsReport(Char *Result, voice_index voice);
+extern void maybeLyrics(voice_index voice, paragraph_index parline, Char *w);
+extern void extractLyrtag(voice_index voice, Char *note);
+extern void lyricsAdjust(voice_index voice, Char *note);
+extern void assignLyrics(stave_index stave, Char *lyrassign);
+extern void lyricsParagraph(void);
+extern boolean hasVerseNumber(voice_index 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-src/lyrics.pas
index 14d7f5046eb..51253b222d7 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/lyrics.pas
+++ b/Build/source/utils/m-tx/mtx-src/lyrics.pas
@@ -113,6 +113,7 @@ procedure lyricsParagraph;
other: array[other_index] of string[lyrtaglength];
numbered: boolean;
begin if not doLyrics then exit;
+ if para_len<2 then fatalerror('empty lyrics paragraph');
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;
@@ -126,9 +127,9 @@ begin if not doLyrics then exit;
' has lyrics headed ',first);
for i:=1 to nother do write('=',other[i]); writeln;
end;
- tex3(comment+' Paragraph '+toString(paragraph_no)+' line '+
+ TeXtype2(comment+' Paragraph '+toString(paragraph_no)+' line '+
toString(line_no)+' bar '+toString(bar_no));
- tex3('\mtxSetLyrics'+first+'{%');
+ TeXtype2('\mtxSetLyrics'+first+'{%');
for line:=2 to para_len do
begin lyrTranslate(P[line],numbered);
if numbered then if (line>2) then warning(
@@ -149,7 +150,7 @@ begin if not doLyrics then exit;
else if pmx_preamble_done then putLine('}\')
else putLine('}')
end;
- for i:=1 to nother do tex3('\mtxCopyLyrics'+first+other[i]);
+ for i:=1 to nother do TeXtype2('\mtxCopyLyrics'+first+other[i]);
end;
function songraise(voice: voice_index): string;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtx.c b/Build/source/utils/m-tx/mtx-src/mtx.c
index f4a85564092..12d9c089e5d 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/mtx.c
+++ b/Build/source/utils/m-tx/mtx-src/mtx.c
@@ -2,8 +2,8 @@
/* From input file "mtx.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define MTX_G
#include "mtx.h"
@@ -39,8 +39,7 @@ typedef boolean sticky['z' + 1 - 'a'];
Static sticky note_attrib[maxvoices], rest_attrib[maxvoices];
-Static short logTwo(denom)
-short denom;
+Static short logTwo(short denom)
{
short l = 0;
@@ -52,8 +51,7 @@ short denom;
}
-Local boolean dotted(n)
-short n;
+Local boolean dotted(short n)
{
boolean Result;
@@ -71,10 +69,7 @@ short n;
/* 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 *rests(Char *Result, short len, short meterdenom, boolean blind)
{
Char r[256], bl[256];
Char STR1[256];
@@ -107,9 +102,7 @@ boolean blind;
}
-Local Char *attribs(Result, note)
-Char *Result;
-Char *note;
+Local Char *attribs(Char *Result, Char *note)
{
Char a[256];
short i = 2;
@@ -130,9 +123,7 @@ Char *note;
}
-Static Void checkSticky(note, attrib)
-Char *note;
-boolean *attrib;
+Static void checkSticky(Char *note, boolean *attrib)
{
short i = 2;
short l;
@@ -166,9 +157,7 @@ boolean *attrib;
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;
+void checkOctave(voice_index voice, Char *note)
{
Char code;
@@ -192,13 +181,12 @@ Char *note;
if (code != ' ')
error3(voice, "You may have only one absolute octave assignment");
insertOctaveCode(octave(voice), note);
+ checkRange(voice, note);
resetOctave(voice);
}
-Void markDebeamed(voice, note)
-voice_index voice;
-Char *note;
+void markDebeamed(voice_index voice, Char *note)
{
if (isVocal(voice) && afterSlur(voice) == 0 && unbeamVocal() &&
pos1(duration(voice), flagged) > 0)
@@ -206,8 +194,7 @@ Char *note;
}
-Static short barLength(meter)
-Char *meter;
+Static short barLength(Char *meter)
{
short n1, n2, pn1, pn2;
@@ -216,8 +203,7 @@ Char *meter;
}
-Static boolean isMultiBarRest(rest_)
-Char *rest_;
+Static boolean isMultiBarRest(Char *rest_)
{
boolean Result;
@@ -254,8 +240,7 @@ struct LOC_scanMusic {
Char macro_type;
} ;
-Local Void decmulti(LINK)
-struct LOC_scanMusic *LINK;
+Local void decmulti(struct LOC_scanMusic *LINK)
{
if (LINK->doublex)
LINK->nmulti -= 2;
@@ -268,17 +253,14 @@ struct LOC_countIt {
struct LOC_scanMusic *LINK;
} ;
-Local Void incbar(nl, LINK)
-short nl;
-struct LOC_countIt *LINK;
+Local void incbar(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;
+Local void countIt(struct LOC_scanMusic *LINK)
{
struct LOC_countIt V;
@@ -295,7 +277,7 @@ struct LOC_scanMusic *LINK;
(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:
+/* p2c: mtx.pas, line 150:
* Note: Using % for possibly-negative arguments [317] */
incbar(LINK->count, &V);
LINK->l = pos1(multi_group, LINK->note);
@@ -306,8 +288,7 @@ struct LOC_scanMusic *LINK;
decmulti(LINK);
}
-Local Void maybeGroup(LINK)
-struct LOC_scanMusic *LINK;
+Local void maybeGroup(struct LOC_scanMusic *LINK)
{
if (LINK->note[0] != grace_group)
return;
@@ -320,9 +301,7 @@ struct LOC_scanMusic *LINK;
LINK->ngrace--;
}
-Local short identifyMacro(s_, LINK)
-Char *s_;
-struct LOC_scanMusic *LINK;
+Local short identifyMacro(Char *s_, struct LOC_scanMusic *LINK)
{
Char s[256];
short k;
@@ -336,8 +315,7 @@ struct LOC_scanMusic *LINK;
return 0;
}
-Local Void examineMacro(LINK)
-struct LOC_scanMusic *LINK;
+Local void examineMacro(struct LOC_scanMusic *LINK)
{
if (!countMacro())
return;
@@ -377,9 +355,7 @@ struct LOC_scanMusic *LINK;
}
-Void scanMusic(voice_, left_over)
-voice_index voice_;
-short *left_over;
+void scanMusic(voice_index voice_, short *left_over)
{
struct LOC_scanMusic V;
Char buf[256], enote[256], xnote[256];
@@ -477,7 +453,7 @@ short *left_over;
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:
+/* p2c: mtx.pas, line 268:
* Note: Using % for possibly-negative arguments [317] */
}
} while (!done);
@@ -487,7 +463,7 @@ short *left_over;
}
-Void initMTX()
+void initMTX(void)
{
voice_index i;
Char j;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtx.h b/Build/source/utils/m-tx/mtx-src/mtx.h
index 9c4a9811883..a056afd9b3a 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/mtx.h
+++ b/Build/source/utils/m-tx/mtx-src/mtx.h
@@ -16,11 +16,11 @@
# 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();
+extern void scanMusic(voice_index voice, short *left_over);
+extern void markDebeamed(voice_index voice, Char *note);
+extern void checkOctave(voice_index voice, Char *note);
+extern Char *rests(Char *Result, short len, short meterdenom, boolean blind);
+extern void initMTX(void);
#undef vextern
diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtx.pas b/Build/source/utils/m-tx/mtx-src/mtx.pas
index 474b24521a3..0b1b1042cd4 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/mtx.pas
+++ b/Build/source/utils/m-tx/mtx-src/mtx.pas
@@ -94,7 +94,9 @@ 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)
+ insertOctaveCode(octave(voice),note);
+ checkRange(voice,note);
+ resetOctave(voice)
end;
procedure markDebeamed(voice: voice_index; var note: string);
@@ -241,7 +243,7 @@ begin
end;
appendToLine(voice,enote);
if note='' then done:=true; { !!! else word_bound[here]:=length(line); }
- if (note=barsym) then
+ 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)
diff --git a/Build/source/utils/m-tx/mtx-src/mtx.test b/Build/source/utils/m-tx/mtx-src/mtx.test
new file mode 100644
index 00000000000..e9f2e4259c5
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/mtx.test
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+# Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
+# 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/mtxline.c b/Build/source/utils/m-tx/mtx-src/mtxline.c
index f61cee0e24d..b08eef73777 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/mtxline.c
+++ b/Build/source/utils/m-tx/mtx-src/mtxline.c
@@ -4,7 +4,6 @@
#include "p2c.h"
-
#define MTXLINE_G
#include "mtxline.h"
@@ -40,7 +39,7 @@ typedef struct line_info {
short extra;
boolean vocal;
word_index0 bar_bound[max_bars + 1];
- short word_bound[max_words + 1];
+ short word_bound[max_words + 1], orig_word_bound[max_words + 1];
word_scan scan;
} line_info;
@@ -230,6 +229,7 @@ void resetInfo(voice_index voice, Char *buf)
*P[WITH->mus - 1] = '\0';
WITH->bar_bound[0] = 0;
WITH->word_bound[0] = 0;
+ WITH->orig_word_bound[0] = 0;
WITH->nbar = 0;
WITH->here = 0;
}
@@ -270,6 +270,8 @@ void appendToLine(voice_index voice, Char *note)
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]);
+ WITH->orig_word_bound[WITH->here] = nextWordBound(orig_P[WITH->mus - 1],
+ note[0], WITH->orig_word_bound[WITH->here - 1]);
}
@@ -298,9 +300,9 @@ void barForward(voice_index voice, short nbars)
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)
+ if (WITH->nbar + nbars > max_bars)
error3(voice, "Bars per line limit exceeded");
+ WITH->nbar += nbars;
if (nbars > 0)
WITH->bar_bound[WITH->nbar] = WITH->here;
}
@@ -347,11 +349,15 @@ voice_index0 findVoice(Char *w_)
Static void info3(voice_index voice)
{
+ short p;
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], ' ');
+ p = WITH->orig_word_bound[WITH->here - 1] - 1;
+ if (p < 0)
+ p = 0;
+ printf("%*cV\n", p, ' ');
}
@@ -512,7 +518,7 @@ Local void expandThisMacro(struct LOC_getNextMusWord *LINK)
error("Can't terminate a macro that has not been started", print);
playID = identifyMacro(LINK->note);
toString(playtag, playID);
-/* p2c: mtxline.pas, line 310:
+/* p2c: mtxline.pas, line 317:
* Note: Possible string truncation in assignment [145] */
if (playID < 1 || playID > 99) {
sprintf(STR2, "Macro ID %s is not in range 1..99", playtag);
@@ -526,10 +532,11 @@ Local void expandThisMacro(struct LOC_getNextMusWord *LINK)
warning(STR3, print);
}
if (strlen(macro_text[playID-1]) + strlen(LINK->buf) <= 255) {
- if (debugMode())
+ if (debugMode()) {
printf("Inserting macro %s text \"%s\"\n",
playtag, macro_text[playID-1]);
- printf("Buffer before insert: %s\n", LINK->buf);
+ printf("Buffer before insert: %s\n", LINK->buf);
+ }
sprintf(LINK->buf, "%s%s",
macro_text[playID-1], strcpy(STR5, LINK->buf));
return;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtxline.h b/Build/source/utils/m-tx/mtx-src/mtxline.h
index 23fc05be32c..23fc05be32c 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/mtxline.h
+++ b/Build/source/utils/m-tx/mtx-src/mtxline.h
diff --git a/Build/source/utils/m-tx/mtx-0.60d/mtxline.pas b/Build/source/utils/m-tx/mtx-src/mtxline.pas
index cd3e0b27bcc..5f6e4062fde 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/mtxline.pas
+++ b/Build/source/utils/m-tx/mtx-src/mtxline.pas
@@ -7,14 +7,14 @@ interface uses globals;
type
music_word = (other, abcdefg, zword, lyrtag,
lparen, rparen, rlparen, lbrac, rbrac,
- pmxl, macro, endmacro, mword, oword, rword, nextvoice,
+ pmxprefix, 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,
+ true, true, false, true, false, true, false, true,
false, false, false, false, false );
{ changed bind_left[barword] to false }
@@ -70,7 +70,7 @@ const
name: array[music_word] of string[9] = (
'?', 'note', 'znote', 'lyricsTag',
'(', ')', ')(', '[', ']',
- 'PMX<', 'macro', 'endMacro', 'meter', 'ornament', 'rest', '//',
+ '_','PMX<', 'macro', 'endMacro', 'meter', 'ornament', 'rest', '//',
'BAR', 'TeX', '@', 'firstonly', 'ERROR');
type
@@ -83,7 +83,7 @@ type
extra: integer;
vocal: boolean;
bar_bound: array[bar_index0] of word_index0;
- word_bound: array[word_index0] of integer;
+ word_bound, orig_word_bound: array[word_index0] of integer;
scan: word_scan;
end;
@@ -175,7 +175,8 @@ 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;
+ bar_bound[0]:=0; word_bound[0]:=0; orig_word_bound[0]:=0;
+ nbar:=0; here := 0;
end;
end;
@@ -194,7 +195,10 @@ 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;
+ begin P[mus]:=P[mus]+note+blank; word_bound[here]:=length(P[mus]);
+ orig_word_bound[here]:=nextWordBound(orig_P[mus],note[1],
+ orig_word_bound[here-1]);
+ end;
end;
procedure markBar(voice: voice_index);
@@ -209,8 +213,8 @@ 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');
+ if nbar+nbars>max_bars then error3(voice,'Bars per line limit exceeded');
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;
@@ -233,10 +237,13 @@ begin curtail(w,':'); findVoice:=0;
end;
procedure info3(voice: voice_index);
+ var p: integer;
begin with info[voice] do
begin
writeln ('In voice "', voice_label[voice], '" near word ', here, ':');
- writeln(' ':word_bound[here],'V')
+ p:=orig_word_bound[here-1]-1;
+ if p<0 then p:=0;
+ writeln(' ':p,'V')
end
end;
@@ -316,9 +323,11 @@ procedure GetNextMusWord (var buf, note: string; var nscan: music_word);
' 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);
+ else begin if debugMode then
+ begin writeln('Inserting macro '+playtag+' text "'
+ +macro_text[playID]+'"');
+ writeln('Buffer before insert: ',buf)
+ end;
buf:=macro_text[playID]+buf; exit
end
end;
@@ -360,6 +369,7 @@ procedure GetNextMusWord (var buf, note: string; var nscan: music_word);
begin translateSolfa(note[1]); if note[1]='"' then predelete(note,1);
end;
case note[1] of
+'_': begin nscan:=pmxprefix;delete1(note,1); end;
'a'..'g': nscan:=abcdefg;
'z': nscan:=zword;
'(': nscan:=lparen;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/multfile.c b/Build/source/utils/m-tx/mtx-src/multfile.c
index 53d40c9bd09..c61eea649ac 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/multfile.c
+++ b/Build/source/utils/m-tx/mtx-src/multfile.c
@@ -2,8 +2,8 @@
/* From input file "multfile.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define MULTFILE_G
#include "multfile.h"
diff --git a/Build/source/utils/m-tx/mtx-0.60d/multfile.h b/Build/source/utils/m-tx/mtx-src/multfile.h
index aaa094cdae7..aaa094cdae7 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/multfile.h
+++ b/Build/source/utils/m-tx/mtx-src/multfile.h
diff --git a/Build/source/utils/m-tx/mtx-0.60d/multfile.pas b/Build/source/utils/m-tx/mtx-src/multfile.pas
index 6c272992a3f..6c272992a3f 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/multfile.pas
+++ b/Build/source/utils/m-tx/mtx-src/multfile.pas
diff --git a/Build/source/utils/m-tx/mtx-0.60d/notes.c b/Build/source/utils/m-tx/mtx-src/notes.c
index c212896cf90..88d85791bdb 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/notes.c
+++ b/Build/source/utils/m-tx/mtx-src/notes.c
@@ -2,8 +2,8 @@
/* From input file "notes.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define NOTES_G
#include "notes.h"
@@ -31,8 +31,7 @@ typedef struct parsedNote {
} parsedNote;
-Static Void printNote(n)
-parsedNote n;
+Static void printNote(parsedNote n)
{
printf("%c|%s|%s|%s|%s|%s|%s|%s\n",
n.name, n.duration, n.octave, n.accidental, n.whatever, n.dotgroup,
@@ -50,8 +49,7 @@ parsedNote n;
7. Xtuplet group.
*/
-Void translateSolfa(nt)
-Char *nt;
+void translateSolfa(Char *nt)
{
short k;
@@ -63,8 +61,7 @@ Char *nt;
}
-Char durationCode(note)
-Char *note;
+Char durationCode(Char *note)
{
Char Result = unspecified;
Char code;
@@ -78,8 +75,7 @@ Char *note;
}
-Static Char half(dur)
-Char dur;
+Static Char half(Char dur)
{
Char Result;
short k;
@@ -101,9 +97,7 @@ Char dur;
}
-Static Void addDuration(note, dur)
-Char *note;
-Char dur;
+Static void addDuration(Char *note, Char dur)
{
if (insertDuration())
insertChar(dur, note, 2);
@@ -116,9 +110,7 @@ Char dur;
/* Unconditionally extracts the first character. */
-Static Void extractFirst(note, first)
-Char *note;
-Char *first;
+Static void extractFirst(Char *note, Char *first)
{
*first = note[0];
predelete(note, 1);
@@ -127,10 +119,7 @@ Char *first;
/* Extracts at most one of the characters in "hits". */
-Static Void extractOneOf(note, hits, hit)
-Char *note;
-Char *hits;
-Char *hit;
+Static void extractOneOf(Char *note, Char *hits, Char *hit)
{
short i, l;
@@ -149,10 +138,7 @@ Char *hit;
/* 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;
+Static void extractContiguous(Char *note, Char *hits, Char *hit)
{
short i, l, len;
@@ -176,10 +162,7 @@ Char *hit;
/* Extracts the specified character and everything after it. */
-Static Void extractAfter(note, delim, tail)
-Char *note;
-Char delim;
-Char *tail;
+Static void extractAfter(Char *note, Char delim, Char *tail)
{
short newlen;
@@ -191,7 +174,7 @@ Char *tail;
strcpy(tail, note);
predelete(tail, newlen);
note[(long)((int)newlen)] = '\0';
-/* p2c: notes.pas, line 108:
+/* p2c: notes.pas, line 109:
* Note: Modification of string length may translate incorrectly [146] */
}
@@ -199,8 +182,7 @@ Char *tail;
/* 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;
+Static void extractDotShortcut(Char *note, Char *tail)
{
Char names[256], tail2[256];
short l = 1;
@@ -236,8 +218,7 @@ Char *note, *tail;
/* Extracts a signed number. */
-Static Void extractSignedNumber(note, number)
-Char *note, *number;
+Static void extractSignedNumber(Char *note, Char *number)
{
short k;
Char note0[256];
@@ -268,24 +249,20 @@ struct LOC_extractGroup {
boolean probe, nonumber;
} ;
-Local Void tryMore(LINK)
-struct LOC_extractGroup *LINK;
+Local void tryMore(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;
+Local void try_(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;
+Local void tryNumber(struct LOC_extractGroup *LINK)
{
boolean dot_ = false;
@@ -305,10 +282,7 @@ struct LOC_extractGroup *LINK;
/* Extracts a symbol followed by optional +- or <> shift indicators */
-Static Void extractGroup(note, delim, group_)
-Char *note;
-Char delim;
-Char *group_;
+Static void extractGroup(Char *note, Char delim, Char *group_)
{
struct LOC_extractGroup V;
short k0;
@@ -340,16 +314,14 @@ Char *group_;
strcpy(tail, V.group);
V.k--;
V.group[(long)((int)V.k)] = '\0';
-/* p2c: notes.pas, line 169:
+/* p2c: notes.pas, line 170:
* 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;
+Static void parseNote(Char *note_, parsedNote *pnote)
{
Char note[256];
Char onlymidi[256];
@@ -380,7 +352,7 @@ parsedNote *pnote;
if (*pnote->accidental != '\0') {
extractOneOf(note, "ic", onlymidi);
strcat(pnote->accidental, onlymidi);
-/* p2c: notes.pas, line 191:
+/* p2c: notes.pas, line 192:
* Note: Possible string truncation in assignment [145] */
}
extractGroup(note, 'd', pnote->dotgroup);
@@ -393,12 +365,12 @@ parsedNote *pnote;
if (*note != '\0' && isdigit(note[0])) {
sprintf(STR2, "%c%s", note[0], pnote->octave);
strcpy(pnote->octave, STR2);
-/* p2c: notes.pas, line 197:
+/* p2c: notes.pas, line 198:
* Note: Possible string truncation in assignment [145] */
delete1(note, 1);
}
strcpy(pnote->whatever, note);
-/* p2c: notes.pas, line 199:
+/* p2c: notes.pas, line 200:
* Note: Possible string truncation in assignment [145] */
}
@@ -408,10 +380,7 @@ parsedNote *pnote;
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;
+void processNote(Char *note, Char *xnote, Char dur1, Char *dur, short *count)
{
Char sc[3], origdur[3];
short multiplicity, l;
@@ -455,14 +424,14 @@ short *count;
multiplicity++;
predelete(pnote.shortcut, 1);
strcat(sc, ".");
-/* p2c: notes.pas, line 233:
+/* p2c: notes.pas, line 234:
* 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:
+/* p2c: notes.pas, line 237:
* Note: Possible string truncation in assignment [145] */
dur1 = half(dur1);
}
@@ -474,7 +443,7 @@ short *count;
}
if (!insertDuration()) {
strcpy(pnote.duration, origdur);
-/* p2c: notes.pas, line 243:
+/* p2c: notes.pas, line 244:
* Note: Possible string truncation in assignment [145] */
}
if (rearrangeNote())
@@ -486,15 +455,14 @@ short *count;
if (!insertDuration() && *pnote.shortcut != '\0') {
sprintf(STR1, "%s%s", sc, pnote.shortcut);
strcpy(pnote.shortcut, STR1);
-/* p2c: notes.pas, line 248:
+/* p2c: notes.pas, line 249:
* Note: Possible string truncation in assignment [145] */
}
strcpy(xnote, pnote.shortcut);
}
-Char octaveCode(note)
-Char *note;
+Char octaveCode(Char *note)
{ /*if debugMode then write('Octave code in note "',note,'" is ');*/
parsedNote pnote;
@@ -507,9 +475,7 @@ Char *note;
}
-Void removeOctaveCode(code, note)
-Char code;
-Char *note;
+void removeOctaveCode(Char code, Char *note)
{ /*if debugMode then writeln('remove ',code,' from ',note);*/
short k, l;
@@ -526,9 +492,7 @@ Char *note;
}
-Void insertOctaveCode(code, note)
-Char code;
-Char *note;
+void insertOctaveCode(Char code, Char *note)
{ /*if debugMode then writeln('insert ',code,' into ',note); */
short l;
diff --git a/Build/source/utils/m-tx/mtx-src/notes.h b/Build/source/utils/m-tx/mtx-src/notes.h
new file mode 100644
index 00000000000..8806ef868cc
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/notes.h
@@ -0,0 +1,36 @@
+/* Header for module notes, generated by p2c 1.21alpha-07.Dec.93 */
+#ifndef NOTES_H
+#define NOTES_H
+
+
+/*$V-*/
+
+#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(Char *note, Char *xnote, Char dur1, Char *dur,
+ short *count);
+extern Char durationCode(Char *note);
+extern Char octaveCode(Char *note);
+extern void removeOctaveCode(Char code, Char *note);
+extern void insertOctaveCode(Char code, Char *note);
+extern void translateSolfa(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-src/notes.pas
index 3fdb9edb3c2..2f6a01505f5 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/notes.pas
+++ b/Build/source/utils/m-tx/mtx-src/notes.pas
@@ -1,4 +1,5 @@
unit notes;
+{$V-}
interface uses control;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/preamble.c b/Build/source/utils/m-tx/mtx-src/preamble.c
index 53e4a5b4576..15b84b4ee02 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/preamble.c
+++ b/Build/source/utils/m-tx/mtx-src/preamble.c
@@ -4,7 +4,6 @@
#include "p2c.h"
-
#define PREAMBLE_G
#include "preamble.h"
@@ -38,8 +37,6 @@
#endif
-/* fpc mistakenly thinks CONTROL is not used */
-
#define blank_ ' '
#define colon_ ':'
#define semicolon ';'
@@ -49,9 +46,9 @@
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
+ none, title, composer, pmx, tex, options, msize, bars, shortnote, style,
+ sharps, flats, meter, space, pages, systems, width, height, enable, disable,
+ range, name, indent, poet, part, only, octave_, start
} command_type;
typedef enum {
@@ -70,21 +67,25 @@ typedef char style_index0;
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 commands[28][17] = {
+ "NONE", "TITLE", "COMPOSER", "PMX", "TEX", "OPTIONS", "SIZE", "BARS/LINE",
+ "SHORT", "STYLE", "SHARPS", "FLATS", "METER", "SPACE", "PAGES", "SYSTEMS",
+ "WIDTH", "HEIGHT", "ENABLE", "DISABLE", "RANGE", "NAME", "INDENT", "POET",
+ "PART", "ONLY", "OCTAVE", "START"
};
-Static Char cline[24][256] = {
- "", "", "", "", "", "", "", "1/4", "", "0", "", "C", "", "1", "1", "", "",
- "", "", "", "", "", "", ""
+/* short */
+/* systems */
+
+Static Char cline[28][256] = {
+ "", "", "", "", "", "", "", "", "1/4", "", "0", "", "C", "", "1", "1",
+ "190mm", "260mm", "", "", "", "", "", "", "", "", "", ""
};
-Static boolean redefined[24] = {
+Static boolean redefined[28] = {
false, false, false, false, false, false, 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 */
@@ -108,6 +109,7 @@ 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 orig_range_line;
Static short nclefs, n_pages, n_systems, n_sharps, ngroups;
Static Char part_line[256], title_line[256], composer_line[256],
@@ -120,8 +122,7 @@ Static boolean style_supplied;
/* ------------------ Styles ------------------ */
-Static voice_index0 voiceCount(s_)
-Char *s_;
+Static voice_index0 voiceCount(Char *s_)
{
Char s[256];
short i, l;
@@ -136,8 +137,7 @@ Char *s_;
}
-Static style_index0 findStyle(s_)
-Char *s_;
+Static style_index0 findStyle(Char *s_)
{
style_index0 Result = 0;
Char s[256];
@@ -154,8 +154,7 @@ Char *s_;
}
-Static Void addStyle(S)
-Char *S;
+Static void addStyle(Char *S)
{
style_index0 sn;
Char STR1[256];
@@ -173,7 +172,7 @@ Char *S;
}
-Static Void readStyles()
+Static void readStyles(void)
{
boolean eofstyle;
Char S[256];
@@ -199,9 +198,8 @@ Static Void readStyles()
}
-Static Void applyStyle(s_, stylename, first_inst, first_stave)
-Char *s_, *stylename;
-stave_index first_inst, first_stave;
+Static void applyStyle(Char *s_, Char *stylename, stave_index first_inst,
+ stave_index first_stave)
{
Char s[256];
Char clef[256], subline[256], subcommand[256];
@@ -269,7 +267,7 @@ stave_index first_inst, first_stave;
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:
+/* p2c: preamble.pas, line 185:
* Note: Possible string truncation in assignment [145] */
} else {
for (i = first_stave - 1; i <= last_stave - 1; i++)
@@ -290,7 +288,7 @@ stave_index first_inst, first_stave;
}
-Static Void applyStyles()
+Static void applyStyles(void)
{
short n1, n2, sn;
Char s[256];
@@ -318,26 +316,22 @@ Static Void applyStyles()
/* ------------------------------------------------------------- */
-Static Void wipeCommands()
+Static void wipeCommands(void)
{
command_type c;
- for (c = c1; (long)c <= (long)cn; c = (command_type)((long)c + 1))
+ for (c = c1; c <= cn; c = (command_type)((long)c + 1))
*cline[(long)c] = '\0';
}
-boolean omitLine(line)
-paragraph_index line;
+boolean omitLine(paragraph_index line)
{
- if (line == 0)
- return true;
- else
- return (omit_line[line-1]);
+ return (line > 0 && omit_line[line-1]);
}
-Static Void setName()
+Static void setName(void)
{
short i, FORLIM;
@@ -347,28 +341,27 @@ Static Void setName()
FORLIM = ninstr;
for (i = 0; i <= FORLIM - 1; i++) {
GetNextWord(instr_name[i], cline[(long)name], blank_, dummy);
-/* p2c: preamble.pas, line 224:
+/* p2c: preamble.pas, line 226:
* Note: Possible string truncation in assignment [145] */
}
}
-Static Void setIndent()
+Static void setIndent(void)
{
if (redefined[(long)indent])
strcpy(fracindent, cline[(long)indent]);
}
-Static Void setInitOctave()
+Static void setInitOctave(void)
{
if (redefined[(long)octave_])
initOctaves(cline[(long)octave_]);
}
-Local Void checkLabel(w)
-Char *w;
+Local void checkLabel(Char *w)
{
voice_index j, FORLIM;
Char STR1[256], STR2[256];
@@ -395,8 +388,7 @@ Char *w;
}
-Static Void setVoices(line)
-Char *line;
+Static void setVoices(Char *line)
{
short k;
Char s[256], w[256];
@@ -422,7 +414,7 @@ Char *line;
strcpy(voice_label[nvoices-1], w);
if (*instr_name[nstaves-1] == '\0') {
strcpy(instr_name[nstaves-1], w);
-/* p2c: preamble.pas, line 264:
+/* p2c: preamble.pas, line 266:
* Note: Possible string truncation in assignment [145] */
}
setStavePos(nvoices, nstaves, k);
@@ -436,7 +428,7 @@ Char *line;
if (k == 2) {
sprintf(instr_name[nstaves-1], "\\mtxTwoInstruments{%s}{%s}",
voice_label[nvoices-2], voice_label[nvoices-1]);
-/* p2c: preamble.pas, line 271:
+/* p2c: preamble.pas, line 273:
* Note: Possible string truncation in assignment [145] */
}
number_on_stave[nstaves-1] = k;
@@ -448,8 +440,7 @@ Char *line;
}
-Static Void setClefs(line_)
-Char *line_;
+Static void setClefs(Char *line_)
{
Char line[256];
Char s[256];
@@ -469,8 +460,30 @@ Char *line_;
}
-Static Void setSize(line_)
-Char *line_;
+Static void setDimension(Char *line_, command_type lno)
+{
+ Char line[256];
+ short l;
+ short n = 0, p = 0;
+ Char STR1[256];
+
+ strcpy(line, line_);
+ if (*line == '\0')
+ return;
+ l = strlen(line);
+ do {
+ n++;
+ if (line[n-1] == '.')
+ p++;
+ } while (n <= l && (line[n-1] == '.' || isdigit(line[n-1])));
+ if (n == p || p > 1 ||
+ line[n-1] != 'i' && line[n-1] != 'm' && line[n-1] != 'p')
+ error("Dimension must be a number followed by in, mm or pt", print);
+ sprintf(cline[(long)lno], "w%s", substr_(STR1, line, 1, n));
+}
+
+
+Static void setSize(Char *line_)
{
Char line[256];
stave_index0 i = 0;
@@ -500,15 +513,14 @@ Char *line_;
}
-Static command_type findCommand(command)
-Char *command;
+Static command_type findCommand(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)) {
+ for (j = c1; j <= cn; j = (command_type)((long)j + 1)) {
if (equalsIgnoreCase(command, commands[(long)j]))
return j;
}
@@ -516,8 +528,7 @@ Char *command;
}
-boolean isCommand(command_)
-Char *command_;
+boolean isCommand(Char *command_)
{
Char command[256];
@@ -526,9 +537,13 @@ Char *command_;
}
-Static Void doEnable(line, choice)
-Char *line;
-boolean choice;
+Static boolean mustAppend(command_type command)
+{
+ return (command == tex);
+}
+
+
+Static void doEnable(Char *line, boolean choice)
{
Char word[256];
Char STR1[256];
@@ -545,18 +560,53 @@ boolean choice;
}
-Static line_type doCommand(line_)
-Char *line_;
+Static void setRange(Char *line_)
+{
+ Char line[256];
+ short v, p, FORLIM;
+ Char STR1[256];
+ Char STR2[256];
+
+ strcpy(line, line_);
+ line_no = orig_range_line;
+ FORLIM = nvoices;
+ for (v = 1; v <= FORLIM; v++) {
+ sprintf(STR1, "%s=", voice_label[v-1]);
+ p = strpos2(line, STR1, 1);
+ if (p > 0) {
+ if (strlen(line) < p + 6) {
+ sprintf(STR2, "At least five characters must follow \"%s=\"",
+ voice_label[v-1]);
+ error(STR2, print);
+ }
+ defineRange(v, substr_(STR2, line, p + 2, 5));
+ } else
+ defineRange(v, "");
+ }
+}
+
+
+Static boolean isAssertion(Char *line)
+{
+ boolean Result;
+
+/* p2c: preamble.pas, line 369:
+ * Note: Attempting to EXIT beyond this function [188] */
+ return Result;
+}
+
+
+Static line_type doCommand(Char *line_)
{
line_type Result;
Char line[256];
Char command[256];
command_type last_command;
boolean starts_with_note;
- Char STR1[256], STR2[256];
+ Char STR1[256], STR3[256];
strcpy(line, line_);
- if (line[0] == comment)
+ if (line[0] == comment && !isAssertion(line))
return comment_line;
starts_with_note = maybeMusicLine(line);
GetNextWord(command, line, blank_, colon_);
@@ -568,20 +618,27 @@ Char *line_;
doEnable(line, true);
else if (last_command == disable)
doEnable(line, false);
+ else if (last_command == range)
+ orig_range_line = line_no;
if (last_command != none) {
- strcpy(cline[(long)last_command], line);
+ if (mustAppend(last_command) && redefined[(long)last_command])
+ sprintf(cline[(long)last_command] + strlen(cline[(long)last_command]),
+ "\n%s", line);
+ else {
+ strcpy(cline[(long)last_command], line);
+ if (warn_redefine && redefined[(long)last_command]) {
+ sprintf(STR3, "You have redefined preamble command %s", command);
+ warning(STR3, print);
+ }
+ }
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);
+ sprintf(STR3, "%s%c %s", command, colon_, line);
+ addStyle(STR3);
orig_style_line[known_styles-1] = line_no;
return Result;
} else if (starts_with_note)
@@ -592,8 +649,7 @@ Char *line_;
}
-Void setOnly(line_)
-Char *line_;
+void setOnly(Char *line_)
{
Char line[256];
short num, num1, num2, l;
@@ -630,7 +686,7 @@ Char *line_;
}
-Void interpretCommands()
+void interpretCommands(void)
{
short i, num, den, nbars;
Char STR2[256];
@@ -704,6 +760,9 @@ Void interpretCommands()
setIndent();
setInitOctave();
setOnly(cline[(long)only]);
+ setRange(cline[(long)range]);
+ setDimension(cline[(long)width], width);
+ setDimension(cline[(long)height], height);
if (*options_line != '\0') {
warning("\"Options\" is cryptic and obsolescent.", !print);
printf(" Use \"Enable\" and \"Disable\" instead.\n");
@@ -714,7 +773,7 @@ Void interpretCommands()
}
-Void preambleDefaults()
+void preambleDefaults(void)
{
short i;
@@ -740,8 +799,7 @@ Void preambleDefaults()
}
-Static Void preambleGuess(maybe_voices)
-voice_index maybe_voices;
+Static void preambleGuess(voice_index maybe_voices)
{
switch (maybe_voices) {
@@ -786,7 +844,7 @@ voice_index maybe_voices;
/* ------------------------------------------------------------------ */
-Void nonMusic()
+void nonMusic(void)
{
paragraph_index i, FORLIM;
@@ -798,7 +856,7 @@ Void nonMusic()
}
-boolean thisCase()
+boolean thisCase(void)
{
boolean Result;
@@ -811,8 +869,7 @@ boolean thisCase()
}
-Void augmentPreamble(control_para)
-boolean control_para;
+void augmentPreamble(boolean control_para)
{
paragraph_index i;
line_type l;
@@ -821,7 +878,7 @@ boolean control_para;
if (!thisCase())
return;
- for (l = unknown; (long)l <= (long)plain_line; l = (line_type)((long)l + 1))
+ for (l = unknown; l <= plain_line; l = (line_type)((long)l + 1))
s[(long)l] = 0;
FORLIM = para_len;
for (i = 0; i <= FORLIM - 1; i++) {
@@ -840,7 +897,7 @@ boolean control_para;
}
-Void doPreamble()
+void doPreamble(void)
{
paragraph_index i;
voice_index0 maybe_voices = 0;
@@ -862,7 +919,7 @@ Void doPreamble()
}
-Void respace()
+void respace(void)
{
stave_index i, j;
Char STR1[256];
@@ -873,25 +930,24 @@ Void respace()
if (nspace[j-1] != unspec) {
sprintf(STR3, "\\mtxInterInstrument{%s}{%s}",
toString(STR1, i - 1), toString(STR2, nspace[j-1]));
- tex3(STR3);
+ TeXtype2(STR3);
}
}
if (nspace[ninstr-1] != unspec) {
sprintf(STR3, "\\mtxStaffBottom{%s}", toString(STR1, nspace[ninstr-1]));
- tex3(STR3);
+ TeXtype2(STR3);
}
must_respace = false;
}
-Void restyle()
+void restyle(void)
{
must_restyle = false;
}
-Static short clefno(cl)
-Char cl;
+Static short clefno(Char cl)
{
short Result;
@@ -948,7 +1004,7 @@ Char cl;
}
-Static Void doTenorClefs()
+Static void doTenorClefs(void)
{
voice_index i;
Char c;
@@ -967,8 +1023,14 @@ Static Void doTenorClefs()
}
-Local Char *pmxMeter(Result)
-Char *Result;
+Static void insertTeX(void)
+{
+ if (redefined[(long)tex])
+ TeXtype2(cline[(long)tex]);
+}
+
+
+Local Char *pmxMeter(Char *Result)
{
short denom, num;
Char STR1[256], STR3[256], STR4[256], STR5[256];
@@ -986,9 +1048,7 @@ Char *Result;
return Result;
}
-Local Char *sizecode(Result, k)
-Char *Result;
-short k;
+Local Char *sizecode(Char *Result, short k)
{
strcpy(Result, "\\mtxNormalSize");
switch (k) {
@@ -1029,7 +1089,7 @@ short k;
}
-Void doPMXpreamble()
+void doPMXpreamble(void)
{
static Char clefcode[9] = "0123456";
short i, j;
@@ -1075,6 +1135,7 @@ Void doPMXpreamble()
putLine(texdir);
pmx_preamble_done = true;
+ insertTeX();
respace();
FORLIM = ngroups;
@@ -1106,13 +1167,13 @@ Void doPMXpreamble()
if (*pmx_line != '\0')
putLine(pmx_line);
doTenorClefs();
+ if (*cline[(long)width] != '\0')
+ putLine(cline[(long)width]);
wipeCommands();
}
-Char *startString(Result, voice)
-Char *Result;
-voice_index0 voice;
+Char *startString(Char *Result, voice_index0 voice)
{
Char s[256], w[256];
voice_index j;
diff --git a/Build/source/utils/m-tx/mtx-src/preamble.h b/Build/source/utils/m-tx/mtx-src/preamble.h
new file mode 100644
index 00000000000..6b6c4090e6f
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/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(void);
+extern void preambleDefaults(void);
+extern void interpretCommands(void);
+extern void doPreamble(void);
+extern void doPMXpreamble(void);
+extern void respace(void);
+extern void restyle(void);
+extern Char *startString(Char *Result, voice_index0 voice);
+extern void augmentPreamble(boolean control_para);
+extern boolean omitLine(paragraph_index line);
+extern void nonMusic(void);
+extern void setOnly(Char *line);
+extern boolean isCommand(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-src/preamble.pas
index 9ece7d67adc..ffc3716567b 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/preamble.pas
+++ b/Build/source/utils/m-tx/mtx-src/preamble.pas
@@ -21,7 +21,6 @@ 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 = ':';
@@ -32,9 +31,9 @@ const blank = ' ';
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,
+ ( none, title, composer, pmx, tex, options, msize, bars, shortnote,
+ style, sharps, flats, meter, space, pages, systems, width, height,
+ enable, disable, range, name, indent,
poet, part, only, octave, start );
line_type = ( unknown, colon_line, command_line, comment_line,
@@ -45,18 +44,19 @@ type command_type =
const c1 = title; cn = start;
commands: array[command_type] of string[16] =
- ( 'NONE', 'TITLE', 'COMPOSER', 'PMX', 'OPTIONS',
+ ( 'NONE', 'TITLE', 'COMPOSER', 'PMX', 'TEX', 'OPTIONS',
'SIZE', 'BARS/LINE', 'SHORT',
- 'STYLE', 'SHARPS', 'FLATS', 'METER', 'SPACE', 'PAGES', 'SYSTEMS',
- 'ENABLE', 'DISABLE',
+ 'STYLE', 'SHARPS', 'FLATS', 'METER', 'SPACE', 'PAGES', 'SYSTEMS', 'WIDTH',
+ 'HEIGHT', 'ENABLE', 'DISABLE', 'RANGE',
'NAME', 'INDENT', 'POET', 'PART', 'ONLY', 'OCTAVE', 'START');
cline: array[command_type] of string =
- ( '', '', '', '', '', '', '', '1/4',
- '', '0', '', 'C', '', '1', '1', '', '', '', '', '', '', '', '', '' );
+ ( '', '', '', '', '', '', '', '', '1/4', (* short *)
+ '', '0', '', 'C', '', '1', '1', (* systems *)
+ '190mm', '260mm', '', '', '', '', '', '', '', '', '', '' );
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, 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 = (
@@ -78,6 +78,7 @@ 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;
+ orig_range_line: integer;
var nclefs, n_pages, n_systems, n_sharps, ngroups: integer;
part_line, title_line, composer_line, pmx_line, options_line,
@@ -214,7 +215,8 @@ 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;
+begin omitLine := (line>0) and omit_line[line]
+end;
procedure setName;
var i: integer;
@@ -288,16 +290,35 @@ begin
until s='';
end;
+procedure setDimension(line: string; lno: command_type);
+ var l, n, p: integer;
+begin
+ if line = '' then exit;
+ l := length(line);
+ n := 0;
+ p := 0;
+ repeat n := n+1;
+ if line[n]='.' then p:=p+1;
+ until (n>l) or not ((line[n]='.') or (line[n]>='0') and (line[n]<='9'));
+ if (n=p) or (p>1) or
+ not ((line[n]='i') or (line[n]='m') or (line[n]='p')) then
+ error('Dimension must be a number followed by in, mm or pt',print);
+ cline[lno] := 'w' + substr(line,1,n);
+end;
+
procedure setSize(line: string);
var i: stave_index0;
word: string;
begin i:=0;
while i<ninstr do
begin word:=GetNextWord(line,blank,dummy);
- if word='' then exit;
+ if word='' then break;
inc(i); getNum(word,musicsize);
stave_size[i] := musicsize;
end;
+ if not (musicsize in [16,20]) then
+ for i:=1 to ninstr do
+ if stave_size[i] = unspec then stave_size[i] := musicsize;
if musicsize<16 then musicsize:=16
else if musicsize>20 then musicsize:=20;
end;
@@ -314,6 +335,9 @@ end;
function isCommand(command: string): boolean;
begin isCommand:=findCommand(command)<>none end;
+function mustAppend(command: command_type): boolean;
+begin mustAppend := command=tex end;
+
procedure doEnable(var line: string; choice: boolean);
var word: string;
begin
@@ -323,24 +347,53 @@ begin
until word=''
end;
+procedure setRange(line: string);
+ var v,p: integer;
+begin
+ line_no := orig_range_line;
+ for v:=1 to nvoices do
+ begin p:=pos(voice_label[v]+'=',line);
+ if p>0 then
+ begin
+ if length(line)<p+6 then
+ error('At least five characters must follow "'+voice_label[v]+'="',
+ print);
+ defineRange(v,substr(line,p+2,5));
+ end
+ else defineRange(v,'');
+ end;
+end;
+
+function isAssertion(var line: string): boolean;
+begin
+ exit(false)
+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;
+ if (line[1]=comment) and not isAssertion(line) 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);
+ else if last_command = disable then doEnable(line,false)
+ else if last_command = range then orig_range_line := line_no;
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
+ begin
+ if mustAppend(last_command) and redefined[last_command] then
+ cline[last_command]:=cline[last_command]+#10+line
+ else
+ begin cline[last_command]:=line;
+ if warn_redefine and redefined[last_command] then
warning('You have redefined preamble command '+command,print);
+ end;
+ if last_command=start then start_line:=line;
redefined[last_command]:=true;
end
else begin doCommand:=colon_line; addStyle(command+colon+' '+line);
@@ -417,6 +470,9 @@ begin
if cline[flats]<>'' then
begin getNum(cline[flats],n_sharps); n_sharps:=-n_sharps; end;
setName; setIndent; setInitOctave; setOnly(cline[only]);
+ setRange(cline[range]);
+ setDimension(cline[width],width);
+ setDimension(cline[height],height);
if options_line <>'' then begin
warning('"Options" is cryptic and obsolescent.', not print);
writeln(' Use "Enable" and "Disable" instead.')
@@ -507,10 +563,10 @@ procedure respace;
begin
for i:=ninstr downto 2 do
begin j:=ninstr-i+1;
- if nspace[j]<>unspec then tex3('\mtxInterInstrument{'+toString(i-1)+
+ if nspace[j]<>unspec then TeXtype2('\mtxInterInstrument{'+toString(i-1)+
'}{'+toString(nspace[j])+'}');
end;
- if nspace[ninstr]<>unspec then tex3('\mtxStaffBottom{'+
+ if nspace[ninstr]<>unspec then TeXtype2('\mtxStaffBottom{'+
toString(nspace[ninstr])+'}');
must_respace:=false;
end;
@@ -548,6 +604,11 @@ begin for i:=1 to nclefs do
end;
end;
+procedure insertTeX;
+begin
+ if redefined[tex] then TeXtype2(cline[tex]);
+end;
+
procedure doPMXpreamble;
const clefcode: string[8]='0123456';
var i, j: integer;
@@ -555,11 +616,13 @@ procedure doPMXpreamble;
function pmxMeter: string;
var denom, num: integer;
begin if meternum=0 then
- begin num := beatsPerLine; denom := 0;
+ 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) +
+ else begin num := meternum; {* denom := pmdenom; *} end;
+ { CMO: unconditonally assign value of pmdenom to denom }
+ denom := pmdenom;
+ pmxMeter := toString(num) + ' ' + toString(PMXmeterdenom(meterdenom)) +
' ' + toString(pmnum) + ' ' + toString(denom);
end;
function sizecode(k: integer): string;
@@ -592,7 +655,7 @@ begin
if texdir='' then texdir := './';
putLine(texdir);
- pmx_preamble_done:=true; respace;
+ pmx_preamble_done:=true; insertTeX; respace;
for j:=1 to ngroups do
writeln(outfile,'\\mtxGroup{'+toString(j)+'}{'
@@ -610,6 +673,7 @@ begin
begin putLine('Tc'); putLine('\mtxPoetComposer'); end;
if pmx_line <> '' then putLine(pmx_line);
doTenorClefs;
+ if cline[width] <> '' then putLine(cline[width]);
wipeCommands;
end;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/prepmx.c b/Build/source/utils/m-tx/mtx-src/prepmx.c
index ba186a63e13..715d4c1ca37 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/prepmx.c
+++ b/Build/source/utils/m-tx/mtx-src/prepmx.c
@@ -2,8 +2,8 @@
/* From input file "prepmx.pas" */
-#include "p2c.h"
+#include "p2c.h"
#ifndef CONTROL_H
#include "control.h"
@@ -62,14 +62,12 @@
#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>"
+#define version "0.61"
+#define version_date "<16 December 2015>"
/** See file "Corrections" for updates later than those listed below
*/
@@ -107,8 +105,7 @@ Static short bar_of_line, bars_of_rest, rest_spacing;
/* --------------- Bars and rests --------------- */
-Static Void writeRepeat(bar)
-Char *bar;
+Static void writeRepeat(Char *bar)
{
Char repcode[256];
Char STR1[256];
@@ -136,8 +133,7 @@ Char *bar;
}
-Static Void supplyRests(voice)
-voice_index voice;
+Static void supplyRests(voice_index voice)
{
Char STR2[4];
Char STR3[256];
@@ -157,8 +153,7 @@ voice_index voice;
}
-Static Void countBars(note_)
-Char *note_;
+Static void countBars(Char *note_)
{
Char note[256];
short k, adjust;
@@ -189,7 +184,7 @@ Char *note_;
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()
+Static void putMBRest(void)
{
stave_index i, FORLIM;
Char STR1[256];
@@ -223,9 +218,7 @@ struct LOC_processLine {
boolean in_group;
} ;
-Local Void output(note_, LINK)
-Char *note_;
-struct LOC_processLine *LINK;
+Local void output(Char *note_, struct LOC_processLine *LINK)
{
Char note[256];
Char STR2[256];
@@ -251,9 +244,7 @@ struct LOC_processLine *LINK;
putLine("");
}
-Local Void maybeDotted(note, LINK)
-Char *note;
-struct LOC_processLine *LINK;
+Local void maybeDotted(Char *note, struct LOC_processLine *LINK)
{
if (strlen(note) < 2)
return;
@@ -272,8 +263,7 @@ struct LOC_addChords {
int5 pitches;
} ;
-Local Void outChord(LINK)
-struct LOC_addChords *LINK;
+Local void outChord(struct LOC_addChords *LINK)
{
short k;
Char STR2[256];
@@ -307,8 +297,7 @@ struct LOC_addChords *LINK;
}
}
-Local Void addChords(LINK)
-struct LOC_processLine *LINK;
+Local void addChords(struct LOC_processLine *LINK)
{
struct LOC_addChords V;
Char w[256];
@@ -366,10 +355,8 @@ struct LOC_processLine *LINK;
line_no = mus_line;
}
-Local Char *processOther(Result, note_, LINK)
-Char *Result;
-Char *note_;
-struct LOC_processLine *LINK;
+Local Char *processOther(Char *Result, Char *note_,
+ struct LOC_processLine *LINK)
{
Char note[256];
@@ -388,7 +375,7 @@ struct LOC_processLine *LINK;
break;
/* For a zword, take note of pitch but do not change the contents */
- /* Add spurious duration because repich expects duration to be present */
+ /* Add spurious duration because repitch expects duration to be present */
case zword:
strcpy(LINK->cutnote, note);
predelete(LINK->cutnote, 1);
@@ -430,8 +417,7 @@ struct LOC_processLine *LINK;
return strcpy(Result, note);
}
-Local Void lookahead(LINK)
-struct LOC_processLine *LINK;
+Local void lookahead(struct LOC_processLine *LINK)
{
Char STR2[256];
Char STR3[256];
@@ -441,8 +427,7 @@ struct LOC_processLine *LINK;
processOther(STR2, getMusicWord(STR3, LINK->voice), LINK));
}
-Local Void processNote_(LINK)
-struct LOC_processLine *LINK;
+Local void processNote_(struct LOC_processLine *LINK)
{
if (hasVerseNumber(LINK->voice))
strcat(LINK->pretex, "\\mtxVerse");
@@ -475,13 +460,11 @@ struct LOC_processLine *LINK;
/* ---------------------------------------------------------------- */
-Static Void processLine(voice_, bar_no)
-voice_index voice_;
-short bar_no;
+Static void processLine(voice_index voice_, short bar_no)
{
struct LOC_processLine V;
paragraph_index par_line;
- Char STR2[256];
+ Char STR1[256];
V.voice = voice_;
*V.pretex = '\0';
@@ -495,8 +478,7 @@ short bar_no;
getMusicWord(V.note, V.voice);
if (*V.note == '\0')
return;
- if (debugMode())
- printf("%d %s\n", V.voice, V.note);
+ /* if debugMode then writeln(voice,' ',note); */
switch (thisNote(V.voice)) {
case rword:
@@ -531,8 +513,8 @@ short bar_no;
else
writeRepeat(V.note);
}
- sprintf(STR2, "%c", barsym);
- if (strcmp(V.note, STR2))
+ sprintf(STR1, "%c", barsym);
+ if (strcmp(V.note, STR1))
*V.note = '\0';
V.no_chords = false;
break;
@@ -541,11 +523,11 @@ short bar_no;
if (V.voice != nvoices)
*V.note = '\0';
else
- strcpy(V.note, processOther(STR2, V.note, &V));
+ strcpy(V.note, processOther(STR1, V.note, &V));
break;
default:
- strcpy(V.note, processOther(STR2, V.note, &V));
+ strcpy(V.note, processOther(STR1, V.note, &V));
break;
}
output(V.note, &V);
@@ -557,9 +539,7 @@ short bar_no;
/* ------------------------------------------------------------------- */
-Static Void getMeterChange(voice, new_meter)
-voice_index voice;
-Char *new_meter;
+Static void getMeterChange(voice_index voice, Char *new_meter)
{
short pn1, pn2;
Char w[256], new_command[256];
@@ -582,8 +562,7 @@ struct LOC_musicParagraph {
Char new_meter[256];
} ;
-Local Void putPMXlines(LINK)
-struct LOC_musicParagraph *LINK;
+Local void putPMXlines(struct LOC_musicParagraph *LINK)
{
paragraph_index i, FORLIM;
@@ -597,8 +576,7 @@ struct LOC_musicParagraph *LINK;
}
}
-Local Void processOneBar(LINK)
-struct LOC_musicParagraph *LINK;
+Local void processOneBar(struct LOC_musicParagraph *LINK)
{
paragraph_index0 m, cm;
short n1, n2;
@@ -667,9 +645,7 @@ struct LOC_musicParagraph *LINK;
putLine("");
}
-Local Void putMeter(new_meter_word, LINK)
-Char *new_meter_word;
-struct LOC_musicParagraph *LINK;
+Local void putMeter(Char *new_meter_word, struct LOC_musicParagraph *LINK)
{
if (strcmp(new_meter_word, old_meter_word))
putLine(new_meter_word);
@@ -677,7 +653,7 @@ struct LOC_musicParagraph *LINK;
}
-Static Void musicParagraph()
+Static void musicParagraph(void)
{
struct LOC_musicParagraph V;
voice_index0 j, nvoice;
@@ -758,7 +734,7 @@ Static Void musicParagraph()
Static boolean no_commands_yet;
-Static Void doMusic()
+Static void doMusic(void)
{
Char STR1[256], STR2[256];
Char STR4[256];
@@ -771,6 +747,7 @@ Static Void doMusic()
must_restyle = false;
do {
final_paragraph = endOfInfile();
+ memcpy(orig_P, P, sizeof(paragraph));
if (para_len > 0 && !ignore_input && thisCase()) {
if (no_commands_yet) {
interpretCommands();
@@ -804,9 +781,7 @@ Static Void doMusic()
Static boolean control_paragraph, no_report_errors;
-Static boolean isControlParagraph(P, para_len)
-Char (*P)[256];
-paragraph_index para_len;
+Static boolean isControlParagraph(Char (*P)[256], paragraph_index para_len)
{
paragraph_index0 commands = 0, labels = 0, voices = 0, guff = 0;
paragraph_index0 i;
@@ -832,7 +807,7 @@ paragraph_index para_len;
}
-Static Void topOfPMXfile()
+Static void topOfPMXfile(void)
{
Char STR2[24];
Char STR3[34];
@@ -846,14 +821,13 @@ Static Void topOfPMXfile()
}
-main(argc, argv)
-int argc;
-Char *argv[];
+main(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;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/prepmx.pas b/Build/source/utils/m-tx/mtx-src/prepmx.pas
index 0b246e04f7d..08661beba6b 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/prepmx.pas
+++ b/Build/source/utils/m-tx/mtx-src/prepmx.pas
@@ -1,11 +1,12 @@
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 }
+
+{ CMO: addition/change by Christian Mondrup }
{* M-Tx preprocessor to PMX Dirk Laurie }
-const version = '0.60';
- version_date = '<16 March 2005>';
+const version = '0.61';
+ version_date = '<11 December 2015>';
{* See file "Corrections" for updates later than those listed below
}
@@ -178,7 +179,7 @@ other: if note[1]=grace_group then
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 }
+{ Add spurious duration because repitch expects duration to be present }
zword: begin cutnote:=note; predelete(cutnote,1); insertchar('4',cutnote,2);
checkOctave(voice,cutnote); renewPitch(voice,cutnote)
end;
@@ -224,7 +225,7 @@ begin
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);
+ { if debugMode then writeln(voice,' ',note); }
case thisNote(voice) of
rword: begin if multi_bar_rest then
begin countBars(note); note:=multibar;
@@ -266,7 +267,8 @@ 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);
+ { CMO: process denominator value with function PMXmeterdenom }
+ new_command := meterWord(meternum, PMXmeterdenom(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;
@@ -331,7 +333,7 @@ procedure musicParagraph;
begin
paragraphSetup(nvoice);
- if nvoice=0 then begin nonMusic; exit end
+ 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);
@@ -375,6 +377,7 @@ 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;
+ orig_P := P;
if (para_len>0) and not ignore_input and thisCase then
begin if no_commands_yet then
begin interpretCommands; printFeatures(false);
@@ -386,7 +389,8 @@ begin first_paragraph:=true; pmx_preamble_done:=false; bar_no:=1;
no_commands_yet:=false
end;
if startsWithBracedWord(P[1]) then lyricsParagraph else
- begin musicParagraph; first_paragraph:=false;
+ begin
+ musicParagraph; first_paragraph:=false;
writeRepeat(repeat_sign);
end
end;
@@ -424,6 +428,7 @@ 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;
diff --git a/Build/source/utils/m-tx/mtx-0.60d/status.c b/Build/source/utils/m-tx/mtx-src/status.c
index aef14b88a7b..08845f156e3 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/status.c
+++ b/Build/source/utils/m-tx/mtx-src/status.c
@@ -2,8 +2,8 @@
/* From input file "status.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define STATUS_G
#include "status.h"
@@ -49,13 +49,83 @@ typedef struct line_status {
Static Char init_oct[256] = "";
+
+Static Char range_name[56][256] = {
+ "0c", "0d", "0e", "0f", "0g", "0a", "0b", "1c", "1d", "1e", "1f", "1g",
+ "1a", "1b", "2c", "2d", "2e", "2f", "2g", "2a", "2b", "3c", "3d", "3e",
+ "3f", "3g", "3a", "3b", "4c", "4d", "4e", "4f", "4g", "4a", "4b", "5c",
+ "5d", "5e", "5f", "5g", "5a", "5b", "6c", "6d", "6e", "6f", "6g", "6a",
+ "6b", "7c", "7d", "7e", "7f", "7g", "7a", "7b"
+/* p2c: status.pas, line 76:
+ * Note: Line breaker spent 0.0 seconds, 5000 tries on line 58 [251] */
+};
+
Static line_status current[maxvoices];
Static Char lastdur[maxvoices];
+Static Char voice_range[maxvoices][256], range_low[maxvoices][256],
+ range_high[maxvoices][256];
+
+
+/* Range limits are user-specified as e.g. 3c. To make comparisons
+meaningful, a and b (which come after g) are translated to h and i. */
+
+void checkRange(short voice, Char *note_)
+{
+ Char note[256];
+ Char STR1[4];
+ Char STR3[256];
+
+ strcpy(note, note_);
+ if (*voice_range[voice-1] == '\0')
+ return;
+ if (strlen(note) > 2) { /* assume usual PMX form with octave */
+ sprintf(STR1, "%c%c", note[2], note[0]);
+ strcpy(note, STR1);
+ }
+ if (note[1] == 'a')
+ note[1] = 'h';
+ if (note[1] == 'b')
+ note[1] = 'i';
+ if (strcmp(note, range_low[voice-1]) < 0 ||
+ strcmp(note, range_high[voice-1]) > 0) {
+ sprintf(STR3, "%s is out of range, specified as %s",
+ note, voice_range[voice-1]);
+ error3(voice, STR3);
+ }
+}
+
+
+void defineRange(short voice, Char *range_)
+{
+ Char range[256];
+ Char STR2[256];
+
+ strcpy(range, range_);
+ strcpy(voice_range[voice-1], range);
+ if (*range == '\0')
+ return;
+ if ('0' > range[0] || range[0] > '7' || 'a' > range[1] || range[1] > 'g' ||
+ range[2] != '-' || '0' > range[3] || range[3] > '7' || 'a' > range[4] ||
+ range[4] > 'g') {
+ sprintf(STR2,
+ "Badly formatted range \"%s\" for voice %s, must be e.g. 3c-4a",
+ range, voice_label[voice-1]);
+ error(STR2, print);
+ }
+ if (range[1] == 'a')
+ range[1] = 'h';
+ if (range[1] == 'b')
+ range[1] = 'i';
+ if (range[4] == 'a')
+ range[4] = 'h';
+ if (range[4] == 'b')
+ range[4] = 'i';
+ substr_(range_low[voice-1], range, 1, 2);
+ substr_(range_high[voice-1], range, 4, 2);
+}
-Void chordTie(voice, lab)
-short voice;
-Char *lab;
+void chordTie(short voice, Char *lab)
{
short n;
line_status *WITH;
@@ -70,17 +140,14 @@ Char *lab;
*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:
+/* p2c: status.pas, line 113:
* 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;
+void getChordTies(short voice, short *pitches, Char *labels)
{
line_status *WITH;
@@ -91,7 +158,7 @@ Char *labels;
}
-Void rememberDurations()
+void rememberDurations(void)
{
voice_index v, FORLIM;
@@ -101,7 +168,7 @@ Void rememberDurations()
}
-Void restoreDurations()
+void restoreDurations(void)
{
voice_index v, FORLIM;
@@ -111,16 +178,13 @@ Void restoreDurations()
}
-Char duration(voice)
-short voice;
+Char duration(short voice)
{
return (current[voice-1].duration);
}
-Void resetDuration(voice, dur)
-short voice;
-Char dur;
+void resetDuration(short voice, Char dur)
{
if (pos1(dur, durations) == 0) {
printf("Trying to set duration to %c; ", dur);
@@ -130,8 +194,7 @@ Char dur;
}
-Void activateBeamsAndSlurs(voice)
-short voice;
+void activateBeamsAndSlurs(short voice)
{
line_status *WITH;
@@ -149,8 +212,7 @@ short voice;
}
-Void saveStatus(voice)
-short voice;
+void saveStatus(short voice)
{
line_status *WITH;
@@ -160,15 +222,13 @@ short voice;
}
-boolean noBeamMelisma(voice)
-short voice;
+boolean noBeamMelisma(short voice)
{
return (current[voice-1].no_beam_melisma);
}
-short afterSlur(voice)
-short voice;
+short afterSlur(short voice)
{
short Result;
line_status *WITH;
@@ -181,22 +241,19 @@ short voice;
}
-Char octave(voice)
-short voice;
+Char octave(short voice)
{
return (current[voice-1].octave);
}
-Void resetOctave(voice)
-short voice;
+void resetOctave(short voice)
{
current[voice-1].octave = ' ';
}
-Void initOctaves(octaves)
-Char *octaves;
+void initOctaves(Char *octaves)
{
short i = 1;
@@ -210,8 +267,7 @@ Char *octaves;
}
-Static Char initOctave(voice_stave)
-stave_index voice_stave;
+Static Char initOctave(stave_index voice_stave)
{
if (voice_stave > strlen(init_oct)) {
if (pos1(clef[voice_stave-1], "Gt08") > 0)
@@ -223,16 +279,13 @@ stave_index voice_stave;
}
-Void setOctave(voice)
-short voice;
+void setOctave(short voice)
{
current[voice-1].octave = initOctave(voiceStave(voice));
}
-Void newOctave(voice, dir)
-short voice;
-Char dir;
+void newOctave(short voice, Char dir)
{
line_status *WITH;
@@ -250,20 +303,13 @@ Char dir;
}
-Static short newPitch(voice, note_, pitch, lastnote)
-short voice;
-Char *note_;
-short pitch;
-Char lastnote;
+Static short newPitch(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));
@@ -278,7 +324,7 @@ Char lastnote;
interval -= 7;
if (interval < -3)
interval += 7;
- npitch = pitch + interval; /*if debugMode then write(' was ',npitch);*/
+ npitch = pitch + interval;
while (oct != ' ') {
if (oct == '+')
npitch += 7;
@@ -287,15 +333,11 @@ Char lastnote;
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;
+Local void delins(Char *note, Char c1, Char c2, short l)
{
short i, n;
@@ -322,9 +364,7 @@ short l;
}
-Static Void repitch(note, diff)
-Char *note;
-short diff;
+Static void repitch(Char *note, short diff)
{
diff /= 7;
if (diff > 0)
@@ -334,15 +374,13 @@ short diff;
}
-Void setUnbeamed(voice)
-short voice;
+void setUnbeamed(short voice)
{
current[voice-1].beamed = false;
}
-Void setUnslurred(voice)
-short voice;
+void setUnslurred(short voice)
{
line_status *WITH;
@@ -352,9 +390,7 @@ short voice;
}
-Void beginBeam(voice, note)
-short voice;
-Char *note;
+void beginBeam(short voice, Char *note)
{
line_status *WITH;
@@ -372,8 +408,7 @@ Char *note;
}
-Void endBeam(voice)
-short voice;
+void endBeam(short voice)
{
line_status *WITH;
@@ -385,22 +420,19 @@ short voice;
}
-short slurLevel(voice)
-short voice;
+short slurLevel(short voice)
{
return (current[voice-1].slur_level);
}
-short beamLevel(voice)
-short voice;
+short beamLevel(short voice)
{
return (current[voice-1].beam_level);
}
-boolean noSlurMelisma(voice, history)
-short voice, history;
+boolean noSlurMelisma(short voice, short history)
{
line_status *WITH;
@@ -409,10 +441,7 @@ short voice, history;
}
-Static Char *slurLabel(Result, voice, note)
-Char *Result;
-short voice;
-Char *note;
+Static Char *slurLabel(Char *Result, short voice, Char *note)
{
Char sl;
@@ -431,9 +460,7 @@ Char *note;
}
-Static Void labelSlur(voice, note)
-short voice;
-Char *note;
+Static void labelSlur(short voice, Char *note)
{
Char sl;
line_status *WITH;
@@ -466,9 +493,7 @@ Char *note;
}
-Void beginSlur(voice, note)
-short voice;
-Char *note;
+void beginSlur(short voice, Char *note)
{
short posblind;
line_status *WITH;
@@ -499,9 +524,7 @@ Char *note;
}
-Void endSlur(voice, note)
-short voice;
-Char *note;
+void endSlur(short voice, Char *note)
{
short poscontinue, posblind;
Char contslur[256];
@@ -558,21 +581,21 @@ Char *note;
}
-Void renewPitch(voice, note)
-short voice;
-Char *note;
+/* This is the routine called by prepmx.pas for every normal and chordal
+note, immediately after checkOctave. It does two things: adjusts pitch
+of notes following a C: chord to what it would have been without that
+chord, and checks for pitch overruns. */
+void renewPitch(short voice, Char *note)
{
short pstat;
line_status *WITH;
WITH = &current[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);
+ checkRange(voice, range_name[WITH->pitch + 6]);
if (WITH->pitch < lowest_pitch && checkPitch()) {
printf("Pitch of note %s following %c reported as %d",
note, WITH->lastnote, WITH->pitch);
@@ -584,24 +607,16 @@ Char *note;
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;
+short chordPitch(short voice)
{
return (current[voice-1].chord_pitch);
}
-Void renewChordPitch(voice, note)
-short voice;
-Char *note;
+void renewChordPitch(short voice, Char *note)
{
line_status *WITH;
@@ -616,7 +631,7 @@ Char *note;
}
-Void initStatus()
+void initStatus(void)
{
short voice, FORLIM;
line_status *WITH;
diff --git a/Build/source/utils/m-tx/mtx-src/status.h b/Build/source/utils/m-tx/mtx-src/status.h
new file mode 100644
index 00000000000..3acebe3dabe
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/status.h
@@ -0,0 +1,59 @@
+/* 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(void);
+extern void saveStatus(short voice);
+
+extern void resetDuration(short voice, Char dur);
+extern Char duration(short voice);
+
+extern short slurLevel(short voice);
+extern short beamLevel(short voice);
+extern boolean noBeamMelisma(short voice);
+extern boolean noSlurMelisma(short voice, short history);
+extern short afterSlur(short voice);
+extern void setUnbeamed(short voice);
+extern void setUnslurred(short voice);
+extern void beginBeam(short voice, Char *note);
+extern void endBeam(short voice);
+extern void beginSlur(short voice, Char *note);
+extern void endSlur(short voice, Char *note);
+extern void activateBeamsAndSlurs(short voice);
+
+extern void setOctave(short voice);
+extern void resetOctave(short voice);
+extern Char octave(short voice);
+extern void newOctave(short voice, Char dir);
+extern void initOctaves(Char *octaves);
+
+extern void renewPitch(short voice, Char *note);
+extern short chordPitch(short voice);
+extern void renewChordPitch(short voice, Char *note);
+extern void defineRange(short voice, Char *range);
+extern void checkRange(short voice, Char *note);
+extern void rememberDurations(void);
+extern void restoreDurations(void);
+extern void chordTie(short voice, Char *lab);
+
+
+typedef short int5[5];
+
+
+extern void getChordTies(short 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-src/status.pas
index 9056dbe1917..3048027a7bb 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/status.pas
+++ b/Build/source/utils/m-tx/mtx-src/status.pas
@@ -31,6 +31,8 @@ procedure initOctaves(octaves: string);
procedure renewPitch (voice: integer; var note: string);
function chordPitch(voice: integer): integer;
procedure renewChordPitch (voice: integer; note: string);
+procedure defineRange(voice: integer; range: string);
+procedure checkRange(voice: integer; note: string);
procedure rememberDurations;
procedure restoreDurations;
procedure chordTie(voice: integer; var lab: char);
@@ -43,10 +45,20 @@ const
init_oct: string = '';
lowest_pitch = -9;
highest_pitch = 61;
+ range_name: array[-6..49] of string = (
+'0c','0d','0e','0f','0g','0a','0b',
+'1c','1d','1e','1f','1g','1a','1b',
+'2c','2d','2e','2f','2g','2a','2b',
+'3c','3d','3e','3f','3g','3a','3b',
+'4c','4d','4e','4f','4g','4a','4b',
+'5c','5d','5e','5f','5g','5a','5b',
+'6c','6d','6e','6f','6g','6a','6b',
+'7c','7d','7e','7f','7g','7a','7b');
type
line_status = record
- pitch, chord_pitch, octave_adjust, beam_level, slur_level, after_slur: integer;
+ 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;
@@ -56,6 +68,41 @@ type
var current: array[voice_index] of line_status;
lastdur: array[voice_index] of char;
+ voice_range, range_low, range_high: array[voice_index] of string;
+
+{ Range limits are user-specified as e.g. 3c. To make comparisons
+meaningful, a and b (which come after g) are translated to h and i. }
+
+procedure checkRange(voice: integer; note: string);
+begin
+ if voice_range[voice]='' then exit;
+ if length(note)>2 { assume usual PMX form with octave } then
+ note := note[3]+note[1];
+ if note[2]='a' then note[2]:='h';
+ if note[2]='b' then note[2]:='i';
+ if (note<range_low[voice]) or (note>range_high[voice]) then
+ error3(voice,note+' is out of range, specified as '+voice_range[voice])
+end;
+
+procedure defineRange(voice: integer; range: string);
+begin
+ voice_range[voice] := range;
+ if range='' then exit;
+ if not (
+ ('0'<=range[1]) and (range[1]<='7')
+ and ('a'<=range[2]) and (range[2]<='g')
+ and (range[3]='-')
+ and ('0'<=range[4]) and (range[4]<='7')
+ and ('a'<=range[5]) and (range[5]<='g')
+ ) then error('Badly formatted range "'+range+
+ '" for voice '+voice_label[voice]+', must be e.g. 3c-4a',print);
+ if range[2]='a' then range[2]:='h';
+ if range[2]='b' then range[2]:='i';
+ if range[5]='a' then range[5]:='h';
+ if range[5]='b' then range[5]:='i';
+ range_low[voice]:=substr(range,1,2);
+ range_high[voice]:=substr(range,4,2);
+end;
procedure chordTie(voice: integer; var lab: char);
var n: integer;
@@ -153,9 +200,7 @@ 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);}
+begin
oct:=octaveCode(note);
if oct='=' then oct:=initOctave(voiceStave(voice));
if (oct>='0') and (oct<='9') then
@@ -165,12 +210,11 @@ begin {if debugMode then
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);}
+ npitch:=pitch+interval;
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;
@@ -244,8 +288,12 @@ 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);
+ {* 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[1]='(') or (note[1]=')') then sl:=slurID else sl:=' ';
+ {* CMO 0.60d: omit insertchar in case of tie
+ insertchar(sl,note,2); }
+ if (note[1]='(') or (note[1]=')') then 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')
@@ -295,14 +343,18 @@ begin with current[voice] do
end;
end;
+{ This is the routine called by prepmx.pas for every normal and chordal
+note, immediately after checkOctave. It does two things: adjusts pitch
+of notes following a C: chord to what it would have been without that
+chord, and checks for pitch overruns. }
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);
+ begin
+ pstat:=newPitch (voice, note, chord_pitch, chord_lastnote);
pitch := newPitch (voice, note, pitch, lastnote);
if pitch<>pstat then repitch(note,pitch-pstat);
+ checkRange(voice,range_name[pitch]);
if (pitch<lowest_pitch) and checkPitch then
begin write('Pitch of note ',note,' following ',lastnote,' reported as ',pitch);
error3(voice,'Pitch too low')
@@ -312,10 +364,6 @@ begin with current[voice] do
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;
diff --git a/Build/source/utils/m-tx/mtx-src/strings.h b/Build/source/utils/m-tx/mtx-src/strings.h
new file mode 100644
index 00000000000..3b8e7f4a539
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/strings.h
@@ -0,0 +1,36 @@
+/* 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(Char *s, short p, short *n);
+/* Read an integer at position p of s */
+extern boolean startsWith(Char *s1, Char *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);
+extern short nextWordBound(Char *s, Char trigger, short p);
+/* find end of first word starting with trigger after s[p] */
+
+
+#undef vextern
+
+#endif /*STRINGS_H*/
+
+/* End. */
diff --git a/Build/source/utils/m-tx/mtx-src/strings.pas b/Build/source/utils/m-tx/mtx-src/strings.pas
new file mode 100644
index 00000000000..9f7deabd183
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/strings.pas
@@ -0,0 +1,109 @@
+unit strings; { String handling primitives. }
+ { These should be recoded in C instead of using the p2c code. }
+
+interface
+
+procedure scan1 (s: string; p: integer; var n: integer);
+ { Read an integer at position p of s }
+function startsWith (s1, s2: string): boolean;
+function pos1(c: char; s: string): integer;
+function posNot (c: char; var s: string): integer;
+procedure insertChar (c: char; var s: string; p: integer);
+function substr (var s: string; start, count: integer): string;
+procedure getNum(line: string; var k: integer);
+procedure getTwoNums(var line: string; var k1, k2: integer);
+procedure toUpper(var s: string);
+procedure delete1 (var s: string; p: integer);
+procedure predelete (var s: string; l: integer);
+procedure shorten (var s: string; new_length: integer);
+function nextWordBound(s: string; trigger: char; p: integer): integer;
+ { find end of first word starting with trigger after s[p] }
+
+implementation
+
+procedure scan1 (s: string; p: integer; var n: integer);
+ begin if length(s)<p then
+ writeln('scan1: string too short');
+ predelete(s,p-1); getNum(s,n);
+ end;
+
+function pos1(c: char; s: string): integer;
+ begin pos1:= pos(c, s); end;
+
+procedure delete1 (var s: string; p: integer);
+ begin if length(s)<p then
+ writeln('delete1: string too short');
+ delete(s,p,1);
+ end;
+
+procedure predelete (var s: string; l: integer);
+ begin if length(s)<l then
+ writeln('predelete: string too short');
+ delete(s,1,l);
+ end;
+
+procedure shorten (var s: string; new_length: integer);
+ begin if length(s)<new_length then
+ writeln('shorten: string too short');
+ s[0] := char(new_length);
+ end;
+
+function posNot(c: char; var s: string): integer;
+ var i, l: integer;
+begin l:=length(s);
+ for i:=1 to l do if s[i]<>c then
+ begin posnot:=i; exit; end;
+ posnot:=0;
+end;
+
+procedure strval(line: string; var num, p: integer);
+ begin val(line,num,p); end;
+
+procedure getNum(line: string; var k: integer);
+ var code: integer;
+begin strval(line,k,code);
+ if code>0 then strval(copy(line,1,code-1),k,code);
+end;
+
+procedure getTwoNums(var line: string; var k1, k2: integer);
+ var num, code, p: integer;
+begin
+ strval(line,num,p); strval(copy(line,1,p-1),k1,code);
+ strval(copy(line,p+1,255),k2,code);
+ if code>0 then strval(copy(line,1,code-1),k2,code);
+end;
+
+procedure toUpper (var s: string);
+ var i: integer;
+begin
+ for i:=1 to length(s) do s[i]:=upcase(s[i]);
+end;
+
+function startsWith (s1, s2: string): boolean;
+ var i, l1, l2: integer;
+ begin l1:=length(s1); l2:=length(s2);
+ startsWith := false; if l1<l2 then exit;
+ for i:=1 to l2 do if s1[i]<>s2[i] then exit;
+ startsWith := true;
+ end;
+
+procedure insertChar (c: char; var s: string; p: integer);
+ begin if length(s)<p-1 then
+ writeln('insertchar: string too short');
+ insert(c,s,p);
+ end;
+
+function substr (var s: string; start, count: integer): string;
+ begin if length(s)<start+count-1 then
+ writeln('insertchar: string too short');
+ substr := copy(s,start,count);
+ end;
+
+function nextWordBound(s: string; trigger: char; p: integer): integer;
+ begin
+ repeat p:=p+1 until (p>length(s)) or (s[p]=trigger);
+ while (p<length(s)) and (s[p+1]<>' ') do p:=p+1;
+ nextWordBound:=p;
+end;
+
+end.
diff --git a/Build/source/utils/m-tx/mtx-0.60d/uptext.c b/Build/source/utils/m-tx/mtx-src/uptext.c
index eb5b2772e02..de3f2f6d182 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/uptext.c
+++ b/Build/source/utils/m-tx/mtx-src/uptext.c
@@ -2,8 +2,8 @@
/* From input file "uptext.pas" */
-#include "p2c.h"
+#include "p2c.h"
#define UPTEXT_G
#include "uptext.h"
@@ -35,21 +35,19 @@ typedef struct uptext_info {
Static uptext_info U[maxvoices];
-short uptextLineNo(voice)
-short voice;
+short uptextLineNo(short voice)
{
return (U[voice-1].uptext);
}
-Void setUptextLineNo(voice, lno)
-short voice, lno;
+void setUptextLineNo(short voice, short lno)
{
U[voice-1].uptext = lno;
}
-Void clearUptext()
+void clearUptext(void)
{
voice_index voice, FORLIM;
@@ -59,7 +57,7 @@ Void clearUptext()
}
-Void initUptext()
+void initUptext(void)
{
voice_index voice, FORLIM;
uptext_info *WITH;
@@ -74,8 +72,7 @@ Void initUptext()
}
-Static Void textTranslate(uptext, font)
-Char *uptext, *font;
+Static void textTranslate(Char *uptext, Char *font)
{
short k;
Char STR1[256], STR2[256], STR3[256], STR4[256];
@@ -148,8 +145,7 @@ struct LOC_addUptext {
short adj;
} ;
-Local Void adjustUptext(LINK)
-struct LOC_addUptext *LINK;
+Local void adjustUptext(struct LOC_addUptext *LINK)
{
Char letter;
boolean force = false;
@@ -209,10 +205,7 @@ struct LOC_addUptext *LINK;
}
-Void addUptext(voice_, no_uptext, pretex)
-short voice_;
-boolean *no_uptext;
-Char *pretex;
+void addUptext(short voice_, boolean *no_uptext, Char *pretex)
{
struct LOC_addUptext V;
Char font[256];
diff --git a/Build/source/utils/m-tx/mtx-0.60d/uptext.h b/Build/source/utils/m-tx/mtx-src/uptext.h
index 8a9a1643dea..00fc6646a0a 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/uptext.h
+++ b/Build/source/utils/m-tx/mtx-src/uptext.h
@@ -11,11 +11,11 @@
/* 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));
+extern void initUptext(void);
+extern void clearUptext(void);
+extern short uptextLineNo(short voice);
+extern void setUptextLineNo(short voice, short lno);
+extern void addUptext(short voice, boolean *no_uptext, Char *pretex);
#undef vextern
diff --git a/Build/source/utils/m-tx/mtx-0.60d/uptext.pas b/Build/source/utils/m-tx/mtx-src/uptext.pas
index 16bebc7556f..16bebc7556f 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/uptext.pas
+++ b/Build/source/utils/m-tx/mtx-src/uptext.pas
diff --git a/Build/source/utils/m-tx/mtx-0.60d/utility.c b/Build/source/utils/m-tx/mtx-src/utility.c
index 225936909d1..b44c07b5555 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/utility.c
+++ b/Build/source/utils/m-tx/mtx-src/utility.c
@@ -4,7 +4,6 @@
#include "p2c.h"
-
#define UTILITY_G
#include "utility.h"
@@ -18,8 +17,7 @@
#define dummy '\0'
-short wordCount(s)
-Char *s;
+short wordCount(Char *s)
{
short i, n, FORLIM;
@@ -38,10 +36,7 @@ Char *s;
}
-Char *GetNextWord(Result, s, Delim, Term)
-Char *Result;
-Char *s;
-Char Delim, Term;
+Char *GetNextWord(Char *Result, Char *s, Char Delim, Char 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
@@ -65,10 +60,7 @@ Char Delim, Term;
}
-Char *NextWord(Result, s_, Delim, Term)
-Char *Result;
-Char *s_;
-Char Delim, Term;
+Char *NextWord(Char *Result, Char *s_, Char Delim, Char Term)
{
Char s[256];
@@ -77,9 +69,7 @@ Char Delim, Term;
}
-Char *plural(Result, n)
-Char *Result;
-short n;
+Char *plural(Char *Result, short n)
{
if (n == 1)
return strcpy(Result, "");
@@ -88,9 +78,7 @@ short n;
}
-short curtail(s, c)
-Char *s;
-Char c;
+short curtail(Char *s, Char c)
{
short Result = 0;
short l;
@@ -104,9 +92,7 @@ Char c;
}
-Char *toString(Result, n)
-Char *Result;
-short n;
+Char *toString(Char *Result, short n)
{
Char s[256];
@@ -115,15 +101,13 @@ short n;
}
-short digit(c)
-Char c;
+short digit(Char c)
{
return (c - '0');
}
-boolean equalsIgnoreCase(s1_, s2_)
-Char *s1_, *s2_;
+boolean equalsIgnoreCase(Char *s1_, Char *s2_)
{
Char s1[256], s2[256];
@@ -135,8 +119,7 @@ Char *s1_, *s2_;
}
-boolean startsWithIgnoreCase(s1_, s2_)
-Char *s1_, *s2_;
+boolean startsWithIgnoreCase(Char *s1_, Char *s2_)
{
Char s1[256], s2[256];
@@ -148,8 +131,7 @@ Char *s1_, *s2_;
}
-boolean startsWithBracedWord(P_)
-Char *P_;
+boolean startsWithBracedWord(Char *P_)
{
Char P[256];
Char w[256];
@@ -160,8 +142,7 @@ Char *P_;
}
-Void trim(s)
-Char *s;
+void trim(Char *s)
{
short k;
@@ -173,8 +154,7 @@ Char *s;
}
-boolean endsWith(s1_, s2)
-Char *s1_, *s2;
+boolean endsWith(Char *s1_, Char *s2)
{
Char s1[256];
short l1, l2;
@@ -197,9 +177,7 @@ struct LOC_grep {
boolean matching;
} ;
-Local Void remember(s1, s2, LINK)
-short s1, s2;
-struct LOC_grep *LINK;
+Local void remember(short s1, short s2, struct LOC_grep *LINK)
{
if (LINK->index > 9)
_Escape(9999);
@@ -209,8 +187,7 @@ struct LOC_grep *LINK;
LINK->index++;
}
-Local Void matchnum(LINK)
-struct LOC_grep *LINK;
+Local void matchnum(struct LOC_grep *LINK)
{
boolean allowsign = false, allowpoint = false, quit = false;
short s0;
@@ -254,8 +231,7 @@ struct LOC_grep *LINK;
remember(s0, LINK->s - 1, LINK);
}
-Local Void matchmeta(LINK)
-struct LOC_grep *LINK;
+Local void matchmeta(struct LOC_grep *LINK)
{
if (LINK->p < strlen(LINK->pattern))
LINK->p++;
@@ -266,8 +242,7 @@ struct LOC_grep *LINK;
LINK->matching = false;
}
-Local Void subgrep(LINK)
-struct LOC_grep *LINK;
+Local void subgrep(struct LOC_grep *LINK)
{
LINK->matching = true;
if (LINK->pattern[LINK->p-1] == '*') {
@@ -313,8 +288,7 @@ struct LOC_grep *LINK;
\ When not followed by 0..9 or \, stands for itself
\\ Backslash
*/
-Void grep(source_, pattern_, target)
-Char *source_, *pattern_, *target;
+void grep(Char *source_, Char *pattern_, Char *target)
{
struct LOC_grep V;
short j, t, reg;
@@ -360,8 +334,7 @@ Char *source_, *pattern_, *target;
/* "match" tests whether the source matches the pattern exactly */
-boolean match(source_, pattern_)
-Char *source_, *pattern_;
+boolean match(Char *source_, Char *pattern_)
{
Char source[256], pattern[256];
static Char target[256] = "";
@@ -374,9 +347,7 @@ Char *source_, *pattern_;
/* "translate" replaces the pattern by the target in the source. */
-Char *translate(Result, source_, pattern_, target_)
-Char *Result;
-Char *source_, *pattern_, *target_;
+Char *translate(Char *Result, Char *source_, Char *pattern_, Char *target_)
{
Char source[256], pattern[256], target[256];
diff --git a/Build/source/utils/m-tx/mtx-src/utility.h b/Build/source/utils/m-tx/mtx-src/utility.h
new file mode 100644
index 00000000000..2faeb292ffa
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/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(Char *s1, Char *s2);
+extern boolean startsWithIgnoreCase(Char *s1, Char *s2);
+extern boolean endsWith(Char *s1, Char *s2);
+extern boolean startsWithBracedWord(Char *P);
+extern Char *GetNextWord(Char *Result, Char *s, Char Delim, Char Term);
+extern Char *NextWord(Char *Result, Char *s, Char Delim, Char Term);
+extern short wordCount(Char *s);
+extern Char *plural(Char *Result, short n);
+extern short curtail(Char *s, Char c);
+/* Remove last character if it equals c and return its position;
+ otherwise return 0 */
+extern Char *toString(Char *Result, short n);
+extern void trim(Char *s);
+extern short digit(Char c);
+extern boolean match(Char *source, Char *pattern);
+extern Char *translate(Char *Result, Char *source, Char *pattern,
+ Char *target);
+extern void grep(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-src/utility.pas
index 42cc76d15d5..42cc76d15d5 100644
--- a/Build/source/utils/m-tx/mtx-0.60d/utility.pas
+++ b/Build/source/utils/m-tx/mtx-src/utility.pas
diff --git a/Build/source/utils/m-tx/mtx-src/version.ac b/Build/source/utils/m-tx/mtx-src/version.ac
new file mode 100644
index 00000000000..84d5d2ed6be
--- /dev/null
+++ b/Build/source/utils/m-tx/mtx-src/version.ac
@@ -0,0 +1,11 @@
+dnl
+dnl Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
+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.61])
diff --git a/Build/source/utils/m-tx/prepmx.1 b/Build/source/utils/m-tx/prepmx.1
index 299591e2e9d..226457c532e 100644
--- a/Build/source/utils/m-tx/prepmx.1
+++ b/Build/source/utils/m-tx/prepmx.1
@@ -1,4 +1,4 @@
-.TH prepmx 1 "01 September 2005" "M-Tx Version 0.60" "prepmx Manual Page"
+.TH prepmx 1 "15 December 2015" "M-Tx Version 0.61" "prepmx Manual Page"
.SH NAME
prepmx \- preprocessor for PMX, easy music typesetting program
.SH SYNOPSIS
@@ -18,17 +18,18 @@ easy example, have a look at the following example:
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.
+Laurie, the creator of the M-Tx language and the author of
+.BR prepmx (1),
+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.
+You can then process this file using the
+.BR pmxab (1)
+command, which is a preprocessor for MusiXTeX.
.I outdir/
is the directory where `pmx' will put the final .tex file. Note that the
@@ -41,40 +42,44 @@ 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
+disable unbeamVocal
.TP
.B \-c
-main music lines only \- ignore chords
+disable doChords
.TP
.B \-D
-enable debug mode
+enable debugMode
.TP
.B \-f
-use tonic sol\-fa note names
+enable solfaNoteNames
.TP
.B \-i
-ignore errors
+enable ignoreErrors
.TP
.B \-m
-music only \- ignore lyrics
+disable doLyrics
.TP
.B \-n
-indent first system and print default instrument names
+enable instrumentNames
.TP
.B \-t
-ignore uptext lines
+disable doUptext
.TP
.B \-u
-uptext synchronizes with notes only, not rests
+disable uptextOnRests
.TP
.B \-v
-verbose progress report
+enable beVerbose
.TP
.B \-w
-enable pedantic warnings
+enable pedanticWarnings
.TP
.BI \- n
-select specified case of multiple score
+select Special Case
+.I n
+.TP
+.B \-H
+print enabled status of all options
.SH EXIT STATUS
If no error was found,
.B prepmx
@@ -84,12 +89,12 @@ 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)
+User's Guide (mtxdoc.pdf)
.br
-pmx(1), musixtex(1)
+pmxab(1), musixtex(1)
.SH AUTHORS
-prepmx was written by Dirk Laurie <dpl@sun.ac.za>.
-This manual page was written by Roland Stigge <stigge@antcom.de> for the Debian
-project. It was revised and extended by Nis Martensen
-<nis.martensen@web.de>, mostly by copying text from Dirk Laurie's M-Tx
-User's Guide.
+prepmx was written by Dirk Laurie <dirk.laurie@gmail.com>. This
+manual page was written by Roland Stigge <stigge@antcom.de>
+for the Debian project. It was revised and extended by
+Nis Martensen <nis.martensen@web.de> and Bob Tennent
+<rdt@cs.queensu.ca>.
diff --git a/Build/source/utils/m-tx/version.ac b/Build/source/utils/m-tx/version.ac
index cfad6555f7b..84d5d2ed6be 100644
--- a/Build/source/utils/m-tx/version.ac
+++ b/Build/source/utils/m-tx/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current mtx version
-m4_define([mtx_version], [0.60d])
+m4_define([mtx_version], [0.61])