texlive[51980] Build/source/utils: autosp 2019-08-26
commits+kakuto at tug.org
commits+kakuto at tug.org
Thu Aug 29 02:13:30 CEST 2019
Revision: 51980
http://tug.org/svn/texlive?view=revision&revision=51980
Author: kakuto
Date: 2019-08-29 02:13:30 +0200 (Thu, 29 Aug 2019)
Log Message:
-----------
autosp 2019-08-26
Modified Paths:
--------------
trunk/Build/source/utils/README
trunk/Build/source/utils/autosp/ChangeLog
trunk/Build/source/utils/autosp/TLpatches/ChangeLog
trunk/Build/source/utils/autosp/TLpatches/patch-01-binary-write
trunk/Build/source/utils/autosp/autosp-src/ChangeLog
trunk/Build/source/utils/autosp/autosp-src/autosp.c
trunk/Build/source/utils/autosp/autosp-src/configure
trunk/Build/source/utils/autosp/autosp-src/configure.ac
trunk/Build/source/utils/autosp/autosp-src/process_command.c
trunk/Build/source/utils/autosp/autosp-src/process_command.h
trunk/Build/source/utils/autosp/autosp-src/process_score.c
trunk/Build/source/utils/autosp/autosp-src/process_score.h
trunk/Build/source/utils/autosp/autosp-src/spacing_note.c
trunk/Build/source/utils/autosp/autosp-src/status.c
trunk/Build/source/utils/autosp/configure
trunk/Build/source/utils/autosp/configure.ac
Modified: trunk/Build/source/utils/README
===================================================================
--- trunk/Build/source/utils/README 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/README 2019-08-29 00:13:30 UTC (rev 51980)
@@ -9,7 +9,7 @@
see http://tug.org/texlive/build.html#asymptote
and tlpkg/bin/tl-update-asy
-autosp 2019-01-08 - checked 10Jan19
+autosp 2019-08-26 - checked 29aug19
http://ctan.org/pkg/autosp
devnag - from devanagari package installed in texmf-dist.
Modified: trunk/Build/source/utils/autosp/ChangeLog
===================================================================
--- trunk/Build/source/utils/autosp/ChangeLog 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/ChangeLog 2019-08-29 00:13:30 UTC (rev 51980)
@@ -1,3 +1,8 @@
+2019-08-29 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ * Import autosp-2019-08-26.
+ configure.ac: Adapted.
+
2019-01-10 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
* Import autosp-2019-01-08.
Modified: trunk/Build/source/utils/autosp/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/utils/autosp/TLpatches/ChangeLog 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/TLpatches/ChangeLog 2019-08-29 00:13:30 UTC (rev 51980)
@@ -1,3 +1,8 @@
+2019-08-29 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ Import autosp-2019-08-26.
+ * patch-01-binary-write: Adapt.
+
2019-01-10 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
Import autosp-2019-01-08.
Modified: trunk/Build/source/utils/autosp/TLpatches/patch-01-binary-write
===================================================================
--- trunk/Build/source/utils/autosp/TLpatches/patch-01-binary-write 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/TLpatches/patch-01-binary-write 2019-08-29 00:13:30 UTC (rev 51980)
@@ -1,6 +1,6 @@
-diff -ur autosp-2019-01-08/autosp.c autosp-src/autosp.c
---- autosp-2019-01-08/autosp.c Tue Jan 08 22:27:17 2019
-+++ autosp-src/autosp.c Thu Jan 10 07:39:06 2019
+diff -ur autosp-2019-08-26/autosp.c autosp-src/autosp.c
+--- autosp-2019-08-26/autosp.c Mon Aug 26 20:33:06 2019
++++ autosp-src/autosp.c Thu Aug 29 08:52:49 2019
@@ -183,7 +183,7 @@
}
else
@@ -19,9 +19,9 @@
if (logfile == NULL)
{ printf ("Can't open %s\n", logfilename);
exit (EXIT_FAILURE);
-diff -ur autosp-2019-01-08/rebar.c autosp-src/rebar.c
---- autosp-2019-01-08/rebar.c Tue Jan 08 22:28:27 2019
-+++ autosp-src/rebar.c Thu Jan 10 07:39:23 2019
+diff -ur autosp-2019-08-26/rebar.c autosp-src/rebar.c
+--- autosp-2019-08-26/rebar.c Tue Jan 08 22:28:27 2019
++++ autosp-src/rebar.c Thu Aug 29 08:53:39 2019
@@ -264,7 +264,7 @@
else
append (outfilename, &outfilename_n, ".aspc", sizeof (outfilename));
@@ -31,15 +31,15 @@
if (outfile == NULL)
{ fprintf (stderr,"Can't open %s\n", outfilename);
exit (EXIT_FAILURE);
-diff -ur autosp-2019-01-08/spacing_note.c autosp-src/spacing_note.c
---- autosp-2019-01-08/spacing_note.c Wed May 16 22:35:31 2018
-+++ autosp-src/spacing_note.c Thu Jan 10 08:29:36 2019
+diff -ur autosp-2019-08-26/spacing_note.c autosp-src/spacing_note.c
+--- autosp-2019-08-26/spacing_note.c Wed May 16 22:35:31 2018
++++ autosp-src/spacing_note.c Thu Aug 29 08:56:07 2019
@@ -30,7 +30,7 @@
update_global_skip (n);
/* commas will be discarded by filter_output (i) */
if (*s == '.' && new_beaming == 0 && !dottedbeamnotes)
- spacing = spacing * 1.50;
-+ spacing = (int)(spacing * 1.50);
++ spacing = (int)(spacing * 1.50);
else if ( (*s == '^' || *s == '_' || *s == '=' || *s == '>')
&& !vspacing_active[i] /* is additional spacing needed? */
)
@@ -61,9 +61,9 @@
t = strpbrk (s+1, "{\\&|$"); /* collective coding? */
if (*t == '{') /* {...} */
-diff -ur autosp-2019-01-08/tex2aspc.c autosp-src/tex2aspc.c
---- autosp-2019-01-08/tex2aspc.c Tue Jan 08 22:28:57 2019
-+++ autosp-src/tex2aspc.c Thu Jan 10 07:39:45 2019
+diff -ur autosp-2019-08-26/tex2aspc.c autosp-src/tex2aspc.c
+--- autosp-2019-08-26/tex2aspc.c Wed Feb 13 07:13:26 2019
++++ autosp-src/tex2aspc.c Thu Aug 29 08:56:48 2019
@@ -342,7 +342,7 @@
append (outfilename, &outfilename_n, ".aspc", sizeof (outfilename));
}
Modified: trunk/Build/source/utils/autosp/autosp-src/ChangeLog
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/ChangeLog 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/ChangeLog 2019-08-29 00:13:30 UTC (rev 51980)
@@ -1,5 +1,10 @@
AUTOSP
+2019-08-26
+
+ scale notes when \setsize instrument has the spacing staff
+ allow for \startmuflex\startpiece...
+
2019-01-08
adjust cspacing for new beaming after first collective beam note
Modified: trunk/Build/source/utils/autosp/autosp-src/autosp.c
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/autosp.c 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/autosp.c 2019-08-29 00:13:30 UTC (rev 51980)
@@ -1,4 +1,4 @@
-char version[12] = "2019-01-08";
+char version[12] = "2019-08-26";
/* Copyright (C) 2014-19 R. D. Tennent School of Computing,
* Queen's University, rdt at cs.queensu.ca
@@ -108,7 +108,7 @@
};
printf ("This is autosp, version %s.\n", version);
- printf ("Copyright (C) 2014-18 R. D. Tennent\n" );
+ printf ("Copyright (C) 2014-19 R. D. Tennent\n" );
printf ("School of Computing, Queen's University, rdt at 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" );
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 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/configure.ac 2019-08-29 00:13:30 UTC (rev 51980)
@@ -1,5 +1,5 @@
AC_PREREQ(2.63)
-AC_INIT([autosp],[2019-01-08],[rdt at cs.queensu.ca])
+AC_INIT([autosp],[2019-08-26],[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/process_command.c
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/process_command.c 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/process_command.c 2019-08-29 00:13:30 UTC (rev 51980)
@@ -212,7 +212,7 @@
}
void initialize_notes ()
-{ int i;
+{ int i; int instrument = 0; int staff = 0;
if (debug)
{ fprintf (logfile, "\nEntering initialize_notes\n");
status_all ();
@@ -220,6 +220,16 @@
if ( nastaffs == 1 && spacing != MAX_SPACING && restbars > 0)
output_rests ();
+ fprintf (outfile, "\\scale");
+ do /* determine instrument for spacing_staff */
+ {
+ instrument++;
+ staff = staff + staffs[instrument];
+ }
+ while (staff < spacing_staff );
+ fprintf (outfile, "%s\n", instrument_size[instrument]);
+ oldspacing_staff = spacing_staff;
+
if (spacing == MAX_SPACING)
fprintf (outfile, "\\znotes");
else if (spacing == SP(1)+SP(2) || spacing == SP(1)+SP(2)+SP(4))
@@ -383,8 +393,9 @@
{ int i;
bool xtuplet_flag;
while (true)
- { old_spacing = spacing;
+ { old_spacing = spacing;
spacing = MAX_SPACING;
+ spacing_staff = 0;
global_skip = 0;
nonvirtual_notes = false;
if (debug)
@@ -396,7 +407,12 @@
{
spacings[i] = spacing_note (i);
if (spacings[i] < spacing)
+ {
spacing = spacings[i];
+ spacing_staff = i;
+ }
+ else if (spacings[i] == spacing && vspacing[spacing_staff] > 0)
+ spacing_staff = i;
}
if (appoggiatura)
{
@@ -410,8 +426,10 @@
process_xtuplet ();
continue;
}
- if (spacing != old_spacing || spacing == MAX_SPACING)
- { if (old_spacing < MAX_SPACING)
+
+ if (spacing != old_spacing || spacing == MAX_SPACING || spacing_staff != oldspacing_staff)
+ {
+ if (old_spacing < MAX_SPACING)
terminate_notes ();
if (spacing == MAX_SPACING || nonvirtual_notes == false)
{
@@ -483,16 +501,38 @@
while (*ln <= s) { putc (**ln, outfile); (*ln)++;}
}
+ else if ( prefix("\\setsize", *ln) )
+ { int n; char *p;
+ s = strpbrk (*ln, "123456789");
+ if ( s == NULL ) error ("\\setsize command unreadable.");
+ n = (int)(*s) - (int)('0'); /* instrument number */
+ s++;
+ if (*s == '}') s++;
+ if (*s == '{') s++;
+ t = strpbrk (s, " }\n");
+ if ( t == NULL ) error ("\\setsize command unreadable.");
+ instrument_size[n][0] = '\0';
+ p = instrument_size[n];
+ while (s < t)
+ { *p = *s;
+ p++; s++;
+ }
+ *p = '\0';
+ if (debug)
+ fprintf (logfile, "instrument_size[%d] = %s\n", n, instrument_size[n]);
+ while (*ln <= s) { putc (**ln, outfile); (*ln)++;}
+ }
+
else if ( prefix("\\startpiece", *ln) )
{
if (!TransformNotesDefined) /* create default TransformNotes2: */
{ int i, j;
t = TransformNotes2;
- nstaffs = 1;
+ nstaffs = 1;
sprintf (t, "#%1i", nstaffs+1); t = t+2;
for (j=2; j <= staffs[1]; j++)
{ nstaffs++; sprintf (t, "|#%1i", nstaffs+1); t = t+3;
- active[nstaffs] = true;
+ active[nstaffs] = true;
}
for (i=2; i <= ninstr; i++)
{ nstaffs++; sprintf (t, "&#%1i", nstaffs+1); t = t+3;
@@ -956,6 +996,7 @@
else if ( prefix ("\\end ", *ln)
|| prefix ("\\end%", *ln)
+ || prefix ("\\end\n", *ln)
|| prefix ("\\end{document}", *ln) )
{
fprintf (outfile, "%s", *ln);
@@ -962,6 +1003,11 @@
exit(0);
}
+ else if ( prefix ("\\startmuflex", *ln) )
+ {
+ fputs ("\\startmuflex", outfile);
+ *ln = *ln + 12;
+ }
else /* everything else */
{
Modified: trunk/Build/source/utils/autosp/autosp-src/process_command.h
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/process_command.h 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/process_command.h 2019-08-29 00:13:30 UTC (rev 51980)
@@ -32,6 +32,8 @@
int new_beaming;
int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes */
+int spacing_staff; /* staff that determines current spacing */
+
/* save-restore state for a staff; used in process_xtuplet */
int beamingi;
char *currenti;
@@ -54,6 +56,8 @@
/* = 6 for six commas */
+char s[SHORT_LEN]; /* string for ps() */
+char *s_n;
char *ps(int spacing);
void note_segment (char *s);
void status (int i);
Modified: trunk/Build/source/utils/autosp/autosp-src/process_score.c
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/process_score.c 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/process_score.c 2019-08-29 00:13:30 UTC (rev 51980)
@@ -24,6 +24,7 @@
staffs[i] = 1;
active[i] = true;
bar_rest[i] = false;
+ append (instrument_size[i], NULL, "\\normalvalue", SHORT_LEN);
}
spacing = MAX_SPACING;
restbars = 0;
@@ -31,6 +32,7 @@
nstaffs = 1; /* number of staffs */
nastaffs = 1; /* number of active staffs; */
old_spacing = MAX_SPACING;
+ oldspacing_staff = 0;
Changeclefs = false; /* output \Changeclefs after \def\atnextbar */
TransformNotes2[0] = '\0';
Modified: trunk/Build/source/utils/autosp/autosp-src/process_score.h
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/process_score.h 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/process_score.h 2019-08-29 00:13:30 UTC (rev 51980)
@@ -16,9 +16,12 @@
int nstaffs; /* number of staffs */
int nastaffs; /* number of active staffs; */
int old_spacing;
+int oldspacing_staff;
bool Changeclefs; /* output \Changeclefs after \def\atnextbar */
char TransformNotes2[SHORT_LEN]; /* 2nd argument of \TransformNotes */
bool TransformNotesDefined;
+char instrument_size[MAX_STAFFS][SHORT_LEN];
+ /* instrument size as set by setsize or by default ("\\@one") */
char line[LINE_LEN]; /* line of input */
Modified: trunk/Build/source/utils/autosp/autosp-src/spacing_note.c
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/spacing_note.c 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/spacing_note.c 2019-08-29 00:13:30 UTC (rev 51980)
@@ -30,7 +30,7 @@
update_global_skip (n);
/* commas will be discarded by filter_output (i) */
if (*s == '.' && new_beaming == 0 && !dottedbeamnotes)
- spacing = (int)(spacing * 1.50);
+ spacing = (int)(spacing * 1.50);
else if ( (*s == '^' || *s == '_' || *s == '=' || *s == '>')
&& !vspacing_active[i] /* is additional spacing needed? */
)
Modified: trunk/Build/source/utils/autosp/autosp-src/status.c
===================================================================
--- trunk/Build/source/utils/autosp/autosp-src/status.c 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/autosp-src/status.c 2019-08-29 00:13:30 UTC (rev 51980)
@@ -2,10 +2,7 @@
char *ps(int spacing)
/* convert spacing value to note value(s) */
-{ char *s = malloc(SHORT_LEN);
- char *s_n;
- if (s == NULL) error ("Not enough memory");
- s_n = s;
+{ s_n = s;
*s = '\0';
if (spacing == MAX_SPACING)
sprintf(s, "MAX_SPACING");
@@ -57,6 +54,8 @@
{
fprintf (logfile, "spacing=%s\n", ps(spacing));
fprintf (logfile, "old_spacing=%s\n", ps(old_spacing));
+ fprintf (logfile, "spacing_staff=%d\n", spacing_staff);
+ fprintf (logfile, "oldspacing_staff=%d\n", oldspacing_staff);
}
void
Modified: trunk/Build/source/utils/autosp/configure
===================================================================
(Binary files differ)
Modified: trunk/Build/source/utils/autosp/configure.ac
===================================================================
--- trunk/Build/source/utils/autosp/configure.ac 2019-08-28 23:53:44 UTC (rev 51979)
+++ trunk/Build/source/utils/autosp/configure.ac 2019-08-29 00:13:30 UTC (rev 51980)
@@ -7,7 +7,7 @@
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], [2019-01-08])[]dnl using unmodified autosp source
+m4_define([autosp_version], [2019-08-26])[]dnl using unmodified autosp source
AC_INIT([autosp (TeX Live)], autosp_version, [tex-k at tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([autosp-src/autosp.c])
More information about the tex-live-commits
mailing list