texlive[43712] Build/source/utils/autosp/autosp-src: import new

commits+preining at tug.org commits+preining at tug.org
Fri Apr 7 01:47:08 CEST 2017


Revision: 43712
          http://tug.org/svn/texlive?view=revision&revision=43712
Author:   preining
Date:     2017-04-07 01:47:07 +0200 (Fri, 07 Apr 2017)
Log Message:
-----------
import new autosp sources (7Apr17)

Modified Paths:
--------------
    trunk/Build/source/utils/autosp/autosp-src/ChangeLog
    trunk/Build/source/utils/autosp/autosp-src/README
    trunk/Build/source/utils/autosp/autosp-src/autosp.1
    trunk/Build/source/utils/autosp/autosp-src/autosp.c
    trunk/Build/source/utils/autosp/autosp-src/autosp.test
    trunk/Build/source/utils/autosp/autosp-src/configure
    trunk/Build/source/utils/autosp/autosp-src/configure.ac
    trunk/Build/source/utils/autosp/autosp-src/tests/quod2.aspc
    trunk/Build/source/utils/autosp/autosp-src/tests/quod2.tex

Modified: trunk/Build/source/utils/autosp/autosp-src/ChangeLog
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/ChangeLog	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/ChangeLog	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,5 +1,7 @@
 AUTOSP
 
+  \hl distinguished from \hloff
+
 2016-11-02
 
   support xtuples in more than one staff (provided x and note durations are

Modified: trunk/Build/source/utils/autosp/autosp-src/README
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/README	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/README	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,5 +1,5 @@
 This is the README for the autosp package, 
-version 2016-11-02.
+version 2017-04-06.
 
 autosp is a preprocessor that generates note-spacing
 commands for MusiXTeX scores. It simplifies the creation
@@ -37,13 +37,16 @@
 coded using the standard \def\atnextbar notation but also
 by using the non-standard command \Cpause in a note segment.
 
-Spacing commands \sk and \hsk (but not \qsk, \hqsk or
-\qqsk) in the source are discarded. A note segment can be
-completely empty, but if a note segment should start 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.
+Spacing commands \sk and \hsk in the source are discarded,
+but not \qsk, \hqsk or \qqsk; moreover non-standard commands
+\Qsk, \HQsk and \QQsk generate "global" skips; i.e., the
+effect of \qsk, \hqsk or \qqsk in *every* staff.
 
+A note segment can be completely empty, but if a note
+segment should start 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.
+
 All other conventional MusiXTeX commands are output exactly
 as given in the input.
 

Modified: trunk/Build/source/utils/autosp/autosp-src/autosp.1
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/autosp.1	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/autosp.1	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,5 +1,5 @@
 .\" This manpage is licensed under the GNU Public License
-.TH AUTOSP 1 2016-10-31  "" ""
+.TH AUTOSP 1 2017-04-06  "" ""
 
 .SH NAME
 autosp \- preprocessor to generate note-spacing commands for MusiXTeX scores
@@ -126,9 +126,14 @@
 the non-standard command \\Cpause in a note segment generates a
 bar-centered rest.
 
-Spacing commands \\sk and \\hsk
-(but not \\qsk, \\hqsk or \\qqsk)
-in the source are discarded.
+Spacing commands \\sk and \\hsk in the source are discarded,
+but not \\qsk, \\hqsk or \\qqsk;
+moreover
+non-standard commands
+\\Qsk, \\HQsk and \\QQsk generate "global" skips; i.e., the effect of \\qsk, \\hqsk or \\qqsk in 
+.I every 
+staff.
+
 A note segment can be completely empty, but if a note segment should start
 with or contain a "space," the note-value
 of that space must be made explicit with a command of the
@@ -209,7 +214,9 @@
 64ths.
 .B autosp
 cannot deal with simultaneous x-tuplets in multiple staffs unless the x values and
-note durations are identical.
+note durations are identical. Global skips (\\QQsk, \\HQsk and \\Qsk) are
+ineffective if a staff has an x-tuplet; however, "local" skips (\\qqsk, \\hqsk, \\qsk)
+are effective.
 
 User-defined macros are not processed or expanded.
 

Modified: trunk/Build/source/utils/autosp/autosp-src/autosp.c
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/autosp.c	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/autosp.c	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,6 +1,6 @@
-char version[12] = "2016-11-02";
+char version[12] = "2017-04-06";
 
-/*  Copyright (C) 2014-16 R. D. Tennent School of Computing,
+/*  Copyright (C) 2014-17 R. D. Tennent School of Computing,
  *  Queen's University, rdt at cs.queensu.ca
  *
  *  This program is free software; you can redistribute it
@@ -119,6 +119,7 @@
 PRIVATE char logfilename[SHORT_LEN];
 PRIVATE char *logfilename_n = logfilename;
 
+
 PRIVATE FILE *infile, *outfile, *logfile;
 
 PRIVATE char line[LINE_LEN];            /* line of input                      */
@@ -175,6 +176,11 @@
                                /* accumulate commands to be output    */
 PRIVATE char *n_outstrings[MAX_STAFFS];
 
+PRIVATE int global_skip;  
+   /* = 1, 2 or 4, for (non-standard) commands \QQsk \HQsk \Qsk */
+PRIVATE char global_skip_str[8];
+PRIVATE char *n_global_skip_str = global_skip_str;
+
 PRIVATE void
 usage (FILE *f)
 {
@@ -337,6 +343,7 @@
   for (i=1; i <= nstaffs; i++)
     xtuplet[i] = 1;
   appoggiatura = false;
+  global_skip = 0;
   if (debug) 
   { fprintf (logfile, "\nAfter analyze_notes:\n");
     status_all ();
@@ -363,7 +370,7 @@
 
 PRIVATE
 void output_filtered (int i)
-{ /* discard \sk \hsk and \Cpause */
+{ /* discard \sk \hsk \Qsk \HQsk \QQsk and \Cpause */
   char *s = notes[i];
   while (s < current[i])
   { char *t = strpbrk (s+1, "\\&|$");
@@ -370,7 +377,10 @@
     if (t == NULL || t > current[i]) t = current[i];
     if (!prefix ("\\sk", s)
      && !prefix ("\\hsk", s)
-     && !prefix ("\\Cpause", s) )
+     && !prefix ("\\Cpause", s) 
+     && !prefix ("\\Qsk", s) 
+     && !prefix ("\\HQsk", s) 
+     && !prefix ("\\QQsk", s) )
     {
       while (s < t) 
       { *n_outstrings[i] = *s; 
@@ -632,7 +642,8 @@
     { spacing = SP(1); break; }
     
     if ( prefix ("\\ha", s)
-      || prefix ("\\hl", s)
+      || (prefix ("\\hl", s)  && !prefix ( "\\hloff", s) )
+         
       || prefix ("\\hu", s)
       || prefix ("\\hp", s)
       || prefix ("\\hpause", s) )
@@ -850,6 +861,13 @@
       else 
         s = skip_arg(t); 
     }
+    else if (prefix ("\\Qsk", s) )
+    /* may have global skips in more than one staff */
+    {  if (global_skip < 4) global_skip = 4; }
+    else if (prefix ("\\HQsk", s) )
+    {  if (global_skip < 2) global_skip = 2; }
+    else if (prefix ("\\QQsk", s) )
+    {  if (global_skip < 1) global_skip = 1; }
 
     /* Command is non-spacing.         */
     /* Skip ahead to the next command. */
@@ -1393,6 +1411,7 @@
   while (true)
   { old_spacing = spacing;
     spacing = MAX_SPACING;
+    global_skip = 0;
     nonvirtual_notes = false;
     if (debug)
     { fprintf (logfile, "\nIn generate_notes:\n");
@@ -1433,8 +1452,24 @@
         output_rests ();
       initialize_notes ();
     }
+
+    /*  generate global_skip_str:  */
+    global_skip_str[0] = '\0';
+    n_global_skip_str = global_skip_str;
+    switch (global_skip) 
+    {
+      case 0: break;
+      case 1: append (global_skip_str, &(n_global_skip_str), "\\qqsk", 8); break;  
+      case 2: append (global_skip_str, &(n_global_skip_str), "\\hqsk", 8); break;  
+      case 4: append (global_skip_str, &(n_global_skip_str), "\\qsk", 8); break;  
+    }
+
     for (i=1; i <= nstaffs; i++)  /* append current notes to outstrings */
-      if (active[i]) output_notes (i);
+      if (active[i]) 
+      {
+        append (outstrings[i], &(n_outstrings[i]), global_skip_str, LINE_LEN);
+        output_notes (i);
+      }
     for (i=1; i <= nstaffs; i++)
     {
       /* virtual notes needed?  */
@@ -1878,7 +1913,7 @@
   time (&mytime);
   strftime (today, 11, "%Y-%m-%d", localtime (&mytime) );
   fprintf (stdout, "This is autosp, version %s.\n", version);
-  fprintf (stdout, "Copyright (C) 2014-16  R. D. Tennent\n" );
+  fprintf (stdout, "Copyright (C) 2014-17  R. D. Tennent\n" );
   fprintf (stdout, "School of Computing, Queen's University, rdt at cs.queensu.ca\n" );
   fprintf (stdout, "License GNU GPL version 2 or later <http://gnu.org/licences/gpl.html>.\n" );
   fprintf (stdout, "There is NO WARRANTY, to the extent permitted by law.\n\n" );

Modified: trunk/Build/source/utils/autosp/autosp-src/autosp.test
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/autosp.test	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/autosp.test	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,8 +1,15 @@
 #! /bin/sh
-# Copyright 2016-2017 Karl Berry <tex-live at tug.org>
+
+# Copyright 2016 Karl Berry <tex-live at tug.org>
 # Copyright 2015 Peter Breitenlohner <tex-live at tug.org>
 # You may freely use, modify and/or distribute this file.
 
+if test -z "$test_srcdir"; then
+  # If not set, then we are not running from `make check'.
+  test_srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`  # == dirname $0
+  test "$test_srcdir" = "$0" && test_srcdir=.       # in case subst failed
+fi
+
 echo && echo "*** autosp --help"
 ./autosp --help || exit 1
 
@@ -13,9 +20,9 @@
 ./autosp -dd && exit 1
 
 echo && echo "*** autosp tests/quod2.aspc quod2.aspc"
-cp $srcdir/$AUTOSP_TREE/tests/quod2.aspc .
+cp $test_srcdir/tests/quod2.aspc .
 rm -f quod2.tex
 ./autosp quod2.aspc || exit 1
 
 echo && echo "*** diff quod2.tex tests/quod2.tex"
-diff quod2.tex $srcdir/$AUTOSP_TREE/tests/quod2.tex || exit 1
+diff quod2.tex $test_srcdir/tests/quod2.tex || exit 1

Modified: trunk/Build/source/utils/autosp/autosp-src/configure
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/autosp/autosp-src/configure.ac
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/configure.ac	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/configure.ac	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,5 +1,5 @@
 AC_PREREQ(2.63)
-AC_INIT([autosp],[2016-11-02],[rdt at cs.queensu.ca])
+AC_INIT([autosp],[2017-04-06],[rdt at cs.queensu.ca])
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS([config.h])

Modified: trunk/Build/source/utils/autosp/autosp-src/tests/quod2.aspc
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/tests/quod2.aspc	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/tests/quod2.aspc	2017-04-06 23:47:07 UTC (rev 43712)
@@ -28,7 +28,7 @@
 \setname3{A}
 \setname4{S}
 \songtop4\songbottom1
-\fulltitle{\BIgfont \so{Quodlibet}}
+\fulltitle{\sc\so{Quodlibet}}
 \subtitle{\it Variation 30 of the Goldberg Variations for Clavier}
 \title{\it Quodlibet}
 \author{J. S. Bach (1685--1750)}
@@ -81,17 +81,17 @@
 \anotes
   \itieu0a\qa a\ttie0\ibbl0a{-2}\qb0{aNM}\tqb0L&
   \ibl1l{-2}\qb1l\tqb1k\cl{^j}\ds&
-  \qa{.o}\ibbl2i2\qb2i\qsk\tqb2{^j}&
+  \qa{.o}\ibbl2i2\qb2i\Qsk\tqb2{^j}&
   \shake{n}\ibl3i0\qb3{^j}\nbbl3\qb3i\tqb3j\cu h\ds\en
 \bar%7
 \anotes\qa{MK}&\ibu1g0\qb1{fgh}\tqh1f&\ibl2k0\qb2{klm}\tqb2k&\qa{hh}\en
 \anotes\qa{NG}&\ibu1g{-2}\qb1{gfe}\tqh1d&\ibl2i4\qb2{ikn}\tqb2m&\qa{ii}\en
 \bar%8
-\vnotes0.4\elemskip&&&\en
+\nspace
 \anotes
   \qu{.H}\cu{^J}&
   \ibu1c4\qb1{^cde}\itied1h\tqh1h&
-  \ibl2l{-1}\qb2{.l}\itieu2k\tbbl2\tqb2k\ttie2\ibbl2j0\qb2k\hqsk\tbbl2\qb2{^j}\itieu2l\tqb2l&
+  \ibl2l{-1}\qb2{.l}\itieu2k\tbbl2\tqb2k\ttie2\ibbl2j0\qb2k\HQsk\tbbl2\qb2{^j}\itieu2l\tqb2l&
   \ibu3h{0}\qb3{hih}\tqh3g\en
 \anotes
   \ql K\cl K&
@@ -117,14 +117,14 @@
   \qa{.a}\cl{^a}&
   \ibl1m{-1}\qb1{mnm}\tqb1l&
   \qa{qq}&
-  \ibbl3k2\qb3{^klm}\tqb3n\ibl3o{-2}\qb3o\nbbl3\qb3n\qsk\tqb3m\en
+  \ibbl3k2\qb3{^klm}\tqb3n\ibl3o{-2}\qb3o\nbbl3\qb3n\tqb3m\en
 \bar%12
-\vnotes0.4\elemskip&&&\en
+\nspace
 \anotes
   \qa b\qa I&
   \ibl1k2\qb1{^k}\nbbl1\qb1l\tqb1m\itied1i\qu i&
   \ibl2o{-1}\qb2p\qb2q\qb2p\tqb2o&
-  \ibl3n{-2}\qb3n\nbbl3\qb3m\tqb3l\qsk\ibbl3k0\qb3{^kl}\qb3m\tqb3k\en
+  \ibl3n{-2}\qb3n\nbbl3\qb3m\tqb3l\Qsk\ibbl3k0\qb3{^kl}\qb3m\tqb3k\en
 \anotes
   \qa{.L}\cl{=K}&
   \ttie1\ibu1i0\qb1i\nbbu1\qb1h\tqh1i\ibu1g2\qb1g\nbbu1\qb1h\tqh1i&

Modified: trunk/Build/source/utils/autosp/autosp-src/tests/quod2.tex
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/tests/quod2.tex	2017-04-06 23:38:25 UTC (rev 43711)
+++ trunk/Build/source/utils/autosp/autosp-src/tests/quod2.tex	2017-04-06 23:47:07 UTC (rev 43712)
@@ -1,4 +1,4 @@
-%  Generated by autosp (2016-11-02).
+%  Generated by autosp (2017-04-06).
 \input musixtex
 \input musixplt
 \input soul.sty
@@ -29,7 +29,7 @@
 \setname3{A}
 \setname4{S}
 \songtop4\songbottom1
-\fulltitle{\BIgfont \so{Quodlibet}}
+\fulltitle{\sc\so{Quodlibet}}
 \subtitle{\it Variation 30 of the Goldberg Variations for Clavier}
 \title{\it Quodlibet}
 \author{J. S. Bach (1685--1750)}
@@ -77,14 +77,14 @@
 \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\hqsk&\tqb1m\sk\hqsk&\sk\sk\hqsk&\tqb3k\sk\hqsk\en%
 \Notes\itieu0a\qa a&\ibl1l{-2}\qb1l&\qa{.o}&\shake{n}\ibl3i0\qb3{^j}\en
-\notes\sk\sk\ttie0\ibbl0a{-2}\qb0{a}\qb0{N}\qb0{M}\tqb0L\hqsk&\tqb1k\sk\cl{^j}\sk\ds\sk\hqsk&\sk\sk\sk\sk\ibbl2i2\qb2i\qsk\tqb2{^j}\hqsk&\nbbl3\qb3i\tqb3j\cu h\sk\ds\sk\hqsk\en%
+\notes\sk\sk\ttie0\ibbl0a{-2}\qb0{a}\qb0{N}\qb0{M}\qsk\tqb0L\hqsk&\tqb1k\sk\cl{^j}\sk\ds\qsk\sk\hqsk&\sk\sk\sk\sk\ibbl2i2\qb2i\qsk\tqb2{^j}\hqsk&\nbbl3\qb3i\tqb3j\cu h\sk\ds\qsk\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}\sk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ace
 \Notes\qa b&\ibl1k2\qb1{^k}&\ibl2o{-1}\qb2p&\ibl3n{-2}\qb3n\en
-\notes\sk\sk\qa I\sk\sk\sk\hqsk&\nbbl1\qb1l\tqb1m\itied1i\qu i\sk\sk\sk\hqsk&\qb2q\sk\qb2p\sk\tqb2o\sk\hqsk&\nbbl3\qb3m\tqb3l\qsk\ibbl3k0\qb3{^k}\qb3{l}\qb3m\tqb3k\hqsk\en%
+\notes\sk\sk\qsk\qa I\sk\sk\sk\hqsk&\nbbl1\qb1l\tqb1m\qsk\itied1i\qu i\sk\sk\sk\hqsk&\qb2q\sk\qsk\qb2p\sk\tqb2o\sk\hqsk&\nbbl3\qb3m\tqb3l\qsk\ibbl3k0\qb3{^k}\qb3{l}\qb3m\tqb3k\hqsk\en%
 \Notes\qa{.L}&\ttie1\ibu1i0\qb1i&\ibl2n0\qb2n&\itieu3l\ha l\en
 \notes\sk\sk&\nbbu1\qb1h\tqh1i&\nbbl2\qb2m\tqb2n&\sk\sk\en
 \Notes\sk&\ibu1g2\qb1g&\cl l&\sk\en



More information about the tex-live-commits mailing list