Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /proc/thread-self/root/usr/local/lib/python3.8/dist-packages/iftlib/abc/abc_old/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : //proc/thread-self/root/usr/local/lib/python3.8/dist-packages/iftlib/abc/abc_old/xx

abc2ps.c:struct ISTRUCT info, default_info;
abc2ps.c-unsigned char deco_glob[256], deco_tune[256];
abc2ps.c:struct SYMBOL *sym;		/* (points to the symbols of the current voice) */
abc2ps.c-
abc2ps.c-char page_init[201];		/* initialization string after page break */
abc2ps.c-int tunenum;			/* number of current tune */
abc2ps.c-int pagenum = 1;		/* current page in output file */
abc2ps.c-
--
abc2ps.c:static struct str_a {
abc2ps.c-	char	str[4096];	/* memory area */
abc2ps.c-	char	*p;		/* pointer in area */
abc2ps.c:	struct str_a *n;	/* next area */
abc2ps.c-	int	r;		/* remaining space in area */
abc2ps.c-} *str_r[MAXAREAL], *str_c[MAXAREAL];	/* root and current area pointers */
abc2ps.c-
abc2ps.c-/* -- local functions -- */
abc2ps.c-
--
abc2ps.c:static void do_filter(struct abctune *t,
abc2ps.c-		      char *sel);
abc2ps.c:static void do_select(struct abctune *t,
abc2ps.c-		      int first_tune,
abc2ps.c-		      int last_tune);
abc2ps.c-static char *getext(char *fid);
abc2ps.c-static void output_file(void);
abc2ps.c-static char *read_file(void);
--
abc2ps.c:		 sizeof(struct SYMBOL) - sizeof(struct abcsym),
abc2ps.c-		 0);			/* don't keep comments */
abc2ps.c-
abc2ps.c-	/* parse the arguments - as soon as a file ends, it is treated */
abc2ps.c-	help_me = 0;
abc2ps.c-	while (--argc > 0) {
--
abc2ps.c:	struct abctune *t;
abc2ps.c-	char *file;
abc2ps.c-
abc2ps.c-	/* read the file into memory */
abc2ps.c-	if ((file = read_file()) == 0) {
abc2ps.c-#ifdef unix
--
abc2ps.c:static void do_filter(struct abctune *t, char *sel)
abc2ps.c-{
abc2ps.c-	int cur_sel;
abc2ps.c-	int end_sel;
abc2ps.c-	int n;
abc2ps.c-
--
abc2ps.c:static void do_select(struct abctune *t,
abc2ps.c-		      int first_tune,
abc2ps.c-		      int last_tune)
abc2ps.c-{
abc2ps.c-	while (t != 0) {
abc2ps.c:		struct abcsym *s;
abc2ps.c-		int print_tune;
abc2ps.c-
abc2ps.c-		print_tune = 0;
abc2ps.c-		for (s = t->first_sym; s != 0; s = s->next) {
abc2ps.c-			if (s->type == ABC_T_INFO
--
abc2ps.c:	struct FORMAT *fmt;
abc2ps.c-
abc2ps.c-	fmt = &cfmt;
abc2ps.c-	if (landscape >= 0)
abc2ps.c-		fmt->landscape = landscape;
abc2ps.c-	if (scalefac >= 0)
--
abc2ps.c:	struct str_a *a_p;
abc2ps.c-
abc2ps.c-	if ((a_p = str_r[level]) == 0) {
abc2ps.c-		str_r[level] = a_p = malloc(sizeof *str_r[0]);
abc2ps.c-		a_p->n = 0;
abc2ps.c-	}
--
abc2ps.c:	struct str_a *a_p;
abc2ps.c-
abc2ps.c-	a_p = str_c[str_level];
abc2ps.c-	len = (len + 7) & ~7;		/* align at 64 bits boundary */
abc2ps.c-	if (a_p->r < len) {
abc2ps.c-		if (a_p->n == 0) {
--
abcparse.c:static struct deco dc;		/* decorations */
abcparse.c-static int lyric_started;	/* lyric started */
abcparse.c:static struct abcsym *lyric_start;	/* 1st note of the line for d: */
abcparse.c:static struct abcsym *lyric_cont;	/* current symbol when d: continuation */
abcparse.c-
abcparse.c-#define VOICE_NAME_SZ 32	/* max size of a voice name */
abcparse.c-
abcparse.c-static unsigned char *file;	/* remaining abc file */
abcparse.c-static short linenum;		/* current line number */
--
abcparse.c:static struct {			/* voice table and current pointer */
abcparse.c-	char *name;			/* voice name */
abcparse.c-	short ulen;			/* unit note length */
abcparse.c-	signed char carryover;		/* for interpreting > and < chars */
abcparse.c-	unsigned char ntinext;
abcparse.c-	signed char tinext[MAXHD];	/* chord ties */
--
abcparse.c:		       struct abcsym *s);
abcparse.c-static unsigned char *parse_len(unsigned char *p,
abcparse.c-				int *p_len);
abcparse.c-static unsigned char *parse_clef(unsigned char *p,
abcparse.c:				 struct clef_s *p_clef);
abcparse.c:static void parse_header(struct abctune *t,
abcparse.c-			 unsigned char *p,
abcparse.c-			 char *comment);
abcparse.c:static int parse_line(struct abctune *t,
abcparse.c-		      unsigned char *p);
abcparse.c:static unsigned char *parse_note(struct abctune *t,
abcparse.c-				 unsigned char *p);
abcparse.c-static void syntax(char *msg, char *q);
abcparse.c-
abcparse.c-/* -- delete an ABC symbol -- */
abcparse.c:void abc_delete(struct abcsym *as)
abcparse.c-{
abcparse.c-	switch (as->type) {
abcparse.c-	case ABC_T_INFO:
abcparse.c-		switch (as->text[0]) {
abcparse.c-		case 'Q':
--
abcparse.c:void abc_free(struct abctune *first_tune)
abcparse.c-{
abcparse.c:	struct abctune *t;
abcparse.c-
abcparse.c-	if (!free_f)
abcparse.c-		return;
abcparse.c-	t = first_tune;
abcparse.c-	for (;;) {
abcparse.c:		struct abcsym *s;
abcparse.c-
abcparse.c-		if (t == 0)
abcparse.c-			break;
abcparse.c-		s = t->first_sym;
abcparse.c-
--
abcparse.c:			struct abcsym *n;
abcparse.c-
abcparse.c-			n = s->next;
abcparse.c-			abc_delete(s);
abcparse.c-			if ((s = n) == 0)
abcparse.c-				break;
--
abcparse.c:			struct abctune *n;
abcparse.c-
abcparse.c-			n = t->next;
abcparse.c-			free_f(t);
abcparse.c-			t = n;
abcparse.c-		}
--
abcparse.c:		struct abcsym *s)
abcparse.c-{
abcparse.c-	unsigned char *p;
abcparse.c:	struct abctune *t;
abcparse.c-
abcparse.c-	/* initialize */
abcparse.c-	file = file_api;
abcparse.c-	if (level_f)
abcparse.c-		level_f(abc_state != ABC_S_GLOBAL);
--
abcparse.c:struct abcsym *abc_new(struct abctune *t,
abcparse.c-		       unsigned char *p,
abcparse.c-		       unsigned char *comment)
abcparse.c-{
abcparse.c:	struct abcsym *s;
abcparse.c-
abcparse.c-	s = alloc_f(sizeof *s + client_sz);
abcparse.c-	memset(s, 0, sizeof *s + client_sz);
abcparse.c-	s->tune = t;
abcparse.c-	if (p != 0) {
--
abcparse.c:struct abctune *abc_parse(char *file_api)
abcparse.c-{
abcparse.c-	unsigned char *p;
abcparse.c:	struct abctune *first_tune = 0;
abcparse.c:	struct abctune *t, *last_tune;
abcparse.c-
abcparse.c-	/* initialize */
abcparse.c-	file = file_api;
abcparse.c-	t = 0;
abcparse.c-	abc_state = ABC_S_GLOBAL;
--
abcparse.c:			struct abctune *n;
abcparse.c-
abcparse.c-			if (*p == '\0')
abcparse.c-				continue;
abcparse.c-			n = alloc_f(sizeof *n);
abcparse.c-			memset(n, 0 , sizeof *n);
--
abcparse.c:static void broken_rhythm(struct note *note,
abcparse.c-			  int num)	/* >0: do dot, <0: do half */
abcparse.c-{
abcparse.c-	int l, m, n;
abcparse.c-
abcparse.c-	num *= 2;
--
abcparse.c:		      struct abcsym *s)
abcparse.c-{
abcparse.c-	int sf, j;
abcparse.c-	char w[81];
abcparse.c-	int bagpipe;
abcparse.c:	struct clef_s clef;
abcparse.c-	int minor = 0;
abcparse.c-
abcparse.c-	/* check for clef alone */
abcparse.c-	p = parse_clef(p, &clef);
abcparse.c-	if (*p == '\0') {
--
abcparse.c:			struct abcsym *s2;
abcparse.c-
abcparse.c-			s2 = abc_new(s->tune, 0, 0);
abcparse.c-			s2->type = ABC_T_CLEF;
abcparse.c-			memcpy(&s2->u.clef, &clef, sizeof s2->u.clef);
abcparse.c-			s->u.key.empty = 1;
--
abcparse.c:			struct abcsym *s2;
abcparse.c-
abcparse.c-			s2 = abc_new(s->tune, 0, 0);
abcparse.c-			s2->type = ABC_T_CLEF;
abcparse.c-			memcpy(&s2->u.clef, &clef, sizeof s2->u.clef);
abcparse.c-			continue;
--
abcparse.c:		     struct abcsym *s)
abcparse.c-{
abcparse.c-	int l1, l2, d;
abcparse.c-	char *error_txt = 0;
abcparse.c-
abcparse.c-	l1 = 0;
--
abcparse.c:			 struct abcsym *s)
abcparse.c-{
abcparse.c-	int m1, m2, d, wmeasure;
abcparse.c-	int nm, i;
abcparse.c-	int in_parenth;
abcparse.c-
--
abcparse.c:		       struct abcsym *s)
abcparse.c-{
abcparse.c-	int voice;
abcparse.c-	char flags, flags2;
abcparse.c:	struct staff_s *staff;
abcparse.c-
abcparse.c-	/* define the voices */
abcparse.c-	flags = 0;
abcparse.c-	staff = 0;
abcparse.c-	voice = 0;
--
abcparse.c:		       struct abcsym *s)
abcparse.c-{
abcparse.c-	int len = ulen ? ulen : BASE_LEN / 8;
abcparse.c-	int value = 0;
abcparse.c-	int have_error = 0;
abcparse.c-
--
abcparse.c:		      struct abcsym *s)
abcparse.c-{
abcparse.c-	if (char_tb[*p] != CHAR_DECO)
abcparse.c-		return "Invalid decoration";
abcparse.c-	s->u.user.symbol = *p++;
abcparse.c-
--
abcparse.c:			 struct abcsym *s)
abcparse.c-{
abcparse.c-	int voice;
abcparse.c-	char *error_txt = 0;
abcparse.c-	char name[VOICE_NAME_SZ];
abcparse.c:	struct clef_s clef;
abcparse.c:static struct kw_s {
abcparse.c-	char *name;
abcparse.c-	short len;
abcparse.c-	short index;
abcparse.c-} kw_tb[] = {
abcparse.c-	{"name=", 5, 0},
--
abcparse.c:	struct kw_s *kw;
abcparse.c-
abcparse.c-	/* save the unit note length of the previous voice */
abcparse.c-	curvoice->ulen = ulen;
abcparse.c-
abcparse.c-	if (voice_tb[0].name == 0) {
--
abcparse.c:				struct abcsym *s2;
abcparse.c-
abcparse.c-				s2 = abc_new(s->tune, 0, 0);
abcparse.c-				s2->type = ABC_T_CLEF;
abcparse.c-				memcpy(&s2->u.clef, &clef, sizeof s2->u.clef);
abcparse.c-				continue;
--
abcparse.c:				struct abcsym *s2;
abcparse.c-
abcparse.c-				s2 = abc_new(s->tune, 0, 0);
abcparse.c-				s2->type = ABC_T_CLEF;
abcparse.c-				memcpy(&s2->u.clef, &clef, sizeof s2->u.clef);
abcparse.c-			} else	error_txt = "Unknown clef";
--
abcparse.c:void note_sort(struct abcsym *s)
abcparse.c-{
abcparse.c-	int m = s->u.note.nhd;
abcparse.c-
abcparse.c-	for (;;) {
abcparse.c-		int i;
--
abcparse.c:static char *parse_bar(struct abctune *t,
abcparse.c-		       unsigned char *p,
abcparse.c-		       enum bar_type bar_type)
abcparse.c-{
abcparse.c:	struct abcsym *s;
abcparse.c-	char repeat_value[32];
abcparse.c-
abcparse.c-	s = abc_new(t, gchord, 0);
abcparse.c-	if (gchord) {
abcparse.c-		if (free_f)
--
abcparse.c:				 struct clef_s *p_clef)
abcparse.c-{
abcparse.c-	int clef = -1;
abcparse.c-	int explicit_clef = 0;
abcparse.c-	int transpose = 0;
abcparse.c-	int clef_line = 0;
--
abcparse.c:			  struct deco *deco)
abcparse.c-{
abcparse.c-	int n;
abcparse.c-	unsigned char c, d;
abcparse.c-
abcparse.c-	n = deco->n;
--
abcparse.c:	struct abcsym *is;
abcparse.c-	unsigned char d;
abcparse.c-	int n;
abcparse.c-
abcparse.c-	if ((is = lyric_cont) == 0)
abcparse.c-		is = lyric_start;
--
abcparse.c:			 struct note *note)
abcparse.c-{
abcparse.c-	int i;
abcparse.c-
abcparse.c-	for (;;) {
abcparse.c-		switch (*p++) {
--
abcparse.c:static int parse_line(struct abctune *t,
abcparse.c-		      unsigned char *p)
abcparse.c-{
abcparse.c:	struct abcsym *s;
abcparse.c-	unsigned char *comment;
abcparse.c-	signed char carryover_sav = 0;	/* (compiler warning) */
abcparse.c-	unsigned char *q, c;
abcparse.c-	char sappo = 0;
abcparse.c-	static char qtb[10] = {1, 1, 3, 2, 3, 0, 2, 0, 3, 0};
--
abcparse.c:static unsigned char *parse_note(struct abctune *t,
abcparse.c-				 unsigned char *p)
abcparse.c-{
abcparse.c:	struct abcsym *s;
abcparse.c-	unsigned char *q;
abcparse.c-	int pit, len, acc, smal, nostem;
abcparse.c-	int chord, sl1, sl2;
abcparse.c-	int j, m;
abcparse.c-
--
abcparse.c:static void parse_header(struct abctune *t,
abcparse.c-			 unsigned char *p,
abcparse.c-			 char *comment)
abcparse.c-{
abcparse.c:	struct abcsym *s;
abcparse.c-	unsigned char header_type = *p;
abcparse.c-	char *error_txt = 0;
abcparse.c-
abcparse.c-	s = abc_new(t, p, comment);
abcparse.c-	s->type = ABC_T_INFO;
--
deco.c:static struct deco_elt {
deco.c:	struct deco_elt *next;	/* next decoration */
deco.c:	struct SYMBOL *s;	/* symbol */
deco.c-	unsigned char t;	/* decoration index */
deco.c-	unsigned char staff;	/* staff */
deco.c-	char inv;		/* invert the glyph if 1 */
deco.c-	char flags;
deco.c-#define DE_VAL	0x01		/* put extra value if 1 */
--
deco.c:struct deco_def_s;
deco.c:typedef void draw_f(struct deco_elt *de);
deco.c-static draw_f d_arp, d_cresc, d_near, d_slide, d_upstaff,
deco.c-	d_pf, d_trill;
deco.c-
deco.c-/* decoration table */
deco.c-/* !! don't change the order of the numbered items !! */
deco.c:static struct deco_def_s {
deco.c-	char *name;
deco.c-	unsigned char func;	/* function index */
deco.c-	signed char ps_func;	/* postscript function index */
deco.c-	unsigned char h;	/* height */
deco.c-	unsigned char wl;	/* width */
--
deco.c:static struct SYMBOL *first_note;	/* first note/rest of the line */
deco.c-
deco.c:static void draw_gchord(struct SYMBOL *s, float gchy);
deco.c-
deco.c-/* get the vertical offset of a long decoration */
deco.c:static float get_y(struct SYMBOL *s,
deco.c-		   int up,
deco.c-		   float x,
deco.c-		   float w,
deco.c-		   float h)
deco.c-{
deco.c:	struct SYMBOL *s2, *s_start;
deco.c-	int staff, start_seen;
deco.c-	float y;
deco.c-
deco.c-	s_start = s;
deco.c-	start_seen = 0;
--
deco.c:static void set_y(struct SYMBOL *s,
deco.c-		  int up,
deco.c-		  float x,
deco.c-		  float w,
deco.c-		  float y)
deco.c-{
deco.c:	struct SYMBOL *s2, *s_start;
deco.c-	int staff, start_seen;
deco.c-
deco.c-	s_start = s;
deco.c-	start_seen = 0;
deco.c-	staff = s->staff;
--
deco.c:static void d_arp(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	int m, h;
deco.c-	float yc, xc;
deco.c-
deco.c-	s = de->s;
deco.c-	dd = &deco_def_tb[de->t];
--
deco.c:static void d_cresc(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	int staff, voice, up;
deco.c-	float x, y, dx;
deco.c:	struct SYMBOL *s2;
deco.c-
deco.c-	if (de->flags & DE_TREATED)
deco.c-		return;
deco.c-	s = de->s;
deco.c-	dd = &deco_def_tb[de->t];
--
deco.c:			de = (struct deco_elt *) getarena(sizeof *de);
deco.c-			memset(de, 0, sizeof *de);
deco.c-			deco_tail->next = de;
deco.c-			deco_tail = de;
deco.c-			de->s = s;
deco.c-			de->t = t;
--
deco.c:static void d_near(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	int y, sig;
deco.c-
deco.c-	s = de->s;
deco.c-	dd = &deco_def_tb[de->t];
deco.c-	sig = s->stem > 0 ? -1 : 1;
--
deco.c:static void d_pf(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	float y, w;
deco.c-	char *str;
deco.c-	int up;
deco.c-
deco.c-	s = de->s;
--
deco.c:static void d_slide(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	int m;
deco.c-	float yc, xc;
deco.c-
deco.c-	s = de->s;
deco.c-	dd = &deco_def_tb[de->t];
--
deco.c:static void d_trill(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	int staff, voice, up;
deco.c-	float x, y, dx;
deco.c:	struct SYMBOL *s2;
deco.c-
deco.c-	if (de->flags & DE_TREATED)
deco.c-		return;
deco.c-	s = de->s;
deco.c-	dd = &deco_def_tb[de->t];
--
deco.c:			de = (struct deco_elt *) getarena(sizeof *de);
deco.c-			memset(de, 0, sizeof *de);
deco.c-			deco_tail->next = de;
deco.c-			deco_tail = de;
deco.c-			de->s = s;
deco.c-			de->t = t;
--
deco.c:static void d_upstaff(struct deco_elt *de)
deco.c-{
deco.c:	struct SYMBOL *s;
deco.c:	struct deco_def_s *dd;
deco.c-	float x, yc;
deco.c-	int inv;
deco.c-	char *str;
deco.c-
deco.c-	s = de->s;
--
deco.c:	struct deco_def_s *dd;
deco.c-	int deco;
deco.c-	char name[16];
deco.c-	int c_func;
deco.c-	char ps_func[16];
deco.c-	int h, wl, wr, n;
--
deco.c:void deco_cnv(struct deco *dc)
deco.c-{
deco.c-	int i;
deco.c-
deco.c-	for (i = dc->n; --i >= 0; ) {
deco.c-		unsigned char deco;
--
deco.c:void deco_update(struct SYMBOL *s, float dx)
deco.c-{
deco.c:	struct deco_elt *de;
deco.c-
deco.c-	for (de = deco_head; de != 0; de = de->next) {
deco.c-		if (de->s == s)
deco.c-			de->x += dx;
deco.c-	}
--
deco.c:float deco_width(struct SYMBOL *s)
deco.c-{
deco.c:	struct deco *dc;
deco.c-	int i;
deco.c-	float wl;
deco.c-
deco.c-	wl = 0;
deco.c-	if (s->type == BAR)
--
deco.c:		struct deco_def_s *dd;
deco.c-
deco.c-		dd =  &deco_def_tb[dc->t[i]];
deco.c-		switch (dd->func) {
deco.c-		case 1: wl += 7.; break;	/* slide */
deco.c-		case 6: wl += 10.; break;	/* arpeggio */
--
deco.c:	struct deco_elt *de;
deco.c-
deco.c-	for (de = deco_head; de != 0; de = de->next) {
deco.c:		struct deco_def_s *dd;
deco.c-		int f;
deco.c-
deco.c-		dd = &deco_def_tb[de->t];
deco.c-		if ((f = dd->ps_func) < 0)
deco.c-			continue;
--
deco.c:	struct SYMBOL *s;
deco.c-	int k;
deco.c:	struct deco *dc;
deco.c-	unsigned char deco;
deco.c:	struct deco_def_s *dd;
deco.c:	struct deco_elt *de;
deco.c:	struct SYMBOL *first;
deco.c-
deco.c-	deco_head = deco_tail = 0;
deco.c-	first = 0;
deco.c-	for (s = first_voice->sym; s != 0; s = s->ts_next) {
deco.c-		switch (s->type) {
--
deco.c:			de = (struct deco_elt *) getarena(sizeof *de);
deco.c-			memset(de, 0, sizeof *de);
deco.c-			if (deco_head == 0)
deco.c-				deco_head = de;
deco.c-			else	deco_tail->next = de;
deco.c-			deco_tail = de;
--
deco.c:	struct deco_elt *de;
deco.c-
deco.c-	for (de = deco_head; de != 0; de = de->next) {
deco.c:		struct deco_def_s *dd;
deco.c-		int f;
deco.c-
deco.c-		dd = &deco_def_tb[de->t];
deco.c-		f = dd->func;
deco.c-		if (f < 3 || f >= 6)
--
deco.c:	struct SYMBOL *s;
deco.c:	struct VOICE_S *p_voice;
deco.c-	float x, y;
deco.c:	struct deco_elt *de;
deco.c-	int voice;
deco.c-	int some_gchord;
deco.c:	struct {
deco.c-		float ymin, ymax;
deco.c-	} minmax[MAXSTAFF];
deco.c-
deco.c-	/* set the top and bottom of all symbols out of the staves */
deco.c-	for (s = first_voice->sym; s != 0; s = s->ts_next) {
--
deco.c:			struct lyrics *ly;
deco.c-			int nlyric;
deco.c-
deco.c-			if ((ly = s->ly) == 0)
deco.c-				continue;
deco.c-			for (nlyric = MAXLY; --nlyric >= 0; )
--
deco.c:			struct SYMBOL *s1, *s2;
deco.c-			int nmes;
deco.c-			float x2, y2;
deco.c-			int n;
deco.c-
deco.c-			if (s->type != BAR
--
deco.c:		struct deco_def_s *dd;
deco.c-
deco.c-		dd = &deco_def_tb[de->t];
deco.c-		if (dd->func < 6)		/* if not tied to the staff */
deco.c-			continue;
deco.c-		func_tb[dd->func](de);
--
deco.c:		struct deco_def_s *dd;
deco.c-
deco.c-		dd = &deco_def_tb[de->t];
deco.c-		if (dd->ps_func < 0
deco.c-		    || dd->func < 6)
deco.c-			continue;
--
deco.c:static void draw_gchord(struct SYMBOL *s,
deco.c-			float gchy)
deco.c-{
deco.c-	float x, w, spc, yspc, gchx;
deco.c-	char *p, *q, *r;
deco.c-	char t[81];
--
deco.c:	struct SYMBOL *s;
deco.c-	int head, dots, flags;
deco.c-	float sc, dx, h, ht, w, ymin, nw, dy;
deco.c-	char tmp[128];
deco.c-
deco.c-	/* put the tempo indication at top */
--
draw.c:struct BEAM {			/* packages info on one beam */
draw.c:	struct SYMBOL *s1, *s2;
draw.c-	float a, b;
draw.c-	float x, y, t;
draw.c-	short stem, staff;
draw.c-};
draw.c-
--
draw.c:		      struct SYMBOL *s,
draw.c-		      int fl);
draw.c-
draw.c-/* -- check if space enough in the output buffer -- */
draw.c-static void nbuf_check(void)
draw.c-{
--
draw.c:static int calculate_beam(struct BEAM *bm,
draw.c:			  struct SYMBOL *s1)
draw.c-{
draw.c:	struct SYMBOL *s, *s2;
draw.c-	int notes, flags, staff, voice;
draw.c-	float x, y, ys, a, b, max_stem_err;
draw.c-	float sx, sy, sxx, sxy, syy, a0, stem_xoff;
draw.c-	int two_staves;
draw.c-  
--
draw.c:		struct SYMBOL *g;
draw.c-
draw.c-		if ((g = s->grace) == 0) {
draw.c-			if (s == s2)
draw.c-				break;
draw.c-			continue;
--
draw.c:		      struct BEAM *bm)
draw.c-{
draw.c-	float y1, dy2;
draw.c-
draw.c-	y1 = bm->a * x1 + bm->b - dy;
draw.c-	dy2 = bm->a * (x2 - x1);
--
draw.c:static void draw_beams(struct BEAM *bm)
draw.c-{
draw.c:	struct SYMBOL *s, *s1, *s2;
draw.c-	int i, maxfl;
draw.c-	float shift;
draw.c-	int two_staves;
draw.c-
draw.c-	s1 = bm->s1;
--
draw.c:		struct SYMBOL *k1, *k2;
draw.c-		int inbeam;
draw.c-
draw.c-		k1 = k2 = s1;
draw.c-		inbeam = 0;
draw.c-		if (!s1->as.u.note.grace)
--
draw.c:	struct VOICE_S *p_voice;
draw.c-	int n, staff;
draw.c:	struct {
draw.c:		struct VOICE_S *v[4];
draw.c-		int nv;
draw.c-		int nl;
draw.c-	} staff_d[MAXSTAFF], *staff_p;
draw.c-	float y;
draw.c-
--
draw.c:			 struct SYMBOL *s)
draw.c-{
draw.c-	int i, j;
draw.c-
draw.c-	if (s->as.u.meter.wmeasure == 0)
draw.c-		return;
--
draw.c:static void draw_keysig(struct VOICE_S *p_voice,
draw.c-			float x,
draw.c:			struct SYMBOL *s)
draw.c-{
draw.c-	int old_sf = s->u;
draw.c-	int staff = p_voice->staff;
draw.c-	float staffb = staff_tb[staff].y;
draw.c-	int i, clef_ix;
--
draw.c:		      struct SYMBOL *s)
draw.c-{
draw.c-	switch (s->as.u.bar.type) {
draw.c-	case B_SINGLE:
draw.c-		PUT3("%.1f %.1f %.1f bar", h, x, y); break;
draw.c-	case B_DOUBLE:
--
draw.c:		     struct SYMBOL *s)
draw.c-{
draw.c-	int	staff;
draw.c-	float	stafft, y;
draw.c-	int	dotsb = 0;
draw.c-	int	dotsa = 0;
--
draw.c:static void draw_rest(struct SYMBOL *s)
draw.c-{
draw.c-	int i, y;
draw.c-	float x, dotx, staffb;
draw.c-
draw.c-static char *rest_tb[9] = {
--
draw.c:			    struct SYMBOL *s)
draw.c-{
draw.c-	int yy;
draw.c-	float x0, y0, x1, y1, x2, y2, x3, y3, bet1, bet2, dy1, dy2;
draw.c-	float a, b, staffb;
draw.c:	struct SYMBOL *g, *last;
draw.c:	struct BEAM bm;
draw.c-
draw.c-	a = b = 0;			/* compiler warning */
draw.c-
draw.c-	staffb = staff_tb[s->staff].y;	/* bottom of staff */
draw.c-
--
draw.c:			    struct SYMBOL *s,
draw.c-			    int m)
draw.c-{
draw.c-	int y;
draw.c-	float staffb;
draw.c-	char *p;
--
draw.c:		struct SYMBOL *s2;
draw.c-
draw.c-		s2 = s->ts_next;
draw.c-		if ((m == 0
draw.c-		     && s2 != 0
draw.c-		     && s->pits[0] == s2->pits[s2->nhd])
--
draw.c:		      struct SYMBOL *s,
draw.c-		      int fl)
draw.c-{
draw.c-	int	y, i, m, ma;
draw.c-	float	staffb;
draw.c-	char *hltype;
--
draw.c:static void draw_bracket(struct SYMBOL *s1,
draw.c:			 struct SYMBOL *s2)
draw.c-{
draw.c:	struct SYMBOL *sy;
draw.c-	int upstaff, nb_only;
draw.c-/*	int two_staves; */
draw.c-	float x1, x2, y1, y2, xm, ym, s, s0, yy, yx, dy;
draw.c-
draw.c-	/* search what is the upper staff and if a bracket is needed */
--
draw.c:static void draw_nplet_brackets(struct SYMBOL *sym)
draw.c-{
draw.c:	struct SYMBOL *s, *s1;
draw.c-
draw.c-	for (s = sym; s != 0; s = s->next) {
draw.c-		if ((s->sflags & (S_NPLET_ST|S_NPLET_END)) != S_NPLET_ST)
draw.c-			continue;
draw.c-		s1 = s;
--
draw.c:static int slur_direction(struct SYMBOL *k1,
draw.c:			  struct SYMBOL *k2)
draw.c-{
draw.c:	struct SYMBOL *s;
draw.c-	int are_stems, are_downstems, y_max;
draw.c-
draw.c-	are_stems = are_downstems = 0;
draw.c-	y_max = 300;
draw.c-	for (s = k1; ; s = s->next) {
--
draw.c:static int slur_multi(struct SYMBOL *k1,
draw.c:		      struct SYMBOL *k2)
draw.c-{
draw.c-	for (;;) {
draw.c-		if (k1->multi != 0)	/* if multi voice */
draw.c-			/*fixme: may change*/
draw.c-			return k1->multi;
--
draw.c:static void draw_slur(struct SYMBOL *k1,
draw.c:		      struct SYMBOL *k2,
draw.c-		      int level)
draw.c-{
draw.c:	struct SYMBOL *k;
draw.c-	float x1, y1, x2, y2, height, addx, addy;
draw.c-	float hmin, a;
draw.c-	float y, z, h, dx, dy;
draw.c-	int s, nn;
draw.c-	int upstaff;
--
draw.c:			struct SYMBOL *g;
draw.c-
draw.c-			for (g = k->grace; g != 0; g = g->next) {
draw.c-				y = g->y - a * k->x - addy;
draw.c-				if (s > 0) {
draw.c-					y += GSTEM + 2;
--
draw.c:static struct SYMBOL *next_scut(struct SYMBOL *s)
draw.c-{
draw.c:	struct SYMBOL *prev;
draw.c-
draw.c-	prev = s;
draw.c-	for (s = s->next; s != 0; s = s->next) {
draw.c-		if (s->type == BAR
draw.c-		    && (s->as.u.bar.type == B_RREP
--
draw.c:static struct SYMBOL *prev_scut(struct SYMBOL *s)
draw.c-{
draw.c:	struct SYMBOL *sym;
draw.c-	int voice;
draw.c-
draw.c-	voice = s->voice;
draw.c-	for ( ; s != 0; s = s->prev) {
draw.c-		if (s->type == BAR
--
draw.c:static void draw_chord_ties(struct SYMBOL *k1,
draw.c:			    struct SYMBOL *k2,
draw.c-			    int nslur,
draw.c-			    int *mhead1,
draw.c-			    int *mhead2,
draw.c-			    int job)
draw.c-{
draw.c:	struct SYMBOL *cut;
draw.c-	int i, m1, p1, p2, y;
draw.c-	int s0, s1, s;
draw.c-	float x1, y1, x2, y2, height, addx, addy;
draw.c-
draw.c-	s1 = 0;
--
draw.c:static void draw_ties(struct SYMBOL *k1,
draw.c:		      struct SYMBOL *k2,
draw.c-		      int job)
draw.c-{
draw.c-	int i, j, m1;
draw.c-	int mhead1[MAXHD], mhead2[MAXHD], nslur, nh1, nh2;
draw.c-
--
draw.c:static void draw_all_ties(struct SYMBOL *sym)
draw.c-{
draw.c:	struct SYMBOL *s1, *s2;
draw.c-
draw.c-	for (s1 = sym; s1 != 0; s1 = s1->next) {
draw.c-		if (s1->type == NOTE)
draw.c-			break;
draw.c-	}
--
draw.c:static void draw_all_slurs(struct SYMBOL *sym)
draw.c-{
draw.c:	struct SYMBOL *s, *s1, *k;
draw.c:	struct SYMBOL *cut, *gr1, *gr2;
draw.c-	int pass, num, gr1_out;
draw.c-
draw.c-	for (pass = 0; ; pass++) {
draw.c-		num = 0;
draw.c-		gr1 = gr2 = 0;
--
draw.c:static void draw_vocals(struct SYMBOL *sym)
draw.c-{
draw.c-	int hyflag, l, j, lflag, nwl;
draw.c-	float lastx, vfsize, w, swfac, lskip;
draw.c-	unsigned char t[81];
draw.c-	float y;
--
draw.c:		struct SYMBOL *s;
draw.c-		float x0;
draw.c-
draw.c-		hyflag = lflag = 0;
draw.c-		lastx = -10;
draw.c-		x0 = 0;		/* (compiler warning) */
--
draw.c:			struct lyrics *ly;
draw.c-			float shift;
draw.c-			char *p;
draw.c-
draw.c-			if ((ly = s->ly) == 0
draw.c-			    || (p = ly->w[j]) == 0) {
--
draw.c:	struct VOICE_S *p_voice;
draw.c:	struct SYMBOL *s;
draw.c-
draw.c-	for (p_voice = first_voice; p_voice; p_voice = p_voice->next) {
draw.c:		struct BEAM bm;
draw.c-
draw.c-		bm.s2 = 0;
draw.c-		bm.staff = 0;
draw.c-		for (s = p_voice->sym; s != 0; s = s->next) {
draw.c-			if (s->type == NOTE
--
draw.c:		struct SYMBOL *gr;
draw.c-
draw.c-		if (s->type != NOTE) {
draw.c-			if ((gr = s->grace) == 0)
draw.c-				continue;
draw.c-			for (gr = s->grace; gr->next != 0; gr = gr->next)
--
draw.c:void draw_symbols(struct VOICE_S *p_voice)
draw.c-{
draw.c:	struct SYMBOL *sym;
draw.c-	float x, y;
draw.c:	struct BEAM bm;
draw.c:	struct SYMBOL *s;
draw.c-
draw.c-	sym = p_voice->sym;
draw.c-
draw.c-	/* draw the symbols */
draw.c-	bm.s2 = 0;
--
format.c:struct FORMAT cfmt;		/* current format for output */
format.c-
format.c-static char *fontnames[MAXFONTS];	/* list of font names */
format.c-static char used_font[MAXFONTS];	/* used fonts */
format.c-static int nfontnames;
format.c-static float staffwidth;
--
format.c:static struct format {
format.c-	char *name;
format.c-	short type;
format.c-#define FORMAT_I 0	/* int */
format.c-#define FORMAT_R 1	/* float */
format.c-#define FORMAT_F 2	/* font spec */
--
format.c:static void fontspec(struct FONTSPEC *f,
format.c-		     char *name,
format.c-		     float size)
format.c-{
format.c-	if (name != 0)
format.c-		f->fnum = add_font(name);
--
format.c:	struct FORMAT *f;
format.c-
format.c-	f = &cfmt;
format.c-	used_font[f->titlefont.fnum] = 1;
format.c-	used_font[f->subtitlefont.fnum] = 1;
format.c-	used_font[f->composerfont.fnum] = 1;
--
format.c:	struct FORMAT *f;
format.c-
format.c-	f = &cfmt;
format.c-	memset(f, 0, sizeof *f);
format.c-	f->name = "standard";
format.c-	f->pageheight	= PAGEHEIGHT;
--
format.c:	struct format *fd;
format.c-static char yn[2][5]={"no","yes"};
format.c-
format.c-	printf("Format \"%s\":\n", cfmt.name);
format.c-	for (fd = format_tb; fd->name; fd++) {
format.c-		printf("  %-13s ", fd->name);
--
format.c:			struct FONTSPEC *s;
format.c-
format.c:			s = (struct FONTSPEC *) fd->v;
format.c-			printf("%s %.1f", fontnames[s->fnum], s->size);
format.c-			if (fd->subtype == 1
format.c-			    && cfmt.partsbox)
format.c-				printf(" box");
format.c-			printf("\n");
--
format.c:		   struct FONTSPEC *fn)
format.c-{
format.c-	char fname[STRLFMT];
format.c-	float fsize;
format.c-
format.c-	fsize = fn->size;
--
format.c:	struct format *fd;
format.c-	char w[81];
format.c-
format.c-	if (*p == '\0'
format.c-	    || *p == '%')
format.c-		return 2;
--
format.c:			g_fspc(p, (struct FONTSPEC *) fd->v);
format.c-			if (fd->subtype == 1)
format.c-				cfmt.partsbox = strstr(p, "box") != 0;
format.c-			break;
format.c-		case FORMAT_U:
format.c-			*((float *) fd->v) = scan_u(p);
--
format.c:void set_font(struct FONTSPEC *font)
format.c-{
format.c-	int fnum;
format.c-
format.c-	fnum = font->fnum;
format.c-	if (!used_font[fnum]) {
--
music.c:static struct SYMBOL *tssym;	/* time sorted list of symbols */
music.c:static struct SYMBOL *tsnext;	/* next line when cut */
music.c-
music.c-#define AT_LEAST(a,b)  do { float tmp = b; if(a<tmp) a=tmp; } while (0)
music.c-
music.c-/* width of notes indexed by log2(note_length) */
music.c-static float w_tb[9] = {
--
music.c:static struct {
music.c-	char u, l;
music.c-} rest_sp[9] = {
music.c-	{16, 25},
music.c-	{16, 19},
music.c-	{10, 19},
--
music.c:static void set_head_directions(struct SYMBOL *s)
music.c-{
music.c-	int i, n, sig, d, shift, nac;
music.c-	int i1, i2, m;
music.c-	float dx, xmn;
music.c-
--
music.c:static void insert_clef(struct SYMBOL *s,
music.c-			int clef_type)
music.c-{
music.c:	struct SYMBOL *new_s;
music.c-	int time, seq;
music.c-
music.c-	/* create the symbol */
music.c-	new_s = ins_sym(CLEF, s->prev);
music.c-	new_s->as.u.clef.type = clef_type;
--
music.c:	struct SYMBOL *s;
music.c-	int min, max;
music.c:	struct SYMBOL *last_chg;
music.c-	int clef_type;
music.c-
music.c-	min = max = 16;			/* 'C' */
music.c-
music.c-	/* count the number of notes upper and lower than 'C' */
--
music.c:		struct SYMBOL *s2, *s3;
music.c-
music.c-		if (s->staff != staff
music.c-		    || s->type != NOTE)
music.c-			continue;
music.c-
--
music.c:			struct SYMBOL *s4;
music.c-
music.c-			if ((s4 = s3) != 0) {
music.c-				for (s4 = s4->ts_prev; s4 != 0; s4 = s4->ts_prev) {
music.c-					if (s4->staff != staff)
music.c-						continue;
--
music.c:	struct SYMBOL *s, *t, *prev_sym;
music.c-	int time, bars;
music.c:	struct VOICE_S *p_voice;
music.c-
music.c-	for (p_voice = first_voice; p_voice; p_voice = p_voice->next) {
music.c-		p_voice->s_anc = 0;
music.c-		p_voice->selected = 0;
music.c-	}
--
music.c:	struct VOICE_S *p_voice;
music.c-	int staff, staff_chg;
music.c:	struct SYMBOL *s, *s1;
music.c-
music.c-	for (p_voice = first_voice; p_voice; p_voice = p_voice->next) {
music.c-		if (!p_voice->floating)
music.c-			continue;
music.c-		staff_chg = 0;
--
music.c:	struct SYMBOL *s;
music.c-	int staff;
music.c-	char staff_clef[MAXSTAFF];
music.c-
music.c-	for (s = tssym; s != 0; s = s->ts_next) {
music.c:		struct SYMBOL *g;
music.c-		int delta;
music.c-		int np, m, pav;
music.c-
music.c-		staff = s->staff;
music.c-		switch (s->type) {
--
music.c:	struct SYMBOL *s;
music.c-	int i, staff, us, ls;
music.c:	struct {
music.c-		short nvoice;
music.c-		short last;
music.c:		struct {
music.c-			short voice;
music.c-			short nn;
music.c-			short ymn;
music.c-			short ymx;
music.c-		} st[4];		/* (no more than 4 voices per staff) */
--
music.c:	struct VOICE_S *p_voice;
music.c-
music.c-	memset(stb, 0, sizeof stb);
music.c-	for (staff = MAXSTAFF; --staff >= 0; ) {
music.c-		for (i = 4; --i >= 0; )
music.c-			stb[staff].st[i].voice = -1;
--
music.c:		struct SYMBOL *t;
music.c-
music.c-		for (staff = MAXSTAFF; --staff >= 0; ) {
music.c-			stb[staff].nvoice = 0;
music.c-			stb[staff].last = 0;
music.c-			for (i = 4; --i >= 0; ) {
--
music.c:	struct SYMBOL *s;
music.c:	struct VOICE_S *p_voice;
music.c-
music.c-#ifndef CLEF_TRANSPOSE
music.c-	int old_behaviour, done;
music.c-
music.c-	/* adjust the pitches if old abc2ps behaviour of clef definition */
--
music.c:				struct SYMBOL *g;
music.c-				int i;
music.c-
music.c-				switch (s->type) {
music.c-				case CLEF:
music.c-					switch (s->as.u.clef.type) {
--
music.c:		struct SYMBOL *sym, *last_tie, *lastnote;
music.c-
music.c-		sym = p_voice->sym;
music.c-
music.c-		pitch = 22;				/* 'B' - if no note! */
music.c-		for (s = sym; s != 0; s = s->next) {
--
music.c:	struct VOICE_S *p_voice;
music.c-
music.c-/*fixme: split big lines*/
music.c-	w = 0;
music.c-	if (first_line) {
music.c-
--
music.c:	struct SYMBOL *s;
music.c:	struct VOICE_S *p_voice;
music.c-	int	staff;
music.c-	float	y, vocal_height;
music.c-	float	staffsep, dy;
music.c:	struct {
music.c-		char avoc, bvoc;	/* number of vocals above and below the staff */
music.c-		short vocal;		/* some vocal below the staff */
music.c-		float x;
music.c-		float ctop, mtop;
music.c-		float cbot, mbot;
--
music.c:static void set_beams(struct SYMBOL *sym)
music.c-{
music.c:	struct SYMBOL *s;
music.c-	int beam, laststem, stem, lasty;
music.c-	int do_break;
music.c-
music.c-#if CUT_NPLETS
music.c-	/* separate words before and after n-plet */
--
music.c:		struct SYMBOL *lastnote;
music.c-		int num, nplet;
music.c-
music.c-		num = nplet = 0;
music.c-		lastnote = 0;
music.c-		for (s = sym; s != 0; s = s->next) {
--
music.c:				struct SYMBOL *t;
music.c-
music.c-				avg = s->yav;
music.c-				n = 1;
music.c-				for (t = s->next; t != 0; t = t->next) {
music.c-					if (t->type == NOTE) {
--
music.c:static float set_graceoffs(struct SYMBOL *s)
music.c-{
music.c:	struct SYMBOL *g, *next;
music.c-	int m;
music.c-	float xx;
music.c-
music.c-	xx = 0;
music.c-	g = s->grace;
--
music.c:	struct SYMBOL *s, *s1;
music.c-
music.c-/*fixme: the accidentals are not treated.. */
music.c-	for (s = tssym; s != 0; s = s->ts_next) {
music.c:		struct SYMBOL *s2;
music.c-		int d, m, nhd2;
music.c-		float d1, d2, x1, x2, dy1, dy2;
music.c-		float noteshift;
music.c-
music.c-		if (s->type != NOTE)
--
music.c:	struct SYMBOL *s;
music.c-
music.c-	for (s = tssym; s != 0; s = s->ts_next) {
music.c-		float slen, ymin, ymax;
music.c-
music.c-		if (s->type != NOTE)
--
music.c:static void set_width(struct SYMBOL *s)
music.c-{
music.c-	int i, m;
music.c:	struct SYMBOL *prev;
music.c-	float xx, w, wlnote, wlw;
music.c-	char t[81];
music.c-
music.c-	switch (s->type) {
music.c-	case NOTE:
--
music.c:			struct SYMBOL *k;
music.c-			float spc;
music.c-
music.c-			/* rest is same for all guitar chord cases */
music.c-			tex_str(t, s->as.text, sizeof t, &w);
music.c-
--
music.c:			struct lyrics *ly = s->ly;
music.c-			float swfac;
music.c-
music.c-			swfac = cfmt.vocalfont.size * cfmt.vocalfont.swfac;
music.c-			for (i = 0; i < MAXLY; i++) {
music.c:				struct SYMBOL *k;
music.c-				float shift;
music.c-				char *p;
music.c-
music.c-				if ((p = ly->w[i]) == 0)
music.c-					continue;
--
music.c:	struct SYMBOL *s;
music.c-
music.c-	for (s = tssym; s != 0; s = s->ts_next)
music.c-		set_width(s);
music.c-}
music.c-
--
music.c:static void set_piece(struct SYMBOL *s)
music.c-{
music.c:	struct VOICE_S *p_voice;
music.c-
music.c-	/* if last line, do nothing */
music.c-	if ((tsnext = s->ts_next) == 0)
music.c-		return;
music.c-
--
music.c:			struct SYMBOL *s2;
music.c-
music.c-			if (s->voice != voice)
music.c-				continue;
music.c-
music.c-			/* set the word end / start */
--
music.c:static void set_spacing(struct SYMBOL *s)
music.c-{
music.c:	struct SYMBOL *prev;
music.c-
music.c-	prev = s->prev;
music.c-	s->shrink = prev->wr + s->wl;
music.c-	s->x = prev->pr + s->pl;
music.c-
--
music.c:	struct SYMBOL *s;
music.c:	struct SYMBOL *staff_further[MAXSTAFF];
music.c-
music.c-	voice = 0;
music.c-	space = shrink = stretch = 0.0;	/* compiler warnings */
music.c-	alfa0 = ALFA_X;			/* max shrink and stretch */
music.c-	beta0 = BETA_X;
--
music.c:		struct SYMBOL *s2, *s3, *s4;
music.c-		float max_shrink, max_space;
music.c-		int len;
music.c:		struct VOICE_S *p_voice;
music.c-
music.c-		/* get the notes at this time, set spacing
music.c-		 * and get the min shrinking */
music.c-		seq = s->seq;
music.c-		len = s->time - time;
--
music.c:static void check_bars(struct VOICE_S *p_voice)
music.c-{
music.c:	struct SYMBOL *sym;
music.c:	struct SYMBOL *s;
music.c-
music.c-	sym = p_voice->sym;
music.c-	p_voice->bar_start = -1;
music.c-	p_voice->bar_text = 0;
music.c-	p_voice->bar_repeat = 0;
--
music.c:	struct SYMBOL *s;
music.c-
music.c-	for (s = first_voice->sym; s != 0; s = s->ts_next) {
music.c-		switch (s->type) {
music.c-		case NOTE:
music.c-		case REST:
--
music.c:	struct SYMBOL *s;
music.c-	int number, time, seq, i;
music.c-
music.c-	if (!cfmt.continueall) {
music.c-		if ((number = cfmt.barsperstaff) == 0) {
music.c-
--
music.c:static void init_music_line(struct VOICE_S *p_voice)
music.c-{
music.c:	struct SYMBOL *s, *sym;
music.c-static	int meter_f;
music.c-
music.c-	sym = p_voice->sym;
music.c-	p_voice->sym = 0;
music.c-
--
music.c:		       sizeof (struct SYMBOL) - sizeof (struct abcsym));
music.c-		p_voice->last_symbol->next = s;
music.c-		s->prev = p_voice->last_symbol;
music.c-		p_voice->last_symbol = s;
music.c-		s->voice = p_voice - voice_tb;
music.c-		s->staff = p_voice->staff;
--
music.c:	struct VOICE_S *p_voice;
music.c:	struct SYMBOL *s, *s1;
music.c-	int done;
music.c-	int j, t;
music.c-
music.c-	clrarena(3);
music.c-
--
music.c:	struct VOICE_S *p_voice;
music.c-	int voice, first_line;
music.c-	float lwidth;
music.c-
music.c-	for (p_voice = first_voice; p_voice; p_voice = p_voice->next)
music.c-		if (p_voice->sym != 0)
--
parse.c:struct STAFF staff_tb[MAXSTAFF];	/* staff table */
parse.c-int nstaff;				/* (0..MAXSTAFF-1) */
parse.c-
parse.c:struct lyric_fonts_s lyric_fonts[8];
parse.c-int nlyric_font;
parse.c-
parse.c:struct VOICE_S voice_tb[MAXVOICE];	/* voice table */
parse.c-int nvoice;				/* (0..MAXVOICE-1) */
parse.c:static struct VOICE_S *curvoice;	/* current voice while parsing */
parse.c:struct VOICE_S *first_voice;		/* first voice */
parse.c-
parse.c:static struct FORMAT dfmt;		/* format at start of tune */
parse.c-
parse.c-static int lyric_nb;			/* current number of lyric lines */
parse.c:static struct SYMBOL *lyric_start;	/* 1st note of the line for w: */
parse.c:static struct SYMBOL *lyric_cont;	/* current symbol when w: continuation */
parse.c-
parse.c:static struct SYMBOL *grace_head, *grace_tail;
parse.c:static struct SYMBOL *voice_over;	/* voice overlay */
parse.c-static int over_bar;			/* voice overlay in a measure */
parse.c-static int lastvoice;			/* last voice for overlay allocation */
parse.c-
parse.c-static int bar_number;			/* (for %%setbarnb) */
parse.c-
--
parse.c:static void get_clef(struct SYMBOL *s);
parse.c:static void get_key(struct SYMBOL *s);
parse.c:static void get_meter(struct SYMBOL *s);
parse.c:static void get_voice(struct SYMBOL *s);
parse.c:static void get_note(struct SYMBOL *s);
parse.c:static struct abcsym *process_pscomment(struct abcsym *as);
parse.c:static void set_nplet(struct SYMBOL *s);
parse.c:static void sym_link(struct SYMBOL *s);
parse.c-
parse.c-/* -- add a new symbol at end of list -- */
parse.c:struct SYMBOL *add_sym(struct VOICE_S *p_voice,
parse.c-		       int type)
parse.c-{
parse.c:	struct SYMBOL *s;
parse.c-
parse.c:	s = (struct SYMBOL *) getarena(sizeof *s);
parse.c-	memset(s, 0, sizeof *s);
parse.c-	if (p_voice->sym != 0) {
parse.c-		p_voice->last_symbol->next = s;
parse.c-		s->prev = p_voice->last_symbol;
parse.c-	} else	p_voice->sym = s;
--
parse.c:struct SYMBOL *ins_sym(int type,
parse.c:		       struct SYMBOL *s)	/* previous symbol */
parse.c-{
parse.c:	struct VOICE_S *p_voice;
parse.c:	struct SYMBOL *new_s, *next;
parse.c-
parse.c-	curvoice = p_voice = &voice_tb[s->voice];
parse.c-	p_voice->last_symbol = s;
parse.c-	next = s->next;
parse.c-	new_s = add_sym(p_voice, type);
--
parse.c:	struct VOICE_S *p_voice, *p_voice1;
parse.c:	struct SYMBOL *s, *s2;
parse.c-
parse.c-	for (p_voice = first_voice; p_voice; p_voice = p_voice->next) {
parse.c-		int voice;
parse.c-
parse.c-		if (p_voice->clone < 0)
--
parse.c:			s2 = (struct SYMBOL *) getarena(sizeof *s2);
parse.c-			memcpy(s2, s, sizeof *s2);
parse.c-			if (p_voice->sym != 0) {
parse.c-				p_voice->last_symbol->next = s2;
parse.c-				s2->prev = p_voice->last_symbol;
parse.c-			} else	p_voice->sym = s2;
--
parse.c:static void gchord_adjust(struct SYMBOL *s)
parse.c-{
parse.c-	char *p;
parse.c-	int freegchord, l;
parse.c-
parse.c-	freegchord = cfmt.freegchord;
--
parse.c:	struct SYMBOL *s;
parse.c-	char word[81], *w;
parse.c-	int ln;
parse.c-	int curfont;
parse.c-
parse.c-	/* search/create the lyric font */
--
parse.c:				s->ly = (struct lyrics *) getarena(sizeof (struct lyrics));
parse.c:				memset(s->ly, 0, sizeof (struct lyrics));
parse.c-			}
parse.c-			l = strlen(word) + 1 + 1;
parse.c-			w = getarena(l);
parse.c-			s->ly->w[ln] = w;
parse.c-			w[0] = curfont;		/* the 1st char is the font index */
--
parse.c:static void get_over(struct SYMBOL *s)
parse.c-{
parse.c:	struct VOICE_S *p_voice, *p_voice2;
parse.c:	struct SYMBOL *s1, *s2;
parse.c-	int ctime, otype, linenum;
parse.c-
parse.c-	/* treat the end of overlay */
parse.c-	p_voice = curvoice;
parse.c-	linenum = s != 0 ? s->as.linenum : 0;
--
parse.c:		struct SYMBOL *s2;
parse.c-
parse.c-		s2 = add_sym(curvoice, BAR);
parse.c-		s2->as.type = ABC_T_BAR;
parse.c-		s2->as.linenum = linenum;
parse.c-		s2->time = curvoice->time;
--
parse.c:		struct SYMBOL *tmp;
parse.c-
parse.c-		tmp = s;
parse.c:		s = (struct SYMBOL *) voice_over->as.next;
parse.c-/*fixme: what if this symbol is not in the voice?*/
parse.c-		if (s->voice != curvoice - voice_tb) {
parse.c-			ERROR(("line %d: Voice overlay not closed",
parse.c-				s->as.linenum));
parse.c-			voice_over = 0;
--
parse.c:static void get_staves(struct SYMBOL *s)
parse.c-{
parse.c-	int i, staff, flags;
parse.c:	struct staff_s *p_staff;
parse.c:	struct VOICE_S *p_voice, *p_voice2;
parse.c-	int dup_voice;
parse.c-
parse.c-	/* clear, then link the voices */
parse.c-	for (i = 0, p_voice = voice_tb;
parse.c-	     i < MAXVOICE;
--
parse.c:			struct VOICE_S *p_voice3;
parse.c-
parse.c-			dup_voice--;
parse.c-			p_voice3 = &voice_tb[dup_voice];
parse.c-			memcpy(p_voice3, p_voice, sizeof *p_voice3);
parse.c-			p_voice3->clone = voice;
--
parse.c:	struct VOICE_S *p_voice;
parse.c-	int	i;
parse.c-
parse.c-	for (i = 0, p_voice = voice_tb;
parse.c-	     i < MAXVOICE;
parse.c-	     i++, p_voice++) {
--
parse.c:static void get_info(struct SYMBOL *s,
parse.c-		     int info_type,
parse.c-		     unsigned char *p)
parse.c-{
parse.c:	struct ISTRUCT *inf;
parse.c-
parse.c-	/* change global or local */
parse.c-	inf = s->as.state == ABC_S_GLOBAL ? &default_info : &info;
parse.c-	lvlarena(s->as.state != ABC_S_GLOBAL);
parse.c-
--
parse.c:			struct VOICE_S *old_voice;
parse.c-
parse.c-			old_voice = curvoice;
parse.c-			curvoice = first_voice;
parse.c-			sym_link(s);
parse.c-			s->type = PART;
--
parse.c:void identify_note(struct SYMBOL *s,
parse.c-		   int len,
parse.c-		   int *p_head,
parse.c-		   int *p_dots,
parse.c-		   int *p_flags)
parse.c-{
--
parse.c:static void get_bar(struct SYMBOL *s)
parse.c-{
parse.c-	/* remove the invisible repeat bars of the 1st voice */
parse.c-	if (curvoice == first_voice
parse.c-	    && s->as.u.bar.type == B_INVIS) {
parse.c:		struct SYMBOL *s2;
parse.c-
parse.c-		s2 = curvoice->last_symbol;
parse.c-		if (s2->type == BAR
parse.c-		    && s2->as.text == 0) {
parse.c-			s2->as.text = s->as.text;
--
parse.c:		struct SYMBOL *s3;
parse.c-
parse.c-		s3 = s->prev;
parse.c-		curvoice->last_symbol = s3;
parse.c-		s3->next = 0;
parse.c-		s3->prev->next = s;
--
parse.c:void do_tune(struct abctune *at,
parse.c-	     int header_only)
parse.c-{
parse.c:	struct abcsym *as;
parse.c-
parse.c-	/* initialize */
parse.c-	memset(voice_tb, 0, sizeof voice_tb);
parse.c-	voice_init();		/* initialize all the voices */
parse.c-	voice_tb[0].name = getarena(2);
--
parse.c:		struct SYMBOL *s = (struct SYMBOL *) as;
parse.c-
parse.c-		if (header_only
parse.c-		    && as->state != ABC_S_GLOBAL)
parse.c-			break;
parse.c-		switch (as->type) {
--
parse.c:				struct SYMBOL *s2;
parse.c-
parse.c-			/* repeat measure more than 1 time */
parse.c-			/* 2 times -> (bar - invisible rest - bar - mrep - bar) */
parse.c-/*fixme: 3 or more times not treated*/
parse.c-				s2 = add_sym(curvoice, REST);
--
parse.c:static void get_clef(struct SYMBOL *s)
parse.c-{
parse.c:	struct VOICE_S *p_voice;
parse.c-
parse.c-	if (s->as.prev->type == ABC_T_INFO
parse.c-	    && s->as.prev->text[0] == 'V')	/* clef relative to a voice definition*/
parse.c-		p_voice = &voice_tb[(int) s->as.prev->u.voice.voice];
parse.c-	else	p_voice = curvoice;
--
parse.c:		struct SYMBOL *s2;
parse.c-
parse.c-#if 0		
parse.c-		if (p_voice->clef.type != s->as.u.clef.type
parse.c-		    || p_voice->clef.line != s->as.u.clef.line
parse.c-		    || p_voice->clef.octave != s->as.u.clef.octave) {
--
parse.c:static void get_key(struct SYMBOL *s)
parse.c-{
parse.c:	struct VOICE_S *p_voice;
parse.c-	int i;
parse.c-
parse.c-	if (s->as.u.key.empty)
parse.c-		return;			/* clef only */
parse.c-	switch (s->as.state) {
--
parse.c:static void get_meter(struct SYMBOL *s)
parse.c-{
parse.c-	switch (s->as.state) {
parse.c-	case ABC_S_GLOBAL:
parse.c-		/*fixme: keep the values and apply to all tunes?? */
parse.c-		break;
--
parse.c:		struct VOICE_S *p_voice;
parse.c-		int i;
parse.c-
parse.c-		for (i = MAXVOICE, p_voice = voice_tb;
parse.c-		     --i >= 0;
parse.c-		     p_voice++)
--
parse.c:static void get_voice(struct SYMBOL *s)
parse.c-{
parse.c-	int voice;
parse.c:	struct VOICE_S *p_voice;
parse.c-	char t[64];
parse.c-
parse.c-	voice = s->as.u.voice.voice;
parse.c-	p_voice = &voice_tb[voice];
parse.c-	if (voice > nvoice) {		/* new voice */
parse.c:		struct VOICE_S *p_voice2;
parse.c-
parse.c-		nvoice = voice;
parse.c-		if (!s->as.u.voice.merge) {
parse.c-#if MAXSTAFF < MAXVOICE
parse.c-			if (nstaff >= MAXSTAFF - 1) {
--
parse.c:static void get_note(struct SYMBOL *s)
parse.c-{
parse.c-	s->nhd = s->as.u.note.nhd;
parse.c-	if (!s->as.u.note.grace) {	/* normal note/rest */
parse.c-		if (grace_head != 0)
parse.c-			grace_head = 0;
--
parse.c:			struct SYMBOL *s2;
parse.c-
parse.c-			s2 = add_sym(curvoice, GRACE);
parse.c-			s2->type = GRACE;
parse.c-			s2->as.linenum = s->as.linenum;
parse.c-			s2->time = curvoice->time;
--
parse.c:static struct abcsym *process_pscomment(struct abcsym *as)
parse.c-{
parse.c-	unsigned char *p;
parse.c-	char *q;
parse.c-	char w[32];
parse.c-	float h1;
parse.c:	struct SYMBOL *s = (struct SYMBOL *) as;
parse.c-
parse.c-	p = as->text + 2;		/* skip '%%' */
parse.c-	if (strncasecmp(p, "fmt ", 4) == 0)
parse.c-		p += 4;			/* skip 'fmt' */
parse.c-
--
parse.c:			get_staves((struct SYMBOL *) as);
parse.c-			curvoice = first_voice;
parse.c-			return as;
parse.c-		}
parse.c-		break;
parse.c-	case 'c':
--
parse.c:static void set_nplet(struct SYMBOL *s)
parse.c-{
parse.c:	struct SYMBOL *t;
parse.c-	int l, r, lplet;
parse.c-	int time;
parse.c-
parse.c-	l = 0;
parse.c-	for (;;) {
--
parse.c:static void sym_link(struct SYMBOL *s)
parse.c-{
parse.c:	struct VOICE_S *p_voice = curvoice;
parse.c-
parse.c:/*	memset((&s->as) + 1, 0, sizeof (struct SYMBOL) - sizeof (struct abcsym)); */
parse.c-	if (p_voice->sym != 0) {
parse.c-		p_voice->last_symbol->next = s;
parse.c-		s->prev = p_voice->last_symbol;
parse.c-	} else	p_voice->sym = s;
parse.c-	p_voice->last_symbol = s;
--
subs.c:static struct text {
subs.c:	struct text *next;
subs.c-	float textw;
subs.c-	char text[2];
subs.c-} *text_tb[TEXT_MAX];
subs.c-
subs.c-/* -- print message for internal error and maybe stop -- */
--
subs.c:static void set_font_init(struct FONTSPEC *font)
subs.c-{
subs.c-	set_font(font);
subs.c-	sprintf(page_init, "%.1f F%d ", font->size, font->fnum);
subs.c-}
subs.c-
--
subs.c:	struct text *t, *r;
subs.c-
subs.c:	t = (struct text *) getarena(sizeof (struct text) - 2
subs.c-				     + strlen(s) + 1);
subs.c-	strcpy(t->text, s);
subs.c-	t->textw = cwid('a') * strlen(s);
subs.c-	t->next = 0;
subs.c-	if ((r = text_tb[type]) == 0)
--
subs.c:	struct text *t, *u, *t_end;
subs.c-	int n, have_text;
subs.c-	float middle, max2col;
subs.c-
subs.c-	if ((u = text_tb[TEXT_W]) == 0)
subs.c-		return;
--
subs.c:	struct text *t;
subs.c-	char buf[256];
subs.c-
subs.c-	if ((t = text_tb[type]) == 0)
subs.c-		return;
subs.c-
--
subs.c:	struct text *t;
subs.c-	float baseskip,parskip;
subs.c-
subs.c-	set_font_init(&cfmt.textfont);
subs.c-	baseskip = cfmt.textfont.size * cfmt.lineskipfac;
subs.c-	parskip = cfmt.textfont.size * cfmt.parskipfac;
--
subs.c:	struct text *t;
subs.c-
subs.c-	t = text_tb[TEXT_PS];
subs.c-	while (t != 0) {
subs.c-		fprintf(fout, "%s\n", t->text);
subs.c-		t = t->next;

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net