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 File Reference
#include "p2c.h"
#include "mtxline.h"
#include "strings.h"
#include "control.h"
#include "notes.h"
#include "utility.h"
Include dependency graph for mtxline.c:

Go to the source code of this file.

Classes

struct  line_info
 
struct  LOC_getNextMusWord
 

Macros

#define MTXLINE_G
 
#define nmacros   99
 

Typedefs

typedef music_word word_scan[128]
 
typedef struct line_info line_info
 

Functions

short beatsPerLine (void)
 
void skipChordBar (voice_index voice)
 
char * getBar (char *Result, voice_index voice, short bar)
 
char * musicLine (char *Result, voice_index voice)
 
paragraph_index0 musicLineNo (voice_index voice)
 
void setMusicLineNo (voice_index voice, paragraph_index lno)
 
paragraph_index0 chordLineNo (voice_index voice)
 
void setChordLineNo (voice_index voice, paragraph_index lno)
 
void setVocal (voice_index voice, boolean voc)
 
boolean isVocal (voice_index voice)
 
void setStavePos (voice_index voice, stave_index stave, stave_index pos)
 
stave_index voiceStave (voice_index voice)
 
stave_index voicePos (voice_index voice)
 
voice_index companion (voice_index voice)
 
void regroup (voice_index voice)
 
void resetInfo (voice_index voice, char *buf)
 
void clearLabels (void)
 
void appendNote (voice_index voice, music_word nscan)
 
void appendToLine (voice_index voice, char *note)
 
void markBar (voice_index voice)
 
short numberOfBars (voice_index voice)
 
void barForward (voice_index voice, short nbars)
 
void setExtraLength (voice_index voice, short ext)
 
short ExtraLength (voice_index voice)
 
voice_index0 findVoice (char *w_)
 
static void info3 (voice_index voice)
 
void error3 (voice_index voice, char *message)
 
void warning3 (voice_index voice, char *message)
 
char * nextMusicWord (char *Result, voice_index voice)
 
char * MusicWord (char *Result, short voice, short n)
 
music_word thisNote (voice_index voice)
 
music_word nextNote (voice_index voice)
 
boolean endOfBar (voice_index voice, short bar_no)
 
void gotoBar (voice_index voice, short bar_no)
 
char * getMusicWord (char *Result, voice_index voice)
 
boolean maybeMusicLine (char *l_)
 
static void macroInit (void)
 
static short identifyMacro (char *s_)
 
static void expandThisMacro (struct LOC_getNextMusWord *LINK)
 
void getNextMusWord (char *buf_, char *note_, music_word *nscan)
 
boolean upper (voice_index voice)
 
void describeVoice (voice_index voice, char *describe_lyr)
 
boolean aloneOnStave (stave_index stave)
 
void selectVoices (char *line_)
 

Variables

boolean bind_left [22]
 
static char name [22][10]
 
static line_info info [15]
 
static boolean macro_initialized = 0
 
static char macro_text [99][256]
 

Macro Definition Documentation

◆ MTXLINE_G

#define MTXLINE_G

Definition at line 8 of file mtxline.c.

◆ nmacros

#define nmacros   99

Definition at line 470 of file mtxline.c.

Typedef Documentation

◆ line_info

typedef struct line_info line_info

◆ word_scan

typedef music_word word_scan[128]

Definition at line 34 of file mtxline.c.

Function Documentation

◆ aloneOnStave()

boolean aloneOnStave ( stave_index  stave)

Definition at line 810 of file mtxline.c.

References first_on_stave, info, number_on_stave, stave, and v.

Referenced by reviseLyrics().

◆ appendNote()

void appendNote ( voice_index  voice,
music_word  nscan 
)

Definition at line 253 of file mtxline.c.

References error3(), line_info::here, info, max_words, line_info::scan, and voice.

Referenced by scanMusic().

◆ appendToLine()

void appendToLine ( voice_index  voice,
char *  note 
)

◆ barForward()

void barForward ( voice_index  voice,
short  nbars 
)

Definition at line 297 of file mtxline.c.

References line_info::bar_bound, error3(), line_info::here, info, max_bars, line_info::nbar, nbars, and voice.

Referenced by scanMusic().

◆ beatsPerLine()

short beatsPerLine ( void  )

Definition at line 59 of file mtxline.c.

References error3(), line_info::extra, info, meternum, line_info::nbar, nvoices, one_beat, and voice.

Referenced by musicParagraph(), and pmxMeter().

◆ chordLineNo()

paragraph_index0 chordLineNo ( voice_index  voice)

Definition at line 125 of file mtxline.c.

References info, and voice.

Referenced by addChords().

◆ clearLabels()

void clearLabels ( void  )

Definition at line 239 of file mtxline.c.

References line_info::chord, info, line_info::mus, nvoices, and voice.

Referenced by analyzeParagraph().

◆ companion()

voice_index companion ( voice_index  voice)

Definition at line 171 of file mtxline.c.

References info, number_on_stave, s, voice, and line_info::voice_stave.

Referenced by processOneBar().

◆ describeVoice()

void describeVoice ( voice_index  voice,
char *  describe_lyr 
)

◆ endOfBar()

boolean endOfBar ( voice_index  voice,
short  bar_no 
)

Definition at line 422 of file mtxline.c.

References line_info::bar_bound, bar_no, line_info::here, info, and voice.

Referenced by processLine().

◆ error3()

◆ expandThisMacro()

◆ ExtraLength()

short ExtraLength ( voice_index  voice)

Definition at line 322 of file mtxline.c.

References info, and voice.

Referenced by testParagraph().

◆ findVoice()

voice_index0 findVoice ( char *  w_)

◆ getBar()

char* getBar ( char *  Result,
voice_index  voice,
short  bar 
)

Definition at line 95 of file mtxline.c.

References line_info::bar_bound, info, line_info::mus, P, substr_(), voice, and line_info::word_bound.

Referenced by describeVoice().

◆ getMusicWord()

char* getMusicWord ( char *  Result,
voice_index  voice 
)

Definition at line 440 of file mtxline.c.

References line_info::here, info, line_no, line_info::mus, MusicWord(), orig_line_no, and voice.

Referenced by getMeterChange(), lookahead(), and processLine().

◆ getNextMusWord()

◆ gotoBar()

void gotoBar ( voice_index  voice,
short  bar_no 
)

Definition at line 431 of file mtxline.c.

References line_info::bar_bound, bar_no, line_info::here, info, and voice.

Referenced by processOneBar().

◆ identifyMacro()

static short identifyMacro ( char *  s_)
static

Definition at line 489 of file mtxline.c.

References getNum(), k, predelete(), s, and strcpy().

Referenced by expandThisMacro().

◆ info3()

static void info3 ( voice_index  voice)
static

Definition at line 351 of file mtxline.c.

References line_info::here, info, line_info::orig_word_bound, p, printf(), voice, and voice_label.

Referenced by error3(), and warning3().

◆ isVocal()

boolean isVocal ( voice_index  voice)

Definition at line 143 of file mtxline.c.

References info, and voice.

Referenced by markDebeamed().

◆ macroInit()

static void macroInit ( void  )
static

Definition at line 477 of file mtxline.c.

References i, macro_initialized, macro_text, and nmacros.

Referenced by expandThisMacro().

◆ markBar()

void markBar ( voice_index  voice)

Definition at line 279 of file mtxline.c.

References line_info::bar_bound, error3(), line_info::here, info, line_info::nbar, and voice.

Referenced by scanMusic().

◆ maybeMusicLine()

boolean maybeMusicLine ( char *  l_)

Definition at line 452 of file mtxline.c.

References abcdefg, blank, getNextMusWord(), GetNextWord(), cutout::l, pos1(), strcpy(), and w.

Referenced by doCommand(), and doPreamble().

◆ musicLine()

char* musicLine ( char *  Result,
voice_index  voice 
)

Definition at line 107 of file mtxline.c.

References musicLineNo(), P, strcpy(), and voice.

Referenced by testParagraph().

◆ musicLineNo()

paragraph_index0 musicLineNo ( voice_index  voice)

Definition at line 113 of file mtxline.c.

References info, and voice.

Referenced by includeStartString(), musicLine(), processLine(), processOneBar(), and testParagraph().

◆ MusicWord()

char* MusicWord ( char *  Result,
short  voice,
short  n 
)

Definition at line 391 of file mtxline.c.

References info, line_info::mus, n, P, strcpy(), substr_(), voice, and line_info::word_bound.

Referenced by getMusicWord(), and nextMusicWord().

◆ nextMusicWord()

char* nextMusicWord ( char *  Result,
voice_index  voice 
)

Definition at line 385 of file mtxline.c.

References info, MusicWord(), and voice.

◆ nextNote()

music_word nextNote ( voice_index  voice)

Definition at line 413 of file mtxline.c.

References line_info::here, info, line_info::scan, and voice.

Referenced by getMeterChange(), and lookahead().

◆ numberOfBars()

short numberOfBars ( voice_index  voice)

Definition at line 291 of file mtxline.c.

References info, and voice.

Referenced by scanMusic(), and testParagraph().

◆ regroup()

◆ resetInfo()

void resetInfo ( voice_index  voice,
char *  buf 
)

◆ selectVoices()

void selectVoices ( char *  line_)

Definition at line 823 of file mtxline.c.

References blank, error, findVoice(), GetNextWord(), i, k, nvoices, print, printf(), selected, and strcpy().

Referenced by analyzeParagraph().

◆ setChordLineNo()

void setChordLineNo ( voice_index  voice,
paragraph_index  lno 
)

Definition at line 131 of file mtxline.c.

References line_info::chord, info, and voice.

Referenced by maybeChords().

◆ setExtraLength()

void setExtraLength ( voice_index  voice,
short  ext 
)

Definition at line 312 of file mtxline.c.

References ext, line_info::extra, line_info::here, info, other, line_info::scan, and voice.

Referenced by scanMusic().

◆ setMusicLineNo()

void setMusicLineNo ( voice_index  voice,
paragraph_index  lno 
)

Definition at line 119 of file mtxline.c.

References info, line_info::mus, and voice.

Referenced by analyzeParagraph().

◆ setStavePos()

void setStavePos ( voice_index  voice,
stave_index  stave,
stave_index  pos 
)

Definition at line 149 of file mtxline.c.

References info, pos, stave, voice, line_info::voice_pos, and line_info::voice_stave.

Referenced by setVoices().

◆ setVocal()

void setVocal ( voice_index  voice,
boolean  voc 
)

Definition at line 137 of file mtxline.c.

References info, line_info::vocal, and voice.

Referenced by applyStyle(), and preambleDefaults().

◆ skipChordBar()

void skipChordBar ( voice_index  voice)

Definition at line 81 of file mtxline.c.

References barsym, line_info::chord, info, P, predelete(), sprintf, strcmp(), and voice.

Referenced by processLine().

◆ thisNote()

music_word thisNote ( voice_index  voice)

Definition at line 404 of file mtxline.c.

References line_info::here, info, line_info::scan, and voice.

Referenced by output(), processLine(), and processOther().

◆ upper()

◆ voicePos()

stave_index voicePos ( voice_index  voice)

Definition at line 165 of file mtxline.c.

References info, and voice.

Referenced by processOneBar().

◆ voiceStave()

stave_index voiceStave ( voice_index  voice)

Definition at line 159 of file mtxline.c.

References info, and voice.

Referenced by extractLyrtag(), newPitch(), setOctave(), and songraise().

◆ warning3()

void warning3 ( voice_index  voice,
char *  message 
)

Definition at line 375 of file mtxline.c.

References info3(), message, print, sprintf, voice, and warning().

Variable Documentation

◆ bind_left

boolean bind_left[22]
Initial value:
= {
0 , 0 , 1 , 0 , 0 , 1 , 1 , 0 , 1 , 1 , 1 ,
0 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0
}

Definition at line 12 of file mtxline.c.

Referenced by lookahead(), and regroup().

◆ info

◆ macro_initialized

boolean macro_initialized = 0
static

Definition at line 473 of file mtxline.c.

Referenced by macroInit().

◆ macro_text

char macro_text[99][256]
static

Definition at line 474 of file mtxline.c.

Referenced by expandThisMacro(), and macroInit().

◆ name

char name[22][10]
static
Initial value:
= {
"?", "note", "znote", "lyricsTag", "(", ")", ")(", "[", "]", "_", "PMX<",
"macro", "endMacro", "meter", "ornament", "rest", "//", "BAR", "TeX", "@",
"firstonly", "ERROR"
}

Definition at line 48 of file mtxline.c.

Referenced by describeVoice().