Blame texlive-base-20190410-gcc10-autosp-fix-global-vars.patch

7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c.externfix	2020-01-23 13:07:24.044942747 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/autosp.c	2020-01-23 13:12:41.905857613 -0500
7360b2a
@@ -82,6 +82,13 @@ char version[12] = "2019-01-08";
7360b2a
 
7360b2a
 # include "autosp.h"
7360b2a
 
7360b2a
+char infilename[SHORT_LEN];
7360b2a
+char *infilename_n;
7360b2a
+char outfilename[SHORT_LEN];
7360b2a
+char *outfilename_n;
7360b2a
+char logfilename[SHORT_LEN];
7360b2a
+char *logfilename_n;
7360b2a
+FILE *infile, *outfile, *logfile;
7360b2a
 
7360b2a
 PRIVATE void
7360b2a
 usage ()
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h.externfix	2020-01-23 13:02:59.186403822 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/autosp.h	2020-01-23 13:12:30.912087145 -0500
7360b2a
@@ -25,16 +25,16 @@
7360b2a
 
7360b2a
 # define SHORT_LEN 256
7360b2a
 
7360b2a
-bool debug;
7360b2a
-bool dottedbeamnotes;          /* dotted beam notes ignored?        */
7360b2a
+extern bool debug;
7360b2a
+extern bool dottedbeamnotes;          /* dotted beam notes ignored?        */
7360b2a
 
7360b2a
-char infilename[SHORT_LEN];
7360b2a
-char *infilename_n;
7360b2a
-char outfilename[SHORT_LEN];
7360b2a
-char *outfilename_n;
7360b2a
-char logfilename[SHORT_LEN];
7360b2a
-char *logfilename_n;
7360b2a
-FILE *infile, *outfile, *logfile;
7360b2a
+extern char infilename[SHORT_LEN];
7360b2a
+extern char *infilename_n;
7360b2a
+extern char outfilename[SHORT_LEN];
7360b2a
+extern char *outfilename_n;
7360b2a
+extern char logfilename[SHORT_LEN];
7360b2a
+extern char *logfilename_n;
7360b2a
+extern FILE *infile, *outfile, *logfile;
7360b2a
 
7360b2a
 
7360b2a
 void process_score ();
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c.externfix	2020-01-23 13:23:55.275608432 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_command.c	2020-01-23 13:26:00.074878265 -0500
7360b2a
@@ -1,5 +1,37 @@
7360b2a
 # include "process_command.h"
7360b2a
+char terminator[MAX_STAFFS];		/* one of '&' "|', '$'                */
7360b2a
+char *notes[MAX_STAFFS];		/* note segment for ith staff         */
7360b2a
+char *current[MAX_STAFFS];
7360b2a
+int spacings[MAX_STAFFS];		/* spacing for ith staff              */
7360b2a
+int vspacing[MAX_STAFFS];		/* virtual-note (skip) spacing        */
7360b2a
+bool vspacing_active[MAX_STAFFS];	/* virtual-note spacing active?       */
7360b2a
+					/* used to preclude unnecessary pre-accidental skips    */
7360b2a
+bool nonvirtual_notes;			/* used to preclude output of *only* virtual notes */
7360b2a
+int cspacing[MAX_STAFFS];		/* nominal collective-note spacing    */
7360b2a
+char collective[MAX_STAFFS][SHORT_LEN];
7360b2a
+					/* prefixes for collective note sequences */
7360b2a
+bool first_collective[MAX_STAFFS];
7360b2a
+char deferred_bar[SHORT_LEN];		/* deferred \bar (or \endpiece etc.)  */
7360b2a
+int beaming[MAX_STAFFS];		/* spacing for beamed notes           */
7360b2a
+int new_beaming;
7360b2a
+int semiauto_beam_notes[MAX_STAFFS];	/* semi-automatic beam notes     */
7360b2a
 
7360b2a
+/* save-restore state for a staff; used in process_xtuplet */
7360b2a
+int beamingi;
7360b2a
+char *currenti;
7360b2a
+int cspacingi;
7360b2a
+int vspacingi;
7360b2a
+char collectivei[SHORT_LEN];
7360b2a
+bool first_collectivei;
7360b2a
+int xtuplet[MAX_STAFFS];		/* x for xtuplet in staff i          */
7360b2a
+bool appoggiatura;
7360b2a
+char outstrings[MAX_STAFFS][LINE_LEN];
7360b2a
+					/* accumulate commands to be output    */
7360b2a
+char *n_outstrings[MAX_STAFFS];
7360b2a
+int global_skip;
7360b2a
+/* = 1, 2, 3, or 4 for (non-standard) commands \QQsk \HQsk \TQsk \Qsk    */
7360b2a
+/* = 5 for five commas and double-flat accidental spacing                */
7360b2a
+/* = 6 for six commas                                                    */
7360b2a
 
7360b2a
 void process_xtuplet (void);
7360b2a
 
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h.externfix	2020-01-23 13:18:54.495606362 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_command.h	2020-01-23 13:23:33.154094850 -0500
7360b2a
@@ -8,47 +8,47 @@
7360b2a
 # define NOTEsp  "\\vnotes9.52\\elemskip"
7360b2a
 # define APPOGG_NOTES "\\vnotes1.45\\elemskip"
7360b2a
 
7360b2a
-char terminator[MAX_STAFFS];    /* one of '&' "|', '$'                */
7360b2a
+extern char terminator[MAX_STAFFS];    /* one of '&' "|', '$'                */
7360b2a
 
7360b2a
-char *notes[MAX_STAFFS];        /* note segment for ith staff         */
7360b2a
-char *current[MAX_STAFFS];
7360b2a
+extern char *notes[MAX_STAFFS];        /* note segment for ith staff         */
7360b2a
+extern char *current[MAX_STAFFS];
7360b2a
 
7360b2a
-int spacings[MAX_STAFFS];       /* spacing for ith staff              */
7360b2a
+extern int spacings[MAX_STAFFS];       /* spacing for ith staff              */
7360b2a
 
7360b2a
-int vspacing[MAX_STAFFS];       /* virtual-note (skip) spacing        */
7360b2a
-bool vspacing_active[MAX_STAFFS]; /* virtual-note spacing active?       */
7360b2a
+extern int vspacing[MAX_STAFFS];       /* virtual-note (skip) spacing        */
7360b2a
+extern bool vspacing_active[MAX_STAFFS]; /* virtual-note spacing active?       */
7360b2a
                       /* used to preclude unnecessary pre-accidental skips    */
7360b2a
 
7360b2a
-bool nonvirtual_notes;          /* used to preclude output of *only* virtual notes */
7360b2a
+extern bool nonvirtual_notes;          /* used to preclude output of *only* virtual notes */
7360b2a
 
7360b2a
-int cspacing[MAX_STAFFS];       /* nominal collective-note spacing    */
7360b2a
-char collective[MAX_STAFFS][SHORT_LEN];
7360b2a
+extern int cspacing[MAX_STAFFS];       /* nominal collective-note spacing    */
7360b2a
+extern char collective[MAX_STAFFS][SHORT_LEN];
7360b2a
                                     /* prefixes for collective note sequences */
7360b2a
-bool first_collective[MAX_STAFFS];
7360b2a
+extern bool first_collective[MAX_STAFFS];
7360b2a
 
7360b2a
-char deferred_bar[SHORT_LEN];   /* deferred \bar (or \endpiece etc.)  */
7360b2a
+extern char deferred_bar[SHORT_LEN];   /* deferred \bar (or \endpiece etc.)  */
7360b2a
 
7360b2a
-int beaming[MAX_STAFFS];        /* spacing for beamed notes           */
7360b2a
-int new_beaming;
7360b2a
-int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes     */
7360b2a
+extern int beaming[MAX_STAFFS];        /* spacing for beamed notes           */
7360b2a
+extern int new_beaming;
7360b2a
+extern int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes     */
7360b2a
 
7360b2a
 /* save-restore state for a staff; used in process_xtuplet */
7360b2a
-int beamingi;  
7360b2a
-char *currenti;
7360b2a
-int cspacingi;
7360b2a
-int vspacingi;
7360b2a
-char collectivei[SHORT_LEN];
7360b2a
-bool first_collectivei;
7360b2a
+extern int beamingi;  
7360b2a
+extern char *currenti;
7360b2a
+extern int cspacingi;
7360b2a
+extern int vspacingi;
7360b2a
+extern char collectivei[SHORT_LEN];
7360b2a
+extern bool first_collectivei;
7360b2a
 
7360b2a
-int xtuplet[MAX_STAFFS];        /* x for xtuplet in staff i          */
7360b2a
+extern int xtuplet[MAX_STAFFS];        /* x for xtuplet in staff i          */
7360b2a
 
7360b2a
-bool appoggiatura;
7360b2a
+extern bool appoggiatura;
7360b2a
 
7360b2a
-char outstrings[MAX_STAFFS][LINE_LEN];  
7360b2a
+extern char outstrings[MAX_STAFFS][LINE_LEN];  
7360b2a
                                      /* accumulate commands to be output    */
7360b2a
-char *n_outstrings[MAX_STAFFS];
7360b2a
+extern char *n_outstrings[MAX_STAFFS];
7360b2a
 
7360b2a
-int global_skip;  
7360b2a
+extern int global_skip;  
7360b2a
    /* = 1, 2, 3, or 4 for (non-standard) commands \QQsk \HQsk \TQsk \Qsk    */
7360b2a
    /* = 5 for five commas and double-flat accidental spacing                */
7360b2a
    /* = 6 for six commas                                                    */
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c.externfix	2020-01-23 13:17:36.073400920 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_score.c	2020-01-23 13:18:29.827262141 -0500
7360b2a
@@ -1,5 +1,20 @@
7360b2a
 # include "process_score.h"
7360b2a
 
7360b2a
+int staffs[MAX_STAFFS];		/* number of staffs for ith instrument*/
7360b2a
+bool active[MAX_STAFFS];	/* is staff i active?                 */
7360b2a
+bool bar_rest[MAX_STAFFS];
7360b2a
+int spacing;			/* spacing for current notes          */
7360b2a
+int restbars;
7360b2a
+char global_skip_str[7][16];
7360b2a
+int ninstr;			/* number of instruments              */
7360b2a
+int nstaffs;			/* number of staffs                   */
7360b2a
+int nastaffs;			/* number of active staffs;           */
7360b2a
+int old_spacing;
7360b2a
+bool Changeclefs;		/* output \Changeclefs after \def\atnextbar */
7360b2a
+char TransformNotes2[SHORT_LEN];/* 2nd argument of \TransformNotes    */
7360b2a
+bool TransformNotesDefined;
7360b2a
+char line[LINE_LEN];		/* line of input                      */
7360b2a
+
7360b2a
 void process_line ()
7360b2a
 {
7360b2a
   char  *ln; 
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h.externfix	2020-01-23 13:13:28.767879231 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/process_score.h	2020-01-23 13:16:56.554238138 -0500
7360b2a
@@ -6,21 +6,21 @@
7360b2a
 # define SP(note) (SMALL_NOTE/note)  
7360b2a
 /* note = { 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 }  */
7360b2a
 # define MAX_SPACING 2*SP(1)
7360b2a
-int staffs[MAX_STAFFS]; /* number of staffs for ith instrument*/
7360b2a
-bool active[MAX_STAFFS];        /* is staff i active?                 */
7360b2a
-bool bar_rest[MAX_STAFFS];
7360b2a
-int spacing;                    /* spacing for current notes          */
7360b2a
-int restbars;
7360b2a
-char global_skip_str[7][16];   
7360b2a
-int ninstr;                 /* number of instruments              */
7360b2a
-int nstaffs;                /* number of staffs                   */
7360b2a
-int nastaffs;               /* number of active staffs;           */
7360b2a
-int old_spacing;
7360b2a
-bool Changeclefs;               /* output \Changeclefs after \def\atnextbar */
7360b2a
-char TransformNotes2[SHORT_LEN];      /* 2nd argument of \TransformNotes    */
7360b2a
-bool TransformNotesDefined;
7360b2a
+extern int staffs[MAX_STAFFS]; /* number of staffs for ith instrument*/
7360b2a
+extern bool active[MAX_STAFFS];        /* is staff i active?                 */
7360b2a
+extern bool bar_rest[MAX_STAFFS];
7360b2a
+extern int spacing;                    /* spacing for current notes          */
7360b2a
+extern int restbars;
7360b2a
+extern char global_skip_str[7][16];   
7360b2a
+extern int ninstr;                 /* number of instruments              */
7360b2a
+extern int nstaffs;                /* number of staffs                   */
7360b2a
+extern int nastaffs;               /* number of active staffs;           */
7360b2a
+extern int old_spacing;
7360b2a
+extern bool Changeclefs;               /* output \Changeclefs after \def\atnextbar */
7360b2a
+extern char TransformNotes2[SHORT_LEN];      /* 2nd argument of \TransformNotes    */
7360b2a
+extern bool TransformNotesDefined;
7360b2a
 
7360b2a
-char line[LINE_LEN];            /* line of input                      */
7360b2a
+extern char line[LINE_LEN];            /* line of input                      */
7360b2a
 
7360b2a
 void process_line ();
7360b2a
 
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/utils.c.externfix texlive-base-20190410/source/utils/autosp/autosp-src/utils.c
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/utils.c.externfix	2020-01-23 13:05:26.584382978 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/utils.c	2020-01-23 13:05:37.343164091 -0500
7360b2a
@@ -24,6 +24,8 @@
7360b2a
 
7360b2a
 # include "utils.h"
7360b2a
 
7360b2a
+int lineno;
7360b2a
+
7360b2a
 void
7360b2a
 warning (const char msg[])    /* output warning message msg to stderr                 */
7360b2a
 {
7360b2a
diff -up texlive-base-20190410/source/utils/autosp/autosp-src/utils.h.externfix texlive-base-20190410/source/utils/autosp/autosp-src/utils.h
7360b2a
--- texlive-base-20190410/source/utils/autosp/autosp-src/utils.h.externfix	2020-01-23 13:04:15.805822929 -0500
7360b2a
+++ texlive-base-20190410/source/utils/autosp/autosp-src/utils.h	2020-01-23 13:04:25.408627563 -0500
7360b2a
@@ -61,6 +61,6 @@ extern size_t append (char *dst, char **
7360b2a
 extern bool prefix (const char *cs, const char *ct); /* is string cs[] a prefix of ct[]?  */
7360b2a
 extern bool suffix (const char *cs, const char *ct); /* is string cs[] a suffix of ct[]?  */
7360b2a
 
7360b2a
-int lineno;
7360b2a
+extern int lineno;
7360b2a
 extern void error (const char msg[]);	/* abort with stderr message msg */
7360b2a
 extern void warning (const char msg[]); /* output warning message msg to stderr  */