summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-src/src/dump
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-02-09 02:13:53 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-02-09 02:13:53 +0000
commit77471d966e7252229e6379968b18a7ad789b56da (patch)
tree5e6ff026566c8f7443f132bb097e7325b7b5acee /Build/source/texk/gregorio/gregorio-src/src/dump
parenta286a15b8e122724c858631a30ad23e0e9bff1a1 (diff)
gregorio 4.1.0-beta2
git-svn-id: svn://tug.org/texlive/trunk@39632 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/gregorio/gregorio-src/src/dump')
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/dump/dump.c68
1 files changed, 36 insertions, 32 deletions
diff --git a/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c b/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
index f2adafa80c5..8fd22fcf508 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/dump/dump.c
@@ -49,12 +49,22 @@ void dump_write_characters(FILE *const f,
gregorio_print_unichar(f, current_character->cos.character);
fprintf(f, "\n");
} else {
- if (current_character->cos.s.type == ST_T_BEGIN) {
+ switch (current_character->cos.s.type) {
+ case ST_T_BEGIN:
fprintf(f, " beginning of style %s\n",
dump_style_to_string(current_character->cos.s.style));
- } else {
+ break;
+ case ST_T_END:
fprintf(f, " end of style %s\n",
dump_style_to_string(current_character->cos.s.style));
+ break;
+ default:
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !! IMPROPER STYLE !! %s\n",
+ dump_style_to_string(current_character->cos.s.style));
+ break;
+ /* LCOV_EXCL_STOP */
}
}
current_character = current_character->next_character;
@@ -74,7 +84,8 @@ static const char *dump_pitch(const char height, const char highest_pitch) {
}
gregorio_snprintf(buf, 20, "%c", pitch);
} else {
- gregorio_snprintf(buf, 20, "?%d", height);
+ /* not reachable unless there's a programming error */
+ gregorio_snprintf(buf, 20, "?%d", height); /* LCOV_EXCL_LINE */
}
return buf;
}
@@ -87,11 +98,8 @@ void dump_write_score(FILE *f, gregorio_score *score)
gregorio_syllable *syllable;
gregorio_header *header;
- if (!f) {
- gregorio_message(_("call with NULL file"), "gregoriotex_write_score",
- VERBOSITY_ERROR, 0);
- return;
- }
+ gregorio_assert(f, dump_write_score, "call with NULL file", return);
+
fprintf(f,
"=====================================================================\n"
" SCORE INFOS\n"
@@ -177,23 +185,20 @@ void dump_write_score(FILE *f, gregorio_score *score)
for (syllable = score->first_syllable; syllable;
syllable = syllable->next_syllable) {
gregorio_element *element;
- if (syllable->type) {
- fprintf(f, " type %d (%s)\n",
- syllable->type, gregorio_type_to_string(syllable->type));
- }
+ fprintf(f, " type 0 (GRE_SYLLABLE)\n");
if (syllable->position) {
fprintf(f, " position %d (%s)\n",
syllable->position,
gregorio_word_position_to_string(syllable->position));
}
- if (syllable->special_sign) {
- fprintf(f, " special sign %s\n",
- gregorio_sign_to_string(syllable->special_sign));
- }
if (syllable->no_linebreak_area != NLBA_NORMAL) {
fprintf(f, " no line break area %s\n",
gregorio_nlba_to_string(syllable->no_linebreak_area));
}
+ if (syllable->euouae != EUOUAE_NORMAL) {
+ fprintf(f, " euouae %s\n",
+ gregorio_euouae_to_string(syllable->euouae));
+ }
if (syllable->text) {
if (syllable->translation) {
fprintf(f, "\n Text\n");
@@ -327,19 +332,6 @@ void dump_write_score(FILE *f, gregorio_score *score)
unpitched.info.space));
break;
- case GRE_BAR:
- fprintf(f, " glyph_type %d (%s)\n",
- glyph->u.misc.unpitched.info.bar,
- gregorio_bar_to_string(glyph->u.misc.unpitched.
- info.bar));
- if (glyph->u.misc.unpitched.special_sign) {
- fprintf(f, " special sign %d (%s)\n",
- glyph->u.misc.unpitched.special_sign,
- gregorio_sign_to_string(glyph->
- u.misc.unpitched.special_sign));
- }
- break;
-
case GRE_GLYPH:
fprintf(f, " glyph_type %d (%s)\n",
glyph->u.notes.glyph_type,
@@ -354,8 +346,12 @@ void dump_write_score(FILE *f, gregorio_score *score)
break;
default:
- fprintf(f, " !!! UNKNOWN !!! !!!\n");
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(glyph->type));
break;
+ /* LCOV_EXCL_STOP */
}
if (glyph->type == GRE_GLYPH) {
for (note = glyph->u.notes.first_note; note;
@@ -388,8 +384,12 @@ void dump_write_score(FILE *f, gregorio_score *score)
break;
default:
- fprintf(f, " !!! NOT ALLOWED !!! !!!\n");
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(note->type));
break;
+ /* LCOV_EXCL_STOP */
}
if (note->texverb) {
fprintf(f, " TeX string \"%s\"\n",
@@ -466,8 +466,12 @@ void dump_write_score(FILE *f, gregorio_score *score)
break;
default:
- /* do nothing */
+ /* not reachable unless there's a programming error */
+ /* LCOV_EXCL_START */
+ fprintf(f, " !!! NOT ALLOWED !!! %s\n",
+ gregorio_type_to_string(element->type));
break;
+ /* LCOV_EXCL_STOP */
}
if (element->nabc_lines) {
fprintf(f, " nabc_lines %d\n",