w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

mtxline.c
Go to the documentation of this file.
1 /* Output from p2c 1.21alpha-07.Dec.93, the Pascal-to-C translator */
2 /* From input file "mtxline.pas" */
3 
4 
5 #include "p2c.h"
6 
7 
8 #define MTXLINE_G
9 #include "mtxline.h"
10 
11 
12 boolean bind_left[22] = {
13  false, false, true, false, false, true, true, false, true, true, true,
14  false, true, false, true, false, true, false, false, false, false, false
15 };
16 
17 #ifndef STRINGS_H
18 #include "strings.h"
19 #endif
20 
21 #ifndef CONTROL_H
22 #include "control.h"
23 #endif
24 
25 #ifndef NOTES_H
26 #include "notes.h"
27 #endif
28 
29 #ifndef UTILITY_H
30 #include "utility.h"
31 #endif
32 
33 
35 
36 typedef struct line_info {
40  short extra;
41  boolean vocal;
46 
47 
48 Static Char name[22][10] = {
49  "?", "note", "znote", "lyricsTag", "(", ")", ")(", "[", "]", "_", "PMX<",
50  "macro", "endMacro", "meter", "ornament", "rest", "//", "BAR", "TeX", "@",
51  "firstonly", "ERROR"
52 };
53 
55 
56 
57 /* ------------------------------------------------------------- */
58 
59 short beatsPerLine(void)
60 {
61  short Result;
62  voice_index voice, FORLIM;
63  line_info *WITH;
64 
65  FORLIM = nvoices;
66  for (voice = 1; voice <= FORLIM; voice++) {
67  WITH = &info[voice-1];
68  if (WITH->nbar > 0 || WITH->extra > 0) {
69  if (WITH->extra % one_beat > 0) {
70 /* p2c: mtxline.pas, line 99:
71  * Note: Using % for possibly-negative arguments [317] */
72  error3(voice, "Line length not an integer number of beats");
73  }
74  Result = WITH->nbar * meternum + WITH->extra / one_beat;
75  }
76  }
77  return Result;
78 }
79 
80 
82 {
83  line_info *WITH;
84  Char STR1[256];
85 
86  WITH = &info[voice-1];
87  if (WITH->chord > 0) {
88  sprintf(STR1, "%c", barsym);
89  if (!strcmp(P[WITH->chord - 1], STR1))
90  predelete(P[WITH->chord - 1], 1);
91  }
92 }
93 
94 
95 Char *getBar(Char *Result, voice_index voice, short bar)
96 {
97  line_info *WITH;
98 
99  WITH = &info[voice-1];
100  return (substr_(Result, P[WITH->mus - 1],
101  WITH->word_bound[WITH->bar_bound[bar-1]] + 1,
102  WITH->word_bound[WITH->bar_bound[bar]] -
103  WITH->word_bound[WITH->bar_bound[bar-1]]));
104 }
105 
106 
108 {
109  return strcpy(Result, P[musicLineNo(voice) - 1]);
110 }
111 
112 
114 {
115  return (info[voice-1].mus);
116 }
117 
118 
120 {
121  info[voice-1].mus = lno;
122 }
123 
124 
126 {
127  return (info[voice-1].chord);
128 }
129 
130 
132 {
133  info[voice-1].chord = lno;
134 }
135 
136 
137 void setVocal(voice_index voice, boolean voc)
138 {
139  info[voice-1].vocal = voc;
140 }
141 
142 
144 {
145  return (info[voice-1].vocal);
146 }
147 
148 
150 {
151  line_info *WITH;
152 
153  WITH = &info[voice-1];
154  WITH->voice_pos = pos;
155  WITH->voice_stave = stave;
156 }
157 
158 
160 {
161  return (info[voice-1].voice_stave);
162 }
163 
164 
166 {
167  return (info[voice-1].voice_pos);
168 }
169 
170 
172 {
173  short s;
174 
175  s = info[voice-1].voice_stave;
176  if (number_on_stave[s-1] == 1)
177  return voice;
178  else if (info[voice-1].voice_pos == 1)
179  return (voice + 1);
180  else
181  return (voice - 1);
182 }
183 
184 
186 {
187  word_index0 i, j;
188  word_index0 j2 = 0;
189  line_info *WITH;
190  word_index0 FORLIM;
191 
192  WITH = &info[voice-1];
193  if (debugMode())
194  printf("Voice %d has %d bars at ", voice, WITH->nbar);
195  if (debugMode()) {
196  FORLIM = WITH->nbar + 1;
197  for (i = 1; i <= FORLIM; i++)
198  printf("%d ", WITH->bar_bound[i]);
199  }
200  FORLIM = WITH->nbar;
201  for (i = 1; i <= FORLIM; i++) {
202  j2 = WITH->bar_bound[i];
203  j = j2 + 1;
204  while (j <= WITH->here &&
205  (bind_left[(long)WITH->scan[j-1]] || WITH->scan[j-1] == barword)) {
206  WITH->bar_bound[i]++;
207  j++;
208  }
209  }
210  if (WITH->extra > 0)
211  WITH->bar_bound[WITH->nbar + 1] = WITH->here;
212  if (debugMode()) {
213  printf(" regrouped to ");
214  FORLIM = WITH->nbar + 1;
215  for (i = 1; i <= FORLIM; i++)
216  printf("%d ", WITH->bar_bound[i]);
217  }
218  if (debugMode())
219  putchar('\n');
220  WITH->nword = WITH->here;
221 }
222 
223 
225 {
226  line_info *WITH;
227 
228  WITH = &info[voice-1];
229  strcpy(buf, P[WITH->mus - 1]);
230  *P[WITH->mus - 1] = '\0';
231  WITH->bar_bound[0] = 0;
232  WITH->word_bound[0] = 0;
233  WITH->orig_word_bound[0] = 0;
234  WITH->nbar = 0;
235  WITH->here = 0;
236 }
237 
238 
239 void clearLabels(void)
240 {
241  voice_index voice, FORLIM;
242  line_info *WITH;
243 
244  FORLIM = nvoices;
245  for (voice = 0; voice <= FORLIM - 1; voice++) {
246  WITH = &info[voice];
247  WITH->chord = 0;
248  WITH->mus = 0;
249  }
250 }
251 
252 
254 {
255  line_info *WITH;
256 
257  WITH = &info[voice-1];
258  WITH->here++;
259  if (WITH->here > max_words)
260  error3(voice, "Words per line limit exceeded");
261  WITH->scan[WITH->here - 1] = nscan;
262 }
263 
264 
266 {
267  line_info *WITH;
268 
269  if (*note == '\0')
270  return;
271  WITH = &info[voice-1];
272  sprintf(P[WITH->mus - 1] + strlen(P[WITH->mus - 1]), "%s%c", note, blank);
273  WITH->word_bound[WITH->here] = strlen(P[WITH->mus - 1]);
274  WITH->orig_word_bound[WITH->here] = nextWordBound(orig_P[WITH->mus - 1],
275  note[0], WITH->orig_word_bound[WITH->here - 1]);
276 }
277 
278 
280 {
281  line_info *WITH;
282 
283  WITH = &info[voice-1];
284  if (WITH->nbar == 0)
285  error3(voice, "Empty bar");
286  else
287  WITH->bar_bound[WITH->nbar] = WITH->here;
288 }
289 
290 
292 {
293  return (info[voice-1].nbar);
294 }
295 
296 
298 {
299  line_info *WITH;
300 
301  WITH = &info[voice-1];
302  if (WITH->nbar + nbars < 0)
303  error3(voice, "Next voice before bar is full");
304  if (WITH->nbar + nbars > max_bars)
305  error3(voice, "Bars per line limit exceeded");
306  WITH->nbar += nbars;
307  if (nbars > 0)
308  WITH->bar_bound[WITH->nbar] = WITH->here;
309 }
310 
311 
313 {
314  line_info *WITH;
315 
316  WITH = &info[voice-1];
317  WITH->extra = ext;
318  WITH->scan[WITH->here] = other;
319 }
320 
321 
323 {
324  return (info[voice-1].extra);
325 }
326 
327 
329 {
330  voice_index0 Result = 0;
331  Char w[256];
332  short i, FORLIM;
333 
334  strcpy(w, w_);
335  curtail(w, ':');
336  FORLIM = nvoices;
337  for (i = 1; i <= FORLIM; i++) {
338  if (!strcmp(w, voice_label[i-1]))
339  return i;
340  }
341  getNum(w, &i);
342  if (i == 0)
343  return Result;
344  if (i > 0 && i <= nvoices)
345  return i;
346  error("Numeric label outside range 1..nvoices", print);
347  return Result;
348 }
349 
350 
352 {
353  short p;
354  line_info *WITH;
355 
356  WITH = &info[voice-1];
357  printf("In voice \"%s\" near word %d:\n", voice_label[voice-1], WITH->here);
358  p = WITH->orig_word_bound[WITH->here - 1] - 1;
359  if (p < 0)
360  p = 0;
361  printf("%*cV\n", p, ' ');
362 }
363 
364 
366 {
367  Char STR1[256];
368 
369  info3(voice);
370  sprintf(STR1, " %s", message);
371  error(STR1, print);
372 }
373 
374 
376 {
377  Char STR1[256];
378 
379  info3(voice);
380  sprintf(STR1, " %s", message);
381  warning(STR1, print);
382 }
383 
384 
386 {
387  return (MusicWord(Result, voice, info[voice-1].here));
388 }
389 
390 
391 Char *MusicWord(Char *Result, short voice, short n)
392 {
393  line_info *WITH;
394 
395  WITH = &info[voice-1];
396  if (n > 0 && n <= WITH->nword)
397  return (substr_(Result, P[WITH->mus - 1], WITH->word_bound[n-1] + 1,
398  WITH->word_bound[n] - WITH->word_bound[n-1] - 1));
399  else
400  return strcpy(Result, "");
401 }
402 
403 
405 {
406  line_info *WITH;
407 
408  WITH = &info[voice-1];
409  return (WITH->scan[WITH->here - 2]);
410 }
411 
412 
414 {
415  line_info *WITH;
416 
417  WITH = &info[voice-1];
418  return (WITH->scan[WITH->here - 1]);
419 }
420 
421 
423 {
424  line_info *WITH;
425 
426  WITH = &info[voice-1];
427  return (WITH->here > WITH->bar_bound[bar_no]);
428 }
429 
430 
432 {
433  line_info *WITH;
434 
435  WITH = &info[voice-1];
436  WITH->here = WITH->bar_bound[bar_no-1] + 1;
437 }
438 
439 
441 {
442  line_info *WITH;
443 
444  WITH = &info[voice-1];
445  line_no = orig_line_no[WITH->mus - 1];
446  MusicWord(Result, voice, WITH->here);
447  WITH->here++;
448  return Result;
449 }
450 
451 
452 boolean maybeMusicLine(Char *l_)
453 {
454  Char l[256];
455  Char w[256];
456  music_word nscan;
457 
458  strcpy(l, l_);
459  GetNextWord(w, l, blank, dummy);
460 /* p2c: mtxline.pas: Note: Eliminated unused assignment statement [338] */
461  if (pos1(w[0], "abcdefgr()[]{}CMm") == 0)
462  return false;
463  if (pos1(':', w) == 0)
464  return true;
465  getNextMusWord(w, l, &nscan);
466  return (nscan == abcdefg);
467 }
468 
469 
470 #define nmacros 99
471 
472 
473 Static boolean macro_initialized = false;
475 
476 
477 Static void macroInit(void)
478 {
479  short i;
480 
481  if (macro_initialized)
482  return;
483  macro_initialized = true;
484  for (i = 0; i <= nmacros - 1; i++)
485  *macro_text[i] = '\0';
486 }
487 
488 
490 {
491  Char s[256];
492  short k;
493 
494  strcpy(s, s_);
495  predelete(s, 2);
496  getNum(s, &k);
497  return k;
498 }
499 
500 
501 /* Local variables for getNextMusWord: */
504 } ;
505 
507 {
508  Char playtag[11];
509  short playID;
510  Char w[256];
511  Char STR1[72];
512  Char STR2[42];
513  Char STR3[68];
514  Char STR4[54];
515  Char STR5[256], STR7[256];
516 
517  macroInit();
518  if (strlen(LINK->note) == 1)
519  error("Can't terminate a macro that has not been started", print);
520  playID = identifyMacro(LINK->note);
521  toString(playtag, playID);
522 /* p2c: mtxline.pas, line 317:
523  * Note: Possible string truncation in assignment [145] */
524  if (playID < 1 || playID > 99) {
525  sprintf(STR2, "Macro ID %s is not in range 1..99", playtag);
526  error(STR2, print);
527  }
528  if (LINK->note[1] == 'P') {
529  if (*macro_text[playID-1] == '\0') {
530  sprintf(STR3,
531  "Macro %s inserts empty text: did you define it before use?",
532  playtag);
533  warning(STR3, print);
534  }
535  if (strlen(macro_text[playID-1]) + strlen(LINK->buf) <= 255) {
536  if (debugMode()) {
537  printf("Inserting macro %s text \"%s\"\n",
538  playtag, macro_text[playID-1]);
539  printf("Buffer before insert: %s\n", LINK->buf);
540  }
541  sprintf(LINK->buf, "%s%s",
542  macro_text[playID-1], strcpy(STR5, LINK->buf));
543  return;
544  }
545  sprintf(STR4, "Expansion of macro %s causes buffer overflow", playtag);
546  error(STR4, print);
547  }
548  if (pos1(LINK->note[1], "SR") == 0) {
549  sprintf(STR4, "Second character %c of macro word should be in \"PRS\"",
550  LINK->note[1]);
551  error(STR4, print);
552  }
553  *macro_text[playID-1] = '\0';
554  do {
555  GetNextWord(w, LINK->buf, blank, dummy);
556  if (*w == '\0') {
557  sprintf(STR1,
558  "Macro definition %s should be terminated on the same input line",
559  playtag);
560  error(STR1, print);
561  }
562  if (!strcmp(w, "M")) {
563  if (debugMode())
564  printf("Macro %s is: %s\n", playtag, macro_text[playID-1]);
565  break;
566  }
567  if (w[0] == 'M' && strlen(w) > 1) {
568  if (w[1] != 'P' || identifyMacro(w) == playID) {
569  sprintf(STR7, "%s not allowed inside macro definition %s", w, playtag);
570  error(STR7, print);
571  }
572  }
573  sprintf(macro_text[playID-1] + strlen(macro_text[playID-1]), "%s ", w);
574  } while (true);
575  if (LINK->note[1] == 'R') {
576  LINK->note[1] = 'P';
577  sprintf(LINK->buf, "%s %s", LINK->note, strcpy(STR7, LINK->buf));
578  }
579 }
580 
581 
582 void getNextMusWord(Char *buf_, Char *note_, music_word *nscan)
583 {
584  struct LOC_getNextMusWord V;
585  Char maybe_error[256];
586  Char STR2[256];
587 
588  V.buf = buf_;
589  V.note = note_;
590  GetNextWord(V.note, V.buf, blank, dummy);
591  if (*V.note == '\0')
592  return;
593  if (V.note[0] == 'M' && expandMacro()) {
594  expandThisMacro(&V);
595  getNextMusWord(V.buf, V.note, nscan);
596  return;
597  }
598  if (V.note[0] == '\\') {
599  *maybe_error = '\0';
600  if (V.note[strlen(V.note) - 1] != '\\')
601  strcpy(maybe_error, V.note);
602  while (*V.buf != '\0' && V.note[strlen(V.note) - 1] != '\\')
603  sprintf(V.note + strlen(V.note), " %s",
604  GetNextWord(STR2, V.buf, blank, dummy));
605  if (V.note[strlen(V.note) - 1] != '\\')
606  error("Unterminated TeX literal", print);
607  *nscan = texword;
608  if (*maybe_error != '\0') {
609  sprintf(STR2, "Possible unterminated TeX literal: %s", maybe_error);
610  warning(STR2, print);
611  }
612  return;
613  }
614  if (solfaNoteNames()) {
615  translateSolfa(V.note);
616  if (V.note[0] == '"')
617  predelete(V.note, 1);
618  }
619  switch (V.note[0]) {
620 
621  case '_':
622  *nscan = pmxprefix;
623  delete1(V.note, 1);
624  break;
625 
626  case 'a':
627  case 'b':
628  case 'c':
629  case 'd':
630  case 'e':
631  case 'f':
632  case 'g':
633  *nscan = abcdefg;
634  break;
635 
636  case 'z':
637  *nscan = zword;
638  break;
639 
640  case '(':
641  *nscan = lparen;
642  break;
643 
644  case '{':
645  if (V.note[strlen(V.note) - 1] == '}')
646  *nscan = lyrtag;
647  else
648  *nscan = lparen;
649  break;
650 
651  case ')':
652  if (pos1('(', V.note) == 0)
653  *nscan = rparen;
654  else
655  *nscan = rlparen;
656  break;
657 
658  case '}':
659  if (pos1('{', V.note) == 0)
660  *nscan = rparen;
661  else
662  *nscan = rlparen;
663  break;
664 
665  case '[':
666  *nscan = lbrac;
667  break;
668 
669  case ']':
670  if (!strcmp(V.note, "]["))
671  *nscan = other;
672  else
673  *nscan = rbrac;
674  break;
675 
676  case '@':
677  *nscan = atword;
678  break;
679 
680  case 'm':
681  *nscan = mword;
682  break;
683 
684  case 'r':
685  *nscan = rword;
686  break;
687 
688  case '#':
689  case '-':
690  case 'n':
691  case 'x':
692  case '?':
693  case 's':
694  case 't':
695  case 'D':
696  *nscan = pmxl;
697  break;
698 
699  case 'M':
700  if (!strcmp(V.note, "M"))
701  *nscan = endmacro;
702  else
703  *nscan = macro;
704  break;
705 
706  case 'G':
707  if (pos1('A', V.note) > 0)
708  *nscan = pmxl;
709  else
710  *nscan = other;
711  break;
712 
713  case '1':
714  case '2':
715  case '3':
716  case '4':
717  case '5':
718  case '6':
719  case '7':
720  case '8':
721  case '9':
722  if (pos1('/', V.note) > 0)
723  *nscan = mword;
724  else
725  *nscan = pmxl;
726  break;
727 
728  case 'o':
729  *nscan = oword;
730  break;
731 
732  case 'A':
733  case 'V':
734  *nscan = FirstOnly;
735  break;
736 
737  case '/':
738  if (!strcmp(V.note, "//"))
739  *nscan = nextvoice;
740  else if (!strcmp(V.note, "/")) {
741  strcpy(V.note, "//");
742  warning("/ changed to //", print);
743  *nscan = nextvoice;
744  } else {
745  error("Word starts with /: do you mean \\?", print);
746  *nscan = err;
747  }
748  break;
749 
750  default:
751  if (pos1('|', V.note) > 0)
752  *nscan = barword;
753  else
754  *nscan = other;
755  break;
756  }
757 }
758 
759 
761 {
762  line_info *WITH;
763 
764  WITH = &info[voice-1];
765  if (WITH->voice_pos == 1 && voice < nvoices)
766  return (WITH->voice_stave == info[voice].voice_stave);
767  else
768  return false;
769 }
770 
771 
772 void describeVoice(voice_index voice, Char *describe_lyr)
773 {
774  short bar, w;
775  line_info *WITH;
776  Char STR1[256];
777  line_info *WITH1;
778  short FORLIM;
779 
780  WITH = &info[voice-1];
781  printf("Voice `%s' is on line %d", voice_label[voice-1], WITH->mus);
782  if (WITH->vocal) {
783  printf(", is vocal");
784  puts(describe_lyr);
785  } else {
786  if (WITH->chord > 0)
787  printf(" and has chords on line %d", WITH->chord);
788  putchar('\n');
789  }
790  if (!debugMode())
791  return;
792  WITH1 = &info[voice-1];
793  printf("Line has %d bars", WITH1->nbar);
794  if (WITH1->extra > 0)
795  printf(" + %d/64 notes\n", WITH1->extra);
796  else
797  putchar('\n');
798  printf("Bars:");
799  FORLIM = WITH1->nbar;
800  for (bar = 1; bar <= FORLIM; bar++)
801  printf(" %s ", getBar(STR1, voice, bar));
802  printf("\nWord types:");
803  FORLIM = WITH1->nword;
804  for (w = 0; w <= FORLIM - 1; w++)
805  printf(" %s", name[(long)WITH1->scan[w]]);
806  putchar('\n');
807 }
808 
809 
811 {
812  voice_index v;
813 
814  if (number_on_stave[stave-1] != 2)
815  return true;
816  else {
817  v = first_on_stave[stave-1];
818  return (info[v-1].mus == 0 || info[v].mus == 0);
819  }
820 }
821 
822 
823 void selectVoices(Char *line_)
824 {
825  Char line[256];
826  short i = 0;
827  short k;
828  Char word[256];
829  short FORLIM;
830 
831  strcpy(line, line_);
832  FORLIM = nvoices;
833  for (k = 0; k <= FORLIM - 1; k++)
834  selected[k] = false;
835  printf("Voice change to: %s = ", line);
836  while (i < nvoices) {
838  if (*word == '\0') {
839  putchar('\n');
840  return;
841  }
842  i++;
843  printf("%s ", word);
844  k = findVoice(word);
845  if (k == 0)
846  error("This voice is not in the style", print);
847  selected[k-1] = true;
848  }
849  putchar('\n');
850 }
851 
852 
853 
854 
855 /* End. */
#define message
Definition: aptex-macros.h:418
void delete1(char *s, short p)
Definition: cfuncs.c:35
char * substr_(char *Result, char *s, short start, short count)
Definition: cfuncs.c:83
void predelete(char *s, short l)
Definition: cfuncs.c:40
void getNum(char *line, short *k)
Definition: cfuncs.c:57
short pos1(char c, char *s)
Definition: cfuncs.c:30
short nextWordBound(char *s, char trigger, short p)
Definition: cfuncs.c:97
#define Local
Definition: cfuncs.h:10
#define Static
Definition: cfuncs.h:9
#define n
Definition: t4ht.c:1290
boolean debugMode(void)
Definition: control.c:182
boolean solfaNoteNames(void)
Definition: control.c:218
boolean expandMacro(void)
Definition: control.c:158
int dummy
Definition: dummy.c:29
int w
Definition: dviconv.c:26
int v
Definition: dviconv.c:10
int strcmp()
Definition: coll.cpp:143
int printf()
char * strcpy()
#define error(a)
Definition: dviinfo.c:48
static int voice
#define s
Definition: afcover.h:80
#define max_words
Definition: globals.h:25
short one_beat
voice_index0 stave[15]
Definition: globals.h:110
char stave_index
Definition: globals.h:80
Char voice_label[15][256]
short line_no
Definition: globals.h:115
char voice_index
Definition: globals.h:78
paragraph orig_P
Definition: globals.h:120
short meternum
Definition: globals.h:115
paragraph P
voice_index0 first_on_stave[15]
Definition: globals.h:111
char bar_index0
Definition: globals.h:82
short nbars
Definition: globals.h:116
uchar word_index0
Definition: globals.h:84
short bar_no
Definition: globals.h:116
line_nos orig_line_no
char paragraph_index
Definition: globals.h:76
#define blank
Definition: globals.h:55
voice_index0 number_on_stave[15]
Definition: globals.h:111
#define barsym
Definition: globals.h:53
char voice_index0
Definition: globals.h:88
char paragraph_index0
Definition: globals.h:86
#define max_bars
Definition: globals.h:32
voice_index0 nvoices
#define maxvoices
Definition: globals.h:34
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
void warning(char msg[])
Definition: utils.c:72
#define buf
#define macro
Definition: ctangleboot.c:153
#define sprintf
Definition: snprintf.c:44
const int * pos
Definition: combiners.h:905
short numberOfBars(voice_index voice)
Definition: mtxline.c:291
static char name[22][10]
Definition: mtxline.c:48
char * nextMusicWord(char *Result, voice_index voice)
Definition: mtxline.c:385
void appendNote(voice_index voice, music_word nscan)
Definition: mtxline.c:253
boolean endOfBar(voice_index voice, short bar_no)
Definition: mtxline.c:422
music_word nextNote(voice_index voice)
Definition: mtxline.c:413
paragraph_index0 chordLineNo(voice_index voice)
Definition: mtxline.c:125
void resetInfo(voice_index voice, char *buf)
Definition: mtxline.c:224
void getNextMusWord(char *buf_, char *note_, music_word *nscan)
Definition: mtxline.c:582
boolean maybeMusicLine(char *l_)
Definition: mtxline.c:452
void setMusicLineNo(voice_index voice, paragraph_index lno)
Definition: mtxline.c:119
stave_index voiceStave(voice_index voice)
Definition: mtxline.c:159
void setChordLineNo(voice_index voice, paragraph_index lno)
Definition: mtxline.c:131
void setStavePos(voice_index voice, stave_index stave, stave_index pos)
Definition: mtxline.c:149
void barForward(voice_index voice, short nbars)
Definition: mtxline.c:297
paragraph_index0 musicLineNo(voice_index voice)
Definition: mtxline.c:113
#define nmacros
Definition: mtxline.c:470
static char macro_text[99][256]
Definition: mtxline.c:474
static void expandThisMacro(struct LOC_getNextMusWord *LINK)
Definition: mtxline.c:506
music_word word_scan[128]
Definition: mtxline.c:34
void setExtraLength(voice_index voice, short ext)
Definition: mtxline.c:312
voice_index0 findVoice(char *w_)
Definition: mtxline.c:328
static void info3(voice_index voice)
Definition: mtxline.c:351
char * MusicWord(char *Result, short voice, short n)
Definition: mtxline.c:391
void regroup(voice_index voice)
Definition: mtxline.c:185
static line_info info[15]
Definition: mtxline.c:54
static boolean macro_initialized
Definition: mtxline.c:473
void skipChordBar(voice_index voice)
Definition: mtxline.c:81
boolean aloneOnStave(stave_index stave)
Definition: mtxline.c:810
music_word thisNote(voice_index voice)
Definition: mtxline.c:404
short ExtraLength(voice_index voice)
Definition: mtxline.c:322
void describeVoice(voice_index voice, char *describe_lyr)
Definition: mtxline.c:772
char * musicLine(char *Result, voice_index voice)
Definition: mtxline.c:107
boolean isVocal(voice_index voice)
Definition: mtxline.c:143
boolean bind_left[22]
Definition: mtxline.c:12
boolean upper(voice_index voice)
Definition: mtxline.c:760
void warning3(voice_index voice, char *message)
Definition: mtxline.c:375
char * getMusicWord(char *Result, voice_index voice)
Definition: mtxline.c:440
void appendToLine(voice_index voice, char *note)
Definition: mtxline.c:265
void error3(voice_index voice, char *message)
Definition: mtxline.c:365
void markBar(voice_index voice)
Definition: mtxline.c:279
struct line_info line_info
char * getBar(char *Result, voice_index voice, short bar)
Definition: mtxline.c:95
voice_index companion(voice_index voice)
Definition: mtxline.c:171
static void macroInit(void)
Definition: mtxline.c:477
static short identifyMacro(char *s_)
Definition: mtxline.c:489
stave_index voicePos(voice_index voice)
Definition: mtxline.c:165
void clearLabels(void)
Definition: mtxline.c:239
void selectVoices(char *line_)
Definition: mtxline.c:823
void setVocal(voice_index voice, boolean voc)
Definition: mtxline.c:137
short beatsPerLine(void)
Definition: mtxline.c:59
void gotoBar(voice_index voice, short bar_no)
Definition: mtxline.c:431
boolean selected[15]
music_word
Definition: mtxline.h:21
@ barword
Definition: mtxline.h:23
@ rword
Definition: mtxline.h:23
@ texword
Definition: mtxline.h:24
@ FirstOnly
Definition: mtxline.h:24
@ rbrac
Definition: mtxline.h:22
@ rlparen
Definition: mtxline.h:22
@ other
Definition: mtxline.h:22
@ mword
Definition: mtxline.h:23
@ pmxprefix
Definition: mtxline.h:23
@ endmacro
Definition: mtxline.h:23
@ oword
Definition: mtxline.h:23
@ lbrac
Definition: mtxline.h:22
@ nextvoice
Definition: mtxline.h:23
@ atword
Definition: mtxline.h:24
@ err
Definition: mtxline.h:24
@ lparen
Definition: mtxline.h:22
@ rparen
Definition: mtxline.h:22
@ abcdefg
Definition: mtxline.h:22
@ zword
Definition: mtxline.h:22
@ lyrtag
Definition: mtxline.h:22
@ pmxl
Definition: mtxline.h:23
void translateSolfa(char *nt)
Definition: notes.c:52
int k
Definition: otp-parser.c:70
#define print(s)
Definition: pbmtoln03.c:48
#define V
Definition: pgmcrater.c:68
unsigned short word
Definition: picttoppm.c:64
#define STR2(tok)
Definition: t1part.c:39
Definition: sh5.c:97
paragraph_index0 chord
Definition: mtxline.c:39
word_index0 here
Definition: mtxline.c:37
short word_bound[128+1]
Definition: mtxline.c:43
boolean vocal
Definition: mtxline.c:41
short extra
Definition: mtxline.c:40
word_scan scan
Definition: mtxline.c:44
word_index0 nword
Definition: mtxline.c:37
bar_index0 nbar
Definition: mtxline.c:38
short orig_word_bound[128+1]
Definition: mtxline.c:43
word_index0 bar_bound[16+1]
Definition: mtxline.c:42
paragraph_index0 voice_pos
Definition: mtxline.c:39
paragraph_index0 voice_stave
Definition: mtxline.c:39
paragraph_index0 mus
Definition: mtxline.c:39
Definition: bdf.c:133
int j
Definition: t4ht.c:1589
char * ext
Definition: t4ht.c:938
*job_name strlen((char *) job_name) - 4)
char * GetNextWord(char *Result, char *s, char Delim, char Term)
Definition: utility.c:40
char * toString(char *Result, short n)
Definition: utility.c:96
short curtail(char *s, char c)
Definition: utility.c:82