Dear all,

Here is a message from the person in charge of Gregorio integration into
TeXLive. I'm really busy with work and many other things these days, so
do you think you could review the patches?

I'm ok with all of them, the difficult point will be to build with a
recent flex. Brother Samuel, is it possible for you to update your flex
version?

This is not an emergency, but it would be good if these improvements
could reach next beta or rc!

Thank you very much,
--
Elie


-------- Message transféré --------
Sujet : Re: [tex-live] Gregorio integration
Date : Tue, 4 Aug 2015 11:11:10 +0200 (CEST)
De : Peter Breitenlohner <[email protected]>
Pour : Karl Berry <[email protected]>
Copie à : [email protected]

On Sat, 1 Aug 2015, Karl Berry wrote:

> Peter - may I prevail on you to try to integrate Elie's program into the
> build tree?

Hi Karl,

I am about to add gregorio-4.0.0-beta (or perhaps 4.0.0-rc or 4.0.0) into
TL.  I would like to remove fonts/ (and maybe tex/) because they should go
to Master/texmf-dist/ and fonts/ is much bigger then all the rest.  OK?

Hi Elie,

I suppose the CTAN version will contain a ready made gregoriotex.tds.zip,
or?

IMHO: the file fonts/source/gregoriotex/Makefile (generated from
Makefile.am) seems to be fairly useless to generate the font files.
Omitting that file would allow to run install-gtex.sh without configuring
the source tree (in TL we must build outside the source tree!).

I attach a few patches that I would like to apply, but perhaps you can
integrate them into a next version (I compile with fairly agressive gcc
warning flags).

patch-01-kpathsea: You must not #include <getopt.h> and
<kpathsea/kpathsea.h> (except on Linux).

patch-02-warnings: Avoid static, prototype, C99, and const warnings.

patch-03-flex_2_5_39: Avoid gcc -Wsign-compare warnings, backported from
flex-2.5.39, so you could perhaps use that version to regenerate the files.

patch-04-unsigned: Avoid undefined behaviour when char is unsigned (Cygwin
gcc warns about this).

patch-05-return_non_void: Avoid gcc 5.1 warning.

====================

There remain 4 warnings about casting away const:

character.c line 158: I have the impression that language is initialized as
lang and never changed, so the free() is unnecessary.

vowel/vowel-rules.y lines 83, 88, and 90: if language, name, and target are
really const then it is suspicious or worse to free then, if not they should
be declared differently.

====================

A final remark: It would be nice to rewrite gregorio.engine etc to use the
Posix mandated /bin/sh instead of tcsh (and greg-book.engine should probably
be executable).

Regards
Peter


        You must not #include <getopt.h> and <kpathsea/kpathsea.h>
        (except for Linux).

diff -ur gregorio-4.0.0-beta.orig/src/gregorio-utils.c 
gregorio-4.0.0-beta/src/gregorio-utils.c
--- gregorio-4.0.0-beta.orig/src/gregorio-utils.c       2015-07-05 
23:27:56.000000000 +0200
+++ gregorio-4.0.0-beta/src/gregorio-utils.c    2015-08-03 17:16:42.000000000 
+0200
@@ -21,7 +21,11 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
+#ifdef USE_KPSE
+#include <kpathsea/kpathsea.h>
+#else
 #include <getopt.h>
+#endif
 #include <libgen.h>             /* for basename */
 #include <string.h>             /* for strcmp */
 #include <locale.h>
@@ -32,9 +36,6 @@
 #include "characters.h"
 #include "gabc/gabc.h"
 #include "vowel/vowel.h"
-#ifdef USE_KPSE
-    #include <kpathsea/kpathsea.h>
-#endif
 
 #ifndef MODULE_PATH_ENV
 #define MODULE_PATH_ENV        "MODULE_PATH"
diff -ur gregorio-4.0.0-beta.orig/src/characters.c 
gregorio-4.0.0-beta/src/characters.c
--- gregorio-4.0.0-beta.orig/src/characters.c   2015-07-05 21:16:32.000000000 
+0200
+++ gregorio-4.0.0-beta/src/characters.c        2015-08-03 14:43:00.000000000 
+0200
@@ -63,7 +63,8 @@
 static bool read_vowel_rules(const char *const lang) {
     const char *language = lang;
     rulefile_parse_status status = RFPS_NOT_FOUND;
-    char **filenames, *filename, *description;
+    char **filenames, *filename;
+    const char *description;
 
 #ifdef USE_KPSE
     filenames = kpse_find_file_generic(VOWEL_FILE, kpse_tex_format, true, 
true);
diff -ur gregorio-4.0.0-beta.orig/src/dump/dump.c 
gregorio-4.0.0-beta/src/dump/dump.c
--- gregorio-4.0.0-beta.orig/src/dump/dump.c    2015-07-29 22:43:48.000000000 
+0200
+++ gregorio-4.0.0-beta/src/dump/dump.c 2015-08-03 13:36:28.000000000 +0200
@@ -24,6 +24,7 @@
 #include "struct.h"
 #include "unicode.h"
 #include "messages.h"
+#include "plugins.h"
 
 static const char *unknown(int value) {
     static char buf[20];
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination-l.c 
gregorio-4.0.0-beta/src/gabc/gabc-notes-determination-l.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination-l.c      
2015-08-01 15:53:42.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-notes-determination-l.c   2015-08-03 
17:18:35.000000000 +0200
@@ -7244,7 +7244,7 @@
     return pitch - 'a' + LOWEST_PITCH;
 }
 
-gregorio_shape punctum(const char pitch)
+static gregorio_shape punctum(const char pitch)
 {
     if (pitch < 'a') {
         return S_PUNCTUM_INCLINATUM;
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination.l 
gregorio-4.0.0-beta/src/gabc/gabc-notes-determination.l
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination.l        
2015-07-31 17:21:14.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-notes-determination.l     2015-08-03 
14:49:07.000000000 +0200
@@ -46,7 +46,7 @@
     return pitch - 'a' + LOWEST_PITCH;
 }
 
-gregorio_shape punctum(const char pitch)
+static gregorio_shape punctum(const char pitch)
 {
     if (pitch < 'a') {
         return S_PUNCTUM_INCLINATUM;
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination-y.c 
gregorio-4.0.0-beta/src/gabc/gabc-score-determination-y.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination-y.c      
2015-08-01 15:53:41.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-score-determination-y.c   2015-08-03 
15:04:04.000000000 +0200
@@ -110,7 +110,7 @@
 #include "messages.h"
 #include "characters.h"
 #include "sha1.h"
-
+#include "plugins.h"
 #include "gabc.h"
 
 #define YYLLOC_DEFAULT(Current, Rhs, N) \
@@ -170,7 +170,7 @@
 static bool got_language = false;
 static struct sha1_ctx digester;
 
-static inline void check_multiple(char *name, bool exists) {
+static inline void check_multiple(const char *name, bool exists) {
     if (exists) {
         gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
                 _("several %s definitions found, only the last will be taken "
@@ -178,7 +178,7 @@
     }
 }
 
-static void gabc_score_determination_error(char *error_str)
+static void gabc_score_determination_error(const char *error_str)
 {
     gregorio_message(error_str, (const char *) 
"gabc_score_determination_parse",
             VERBOSITY_ERROR, 0);
@@ -658,7 +658,7 @@
 unsigned char nabc_state = 0;
 size_t nabc_lines = 0;
 
-void gabc_y_add_notes(char *notes, YYLTYPE loc) {
+static void gabc_y_add_notes(char *notes, YYLTYPE loc) {
     gregorio_element *new_elements;
     gregorio_element *last_element;
     if (nabc_state == 0) {
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination-y.h 
gregorio-4.0.0-beta/src/gabc/gabc-score-determination-y.h
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination-y.h      
2015-08-01 15:53:41.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-score-determination-y.h   2015-08-03 
15:04:06.000000000 +0200
@@ -1,5 +1,6 @@
 /* A Bison parser, made by GNU Bison 3.0.4.  */
 
+/* Make sure this file is newer than gabc-score-determinatio.y */
 /* Bison interface for Yacc-like parsers in C
 
    Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination.y 
gregorio-4.0.0-beta/src/gabc/gabc-score-determination.y
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination.y        
2015-07-05 23:27:56.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-score-determination.y     2015-08-03 
15:04:03.000000000 +0200
@@ -36,7 +36,7 @@
 #include "messages.h"
 #include "characters.h"
 #include "sha1.h"
-
+#include "plugins.h"
 #include "gabc.h"
 
 #define YYLLOC_DEFAULT(Current, Rhs, N) \
@@ -96,7 +96,7 @@
 static bool got_language = false;
 static struct sha1_ctx digester;
 
-static inline void check_multiple(char *name, bool exists) {
+static inline void check_multiple(const char *name, bool exists) {
     if (exists) {
         gregorio_messagef("det_score", VERBOSITY_WARNING, 0,
                 _("several %s definitions found, only the last will be taken "
@@ -104,7 +104,7 @@
     }
 }
 
-static void gabc_score_determination_error(char *error_str)
+static void gabc_score_determination_error(const char *error_str)
 {
     gregorio_message(error_str, (const char *) 
"gabc_score_determination_parse",
             VERBOSITY_ERROR, 0);
@@ -584,7 +584,7 @@
 unsigned char nabc_state = 0;
 size_t nabc_lines = 0;
 
-void gabc_y_add_notes(char *notes, YYLTYPE loc) {
+static void gabc_y_add_notes(char *notes, YYLTYPE loc) {
     gregorio_element *new_elements;
     gregorio_element *last_element;
     if (nabc_state == 0) {
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-write.c 
gregorio-4.0.0-beta/src/gabc/gabc-write.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-write.c      2015-07-29 
22:43:48.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-write.c   2015-08-03 13:53:58.000000000 
+0200
@@ -29,6 +29,7 @@
 #include "struct.h"
 #include "unicode.h"
 #include "messages.h"
+#include "plugins.h"
 
 #include "gabc.h"
 
@@ -331,7 +332,7 @@
     }
 }
 
-static void gabc_hepisemus(FILE *f, char *prefix, bool connect,
+static void gabc_hepisemus(FILE *f, const char *prefix, bool connect,
         grehepisemus_size size)
 {
     fprintf(f, "_%s", prefix);
@@ -354,7 +355,7 @@
     }
 }
 
-static char *vepisemus_position(gregorio_note *note)
+static const char *vepisemus_position(gregorio_note *note)
 {
     if (!note->v_episemus_height) {
         return "";
@@ -365,7 +366,7 @@
     return "1";
 }
 
-static char *mora_vposition(gregorio_note *note)
+static const char *mora_vposition(gregorio_note *note)
 {
     switch (note->mora_vposition) {
     case VPOS_AUTO:
diff -ur gregorio-4.0.0-beta.orig/src/gregorio-utils.c 
gregorio-4.0.0-beta/src/gregorio-utils.c
--- gregorio-4.0.0-beta.orig/src/gregorio-utils.c       2015-08-03 
17:16:42.000000000 +0200
+++ gregorio-4.0.0-beta/src/gregorio-utils.c    2015-08-03 17:18:35.000000000 
+0200
@@ -132,7 +132,7 @@
 }
 
 // function that adds the good extension to a basename (without extension)
-static char *get_output_filename(char *fbasename, char *extension)
+static char *get_output_filename(char *fbasename, const char *extension)
 {
     char *output_filename = NULL;
     output_filename =
@@ -276,9 +276,6 @@
         "Copyright (C) 2006-2015 Gregorio project authors (see 
CONTRIBUTORS.md)";
     int c;
 
-    #ifdef USE_KPSE
-        kpse_set_program_name("gregorio", "gregorio");
-    #endif
     char *input_file_name = NULL;
     char *output_file_name = NULL;
     char *output_basename = NULL;
@@ -309,6 +306,9 @@
     };
     gregorio_score *score = NULL;
 
+    #ifdef USE_KPSE
+        kpse_set_program_name("gregorio", "gregorio");
+    #endif
     if (argc == 1) {
         print_usage(argv[0]);
         exit(0);
diff -ur gregorio-4.0.0-beta.orig/src/gregoriotex/gregoriotex-write.c 
gregorio-4.0.0-beta/src/gregoriotex/gregoriotex-write.c
--- gregorio-4.0.0-beta.orig/src/gregoriotex/gregoriotex-write.c        
2015-07-29 22:43:48.000000000 +0200
+++ gregorio-4.0.0-beta/src/gregoriotex/gregoriotex-write.c     2015-08-03 
14:26:26.000000000 +0200
@@ -32,6 +32,7 @@
 #include "unicode.h"
 #include "messages.h"
 #include "characters.h"
+#include "plugins.h"
 
 #include "gregoriotex.h"
 
@@ -59,7 +60,7 @@
 #define UNDETERMINED_HEIGHT -127
 
 #define MAX_AMBITUS 5
-static char *tex_ambitus[] = {
+static const char *tex_ambitus[] = {
     NULL, "One", "Two", "Three", "Four", "Five"
 };
 
@@ -165,10 +166,11 @@
 static grestyle_style gregoriotex_ignore_style = ST_NO_STYLE;
 static grestyle_style gregoriotex_next_ignore_style = ST_NO_STYLE;
 
-static char *gregoriotex_determine_note_glyph_name(gregorio_note *note,
+static const char *gregoriotex_determine_note_glyph_name(gregorio_note *note,
         gregorio_glyph *glyph, gregorio_element *element, gtex_alignment *type)
 {
-    static char buf[128], *name;
+    static char buf[128];
+    const char *name;
 
     if (!note) {
         gregorio_message(_("called with NULL pointer"),
@@ -288,7 +290,7 @@
  * They also are and must be the same as in squarize.py.
  */
 
-static char *gregoriotex_determine_liquescentia(gtex_glyph_liquescentia type,
+static const char *gregoriotex_determine_liquescentia(gtex_glyph_liquescentia 
type,
         gregorio_liquescentia liquescentia)
 {
     switch (liquescentia) {
@@ -381,12 +383,12 @@
     return ambitus;
 }
 
-static char *compute_glyph_name(const gregorio_glyph *const glyph,
-        char *const shape, const gtex_glyph_liquescentia ltype)
+static const char *compute_glyph_name(const gregorio_glyph *const glyph,
+        const char *const shape, const gtex_glyph_liquescentia ltype)
 {
     static char buf[BUFSIZE];
 
-    char *liquescentia = gregoriotex_determine_liquescentia(ltype,
+    const char *liquescentia = gregoriotex_determine_liquescentia(ltype,
             glyph->u.notes.liquescentia);
     gregorio_note *current_note;
     // then we start making our formula
@@ -437,11 +439,11 @@
 // calculates the type, used for determining the position of signs. Type is
 // very basic, it is only the global dimensions : torculus, one_note, etc.
 
-char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
+const char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
         const gregorio_element *const element, gtex_alignment *const  type,
         gtex_type *const gtype)
 {
-    char *shape = NULL;
+    const char *shape = NULL;
     gtex_glyph_liquescentia ltype;
     char pitch = 0;
     if (!glyph) {
@@ -742,7 +744,7 @@
  * now part of the score info.  But we keep it here in case it may
  * be needed in future.
  */
-void gregoriotex_write_voice_info(FILE *f, gregorio_voice_info *voice_info)
+static void gregoriotex_write_voice_info(FILE *f, gregorio_voice_info 
*voice_info)
 {
     if (!f || !voice_info) {
         return;
@@ -1730,7 +1732,7 @@
 {
     unsigned int initial_shape = note->u.note.shape;
     char temp;
-    char *shape;
+    const char *shape;
     // type in the sense of GregorioTeX alignment type
     gtex_alignment type = AT_ONE_NOTE;
     if (!note) {
@@ -2222,7 +2224,7 @@
 {
     static char buf[BUFSIZE];
     int ambitus = compute_ambitus(glyph->u.notes.first_note);
-    char *head, *head_liquescence;
+    const char *head, *head_liquescence;
 
     switch (glyph->u.notes.first_note->u.note.shape) {
     case S_QUILISMA:
@@ -2269,7 +2271,7 @@
     gtex_type gtype = 0;
     char next_note_pitch = 0;
     gregorio_note *current_note;
-    char *leading_shape, *shape;
+    const char *leading_shape, *shape;
     if (!glyph) {
         gregorio_message(_("called with NULL pointer"),
                 "gregoriotex_write_glyph", VERBOSITY_ERROR, 0);
@@ -2592,7 +2594,7 @@
     }
 }
 
-static void handle_final_bar(FILE *f, char *type, gregorio_syllable *syllable)
+static void handle_final_bar(FILE *f, const char *type, gregorio_syllable 
*syllable)
 {
     fprintf(f, "\\GreFinal%s{%%\n", type);
     // first element will be the bar, which we just handled, so skip it
diff -ur gregorio-4.0.0-beta.orig/src/gregoriotex/gregoriotex.h 
gregorio-4.0.0-beta/src/gregoriotex/gregoriotex.h
--- gregorio-4.0.0-beta.orig/src/gregoriotex/gregoriotex.h      2015-07-05 
21:16:32.000000000 +0200
+++ gregorio-4.0.0-beta/src/gregoriotex/gregoriotex.h   2015-08-03 
14:24:03.000000000 +0200
@@ -153,7 +153,7 @@
 
 bool gtex_is_h_episemus_above_shown(const gregorio_note *const note);
 bool gtex_is_h_episemus_below_shown(const gregorio_note *const note);
-char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
+const char *gregoriotex_determine_glyph_name(const gregorio_glyph *const glyph,
         const gregorio_element *const element, gtex_alignment *const  type,
         gtex_type *const gtype);
 void gregoriotex_compute_positioning(const gregorio_element *element);
diff -ur gregorio-4.0.0-beta.orig/src/messages.c 
gregorio-4.0.0-beta/src/messages.c
--- gregorio-4.0.0-beta.orig/src/messages.c     2015-07-05 21:16:32.000000000 
+0200
+++ gregorio-4.0.0-beta/src/messages.c  2015-08-03 13:49:54.000000000 +0200
@@ -50,10 +50,12 @@
     verbosity_mode = verbosity;
 }
 
-void gregorio_set_debug_messages(bool debug)
+#if 0 /* unused */
+static void gregorio_set_debug_messages(bool debug)
 {
     debug_messages = debug;
 }
+#endif
 
 static const char *verbosity_to_str(const gregorio_verbosity verbosity)
 {
diff -ur gregorio-4.0.0-beta.orig/src/unicode.c 
gregorio-4.0.0-beta/src/unicode.c
--- gregorio-4.0.0-beta.orig/src/unicode.c      2015-07-05 21:16:32.000000000 
+0200
+++ gregorio-4.0.0-beta/src/unicode.c   2015-08-03 14:07:00.000000000 +0200
@@ -138,7 +138,7 @@
 // the function to compare a grewchar * and a buf. Returns 1 if different, 0
 // if not.
 
-unsigned char gregorio_wcsbufcmp(grewchar *wstr, char *buf)
+unsigned char gregorio_wcsbufcmp(grewchar *wstr, const char *buf)
 {
     int i = 0;
     size_t len;
diff -ur gregorio-4.0.0-beta.orig/src/unicode.h 
gregorio-4.0.0-beta/src/unicode.h
--- gregorio-4.0.0-beta.orig/src/unicode.h      2015-07-05 21:16:32.000000000 
+0200
+++ gregorio-4.0.0-beta/src/unicode.h   2015-08-03 14:06:59.000000000 +0200
@@ -32,7 +32,7 @@
 
 void gregorio_print_unichar(FILE *f, grewchar to_print);
 void gregorio_print_unistring(FILE *f, grewchar *first_char);
-unsigned char gregorio_wcsbufcmp(grewchar *wstr, char *buf);
+unsigned char gregorio_wcsbufcmp(grewchar *wstr, const char *buf);
 grewchar *gregorio_build_grewchar_string_from_buf(const char *buf);
 
 static inline size_t gregorio_wcstrlen(const grewchar *wstr)
        Replace 'int' => 'yy_size_t' as per flex-2.5.39 to avoid
        gcc -Wsign-compare warnings.

diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination-l.c 
gregorio-4.0.0-beta/src/gabc/gabc-notes-determination-l.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination-l.c      
2015-08-03 17:18:35.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-notes-determination-l.c   2015-08-03 
17:21:37.000000000 +0200
@@ -9286,7 +9286,7 @@
        YY_BUFFER_STATE b;
        char *buf;
        yy_size_t n;
-       int i;
+       yy_size_t i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = _yybytes_len + 2;
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination-l.c 
gregorio-4.0.0-beta/src/gabc/gabc-score-determination-l.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-score-determination-l.c      
2015-08-01 15:53:41.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-score-determination-l.c   2015-08-03 
12:09:39.000000000 +0200
@@ -2525,7 +2525,7 @@
        YY_BUFFER_STATE b;
        char *buf;
        yy_size_t n;
-       int i;
+       yy_size_t i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = _yybytes_len + 2;
diff -ur gregorio-4.0.0-beta.orig/src/vowel/vowel-rules-l.c 
gregorio-4.0.0-beta/src/vowel/vowel-rules-l.c
--- gregorio-4.0.0-beta.orig/src/vowel/vowel-rules-l.c  2015-08-01 
15:53:42.000000000 +0200
+++ gregorio-4.0.0-beta/src/vowel/vowel-rules-l.c       2015-08-03 
12:09:27.000000000 +0200
@@ -1668,7 +1668,7 @@
        YY_BUFFER_STATE b;
        char *buf;
        yy_size_t n;
-       int i;
+       yy_size_t i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = _yybytes_len + 2;
        Avoid undefined behaviour when char is signed.

diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination.l 
gregorio-4.0.0-beta/src/gabc/gabc-notes-determination.l
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination.l        
2015-08-03 14:49:07.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-notes-determination.l     2015-08-04 
10:27:23.000000000 +0200
@@ -60,7 +60,7 @@
 {
     nbof_isolated_episemus = 0;
     gregorio_add_note(&current_note,
-            pitch_letter_to_height(tolower(gabc_notes_determination_text[i])),
+            pitch_letter_to_height((unsigned 
char)tolower(gabc_notes_determination_text[i])),
             shape, signs, liquescentia, NULL, &notes_lloc);
 }
 
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination-l.c 
gregorio-4.0.0-beta/src/gabc/gabc-notes-determination-l.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-notes-determination-l.c      
2015-08-03 17:21:37.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-notes-determination-l.c   2015-08-04 
10:27:26.000000000 +0200
@@ -7258,7 +7258,7 @@
 {
     nbof_isolated_episemus = 0;
     gregorio_add_note(&current_note,
-            pitch_letter_to_height(tolower(gabc_notes_determination_text[i])),
+            pitch_letter_to_height((unsigned 
char)tolower(gabc_notes_determination_text[i])),
             shape, signs, liquescentia, NULL, &notes_lloc);
 }
 
diff -ur gregorio-4.0.0-beta.orig/src/gabc/gabc-write.c 
gregorio-4.0.0-beta/src/gabc/gabc-write.c
--- gregorio-4.0.0-beta.orig/src/gabc/gabc-write.c      2015-08-03 
13:53:58.000000000 +0200
+++ gregorio-4.0.0-beta/src/gabc/gabc-write.c   2015-08-04 10:28:45.000000000 
+0200
@@ -412,27 +412,27 @@
         fprintf(f, "%c", pitch_letter(note->u.note.pitch));
         break;
     case S_PUNCTUM_INCLINATUM:
-        fprintf(f, "%c", toupper(pitch_letter(note->u.note.pitch)));
+        fprintf(f, "%c", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         break;
     case S_PUNCTUM_INCLINATUM_DEMINUTUS:
         if (note->next) {
-            fprintf(f, "%c~", toupper(pitch_letter(note->u.note.pitch)));
+            fprintf(f, "%c~", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         } else {
-            fprintf(f, "%c", toupper(pitch_letter(note->u.note.pitch)));
+            fprintf(f, "%c", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         }
         break;
     case S_PUNCTUM_INCLINATUM_AUCTUS:
         if (note->next) {
-            fprintf(f, "%c<", toupper(pitch_letter(note->u.note.pitch)));
+            fprintf(f, "%c<", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         } else {
-            fprintf(f, "%c", toupper(pitch_letter(note->u.note.pitch)));
+            fprintf(f, "%c", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         }
         break;
     case S_PUNCTUM_CAVUM_INCLINATUM:
-        fprintf(f, "%cr", toupper(pitch_letter(note->u.note.pitch)));
+        fprintf(f, "%cr", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         break;
     case S_PUNCTUM_CAVUM_INCLINATUM_AUCTUS:
-        fprintf(f, "%cr<", toupper(pitch_letter(note->u.note.pitch)));
+        fprintf(f, "%cr<", toupper((unsigned 
char)pitch_letter(note->u.note.pitch)));
         break;
     case S_VIRGA:
         fprintf(f, "%cv", pitch_letter(note->u.note.pitch));
diff -ur gregorio-4.0.0-beta.orig/src/gregoriotex/gregoriotex-write.c 
gregorio-4.0.0-beta/src/gregoriotex/gregoriotex-write.c
--- gregorio-4.0.0-beta.orig/src/gregoriotex/gregoriotex-write.c        
2015-08-03 14:26:26.000000000 +0200
+++ gregorio-4.0.0-beta/src/gregoriotex/gregoriotex-write.c     2015-08-04 
10:13:22.000000000 +0200
@@ -2674,6 +2674,7 @@
     }
 
     assert(false); // should never reach here
+    return false; // avoid gcc 5.1 warning
 }
 
 static inline void write_syllable_point_and_click(FILE *const f,
_______________________________________________
Gregorio-devel mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-devel

Répondre à