diff options
Diffstat (limited to 'Build/source/utils')
22 files changed, 1011 insertions, 295 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README index 6f772f45182..544e2876049 100644 --- a/Build/source/utils/README +++ b/Build/source/utils/README @@ -10,7 +10,7 @@ asymptote 2.41 - checked 23mar17 see http://tug.org/texlive/build.html#asymptote and tlpkg/bin/tl-update-asy -autosp 2017-07-14 - checked 26jul17 +autosp 2017-12-26 - checked 29dec17 http://ctan.org/pkg/autosp devnag - from devanagari package installed in texmf-dist. diff --git a/Build/source/utils/autosp/ChangeLog b/Build/source/utils/autosp/ChangeLog index e3e6e2e5d41..c51094c7144 100644 --- a/Build/source/utils/autosp/ChangeLog +++ b/Build/source/utils/autosp/ChangeLog @@ -1,3 +1,8 @@ +2017-12-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * Import autosp-2017-12-26 + configure.ac: Adapted. + 2017-07-26 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * Import autosp-2017-07-14 diff --git a/Build/source/utils/autosp/autosp-src/ChangeLog b/Build/source/utils/autosp/autosp-src/ChangeLog index 0f821cfe795..b7554491442 100644 --- a/Build/source/utils/autosp/autosp-src/ChangeLog +++ b/Build/source/utils/autosp/autosp-src/ChangeLog @@ -1,7 +1,21 @@ AUTOSP - Determination of automatic spacing for accidentals simplified - Many comments corrected and expanded +2017-12-21 + + Allow for new commands \nqq, \nqqq, \hap and \happ. + Allow for single-note xtuplet. + Handle restbars > 1 in process_xtuplet or process_appogg + +2017-10-10 + + Corrected nastaffs setting for \startpiece and \startextract. + Introduced vspacings_active[i] to suppress unnecesary added spacing for + accidentals. + Applying TransformNotes to bar_rest output. + +2017-07-14 + + Automatic added spacing for all collective-coding accidentals. 2017-06-21 diff --git a/Build/source/utils/autosp/autosp-src/Makefile.am b/Build/source/utils/autosp/autosp-src/Makefile.am index c10b23606c8..c00b15cfb94 100644 --- a/Build/source/utils/autosp/autosp-src/Makefile.am +++ b/Build/source/utils/autosp/autosp-src/Makefile.am @@ -1,16 +1,17 @@ -bin_PROGRAMS = autosp rebar +bin_PROGRAMS = autosp rebar tex2aspc autosp_SOURCES = utils.h utils.c autosp.c rebar_SOURCES = utils.h utils.c rebar.c +tex2aspc_SOURCES = utils.h utils.c tex2aspc.c AM_CFLAGS = -O4 -ansi -Wall -Wextra -pedantic-errors -dist_man_MANS = autosp.1 rebar.1 +dist_man_MANS = autosp.1 rebar.1 tex2aspc.1 ## Tests ## -TESTS = autosp.test rebar.test +TESTS = autosp.test rebar.test tex2aspc.test EXTRA_DIST = EXTRA_DIST += $(TESTS) DISTCLEANFILES = -EXTRA_DIST += tests/quod2.aspc tests/quod2.tex tests/quod3.aspc -DISTCLEANFILES += quod2.* quod3.* +EXTRA_DIST += tests/quod2.aspc tests/quod2.tex tests/quod3.aspc tests/quod4.aspc +DISTCLEANFILES += quod2.* quod3.* quod4.* diff --git a/Build/source/utils/autosp/autosp-src/Makefile.in b/Build/source/utils/autosp/autosp-src/Makefile.in index 116184b9a9b..b08e3cb8495 100644 --- a/Build/source/utils/autosp/autosp-src/Makefile.in +++ b/Build/source/utils/autosp/autosp-src/Makefile.in @@ -76,7 +76,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -bin_PROGRAMS = autosp$(EXEEXT) rebar$(EXEEXT) +bin_PROGRAMS = autosp$(EXEEXT) rebar$(EXEEXT) tex2aspc$(EXEEXT) subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ @@ -101,6 +101,9 @@ autosp_LDADD = $(LDADD) am_rebar_OBJECTS = utils.$(OBJEXT) rebar.$(OBJEXT) rebar_OBJECTS = $(am_rebar_OBJECTS) rebar_LDADD = $(LDADD) +am_tex2aspc_OBJECTS = utils.$(OBJEXT) tex2aspc.$(OBJEXT) +tex2aspc_OBJECTS = $(am_tex2aspc_OBJECTS) +tex2aspc_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -129,8 +132,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(autosp_SOURCES) $(rebar_SOURCES) -DIST_SOURCES = $(autosp_SOURCES) $(rebar_SOURCES) +SOURCES = $(autosp_SOURCES) $(rebar_SOURCES) $(tex2aspc_SOURCES) +DIST_SOURCES = $(autosp_SOURCES) $(rebar_SOURCES) $(tex2aspc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -468,12 +471,13 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ autosp_SOURCES = utils.h utils.c autosp.c rebar_SOURCES = utils.h utils.c rebar.c +tex2aspc_SOURCES = utils.h utils.c tex2aspc.c AM_CFLAGS = -O4 -ansi -Wall -Wextra -pedantic-errors -dist_man_MANS = autosp.1 rebar.1 -TESTS = autosp.test rebar.test +dist_man_MANS = autosp.1 rebar.1 tex2aspc.1 +TESTS = autosp.test rebar.test tex2aspc.test EXTRA_DIST = $(TESTS) tests/quod2.aspc tests/quod2.tex \ - tests/quod3.aspc -DISTCLEANFILES = quod2.* quod3.* + tests/quod3.aspc tests/quod4.aspc +DISTCLEANFILES = quod2.* quod3.* quod4.* all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -579,6 +583,10 @@ rebar$(EXEEXT): $(rebar_OBJECTS) $(rebar_DEPENDENCIES) $(EXTRA_rebar_DEPENDENCIE @rm -f rebar$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rebar_OBJECTS) $(rebar_LDADD) $(LIBS) +tex2aspc$(EXEEXT): $(tex2aspc_OBJECTS) $(tex2aspc_DEPENDENCIES) $(EXTRA_tex2aspc_DEPENDENCIES) + @rm -f tex2aspc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tex2aspc_OBJECTS) $(tex2aspc_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -587,6 +595,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/autosp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rebar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tex2aspc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .c.o: diff --git a/Build/source/utils/autosp/autosp-src/README b/Build/source/utils/autosp/autosp-src/README index b7964a9cf42..e84c3eacf53 100644 --- a/Build/source/utils/autosp/autosp-src/README +++ b/Build/source/utils/autosp/autosp-src/README @@ -1,5 +1,5 @@ This is the README for the autosp package, -version 2017-06-21. +version 2017-07-14. autosp is a preprocessor that generates note-spacing commands for MusiXTeX scores. It simplifies the creation diff --git a/Build/source/utils/autosp/autosp-src/autosp.1 b/Build/source/utils/autosp/autosp-src/autosp.1 index 38750769ab6..a72d363ab0c 100644 --- a/Build/source/utils/autosp/autosp-src/autosp.1 +++ b/Build/source/utils/autosp/autosp-src/autosp.1 @@ -1,5 +1,5 @@ .\" This manpage is licensed under the GNU Public License -.TH AUTOSP 1 2017-07-140 "" "" +.TH AUTOSP 1 2017-12-19 "" "" .SH NAME autosp \- preprocessor to generate note-spacing commands for MusiXTeX scores @@ -136,9 +136,10 @@ coded using the standard \\def\\atnextbar notation but the non-standard command \\Cpause in a note segment also generates a bar-centered rest. -Spacing commands \\sk and \\hsk in the source are discarded -(but not \\qsk, \\tqsk, \\hqsk or \\qqsk); -however, +Spacing commands \\sk and \\bsk in the source are discarded, +but not "small" skips \\hsk, \\qsk, \\tqsk, \\hqsk or \\qqsk, +or the small "backward" skips \\hbsk, \\bqsk, \\btsk, or \\bhsk. +Moreover, non-standard commands \\QQsk, \\HQsk \\TQsk and \\Qsk in the source generate "global" skips; i.e., the effect of \\qqsk, \\hqsk, \\tqsk or \\qsk, respectively, in .I every @@ -146,17 +147,21 @@ staff. These ensure that staffs remain synchronized if additional spacing is nee Global skips may also be obtained within collective-coding sequences by using up to four successive commas -to get the effects of \\qqsk, \\hqsk, \\tqsk or \\qsk, respectively, -as global skips. -Global skips are -automatically inserted before accidentals ('^', '_', '=', '<', '>') on collective-coding notes. -If the automatic spacing is insufficient, the spacing may be increased by adding sufficient commas or -using a conventional notes command instead of \\anotes. Automatic skips are +to get the effects of \\QQsk, \\HQsk, \\TQsk or \\Qsk, respectively. +Global skips \\tqsk (or, for double-flats, \\qsk) are +automatically inserted before accidentals ('^', '_', '=', '<', '>') on collective-coding notes +(except when the preceding note is "virtual"; i.e., a skip). +If this automatic additional spacing is .I not -inserted -for any of the +wanted in some context, it may be avoided by +replacing +the accidental in the collective-coding sequence +by +any of the .I explicit accidental commands: \\sh, \\fl, \\na, \\smallsh, \\bigsh, etc. +If the automatic spacing is insufficient, the spacing may be increased by adding sufficient commas or +using a conventional notes command instead of \\anotes. A note segment can be completely empty, but if a note segment should start @@ -164,11 +169,14 @@ with or contain a "space," the note-value of that space must be made explicit with a command of the form \\ha{*}, \\qa{.*}, \\qa{*}, \\ca{*}, etc. -From version 2017-06-14, the effects of \\TransformNotes calls are implemented by the pre-processor. This +From version 2017-06-14, the effects of \\TransformNotes calls are implemented by the +.B autosp +pre-processor. This enables use of +musixlyr in .B autosp -scores -with musixlyr.tex, which is incompatible with the +scores; musixlyr.tex +is incompatible with the musixtnt.tex implementation of \\TransformNotes. @@ -215,6 +223,7 @@ of 1.45\\elemskip is used. If this isn't suitable and can't be corrected with a supports .I x-tuplets introduced using \\xtuplet{\fIx\fP} +or \\xxtuplet{\fIx:y\fP} and .I triplets introduced @@ -228,11 +237,6 @@ using any of the following commands (regardless of any re-definition of \\txt or \\downtuplet .fi -However, -MusiXTeX notation does not -specify the -.I intended -duration of an x-tuplet. .B autosp assumes that an x-tuplet is to be played in (\fIx\fP\-1)/\fIx\fP @@ -240,23 +244,58 @@ of the apparent x-tuplet duration. So, for example, a triplet in eighths is assumed to be played in the time of one quarter note. If this assumption isn't valid, the x-tuplet must -be coded explicitly using a \\vnotes command; see the first +be coded explicitly using a suitable \\vnotes command; see the first measure of barsant2.aspc for an example of a non-standard x-tuplet: a 5-tuple of 64th notes with an intended duration of .I six 64ths. + +In some polyrhythmic scores, the \\txt numeral may be displaced, even if the notes +themselves are correctly spaced. In these cases, it is possible to suppress +the normal output of \\txt by using the non-standard commands \\Triolet (no arguments) +or \\Xtuplet{k}\\ +and placing a numeral at the correct location using \\zcn (i.e., \\zcharnote). + .B autosp -cannot deal with simultaneous x-tuplets in multiple staffs unless the x values and -note durations are identical. +can deal with simultaneous x-tuplets in multiple staffs provided the x values and +total note durations are identical. + +In some baroque scores, particularly by J.S. Bach, a beamed sixteenth note is vertically aligned +with +the third note of a triplet of eighth notes in another staff (implying that they should +be sounded simultaneously); e.g., +.nf + + \\ibl0L0\\qb0{.L}\\tqql0L + +.fi +would be played as if notated +.nf + + \\uptrio{b}10\\ql L\\hroff{\\cl L} + +.fi +The following coding will align the beamed sixteenth note +with the third note of a triplet in another staff: +.nf + + \\ibl0L0\\qb0{.L}\\hbsk\\tqql0L -User-defined macros are generally not processed or expanded; however, definitions of the form +.fi +and, similarly, for triplets of sixteenth notes: +.nf + + \\ibbu0J0\\qb0{.J}\\hbsk\\nqqqu0J\\qb0{.J}\\hbsk\\tqqqu0J + +.fi +Generally, user-defined macros are not processed or expanded; however, definitions of the form .nf \\def\\atnextbar{\\znotes ... \\en} .fi -generate definitions that take account of \\TransformNotes. +generate definitions that do take account of \\TransformNotes. All staffs are assumed to have the same meter; see kinder2.aspc for an example of how to work around this. @@ -270,9 +309,13 @@ initially and add them into the resulting TeX file. .SH EXAMPLES See files quod2.aspc, kinder2.aspc, geminiani.aspc and barsant2.aspc for scores suitable for input to .BR autosp . +The program +.B tex2aspc +can be used to convert "legacy" MusiXTeX scores to .aspc format. .SH SEE ALSO .BR msxlint (1) +.BR tex2aspc (1) .PP musixdoc.pdf diff --git a/Build/source/utils/autosp/autosp-src/autosp.c b/Build/source/utils/autosp/autosp-src/autosp.c index 5cf413f72c2..5c9b1c35956 100644 --- a/Build/source/utils/autosp/autosp-src/autosp.c +++ b/Build/source/utils/autosp/autosp-src/autosp.c @@ -1,4 +1,4 @@ -char version[12] = "2017-07-14"; +char version[12] = "2017-12-22"; /* Copyright (C) 2014-17 R. D. Tennent School of Computing, * Queen's University, rdt@cs.queensu.ca @@ -105,7 +105,6 @@ char version[12] = "2017-07-14"; # define PRIVATE static -# define LINE_LEN 1024 # define SHORT_LEN 256 # define MAX_STAFFS 9 @@ -149,6 +148,9 @@ PRIVATE int spacing = MAX_SPACING; /* spacing for current notes */ PRIVATE int old_spacing = MAX_SPACING; PRIVATE int vspacing[MAX_STAFFS]; /* virtual-note (skip) spacing */ +PRIVATE bool vspacing_active[MAX_STAFFS]; /* virtual-note spacing active? */ + /* used to preclude unnecessary pre-accidental skips */ + PRIVATE bool nonvirtual_notes; /* used to preclude output of *only* virtual notes */ @@ -273,6 +275,8 @@ status_all (void) if (active[i]) status (i); status_spacing (); fprintf (logfile, "nastaffs=%d\n", nastaffs); + if (dottedbeamnotes) + fprintf (logfile, "dottedbeamnotes == true\n"); } PRIVATE void @@ -352,6 +356,7 @@ void analyze_notes (char **ln) { n_outstrings[i] = outstrings[i]; *n_outstrings[i] = '\0'; vspacing[i] = 0; + vspacing_active[i] = false; collective[i][0] = '\0'; cspacing[i] = MAX_SPACING; first_collective[i] = false; @@ -384,19 +389,21 @@ void checkn (char *s) PRIVATE void filter_output (int i) -{ /* discard , \sk \hsk \Qsk \TQsk \HQsk \QQsk and \Cpause */ +{ /* discard \sk \bsk \Qsk \TQsk \HQsk \QQsk and \Cpause */ char *s = notes[i]; while (s < current[i]) { char *t; t = strpbrk (s+1, "\\&|$"); if (t == NULL || t > current[i]) t = current[i]; if (!prefix ("\\sk", s) - && !prefix ("\\hsk", s) + && !prefix ("\\bsk", s) && !prefix ("\\Cpause", s) && !prefix ("\\Qsk", s) && !prefix ("\\HQsk", s) && !prefix ("\\TQsk", s) - && !prefix ("\\QQsk", s) ) + && !prefix ("\\QQsk", s) + && !prefix ("\\Triolet", s) + && !prefix ("\\Xtuplet", s) ) { while (s < t) { while (*s == ',') s++; /* global skips */ @@ -442,6 +449,7 @@ void output_notes (int i) append (outstrings[i], &(n_outstrings[i]), "}", LINE_LEN); if (*notes[i] == '}') { collective[i][0] = '\0'; + cspacing[i] = 0; notes[i]++; } if (*notes[i] == '}') /* close of {\tinynotesize..{}}? */ @@ -504,24 +512,28 @@ int collective_note (int i) /* commas will be discarded by filter_output (i) */ if (*s == '.' && new_beaming == 0 && !dottedbeamnotes) spacing = spacing * 1.50; - else if ( (*s == '^' || *s == '_' || *s == '=' || *s == '>') ) + else if ( (*s == '^' || *s == '_' || *s == '=' || *s == '>') + && !vspacing_active[i] /* is additional spacing needed? */ + ) /* leave space for normal accidentals */ - { if (debug) + { update_global_skip (3) ; + if (debug) { fprintf (logfile, "\nLeave space for accidental\n"); status (i); status_beam (i); status_collective (i); } - update_global_skip (3) ; } - else if ( (*s == '<') /* double-flat */ ) - { if (debug) + else if ( (*s == '<') /* double-flat */ + && !vspacing_active[i] /* is additional spacing needed? */ + ) + { update_global_skip (5); + if (debug) { fprintf (logfile, "\nLeave space for double-flat\n"); status (i); status_beam (i); status_collective (i); } - update_global_skip (5); } else if (isalnum (*s) || *s == '*') { @@ -535,6 +547,7 @@ int collective_note (int i) status (i); status_collective (i); } + vspacing_active[i] = false; return spacing; } s++; @@ -766,7 +779,8 @@ int spacing_note (int i) break; } - if (prefix("\\tqqq", s) ) + if (prefix("\\tqqq", s) || + prefix("\\nqqq", s) ) { if (beaming[i] > SP(32)) beaming[i] = SP(32); spacing = beaming[i]; @@ -780,7 +794,8 @@ int spacing_note (int i) break; } - if (prefix("\\tqq", s) ) + if (prefix("\\tqq", s) || + prefix("\\nqq", s) ) { if (beaming[i] > SP(16)) beaming[i] = SP(16); spacing = beaming[i]; @@ -820,13 +835,16 @@ int spacing_note (int i) /* non-spacing beam termination */ new_beaming = 0; - else if ( prefix("\\xtuplet", s)) + else if ( prefix("\\xtuplet", s) || + prefix("\\xxtuplet", s)|| + prefix("\\Xtuplet", s) ) { char *t = s+1; while (!isdigit(*t)) t++; xtuplet[i] = atoi(t); } else if ( prefix("\\triolet", s) + || prefix("\\Triolet", s) || prefix("\\uptrio", s) || prefix("\\downtrio", s) || prefix("\\uptuplet", s) @@ -948,6 +966,7 @@ int spacing_note (int i) if (prefix ("\\whpp", s) || prefix ("\\hupp", s) || prefix ("\\hlpp", s) + || prefix ("\\happ", s) || prefix ("\\hspp", s) || prefix ("\\hppp", s) || prefix ("\\hpausepp", s) @@ -971,6 +990,7 @@ int spacing_note (int i) if (prefix ("\\whp", s) || prefix ("\\hup", s) || prefix ("\\hlp", s) + || prefix ("\\hap", s) || prefix ("\\hsp", s) || prefix ("\\hpp", s) || prefix ("\\hpausep", s) @@ -1012,6 +1032,7 @@ int spacing_note (int i) { fprintf (logfile, "\nAfter spacing_note:\n"); status (i); } + vspacing_active[i] = false; return spacing; } @@ -1045,6 +1066,9 @@ void initialize_notes () { fprintf (logfile, "\nEntering initialize_notes\n"); status_all (); } + if ( nastaffs == 1 && spacing != MAX_SPACING && restbars > 0) + output_rests (); + if (spacing == MAX_SPACING) fprintf (outfile, "\\znotes"); else if (spacing == SP(1)+SP(2) || spacing == SP(1)+SP(2)+SP(4)) @@ -1270,7 +1294,10 @@ void process_xtuplet (void) } } - if (debug) fprintf (logfile, "\nDetermine xtuplet duration:\n"); + if (debug) + { fprintf (logfile, "\nDetermine xtuplet duration:\n"); + fflush (logfile); + } for (i=1; i <= nstaffs; i++) if (xtuplet[i] > 1) { @@ -1278,14 +1305,13 @@ void process_xtuplet (void) save_state (xi); pseudo_output_notes (xi); xspacing = spacings[xi]; - do + while (xspacing % xtuplet[xi] != 0) { xspacing += spacing_note (xi); pseudo_output_notes (xi); if (xspacing >= MAX_SPACING) error ("Can't determine xtuplet duration."); } - while (xspacing % xtuplet[xi] != 0); restore_state (xi); break; } @@ -1448,8 +1474,7 @@ void generate_notes () return; } if (old_spacing < MAX_SPACING) putc ('\n', outfile); - if ( nastaffs == 1 && spacing != MAX_SPACING && restbars > 0) - output_rests (); + initialize_notes (); } @@ -1462,6 +1487,7 @@ void generate_notes () if (active[i] && spacings[i] != MAX_SPACING && spacings[i] != spacing && vspacing[i] == 0 ) { vspacing[i] = spacings[i]; + vspacing_active[i] = true; vspacing[i] = vspacing[i] - spacing; if (debug) { fprintf (logfile, "\nAfter vspacing initialization:\n"); @@ -1527,11 +1553,18 @@ void process_command (char **ln) active[nstaffs] = true; } } + nastaffs = nstaffs; + if (debug) + fprintf (logfile, "default TransformNotes2=%s\n", TransformNotes2); } - if (debug) - fprintf (logfile, "default TransformNotes2=%s\n", TransformNotes2); if (nstaffs == 1) fprintf (outfile, "\\nostartrule\n"); - nastaffs = nstaffs; + if (debug) + { + int j; + fprintf (logfile, "ninstr=%d nstaffs=%d nastaffs=%d\n", ninstr, nstaffs, nastaffs); + for (j=1; j <= nstaffs; j++) + fprintf (logfile, "active[%d]=%d\n", j, active[j]); + } fprintf (outfile, "\\startpiece"); t = strpbrk (*ln+1, "\\%\n"); *ln = t; @@ -1555,11 +1588,11 @@ void process_command (char **ln) active[nstaffs] = true; } } + nastaffs = nstaffs; + if (debug) + fprintf (logfile, "default TransformNotes2=%s\n", TransformNotes2); } - if (debug) - fprintf (logfile, "default TransformNotes2=%s\n", TransformNotes2); if (nstaffs == 1) fprintf (outfile, "\\nostartrule\n"); - nastaffs = nstaffs; fprintf (outfile, "\\startextract"); t = strpbrk (*ln+1, "\\%\n"); *ln = t; @@ -1611,6 +1644,13 @@ void process_command (char **ln) t = strpbrk (t+1, "#}"); if (t == NULL) break; } + if (debug) + { + int j; + fprintf (logfile, "ninstr=%d nstaffs=%d nastaffs=%d\n", ninstr, nstaffs, nastaffs); + for (j=1; j <= nstaffs; j++) + fprintf (logfile, "active[%d]=%d\n", j, active[j]); + } /* output \TransformNotes... as a comment: */ putc ('%', outfile); @@ -1805,6 +1845,7 @@ void process_command (char **ln) else if ( prefix ("\\bar", *ln) && !prefix ("\\barno", *ln)) { int i; + char *s, *t; bool atnextbar = false; for (i=1; i <= nstaffs; i++) if (active[i] && bar_rest[i]) @@ -1824,16 +1865,24 @@ void process_command (char **ln) else { if (atnextbar) { fprintf (outfile, "\\def\\atnextbar{\\znotes"); - for (i=1; i <= nstaffs; i++) + t = TransformNotes2; + while (true) { + s = strchr (t, '#'); + if (s == NULL) + break; + while (t < s) /* output any initial \transpose etc. */ + { putc (*t, outfile); t++; } + t++; /* skip # */ + i = atoi (t) -1; t++; if (active[i]) { if (bar_rest[i]) fprintf (outfile, "\\centerpause"); bar_rest[i] = false; } - if ( (terminator[i] == '&') || (terminator[i] == '|') ) - putc (terminator[i], outfile); + if (*t != '\0') + { putc (*t, outfile); t++; } /* terminator */ } fprintf (outfile, "\\en}%%\n"); } @@ -1962,6 +2011,12 @@ void process_command (char **ln) *ln = *ln + strlen(*ln); } + else if ( prefix ("\\end", *ln)) + { + fprintf (outfile, "\\end\n"); + exit(0); + } + else /* everything else */ { diff --git a/Build/source/utils/autosp/autosp-src/autosp.test b/Build/source/utils/autosp/autosp-src/autosp.test index b7a55db76c5..07d7e8c2a12 100755 --- a/Build/source/utils/autosp/autosp-src/autosp.test +++ b/Build/source/utils/autosp/autosp-src/autosp.test @@ -1,5 +1,6 @@ #! /bin/sh -vx -# Copyright 2016-2017 Karl Berry <tex-live@tug.org> + +# Copyright 2016 Karl Berry <tex-live@tug.org> # Copyright 2015 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. diff --git a/Build/source/utils/autosp/autosp-src/compile b/Build/source/utils/autosp/autosp-src/compile index f8e99f0fb6f..531136b068e 100755 --- a/Build/source/utils/autosp/autosp-src/compile +++ b/Build/source/utils/autosp/autosp-src/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2017-09-16.17; # UTC +scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2017-09-16.17; # UTC # 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, see <https://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,8 +255,7 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ - icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -343,6 +342,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff --git a/Build/source/utils/autosp/autosp-src/configure b/Build/source/utils/autosp/autosp-src/configure index ae24877edfa..522808c7bca 100755 --- a/Build/source/utils/autosp/autosp-src/configure +++ b/Build/source/utils/autosp/autosp-src/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for autosp 2017-07-14. +# Generated by GNU Autoconf 2.69 for autosp 2017-12-26. # # Report bugs to <rdt@cs.queensu.ca>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='autosp' PACKAGE_TARNAME='autosp' -PACKAGE_VERSION='2017-07-14' -PACKAGE_STRING='autosp 2017-07-14' +PACKAGE_VERSION='2017-12-26' +PACKAGE_STRING='autosp 2017-12-26' PACKAGE_BUGREPORT='rdt@cs.queensu.ca' PACKAGE_URL='' @@ -1265,7 +1265,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 autosp 2017-07-14 to adapt to many kinds of systems. +\`configure' configures autosp 2017-12-26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1331,7 +1331,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of autosp 2017-07-14:";; + short | recursive ) echo "Configuration of autosp 2017-12-26:";; esac cat <<\_ACEOF @@ -1422,7 +1422,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -autosp configure 2017-07-14 +autosp configure 2017-12-26 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1845,7 +1845,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 autosp $as_me 2017-07-14, which was +It was created by autosp $as_me 2017-12-26, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2708,7 +2708,7 @@ fi # Define the identity of the package. PACKAGE='autosp' - VERSION='2017-07-14' + VERSION='2017-12-26' cat >>confdefs.h <<_ACEOF @@ -4974,7 +4974,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 autosp $as_me 2017-07-14, which was +This file was extended by autosp $as_me 2017-12-26, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5040,7 +5040,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="\\ -autosp config.status 2017-07-14 +autosp config.status 2017-12-26 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/utils/autosp/autosp-src/configure.ac b/Build/source/utils/autosp/autosp-src/configure.ac index b027bd6d027..43c35444be4 100644 --- a/Build/source/utils/autosp/autosp-src/configure.ac +++ b/Build/source/utils/autosp/autosp-src/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.63) -AC_INIT([autosp],[2017-07-14],[rdt@cs.queensu.ca]) +AC_INIT([autosp],[2017-12-26],[rdt@cs.queensu.ca]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([config.h]) diff --git a/Build/source/utils/autosp/autosp-src/depcomp b/Build/source/utils/autosp/autosp-src/depcomp index 5ff3c6feb4b..4ebd5b3a2f2 100755 --- a/Build/source/utils/autosp/autosp-src/depcomp +++ b/Build/source/utils/autosp/autosp-src/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2017-09-16.17; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2017-09-16.17; # UTC # 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, see <https://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -786,6 +786,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff --git a/Build/source/utils/autosp/autosp-src/install-sh b/Build/source/utils/autosp/autosp-src/install-sh index ac159ceda40..377bb8687ff 100755 --- a/Build/source/utils/autosp/autosp-src/install-sh +++ b/Build/source/utils/autosp/autosp-src/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2017-09-23.17; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,15 +41,19 @@ scriptversion=2017-09-23.17; # UTC # This script is compatible with the BSD install script, but was written # from scratch. -tab=' ' nl=' ' -IFS=" $tab$nl" +IFS=" "" $nl" -# Set DOITPROG to "echo" to test this script. +# set DOITPROG to echo to test this script +# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -doit_exec=${doit:-exec} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -64,6 +68,17 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + posix_mkdir= # Desired mode of installed file. @@ -82,7 +97,7 @@ dir_arg= dst_arg= copy_on_change=false -is_target_a_directory=possibly +no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -122,57 +137,46 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) is_target_a_directory=never;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -204,15 +208,6 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -228,16 +223,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -271,104 +266,122 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst - dstbase=`basename "$src"` - case $dst in - */) dst=$dst$dstbase;; - *) dst=$dst/$dstbase;; - esac + dst=$dstdir/`basename "$src"` dstdir_status=0 else - dstdir=`dirname "$dst"` + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + test -d "$dstdir" dstdir_status=$? fi fi - case $dstdir in - */) dstdirslash=$dstdir;; - *) dstdirslash=$dstdir/;; - esac - obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -378,51 +391,53 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac + eval "$initialize_posix_glob" + oIFS=$IFS IFS=/ - set -f + $posix_glob set -f set fnord $dstdir shift - set +f + $posix_glob set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -435,8 +450,8 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=${dstdirslash}_inst.$$_ - rmtmp=${dstdirslash}_rm.$$_ + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 @@ -457,12 +472,15 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - set +f && + $posix_glob set +f && + test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -475,24 +493,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 @@ -504,6 +522,6 @@ done # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff --git a/Build/source/utils/autosp/autosp-src/rebar.test b/Build/source/utils/autosp/autosp-src/rebar.test index 47193da22c3..2e70b0b7f1a 100755 --- a/Build/source/utils/autosp/autosp-src/rebar.test +++ b/Build/source/utils/autosp/autosp-src/rebar.test @@ -1,6 +1,6 @@ #! /bin/sh -vx -# Copyright 2017 Karl Berry <tex-live@tug.org> -# Copyright 2015 Peter Breitenlohner <tex-live@tug.org> + +# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. echo && echo "*** rebar --help" diff --git a/Build/source/utils/autosp/autosp-src/tests/quod2.tex b/Build/source/utils/autosp/autosp-src/tests/quod2.tex index 10f3205b4fd..d5905e1aafd 100644 --- a/Build/source/utils/autosp/autosp-src/tests/quod2.tex +++ b/Build/source/utils/autosp/autosp-src/tests/quod2.tex @@ -1,4 +1,4 @@ -% Generated by autosp (2017-07-14). +% Generated by autosp (2017-12-22). \input musixtex \input musixplt \input soul.sty @@ -77,7 +77,7 @@ \Notes\qa{.L}\sk\sk&\ibl1n{-1}\qb1{n}\qb1{o}\qb1{n}&\ttie2\ibl2r{-2}\qb2r\tqb2q\qa p&\ibl3n{-2}\qb3{n}\qb3{m}\qb3{l}\en \notes\ibbl0M2\qb0M\tqb0N&\tqb1m\sk&\sk\sk&\tqb3k\sk\hqsk\en% \Notes\tqsk\itieu0a\qa a&\tqsk\ibl1l{-2}\qb1l&\tqsk\qa{.o}&\tqsk\shake{n}\ibl3i0\qb3{^j}\en -\notes\sk\sk\tqsk\ttie0\ibbl0a{-2}\qb0{a}\qb0{N}\qb0{M}\tqsk\tqb0L&\tqb1k\sk\tqsk\cl{^j}\sk\ds\tqsk\sk&\sk\sk\tqsk\sk\sk\ibbl2i2\qb2i\tqsk\tqb2{^j}&\nbbl3\qb3i\tqb3j\tqsk\cu h\sk\ds\tqsk\sk\hqsk\en% +\notes\sk\sk\ttie0\ibbl0a{-2}\qb0{a}\qb0{N}\qb0{M}\tqsk\tqb0L&\tqb1k\sk\cl{^j}\sk\ds\tqsk\sk&\sk\sk\sk\sk\ibbl2i2\qb2i\tqsk\tqb2{^j}&\nbbl3\qb3i\tqb3j\cu h\sk\ds\tqsk\sk\hqsk\en% \bar%7 \Notes\qa{M}\sk\qa{K}\sk&\ibu1g0\qb1{f}\qb1{g}\qb1{h}\tqh1f&\ibl2k0\qb2{k}\qb2{l}\qb2{m}\tqb2k&\qa{h}\sk\qa{h}\sk\en% \Notes\qa{N}\sk\qa{G}\sk&\ibu1g{-2}\qb1{g}\qb1{f}\qb1{e}\tqh1d&\ibl2i4\qb2{i}\qb2{k}\qb2{n}\tqb2m&\qa{i}\sk\qa{i}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.J}&\qa{e}&\ds&\ibu3j{-2}\qb3{j}\en \notes\sk\sk&\sk\sk&\ibbl2l{-2}\qb2l\tqb2k&\qb3{i}\sk\en -\Notes\sk\tqsk\cu{^J}&\qa{e}\tqsk\sk&\ibl2j4\qb2j\tqsk\tqb2l&\qb3{h}\tqsk\tqh3g\en% +\Notes\sk\cu{^J}&\qa{e}\sk&\ibl2j4\qb2j\tqb2l&\qb3{h}\tqh3g\en% \bar%16 \notes\qa{K}\sk\sk\sk\qa{K}\sk&\ibu1g{1}\qb1{d}\sk\qb1{e}\sk\qb1{d}\sk&\ibbl2h1\qb2{h}\qb2{k}\qb2{j}\tqb2i\ibbl2j0\qb2j\tbbl2\qb2h&\ibu3f2\qb3f\sk\tqh3g\sk\ibu3h{-4}\qb3h\sk\en \Notes\sk&\tqh1j&\itieu2k\tqb2k&\tqh3f\en% diff --git a/Build/source/utils/autosp/autosp-src/tests/quod4.aspc b/Build/source/utils/autosp/autosp-src/tests/quod4.aspc new file mode 100644 index 00000000000..9867d3d0e5b --- /dev/null +++ b/Build/source/utils/autosp/autosp-src/tests/quod4.aspc @@ -0,0 +1,160 @@ +% Generated by tex2aspc (2017-12-15). +% Generated by autosp (2017-12-22). +\input musixtex +\input musixplt +\input soul.sty +\sodef{\so}{}{0.15em}{0.5em}{0.5em} +\input musixsty +\input musixps +\nohalfties +\def\pstiehgt{0.5} +\def\psslurhgt{0.5} +\vsize9.75in +\voffset-0.5in +\hsize7.0in +\hoffset-0.25in +\smallmusicsize +\bigaccid +\advance\parindent by 10pt +\def\raisebarno{7\internote}% +\nobarnumbers +\relativeaccid +\geometricskipscale +\instrumentnumber4 +\setclef1\bass\setbassclefsymbol1\bassoct +\setclef4\treble\settrebleclefsymbol4\trebleoct +\generalsignature{+1} +\generalmeter\meterC +\setname1{B} +\setname2{T} +\setname3{A} +\setname4{S} +\songtop4\songbottom1 +\fulltitle{\sc\so{Quodlibet}} +\subtitle{\it Variation 30 of the Goldberg Variations for Clavier} +\title{\it Quodlibet} +\author{J. S. Bach (1685--1750)} +\shortauthor{\it J. S. Bach} +\othermention{Arranged for Recorders by R. D. Tennent} +\maketitle +\startbarno=0 +\nobarnumbers +\stafftopmarg=3.0\Interligne% +\staffbotmarg=3.0\Interligne% +\startpiece\addspace\afterruleskip% +\systemnumbers% +\anotes + \ds& + \cu d& + \ds& + \ds\en +\bar%1 +\anotes + \ha N\sk\sk\sk\ha M\sk\sk\sk\sk\sk& + \ibu1g2\qb1{g}\qb1{h}\qb1{i}\tqh1j\ibl1k{-2}\qb1k\nbbl1\qb1j\tqb1i\ibu1h0\qb1h\nbbu1\qb1g\tqh1h& + & + \hp\sk\sk\sk\qp\sk\sk\ds\cu d\sk\hqsk\en +\def\atnextbar{\znotes&&\centerpause&\en}% +\bar%2 +\anotes + \ha L\sk\sk\sk\qa{.K}\sk\sk\sk\cu J\sk& + \ibu1i{-2}\qb1i\tqh1h\itied1g\qa g\sk\ttie1\qa g\sk\sk\ibu1f0\shake{n}\qb1f\nbbu1\qb1e\tqh1f& + \qa{n}\sk\qa{n}\sk\qa o\sk\sk\cl o\ds\sk& + \ibu3g2\qb3{g}\qb3{h}\qb3{i}\tqh3j\ibl3k{-2}\qb3k\nbbl3\qb3j\tqb3i\cu h\ds\sk\hqsk\en +\bar%3 +\anotes + \hu I\sk\sk\tqsk\sk\hu J\sk\sk\sk& + \qa g\sk\ds\tqsk\cl k\ibu1j{-2}\qb1{j}\qb1{i}\qb1h\tqh1g& + \ibl2n{-1}\qb2{n}\qb2{o}\qb2{n}\tqsk\tqb2{=m}\ibl2j{0}\qb2{l}\qb2{k}\qb2j\tqb2p& + \qa{k}\sk\qa{k}\tqsk\sk\qa{l}\sk\qa{l}\sk\en +\bar%4 +\anotes + \ha K\sk\sk\sk\sk\qa G\sk\ds\ibbl0b{-1}\qb0b\tqb0a& + \itied1f\shake{n}\qa f\sk\ttie1\ibbu1e{-2}\qb1f\tbbu1\qb1e\itied1d\tqh1d\ttie1\qa d\sk\qp\sk\s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2\ibl2j0\qb2k\nbbl2\qb2j\tqb2k\cl i& + \ibu3f2\qb3f\sk\tqh3g\sk\ibu3h{-4}\qb3h\sk\tqh3f\qa g\sk\sk\cu g\en +\setrightrepeat +\endpiece% +\eject +\end diff --git a/Build/source/utils/autosp/autosp-src/tex2aspc.1 b/Build/source/utils/autosp/autosp-src/tex2aspc.1 new file mode 100644 index 00000000000..92b7d24fcb2 --- /dev/null +++ b/Build/source/utils/autosp/autosp-src/tex2aspc.1 @@ -0,0 +1,37 @@ +.\" This manpage is licensed under the GNU Public License +.TH TEX2ASPC 1 2017-12-13 "" "" + +.SH NAME + +tex2aspc \- converts conventional MusiXTeX scores to .aspc format +for processing by +.BR autosp (1). + +.SH SYNOPSIS + +.B tex2aspc +.RB [ \-v\ |\ \-\-version\ |\ \-h\ |\ \-\-help ] + +.B tex2aspc +.IR infile [\fR.tex\fP] +.RI [ outfile [ \fR.aspc\fP ]] + +This program re-factors (sequences of) conventional +note-spacing commands (\\notes \\Notes \\NOtes ...) +into +\\anotes commands. +This is intended for "legacy" scores in order to take advantage of +features +only provided by +.BR autosp (1), +such as "global" skips. + +.SH SEE ALSO +.BR autosp (1) +.PP +musixdoc.pdf + +.SH AUTHOR +This program and manual page were written by Bob Tennent <rdt@cs.queensu.ca>. + + diff --git a/Build/source/utils/autosp/autosp-src/tex2aspc.c b/Build/source/utils/autosp/autosp-src/tex2aspc.c new file mode 100644 index 00000000000..0372fa2d428 --- /dev/null +++ b/Build/source/utils/autosp/autosp-src/tex2aspc.c @@ -0,0 +1,353 @@ +char version[12] = "2017-12-15"; + +/* Copyright (C) 2017 R. D. Tennent School of Computing, + * Queen's University, rdt@cs.queensu.ca + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will + * be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * You should have received a copy of the GNU General + * Public License along with this program; if not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* tex2aspc - converts conventional MusiXTeX code to autosp-compatible format */ + +/* Usage: tex2aspc infile[.tex] [outfile[.aspc]] + * tex2aspc [-v | --version | -h | --help] + */ + + +# include "utils.h" + +#ifdef HAVE_CONFIG_H /* for TeXLive */ +#include <config.h> +#endif + +# ifdef KPATHSEA +# include <kpathsea/getopt.h> +# else +# include <getopt.h> +# endif + +# ifdef HAVE_STDBOOL_H +# include <stdbool.h> +# else +# ifndef HAVE__BOOL +# define _Bool signed char +# endif +# define bool _Bool +# define true 1 +# define false 0 +# endif + +# define PRIVATE static + +# define SHORT_LEN 256 +# define MAX_STAFFS 9 + + +PRIVATE char infilename[SHORT_LEN]; +PRIVATE char *infilename_n = infilename; +PRIVATE char outfilename[SHORT_LEN]; +PRIVATE char *outfilename_n = outfilename; +PRIVATE FILE *infile, *outfile; + +PRIVATE char line[LINE_LEN]; /* line of input */ + +PRIVATE int ninstr = 1; /* number of instruments */ +PRIVATE int staffs[MAX_STAFFS] = {0,1}; /* number of staffs for ith instrument*/ +PRIVATE int nstaffs = 1; /* number of staffs */ +PRIVATE char terminator[MAX_STAFFS]; /* one of '&' "|', '$' */ + +PRIVATE char notes[MAX_STAFFS][LINE_LEN]; + /* accumulate commands to be output */ +PRIVATE char *n_notes[MAX_STAFFS]; +PRIVATE bool outputs = false; /* are there commands to be output? */ + + + +PRIVATE void +usage () +{ + printf ("Usage: tex2aspc [-v | --version | -h | --help]\n"); + printf (" tex2aspc infile[.tex] [outfile[.aspc]]\n"); +} + + +PRIVATE +void analyze_notes (char **ln) +/* append material from *ln to \en to notes[*] and initialize terminator[*]. */ +{ + int i; char *s; char *t; + int newlines = 0; + s = *ln+1; /* skip "/" */ + while (isalpha(*s)) {s++;} /* skip rest of the initial command */ + while (true) + { /* look for \en */ + t = strstr(s, "\\en"); + if (t != NULL) break; + /* replace EOL by a blank and append another line of input */ + { char new_line[LINE_LEN]; + char *nl; + if (fgets (new_line, LINE_LEN, infile) == NULL) + error ("Unexpected EOF."); + nl = new_line; + while (*nl == ' ') nl++; /* avoid spaces */ + t = strpbrk (s, "\n%"); + if (t == NULL) error ("Missing EOL."); + if (*t == '\n') + { *t = ' '; t++;} + *t = '\0'; + if (append (line, &t, nl, LINE_LEN) >= LINE_LEN) + error ("Line too long."); + newlines++; + } + } + /* t -> "\en" */ + if ( prefix("\\enotes", t) ) *ln = t+7; + else *ln = t+3; + *t = '$'; /* replace '\' by '$' (a distinctive terminating character) */ + for (i=1; i <= nstaffs; i++) + { char *tt; + while (*s == ' ') s++; /* skip spaces */ + tt = strpbrk (s, "|&$"); + if (tt == NULL) error ("can't parse note-spacing command."); + while (s < tt) + { *n_notes[i] = *s; + n_notes[i]++; s++; + } + *n_notes[i] = '\0'; + terminator[i] = *s; + if (*s != '$') s++; + } + lineno = lineno + newlines; +} + +PRIVATE +void process_command (char **ln) +{ char *s; + if ( prefix("\\def\\nbinstrument", *ln) || + prefix("\\instrumentnumber", *ln) ) + { + s = strpbrk (*ln, "123456789"); + if ( s == NULL ) error ("instrument number command unreadable."); + ninstr = atoi (s); + while (*ln <= s) { putc (**ln, outfile); (*ln)++;} + } + + else if ( prefix("\\setstaffs", *ln) ) + { /* for now, just record in staffs[i] */ + int n, p; + s = strpbrk (*ln, "123456789"); + if ( s == NULL ) error ("\\setstaffs command unreadable."); + n = (int)(*s) - (int)('0'); /* instrument number */ + s = strpbrk (s+1, "123456789"); + if ( s == NULL ) error ("\\setstaffs command unreadable."); + p = (int)(*s) - (int)('0'); /* number of staffs */ + staffs[n] = p; + while (*ln <= s) { putc (**ln, outfile); (*ln)++;} + } + + else if ( prefix("\\startpiece", *ln) || + prefix("\\startextract", *ln) ) + { int i, j; + nstaffs = 1; + for (j=2; j <= staffs[1]; j++) + nstaffs++; + for (i=2; i <= ninstr; i++) + { nstaffs++; + for (j=2; j <= staffs[i]; j++) + nstaffs++; + } + fputs (*ln, outfile); + *ln =*ln + strlen(*ln); + } + + else if ( prefix("\\nnnotes", *ln) || + prefix("\\nnotes", *ln) || + prefix("\\notes", *ln) || + prefix("\\Notes", *ln) || + prefix("\\NOtes", *ln) || + prefix("\\NOTes", *ln) || + prefix("\\NOTEs", *ln) ) + { char *s; + analyze_notes (ln); + outputs = true; + s = strchr (*ln, '\n'); + if (s == NULL) s = *ln + strlen (*ln); + *ln = s+1; + } + + else + { /* if there is output, generate it and re-initialize n_notes[*] */ + if (outputs) + { int i; + fputs ("\\anotes\n", outfile); + for (i=1; i <= nstaffs; i++) + { + fputs (" ", outfile); + fputs (notes[i], outfile); + if (terminator[i] == '$') + fputs ("\\en", outfile); + else + fputc (terminator[i], outfile); + fputc ('\n', outfile); + n_notes[i] = notes[i]; + *n_notes[i] = '\0'; + } + outputs = false; + } + fputs (*ln, outfile); + *ln =*ln + strlen(*ln); + } + +} + +PRIVATE +void process_line () +{ + char *ln; + ln = &line[0]; + while ( *ln != '\0') + { + while (*ln == ' ') { ln++; fputc (' ', outfile); } + if (*ln == '%') { + fprintf (outfile, "%s", ln); + return; + } + process_command (&ln); + } +} + + +PRIVATE +void process_score () +{ + int c; int i; + lineno = 0; + for (i=1; i < MAX_STAFFS; i++) + { + staffs[i] = 1; + n_notes[i] = notes[i]; + *n_notes[i] = '\0'; + } + c = getc (infile); + + while ( c != EOF ) + { + ungetc (c, infile); + fgets(line, LINE_LEN, infile); + lineno++; + process_line (); + c = getc (infile); + } /* c == EOF */ +} + +int main (int argc, char *argv[]) +{ + int c; + char today[12]; + time_t mytime; +# define NOPTS 3 + struct option longopts[NOPTS] = + { { "help", 0, NULL, 'h'}, + { "version", 0, NULL, 'v'}, + { NULL, 0, NULL, 0} + }; + + time (&mytime); + strftime (today, 11, "%Y-%m-%d", localtime (&mytime) ); + printf ("This is tex2aspc, version %s.\n", version); + printf ("Copyright (C) 2017 R. D. Tennent\n" ); + printf ("School of Computing, Queen's University, rdt@cs.queensu.ca\n" ); + printf ("License GNU GPL version 2 or later <http://gnu.org/licences/gpl.html>.\n" ); + printf ("There is NO WARRANTY, to the extent permitted by law.\n\n" ); + + c = getopt_long (argc, argv, "hv", longopts, NULL); + while (c != -1) + { + switch (c) + { + case 'h': + usage (); + printf ("Please report bugs to rdt@cs.queensu.ca.\n" ); + exit (0); + case 'v': + exit (0); + case '?': + exit (EXIT_FAILURE); + default: + printf ("Function getopt returned character code 0%o.\n", + (unsigned int) c); + exit (EXIT_FAILURE); + } + c = getopt_long (argc, argv, "hv", longopts, NULL); + } + + infilename[0] = '\0'; + infilename_n = infilename; + if (optind < argc) + append (infilename, &infilename_n, argv[optind], sizeof (infilename)); + else + { usage(); + exit (EXIT_FAILURE); + } + infile = fopen (infilename, "r"); + if (infile == NULL) + { + if (suffix (".tex", infilename) ) + { printf ("Can't open %s\n", infilename); + exit (EXIT_FAILURE); + } + else + { append (infilename, &infilename_n, ".tex", sizeof (infilename)); + infile = fopen (infilename, "r"); + if (infile == NULL) + { printf ("Can't open %s\n", infilename); + exit (EXIT_FAILURE); + } + } + } + printf ("Reading from %s.", infilename); + + optind++; + outfilename[0] = '\0'; + outfilename_n = outfilename; + if (optind < argc) /* user-provided outfilename */ + { + append (outfilename, &outfilename_n, argv[optind], sizeof (outfilename)); + if (!suffix (".aspc", outfilename)) + append (outfilename, &outfilename_n, ".aspc", sizeof (outfilename)); + } + else + { /* output to infile.aspc */ + append (outfilename, &outfilename_n, infilename, sizeof (outfilename)); + outfilename_n -= 4; + *outfilename_n = '\0'; + append (outfilename, &outfilename_n, ".aspc", sizeof (outfilename)); + } + + outfile = fopen (outfilename, "w"); + if (outfile == NULL) + { printf ("Can't open %s\n", outfilename); + exit (EXIT_FAILURE); + } + printf (" Writing to %s.", outfilename); + + printf ("\n\n"); + + fprintf (outfile, "%% Generated by tex2aspc (%s).\n", version); + process_score (); + + return 0; +} diff --git a/Build/source/utils/autosp/autosp-src/tex2aspc.test b/Build/source/utils/autosp/autosp-src/tex2aspc.test new file mode 100644 index 00000000000..da78b1caf79 --- /dev/null +++ b/Build/source/utils/autosp/autosp-src/tex2aspc.test @@ -0,0 +1,21 @@ +#! /bin/sh -vx + +# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +echo && echo "*** tex2aspc --help" +./tex2aspc --help || exit 1 + +echo && echo "*** tex2aspc --version" +./tex2aspc --version || exit 1 + +echo && echo "*** tex2aspc (missing infile)" +./tex2aspc && exit 1 + +echo && echo "*** tex2aspc quod2.tex quod4.aspc" +cp tests/quod4.aspc . +rm -f quod4.aspc +./tex2aspc quod2.tex quod4.aspc || exit 1 + +echo && echo "*** diff quod4.aspc tests/quod4.aspc" +diff quod4.aspc tests/quod4.aspc || exit 1 diff --git a/Build/source/utils/autosp/configure b/Build/source/utils/autosp/configure index 58bbd155777..8008477bee6 100755 --- a/Build/source/utils/autosp/configure +++ b/Build/source/utils/autosp/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for autosp (TeX Live) 2017-07-14. +# Generated by GNU Autoconf 2.69 for autosp (TeX Live) 2017-12-26. # # Report bugs to <tex-k@tug.org>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='autosp (TeX Live)' PACKAGE_TARNAME='autosp--tex-live-' -PACKAGE_VERSION='2017-07-14' -PACKAGE_STRING='autosp (TeX Live) 2017-07-14' +PACKAGE_VERSION='2017-12-26' +PACKAGE_STRING='autosp (TeX Live) 2017-12-26' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1278,7 +1278,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 autosp (TeX Live) 2017-07-14 to adapt to many kinds of systems. +\`configure' configures autosp (TeX Live) 2017-12-26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1345,7 +1345,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of autosp (TeX Live) 2017-07-14:";; + short | recursive ) echo "Configuration of autosp (TeX Live) 2017-12-26:";; esac cat <<\_ACEOF @@ -1442,7 +1442,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -autosp (TeX Live) configure 2017-07-14 +autosp (TeX Live) configure 2017-12-26 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1865,7 +1865,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 autosp (TeX Live) $as_me 2017-07-14, which was +It was created by autosp (TeX Live) $as_me 2017-12-26, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3788,7 +3788,7 @@ fi # Define the identity of the package. PACKAGE='autosp--tex-live-' - VERSION='2017-07-14' + VERSION='2017-12-26' cat >>confdefs.h <<_ACEOF @@ -5968,7 +5968,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 autosp (TeX Live) $as_me 2017-07-14, which was +This file was extended by autosp (TeX Live) $as_me 2017-12-26, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6025,7 +6025,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="\\ -autosp (TeX Live) config.status 2017-07-14 +autosp (TeX Live) config.status 2017-12-26 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/utils/autosp/configure.ac b/Build/source/utils/autosp/configure.ac index d3e91db538a..3a2cdcc086f 100644 --- a/Build/source/utils/autosp/configure.ac +++ b/Build/source/utils/autosp/configure.ac @@ -7,7 +7,7 @@ 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_define([autosp_version], [2017-07-14])[]dnl using unmodified autosp source +m4_define([autosp_version], [2017-12-26])[]dnl using unmodified autosp source AC_INIT([autosp (TeX Live)], autosp_version, [tex-k@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([autosp-src/autosp.c]) |