Beispiel #1
0
void augmentPreamble(boolean control_para)
{
  paragraph_index i;
  line_type l;
  short s[5];
  paragraph_index FORLIM;

  if (!thisCase())
    return;
  for (l = unknown; l <= plain_line; l = (line_type)((long)l + 1))
    s[(long)l] = 0;
  FORLIM = para_len;
  for (i = 0; i <= FORLIM - 1; i++) {
    line_no = orig_line_no[i];
    l = doCommand(P[i]);
    s[(long)l]++;
    if (l == comment_line && P[i][1] == comment) {
      predelete(P[i], 2);
      putLine(P[i]);
    }
    if (!control_para && l == unknown)
      error("Unidentifiable line", print);
  }
  if (!control_para && s[(long)command_line] > 0 && s[(long)plain_line] > 0)
    error("Mixture of preamble commands and music", !print);
}
Beispiel #2
0
Static void doMusic(void)
{
  Char STR1[256], STR2[256];
  Char STR4[256];

  first_paragraph = true;
  pmx_preamble_done = false;
  bar_no = 1;
  *repeat_sign = '\0';
  must_respace = false;
  must_restyle = false;
  do {
    final_paragraph = endOfInfile();
    memcpy(orig_P, P, sizeof(paragraph));
    if (para_len > 0 && !ignore_input && thisCase()) {
      if (no_commands_yet) {
	interpretCommands();
	printFeatures(false);
	one_beat = 64 / meterdenom;
	full_bar = meternum * one_beat;
	if (nvoices > standardPMXvoices) {
	  sprintf(STR4, "You have %s voices; standard PMX can only handle %s",
		  toString(STR1, nvoices), toString(STR2, standardPMXvoices));
	  warning(STR4, !print);
	}
	initMTX();
	initUptext();
	initStatus();
	initLyrics();
	no_commands_yet = false;
      }
      if (startsWithBracedWord(P[0]))
	lyricsParagraph();
      else {
	musicParagraph();
	first_paragraph = false;
	writeRepeat(repeat_sign);
      }
    }
    readParagraph(P, orig_line_no, &para_len);
  } while (para_len != 0);
}