summaryrefslogtreecommitdiff
path: root/Build/source/utils/autosp/TLpatches/patch-01-binary-write
blob: c71cb29a5f5891e619c11f4f0c1b0f8759c5460c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
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
   {
-    outfile = fopen (outfilename, "w");
+    outfile = fopen (outfilename, "wb");
     if (outfile == NULL)
     { printf ("Can't open %s\n", outfilename);
       exit (EXIT_FAILURE);
@@ -201,7 +201,7 @@
   *logfilename_n = '\0';
   append (logfilename, &logfilename_n, "alog", sizeof (logfilename));
   if (debug)  
-  { logfile = fopen (logfilename, "w");
+  { logfile = fopen (logfilename, "wb");
     if (logfile == NULL)
     { printf ("Can't open %s\n", logfilename);
       exit (EXIT_FAILURE);
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));
     }
-    outfile = fopen (outfilename, "w");
+    outfile = fopen (outfilename, "wb");
     if (outfile == NULL)
     { fprintf (stderr,"Can't open %s\n", outfilename);
       exit (EXIT_FAILURE);
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);
     else if ( (*s == '^' || *s == '_' || *s == '=' || *s == '>') 
               && !vspacing_active[i]  /* is additional spacing needed? */
             )
@@ -532,7 +532,7 @@
    || prefix ("\\qbpp", s) 
    || prefix ("\\dspp", s) 
    || doubledotted  )
-  { spacing *= 1.75; doubledotted = false;}
+  { spacing = (int)(spacing * 1.75); doubledotted = false;}
   else 
   if (prefix ("\\whp", s)
    || prefix ("\\hup", s)
@@ -556,7 +556,7 @@
    || prefix ("\\qbp", s) 
    || prefix ("\\dsp", s) 
     || dotted  ) 
-  { spacing *= 1.5; dotted = false; }
+  { spacing = (int)(spacing * 1.5); dotted = false; }
 
   t = strpbrk (s+1, "{\\&|$"); /* collective coding?  */
   if (*t == '{')  /*  {...}  */
diff -ur autosp-2019-08-26/tests/quod2.tex autosp-src/tests/quod2.tex
--- autosp-2019-08-26/tests/quod2.tex	Tue Jan 08 22:33:02 2019
+++ autosp-src/tests/quod2.tex	Thu Aug 29 10:11:18 2019
@@ -1,4 +1,4 @@
-%  Generated by autosp (2019-01-08).
+%  Generated by autosp (2019-08-26).
 \input musixtex
 \input musixplt
 \input soul.sty
@@ -42,105 +42,202 @@
 \staffbotmarg=3.0\Interligne%
 \startpiece\addspace\afterruleskip%
 \systemnumbers%
+\scale\normalvalue
 \Notes\ds&\cu d&\ds&\ds\en%
 \bar%1
+\scale\normalvalue
 \Notes\ha N\sk\sk\sk&\ibu1g2\qb1{g}\qb1{h}\qb1{i}\tqh1j&&\hp\sk\sk\sk\en%
+\scale\normalvalue
 \Notes\ha M&\ibl1k{-2}\qb1k&&\qp\en
+\scale\normalvalue
 \notes\sk\sk&\nbbl1\qb1j\tqb1i&&\sk\sk\en
+\scale\normalvalue
 \Notes\sk&\ibu1h0\qb1h&&\ds\en
+\scale\normalvalue
 \notes\sk\sk&\nbbu1\qb1g\tqh1h&&\cu d\sk\hqsk\en%
 \def\atnextbar{\znotes&&\centerpause&\en}%
 \bar%2
-\Notes\ha L\sk\sk\sk&\ibu1i{-2}\qb1i\tqh1h\itied1g\qa g\sk&\qa{n}\sk\qa{n}\sk&\ibu3g2\qb3{g}\qb3{h}\qb3{i}\tqh3j\en%
+\scale\normalvalue
+\Notes\ha L\sk&\ibu1i{-2}\qb1i\tqh1h&\qa{n}\sk&\ibu3g2\qb3{g}\qb3{h}\en
+\scale\normalvalue
+\Notes\sk\sk&\itied1g\qa g\sk&\qa{n}\sk&\qb3{i}\tqh3j\en%
+\scale\normalvalue
 \Notes\qa{.K}&\ttie1\qa g&\qa o&\ibl3k{-2}\qb3k\en
+\scale\normalvalue
 \notes\sk\sk&\sk\sk&\sk\sk&\nbbl3\qb3j\tqb3i\en
+\scale\normalvalue
 \Notes\sk&\ibu1f0\shake{n}\qb1f&\cl o&\cu h\en
+\scale\normalvalue
 \notes\cu J\sk&\nbbu1\qb1e\tqh1f&\ds\sk&\ds\sk\hqsk\en%
 \bar%3
-\Notes\hu I\sk\sk\tqsk\sk&\qa g\sk\ds\tqsk\cl k&\ibl2n{-1}\qb2{n}\qb2{o}\qb2{n}\tqsk\tqb2{=m}&\qa{k}\sk\qa{k}\tqsk\sk\en%
+\scale\normalvalue
+\Notes\hu I\sk&\qa g\sk&\ibl2n{-1}\qb2{n}\qb2{o}&\qa{k}\sk\en
+\scale\normalvalue
+\Notes\sk\tqsk\sk&\ds\tqsk\cl k&\qb2{n}\tqsk\tqb2{=m}&\qa{k}\tqsk\sk\en%
+\scale\normalvalue
 \Notes\hu J\sk\sk\sk&\ibu1j{-2}\qb1{j}\qb1{i}\qb1h\tqh1g&\ibl2j{0}\qb2{l}\qb2{k}\qb2j\tqb2p&\qa{l}\sk\qa{l}\sk\en%
 \bar%4
+\scale\normalvalue
 \Notes\ha K\sk&\itied1f\shake{n}\qa f\sk&\ibl2o{-1}\qb2{o}\qb2{n}&\ibl3k{-1}\qb3{k}\qb3{l}\en
+\scale\normalvalue
 \notes\sk\sk&\ttie1\ibbu1e{-2}\qb1f\tbbu1\qb1e&\qb2{o}\sk&\qb3{k}\sk\en
+\scale\normalvalue
 \Notes\sk&\itied1d\tqh1d&\tqb2m&\tqb3j\en%
-\Notes\qa G\sk\ds&\ttie1\qa d\sk\qp&\ibl2n{-2}\qb2n\tqb2m\ibl2n{-5}\qb2n&\ibu3h{-2}\shake{p}\qb3i\tqh3h\qa g\en
+\scale\normalvalue
+\Notes\qa G\sk&\ttie1\qa d\sk&\ibl2n{-2}\qb2n\tqb2m&\ibu3h{-2}\shake{p}\qb3i\tqh3h\en
+\scale\normalvalue
+\Notes\ds&\qp&\ibl2n{-5}\qb2n&\qa g\en
+\scale\normalvalue
 \notes\ibbl0b{-1}\qb0b\tqb0a&\sk\sk&\tqb2k\sk&\sk\sk\hqsk\en%
 \bar%5
+\scale\normalvalue
 \Notes\ibl0M0\qb0N&\qa{n}&\ibl2n2\qb2{n}&\hp\en
+\scale\normalvalue
 \notes\nbbl0\qb0M\tqb0N&\sk\sk&\qb2{o}\sk&\sk\sk\en
+\scale\normalvalue
 \Notes\ibl0K0\qb0L&\qa{n}&\qb2{p}&\sk\en
+\scale\normalvalue
 \notes\nbbl0\qb0K\tqb0L&\sk\sk&\tqb2q\sk&\sk\sk\hqsk\en%
+\scale\normalvalue
 \Notes\qa{.M}&\qa{o}&\ibl2r{-2}\qb2r&\qp\en
+\scale\normalvalue
 \notes\sk\sk&\sk\sk&\nbbl2\qb2q\tqb2p&\sk\sk\en
-\Notes\sk\cu I&\qa{o}\sk&\ibl2o6\qb2o\itieu2r\tqb2r&\ds\cl k\en%
+\scale\normalvalue
+\Notes\sk&\qa{o}&\ibl2o6\qb2o&\ds\en
+\scale\normalvalue
+\Notes\cu I&\sk&\itieu2r\tqb2r&\cl k\en%
 \bar%6
+\scale\normalvalue
 \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
+\scale\normalvalue
 \notes\ibbl0M2\qb0M\tqb0N&\tqb1m\sk&\sk\sk&\tqb3k\sk\hqsk\en%
+\scale\normalvalue
 \Notes\tqsk\itieu0a\qa a&\tqsk\ibl1l{-2}\qb1l&\tqsk\qa{.o}&\tqsk\shake{n}\ibl3i0\qb3{^j}\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%
+\scale\normalvalue
+\notes\sk\sk&\tqb1k\sk&\sk\sk&\nbbl3\qb3i\tqb3j\en
+\scale\normalvalue
+\notes\ttie0\ibbl0a{-2}\qb0{a}\qb0{N}\qb0{M}\tqsk\tqb0L&\cl{^j}\sk\ds\tqsk\sk&\sk\sk\ibbl2i2\qb2i\tqsk\tqb2{^j}&\cu h\sk\ds\tqsk\sk\hqsk\en%
 \bar%7
+\scale\normalvalue
 \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%
+\scale\normalvalue
 \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\en%
 \bar%8
 \nspace
+\scale\normalvalue
 \Notes\tqsk\qu{.H}&\tqsk\ibu1c4\qb1{^c}&\tqsk\ibl2l{-1}\qb2{.l}&\tqsk\ibu3h{0}\qb3{h}\en
+\scale\normalvalue
 \notes\sk\sk\sk\tqsk\sk&\qb1{d}\sk\qb1{e}\tqsk\sk&\sk\itieu2k\tbbl2\tqb2k\ttie2\ibbl2j0\qb2k\tqsk\tbbl2\qb2{^j}&\qb3{i}\sk\qb3{h}\tqsk\sk\en
+\scale\normalvalue
 \Notes\cu{^J}&\itied1h\tqh1h&\itieu2l\tqb2l&\tqh3g\en%
+\scale\normalvalue
 \notes\ql K\sk\sk\sk&\ttie1\ibu1h{-2}\qb1h\sk\tqh1g\sk&\ttie2\ibbl2l{-1}\qb2{l}\qb2{k}\qb2{l}\tqb2j&\ibu3f{-1}\qb3f\sk\tqh3e\sk\en
+\scale\normalvalue
 \Notes\cl K&\cu f&\cl k&\cu d\en%
 \leftrightrepeat
 \advance\barno-1%
+\scale\normalvalue
 \Notes\ds&\cl m&\ds&\cl o\en%
 \bar%9
+\scale\normalvalue
 \Notes\qa{d}\sk\qa{c}\sk&\ibl1k0\qb1{k}\qb1{m}\qb1{k}\tqb1{m}&\qa{o}\sk\qa{o}\sk&\ibl3m0\qb3{m}\qb3{o}\qb3{m}\tqb3o\en%
+\scale\normalvalue
 \Notes\qa{b}&\ibl1k0\qb1{n}&\qa{p}&\ibl3k2\qb3k\en
+\scale\normalvalue
 \notes\sk\sk&\qb1{k}\sk&\sk\sk&\nbbl3\qb3l\tqb3m\en
+\scale\normalvalue
 \Notes\qa{N}\sk&\qb1{k}\tqb1n&\qa{p}\sk&\ibl3n{-4}\qb3n\tqb3l\en%
 \bar%10
+\scale\normalvalue
 \Notes\ibl0b{-1}\qb0{c}\qb0{b}\qb0{c}\tqb0a&\cl l\ds\qp\sk&\ibl2o{-1}\qb2{o}\qb2{p}\qb2{o}\tqb2n&\ibl3o{-2}\qb3{o}\qb3{n}\qb3{m}\tqb3l\en%
+\scale\normalvalue
 \Notes\tqsk\qa{.b}&\tqsk\qa{m}&\tqsk\ibl2m{-2}\qb2m&\tqsk\ibl3j0\shake n\qb3{^k}\en
+\scale\normalvalue
 \notes\tqsk\sk\sk&\tqsk\sk\sk&\tqsk\tqb2l\sk&\tqsk\nbbl3\qb3{^j}\tqb3k\en
-\Notes\sk\cl{^a}&\qa{m}\sk&\cl{^k}\ds&\ibl3i8\qb3i\tqb3{p}\en%
+\scale\normalvalue
+\Notes\sk&\qa{m}&\cl{^k}&\ibl3i8\qb3i\en
+\scale\normalvalue
+\Notes\cl{^a}&\sk&\ds&\tqb3{p}\en%
 \bar%11
+\scale\normalvalue
 \Notes\qa{N}\sk\qa{N}\sk&\ibl1l0\qb1{n}\qb1{l}\qb1{n}\tqb1l&\qa{p}\sk\qa{p}\sk&\ibl3m0\qb3{l}\qb3{p}\qb3{l}\tqb3{p}\en%
+\scale\normalvalue
 \notes\tqsk\qa{.a}\sk\sk\sk&\tqsk\ibl1m{-1}\qb1{m}\sk\qb1{n}\sk&\tqsk\qa{q}\sk\sk\sk&\tqsk\ibbl3k2\qb3{^k}\qb3{l}\qb3{m}\tqb3n\en
+\scale\normalvalue
 \Notes\sk&\qb1{m}&\qa{q}&\ibl3o{-2}\qb3o\en
+\scale\normalvalue
 \notes\cl{^a}\sk&\tqb1l\sk&\sk\sk&\nbbl3\qb3n\tqb3m\hqsk\en%
 \bar%12
 \nspace
+\scale\normalvalue
 \Notes\tqsk\qa b&\tqsk\ibl1k2\qb1{^k}&\tqsk\ibl2o{-1}\qb2p&\tqsk\ibl3n{-2}\qb3n\en
-\notes\sk\sk\tqsk\qa I\sk\sk\sk&\nbbl1\qb1l\tqb1m\tqsk\itied1i\qu i\sk\sk\sk&\qb2q\sk\tqsk\qb2p\sk\tqb2o\sk&\nbbl3\qb3m\tqb3l\tqsk\ibbl3k0\qb3{^k}\qb3{l}\qb3m\tqb3k\hqsk\en%
+\scale\normalvalue
+\notes\sk\sk&\nbbl1\qb1l\tqb1m&\qb2q\sk&\nbbl3\qb3m\tqb3l\en
+\scale\normalvalue
+\notes\tqsk\qa I\sk\sk\sk&\tqsk\itied1i\qu i\sk\sk\sk&\tqsk\qb2p\sk\tqb2o\sk&\tqsk\ibbl3k0\qb3{^k}\qb3{l}\qb3m\tqb3k\hqsk\en%
+\scale\normalvalue
 \Notes\qa{.L}&\ttie1\ibu1i0\qb1i&\ibl2n0\qb2n&\itieu3l\ha l\en
+\scale\normalvalue
 \notes\sk\sk&\nbbu1\qb1h\tqh1i&\nbbl2\qb2m\tqb2n&\sk\sk\en
+\scale\normalvalue
 \Notes\sk&\ibu1g2\qb1g&\cl l&\sk\en
+\scale\normalvalue
 \notes\cl{=K}\sk&\nbbu1\qb1h\tqh1i&\ds\sk&\sk\sk\hqsk\en%
 \bar%13
+\scale\normalvalue
 \notes\qa{J}\sk\sk\sk\qa{c}\sk&\ibl1j2\qb1{j}\sk\qb1{k}\sk\qb1{l}\sk&\hp\sk\sk\sk\sk\sk&\ttie3\ibbl3k1\slur lku1\qb3{l}\qb3{k}\slur mlu1\qb3m\tqb3l\ibbl3m1\isluru3n\qb3n\tbbl3\tslur3m\qb3m\en
+\scale\normalvalue
 \Notes\sk&\tqb1m&\sk&\tqb3o\en%
+\scale\normalvalue
 \Notes\qa{.b}&\ibl1n{-1}\qb1n&\qa n&\qa{.k}\en
+\scale\normalvalue
 \notes\sk\sk&\nbbl1\qb1m\tqb1l&\sk\sk&\sk\sk\en
+\scale\normalvalue
 \Notes\sk&\cl k&\ibl2i{-5}\qb2n&\sk\en
+\scale\normalvalue
 \notes\ibbu0J{-2}\qb0J\tqh0I&\ds\sk&\tqb2g\sk&\ibbl3j2\qb3j\tqb3k\hqsk\en%
 \bar%14
+\scale\normalvalue
 \Notes\qa{.H}&\ds&\ibl2j1\qb2{.j}&\ibl3l2\qb3l\en
-\notes\sk\sk&\cu h\sk&\sk\tbbl2\tqb2k&\nbbl3\qb3m\tqb3n\en
+\scale\normalvalue
+\notes\sk&\cu h&\sk&\nbbl3\qb3m\en
+\scale\normalvalue
+\notes\sk&\sk&\tbbl2\tqb2k&\tqb3n\en
+\scale\normalvalue
 \Notes\sk&\ibu1e0\qb1e&\ibl2j{-2}\qb2j&\ibl3o{-2}\qb3o\en
+\scale\normalvalue
 \notes\ibbu0I2\qb0I\tqh0J&\nbbu1\qb1d\tqh1e&\tqb2i\sk&\tqb3n\sk\hqsk\en%
+\scale\normalvalue
 \notes\qa{.K}\sk&\ibu1g1\qb1f\sk&\ibu2h1\qb2h\sk&\ibbl3m{-2}\shake{o}\qb3m\tbbl3\qb3l\en
+\scale\normalvalue
 \Notes\sk\sk&\itied1g\tqh1g\ttie1\ibu1g{-1}\qb1g&\tqh2i\ibl2j2\qb2j&\tqb3k\ibu3i{-6}\qb3j\en
+\scale\normalvalue
 \notes\ibbu0J2\qb0J\tqh0K&\tqh1f\sk&\tqb2k\sk&\tqh3d\sk\hqsk\en%
 \bar%15
+\scale\normalvalue
 \Notes\ibu0I0\qb0{G}&\qa{d}&\ibu2i0\qb2i&\ibl3i0\qb3{i}\en
+\scale\normalvalue
 \notes\qb0{H}\sk&\sk\sk&\nbbu2\qb2h\tqh2i&\qb3{j}\sk\en
+\scale\normalvalue
 \Notes\qb0{I}\tqh0G&\qa{d}\sk&\cu g\ds&\qb3{k}\tqb3i\en%
+\scale\normalvalue
 \Notes\qa{.J}&\qa{e}&\ds&\ibu3j{-2}\qb3{j}\en
+\scale\normalvalue
 \notes\sk\sk&\sk\sk&\ibbl2l{-2}\qb2l\tqb2k&\qb3{i}\sk\en
-\Notes\sk\cu{^J}&\qa{e}\sk&\ibl2j4\qb2j\tqb2l&\qb3{h}\tqh3g\en%
+\scale\normalvalue
+\Notes\sk&\qa{e}&\ibl2j4\qb2j&\qb3{h}\en
+\scale\normalvalue
+\Notes\cu{^J}&\sk&\tqb2l&\tqh3g\en%
 \bar%16
+\scale\normalvalue
 \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
+\scale\normalvalue
 \Notes\sk&\tqh1j&\itieu2k\tqb2k&\tqh3f\en%
+\scale\normalvalue
 \Notes\qa N&\ibu1i{-2}\qb1i&\ttie2\ibl2j0\qb2k&\qa g\en
+\scale\normalvalue
 \notes\sk\sk&\tqh1h\sk&\nbbl2\qb2j\tqb2k&\sk\sk\en
+\scale\normalvalue
 \Notes\cu G&\cu g&\cl i&\cu g\en%
 \setrightrepeat
 \endpiece%
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));
   }
 
-  outfile = fopen (outfilename, "w");
+  outfile = fopen (outfilename, "wb");
   if (outfile == NULL)
   { printf ("Can't open %s\n", outfilename);
     exit (EXIT_FAILURE);