Esempio n. 1
0
void nonMusic(void)
{
  paragraph_index i, FORLIM;

  FORLIM = para_len;
  for (i = 0; i <= FORLIM - 1; i++)
    doCommand(P[i]);
  setOnly(cline[(long)only]);
  wipeCommands();
}
Esempio n. 2
0
Local void obliterate(struct LOC_paragraphSetup *LINK)
{
  paragraph_index i;
  Char new_only[256];
  paragraph_index FORLIM;

  *new_only = '\0';
  FORLIM = para_len;
  for (i = 0; i <= FORLIM - 1; i++) {
    if (startsWithIgnoreCase(P[i], "only:")) {
      strcpy(new_only, P[i]);
      strcpy(P[i], "%");
    }
  }
  if (*new_only != '\0') {
    setOnly(new_only);
    return;
  }
  FORLIM = para_len;
  for (i = 1; i <= FORLIM; i++) {
    if (omitLine(i))
      strcpy(P[i-1], "%");
  }
}
Esempio n. 3
0
void interpretCommands(void)
{
  short i, num, den, nbars;
  Char STR2[256];
  short FORLIM;

  strcpy(title_line, cline[(long)title]);
  strcpy(part_line, cline[(long)part]);
  if (*cline[(long)poet] != '\0' || *cline[(long)composer] != '\0')
    sprintf(composer_line, "\\mtxComposerLine{%s}{%s}",
	    cline[(long)poet], cline[(long)composer]);
  else
    *composer_line = '\0';
  strcpy(pmx_line, cline[(long)pmx]);
  GetNextWord(options_line, cline[(long)options], blank_, dummy);
  FORLIM = known_styles;
  for (i = 0; i <= FORLIM - 1; i++)
    style_used[i] = false;
  applyStyles();
  setVoices(voices);
  FORLIM = known_styles;
  for (i = old_known_styles; i <= FORLIM - 1; i++) {
    if (!style_used[i]) {
      warning("The following style was supplied but not used", !print);
      puts(known_style[i]);
    }
  }
  setClefs(clefs);
  if (!redefined[(long)meter]) {
    sprintf(STR2, "You have not defined Meter, assuming \"%s\" ",
	    cline[(long)meter]);
    warning(STR2, !print);
  }
  getMeter(cline[(long)meter], &meternum, &meterdenom, &pmnum, &pmdenom);
  setDefaultDuration(meterdenom);
  if (meternum == 0 &&
      !(redefined[(long)pages] || redefined[(long)systems] ||
	redefined[(long)bars])) {
    strcpy(cline[(long)bars], "1");
    redefined[(long)bars] = true;
  }
  if (redefined[(long)pages] || redefined[(long)systems]) {
    if (redefined[(long)bars])
      warning("BARS/LINE ignored since you specified PAGES or SYSTEMS", print);
    if (redefined[(long)systems])
      getNum(cline[(long)systems], &n_systems);
    else
      warning("PAGES specified but not SYSTEMS", !print);
    if (redefined[(long)pages])
      getNum(cline[(long)pages], &n_pages);
    else
      warning("SYSTEMS specified but not PAGES", !print);
  } else if (redefined[(long)bars]) {
    getNum(cline[(long)bars], &nbars);
    if (nbars > 0) {
      n_pages = 0;
      n_systems = nbars;
    }
  }
  getNum(cline[(long)sharps], &n_sharps);
  setSpace(cline[(long)space]);
  setSize(cline[(long)msize]);
  getTwoNums(cline[(long)shortnote], &num, &den);
  if (den == 0)
    den = 1;
  short_note = num * 64 / den;
  if (*cline[(long)flats] != '\0') {
    getNum(cline[(long)flats], &n_sharps);
    n_sharps = -n_sharps;
  }
  setName();
  setIndent();
  setInitOctave();
  setOnly(cline[(long)only]);
  setRange(cline[(long)range]);
  setDimension(cline[(long)width], width);
  setDimension(cline[(long)height], height);
  if (*options_line != '\0') {
    warning("\"Options\" is cryptic and obsolescent.", !print);
    printf("  Use \"Enable\" and \"Disable\" instead.\n");
  }
  FORLIM = strlen(options_line);
  for (i = 0; i <= FORLIM - 1; i++)
    processOption(options_line[i]);
}