summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-29 23:10:03 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-29 23:10:03 +0000
commitf281e35ba5b0fdd1bacb0f9736ba138aa42ce189 (patch)
treea9914182d36f301681c61d525eb00ffa033b7c6b /Build
parent94b2599d4a7aece204089a48207bee187c455ec4 (diff)
gregorio 4.0.1
git-svn-id: svn://tug.org/texlive/trunk@39231 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/README2
-rw-r--r--Build/source/texk/gregorio/ChangeLog5
-rwxr-xr-xBuild/source/texk/gregorio/configure22
-rw-r--r--Build/source/texk/gregorio/gregorio-src-PATCHES/ChangeLog4
-rw-r--r--Build/source/texk/gregorio/gregorio-src-PATCHES/TL-Changes5
-rw-r--r--Build/source/texk/gregorio/gregorio-src/._CHANGELOG.mdbin171 -> 0 bytes
-rw-r--r--Build/source/texk/gregorio/gregorio-src/.gregorio-version2
-rw-r--r--Build/source/texk/gregorio/gregorio-src/CHANGELOG.md10
-rw-r--r--Build/source/texk/gregorio/gregorio-src/configure.ac4
-rw-r--r--Build/source/texk/gregorio/gregorio-src/doc/Command_Index_internal.tex9
-rw-r--r--Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_0.pdfbin279368 -> 0 bytes
-rw-r--r--Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_1.pdfbin0 -> 279370 bytes
-rw-r--r--Build/source/texk/gregorio/gregorio-src/doc/GregorioRef-4_0_1.pdf (renamed from Build/source/texk/gregorio/gregorio-src/doc/GregorioRef-4_0_0.pdf)bin515934 -> 460969 bytes
-rw-r--r--Build/source/texk/gregorio/gregorio-src/doc/GregorioRef.tex2
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/characters.c12
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c38
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/struct.c2
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/support.c44
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/support.h7
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c2
-rw-r--r--Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l2
-rw-r--r--Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc8
-rw-r--r--Build/source/texk/gregorio/version.ac2
23 files changed, 129 insertions, 53 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README
index 2d7e574e829..460ce52ee21 100644
--- a/Build/source/texk/README
+++ b/Build/source/texk/README
@@ -62,7 +62,7 @@ dvipsk - maintained here, by us
dvisvgm 1.14 - checked 28dec15
http://dvisvgm.bplaced.net/Downloads
-gregorio 4.0.0 - checked 9dec15
+gregorio 4.0.1 - checked 29dec15
https://github.com/gregorio-project/gregorio/releases/
gsftopk - from Paul Vojta's xdvi?
diff --git a/Build/source/texk/gregorio/ChangeLog b/Build/source/texk/gregorio/ChangeLog
index cb878a36e24..89d3e59623d 100644
--- a/Build/source/texk/gregorio/ChangeLog
+++ b/Build/source/texk/gregorio/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import gregorio-4.0.1.
+ * version.ac: Adapted.
+
2015-12-10 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import gregorio-4.0.0.
diff --git a/Build/source/texk/gregorio/configure b/Build/source/texk/gregorio/configure
index 94151e5c7c4..1c1cddc8af5 100755
--- a/Build/source/texk/gregorio/configure
+++ b/Build/source/texk/gregorio/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ChkTeX (TeX Live) 4.0.0.
+# Generated by GNU Autoconf 2.69 for ChkTeX (TeX Live) 4.0.1.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ChkTeX (TeX Live)'
PACKAGE_TARNAME='chktex--tex-live-'
-PACKAGE_VERSION='4.0.0'
-PACKAGE_STRING='ChkTeX (TeX Live) 4.0.0'
+PACKAGE_VERSION='4.0.1'
+PACKAGE_STRING='ChkTeX (TeX Live) 4.0.1'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ChkTeX (TeX Live) 4.0.0 to adapt to many kinds of systems.
+\`configure' configures ChkTeX (TeX Live) 4.0.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1400,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ChkTeX (TeX Live) 4.0.0:";;
+ short | recursive ) echo "Configuration of ChkTeX (TeX Live) 4.0.1:";;
esac
cat <<\_ACEOF
@@ -1519,7 +1519,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ChkTeX (TeX Live) configure 4.0.0
+ChkTeX (TeX Live) configure 4.0.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2175,7 +2175,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ChkTeX (TeX Live) $as_me 4.0.0, which was
+It was created by ChkTeX (TeX Live) $as_me 4.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -7860,7 +7860,7 @@ fi
# Define the identity of the package.
PACKAGE='chktex--tex-live-'
- VERSION='4.0.0'
+ VERSION='4.0.1'
cat >>confdefs.h <<_ACEOF
@@ -14121,7 +14121,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-ChkTeX (TeX Live) config.lt 4.0.0
+ChkTeX (TeX Live) config.lt 4.0.1
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -15708,7 +15708,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ChkTeX (TeX Live) $as_me 4.0.0, which was
+This file was extended by ChkTeX (TeX Live) $as_me 4.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15774,7 +15774,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ChkTeX (TeX Live) config.status 4.0.0
+ChkTeX (TeX Live) config.status 4.0.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/gregorio/gregorio-src-PATCHES/ChangeLog b/Build/source/texk/gregorio/gregorio-src-PATCHES/ChangeLog
index 64900a1ec94..1ebce3a26b8 100644
--- a/Build/source/texk/gregorio/gregorio-src-PATCHES/ChangeLog
+++ b/Build/source/texk/gregorio/gregorio-src-PATCHES/ChangeLog
@@ -1,3 +1,7 @@
+2015-12-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import gregorio-4.0.1.
+
2015-12-10 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import gregorio-4.0.0.
diff --git a/Build/source/texk/gregorio/gregorio-src-PATCHES/TL-Changes b/Build/source/texk/gregorio/gregorio-src-PATCHES/TL-Changes
index 48192dc9060..4c9b4d256ae 100644
--- a/Build/source/texk/gregorio/gregorio-src-PATCHES/TL-Changes
+++ b/Build/source/texk/gregorio/gregorio-src-PATCHES/TL-Changes
@@ -1,5 +1,5 @@
-Changes applied to the gregorio-4.0.0 tree as obtained from:
- https://github.com/gregorio-project/gregorio/releases/tag/v4.0.0/
+Changes applied to the gregorio-4.0.1 tree as obtained from:
+ https://github.com/gregorio-project/gregorio/releases/tag/v4.0.1/
Remove:
Makefile.in
@@ -13,4 +13,3 @@ Remove:
src/Makefile.in
src/config_.h.in
tex/
-
diff --git a/Build/source/texk/gregorio/gregorio-src/._CHANGELOG.md b/Build/source/texk/gregorio/gregorio-src/._CHANGELOG.md
deleted file mode 100644
index cd621b2a872..00000000000
--- a/Build/source/texk/gregorio/gregorio-src/._CHANGELOG.md
+++ /dev/null
Binary files differ
diff --git a/Build/source/texk/gregorio/gregorio-src/.gregorio-version b/Build/source/texk/gregorio/gregorio-src/.gregorio-version
index a4948dcb4b9..73758c1780c 100644
--- a/Build/source/texk/gregorio/gregorio-src/.gregorio-version
+++ b/Build/source/texk/gregorio/gregorio-src/.gregorio-version
@@ -1,4 +1,4 @@
-4.0.0
+4.0.1
*** Do not modify this file. ***
Use VersionManager.py to change the version.
diff --git a/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md b/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md
index 2e861cc866d..586bc22ee6b 100644
--- a/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md
+++ b/Build/source/texk/gregorio/gregorio-src/CHANGELOG.md
@@ -5,6 +5,14 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased][unreleased]
+## [4.0.1] - 2015-12-28
+### Fixed
+- `\greseteolcustos` now retains its setting across multiple score inclusions (see [#703](https://github.com/gregorio-project/gregorio/issues/703)).
+- Gregorio now works against luaotfload 2.6 (see [#717](https://github.com/gregorio-project/gregorio/issues/717)).
+- When beginning of line clefs are invisible and bol shifts are enabled, lyric text will no longer stick out into the margin. Further the notes on the first and subsequent lines now align properly. See [#683](https://github.com/gregorio-project/gregorio/issues/683).
+- `\grecross` and `\grealtcross` now print the correct glyphs (see [#713](https://github.com/gregorio-project/gregorio/issues/713)).
+
+
## [4.0.0] - 2015-12-08
### Fixed
- Handling of the first syllable in gabc is now more consistent with the all other syllables. This centers the syllable correctly when using latin syllable centering (see [#42](https://github.com/gregorio-project/gregorio/issues/42)) and makes the use of styles less surprising in the first syllable (see [#135](https://github.com/gregorio-project/gregorio/issues/135)).
@@ -178,7 +186,7 @@ See GregorioRef.pdf for full details.
- `greg-book` and `greg-lily-book` engines, supplanted by improved capabilities of `\gregorioscore` for compiling gabc files at time of document compilation.
- The TeXShop script for compiling gabc files. Supplanted by the new autocompile feature of the package.
-### Known Bugs
+### Known Bugs - FIXED IN 4.0.1
- When beginning of line clefs are invisible and bol shifts are enabled, lyric text will stick out into the margin. Further the notes on the first and subsequent lines do not align properly. See [#683](https://github.com/gregorio-project/gregorio/issues/683).
diff --git a/Build/source/texk/gregorio/gregorio-src/configure.ac b/Build/source/texk/gregorio/gregorio-src/configure.ac
index ce816caba51..338a3cbe7dd 100644
--- a/Build/source/texk/gregorio/gregorio-src/configure.ac
+++ b/Build/source/texk/gregorio/gregorio-src/configure.ac
@@ -16,8 +16,8 @@ dnl
dnl You should have received a copy of the GNU General Public License
dnl along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([gregorio],[4.0.0],[gregorio-devel@gna.org])
-FILENAME_VERSION="4_0_0"
+AC_INIT([gregorio],[4.0.1],[gregorio-devel@gna.org])
+FILENAME_VERSION="4_0_1"
AC_SUBST(FILENAME_VERSION)
MK=""
AC_SUBST(MK)
diff --git a/Build/source/texk/gregorio/gregorio-src/doc/Command_Index_internal.tex b/Build/source/texk/gregorio/gregorio-src/doc/Command_Index_internal.tex
index 5367ec09e60..498c940dbdf 100644
--- a/Build/source/texk/gregorio/gregorio-src/doc/Command_Index_internal.tex
+++ b/Build/source/texk/gregorio/gregorio-src/doc/Command_Index_internal.tex
@@ -587,6 +587,9 @@ Macro called at the end of the score to ensure that a big initial setting doesnâ
\macroname{\textbackslash greoldcatcode}{}{gregoriotex.tex}
Macro to store the catcode for ``@'' so that we can use said symbol in function names under Plain \TeX\ and then restore the original catcode after the package is done loading.
+\macroname{\textbackslash gre@reseteolcustos}{}{gregoriotex-main.tex}
+Alias that resets the use of automatic custos to the value set by \verb=\greseteolcustos=. This macro is aliased to \verb=\gre@useautoeolcustos= or \verb=\gre@usemanualeolcustos= by \verb=\greseteolcustos=.
+
\macroname{\textbackslash gre@setstylefont}{}{gregoriotex-main.tex}
Macro for opening up greextra font.
@@ -619,6 +622,12 @@ Macro which typesets the key.
\macroname{\textbackslash gre@updateleftbox}{}{gregoriotex-main.tex}
Macro to update the box printed a the left end of every line (the one which holds the staff lines).
+\macroname{\textbackslash gre@useautoeolcustos}{}{gregoriotex-main.tex}
+Macro which enables automatic custos at the end of lines.
+
+\macroname{\textbackslash gre@usemanualeolcustos}{}{gregoriotex-main.tex}
+Macro which disables automatic custos at the end of lines.
+
\macroname{\textbackslash gre@usestylecommon}{}{gregoriotex-signs.tex}
Macro which specifies the alternate glyphs which are common to all of the styles.
diff --git a/Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_0.pdf b/Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_0.pdf
deleted file mode 100644
index ccf6696f01d..00000000000
--- a/Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_0.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_1.pdf b/Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_1.pdf
new file mode 100644
index 00000000000..45b11a94a7f
--- /dev/null
+++ b/Build/source/texk/gregorio/gregorio-src/doc/GregorioNabcRef-4_0_1.pdf
Binary files differ
diff --git a/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef-4_0_0.pdf b/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef-4_0_1.pdf
index 10f1ae7a552..e1f58bf0078 100644
--- a/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef-4_0_0.pdf
+++ b/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef-4_0_1.pdf
Binary files differ
diff --git a/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef.tex b/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef.tex
index 1f35efd09c2..0398eac8ff6 100644
--- a/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef.tex
+++ b/Build/source/texk/gregorio/gregorio-src/doc/GregorioRef.tex
@@ -133,7 +133,7 @@
\vspace{1cm}
- \large Version \textbf{4.0.0}, 8 December 2015 %% PARSE_VERSION_DATE
+ \large Version \textbf{4.0.1}, 28 December 2015 %% PARSE_VERSION_DATE
\vspace{1.5cm}
\end{center}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/characters.c b/Build/source/texk/gregorio/gregorio-src/src/characters.c
index 7cf856985b6..d5e3aa31f6f 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/characters.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/characters.c
@@ -49,12 +49,6 @@
#include "utf8strings.h"
#include "vowel/vowel.h"
-#ifdef _WIN32
-#ifndef PATH_MAX
-#define PATH_MAX _MAX_PATH
-#endif
-#endif
-
#define VOWEL_FILE "gregorio-vowels.dat"
#ifndef USE_KPSE
@@ -85,7 +79,8 @@ static bool read_vowel_rules(char *const lang) {
}
#else
FILE *file;
- char buf[PATH_MAX];
+ size_t bufsize = 0;
+ char *buf = NULL;
size_t capacity = 16, size = 0;
filenames = gregorio_malloc(capacity * sizeof(char *));
@@ -97,7 +92,7 @@ static bool read_vowel_rules(char *const lang) {
strerror(errno));
return false;
}
- while (!feof(file) && !ferror(file) && fgets(buf, PATH_MAX, file)) {
+ while (gregorio_readline(&buf, &bufsize, file)) {
rtrim(buf);
if (strlen(buf) > 0) {
filenames[size++] = gregorio_strdup(buf);
@@ -111,6 +106,7 @@ static bool read_vowel_rules(char *const lang) {
_("kpsewhich returned bad value for %s"), VOWEL_FILE);
}
}
+ free(buf);
filenames[size] = NULL;
pclose(file);
#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c b/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
index 486dfd22e52..d6c8c0a8953 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/gregorio-utils.c
@@ -35,6 +35,7 @@
#include <string.h> /* for strcmp */
#include <locale.h>
#include <limits.h>
+#include <errno.h>
#include "struct.h"
#include "plugins.h"
#include "messages.h"
@@ -63,10 +64,10 @@ typedef enum gregorio_file_format {
/* realpath is not in mingw32 */
#ifdef _WIN32
-#ifndef PATH_MAX
-#define PATH_MAX _MAX_PATH
-#endif
-#define realpath(path,resolved_path) _fullpath(resolved_path, path, PATH_MAX)
+/* _MAX_PATH is being passed for the maxLength (third) argument of _fullpath,
+ * but we are always passing NULL for the absPath (first) argument, so it will
+ * be ignored per the MSDN documentation */
+#define realpath(path,resolved_path) _fullpath(resolved_path, path, _MAX_PATH)
#endif
/* define_path attempts to canonicalize the pathname of a given string */
@@ -130,7 +131,7 @@ static char *get_base_filename(char *fbasename)
return NULL;
}
l = strlen(fbasename) - strlen(p);
- ret = (char *) gregorio_malloc((l + 1) * sizeof(char));
+ ret = (char *) gregorio_malloc(l + 1);
gregorio_snprintf(ret, l + 1, "%s", fbasename);
ret[l] = '\0';
return ret;
@@ -141,8 +142,7 @@ static char *get_output_filename(char *fbasename, const char *extension)
{
char *output_filename = NULL;
output_filename =
- (char *) gregorio_malloc(sizeof(char) *
- (strlen(extension) + strlen(fbasename) + 2));
+ (char *) gregorio_malloc((strlen(extension) + strlen(fbasename) + 2));
output_filename = strcpy(output_filename, fbasename);
output_filename = strcat(output_filename, ".");
output_filename = strcat(output_filename, extension);
@@ -199,16 +199,22 @@ available formats are:\n\
static void check_input_clobber(char *input_file_name, char *output_file_name)
{
- char *absolute_input_file_name;
- char *absolute_output_file_name;
- char *current_directory;
- int file_cmp;
if (input_file_name && output_file_name) {
- current_directory = gregorio_malloc(PATH_MAX * sizeof(char));
- current_directory = getcwd(current_directory, PATH_MAX);
+ char *absolute_input_file_name;
+ char *absolute_output_file_name;
+ char *current_directory;
+ int file_cmp;
+ size_t bufsize = 128;
+ char *buf = gregorio_malloc(bufsize);
+ while ((current_directory = getcwd(buf, bufsize)) == NULL
+ && errno == ERANGE && bufsize < MAX_BUF_GROWTH) {
+ free(buf);
+ bufsize <<= 1;
+ buf = gregorio_malloc(bufsize);
+ }
if (current_directory == NULL) {
fprintf(stderr, _("can't determine current directory"));
- free(current_directory);
+ free(buf);
exit(1);
}
absolute_input_file_name = define_path(current_directory, input_file_name);
@@ -217,7 +223,7 @@ static void check_input_clobber(char *input_file_name, char *output_file_name)
if (file_cmp == 0) {
fprintf(stderr, "error: refusing to overwrite the input file\n");
}
- free(current_directory);
+ free(buf);
free(absolute_input_file_name);
free(absolute_output_file_name);
if (file_cmp == 0) {
@@ -239,7 +245,7 @@ static char *encode_point_and_click_filename(char *input_file_name)
}
/* 2 extra characters for a possible leading slash and final NUL */
- r = result = gregorio_malloc((strlen(filename) * 4 + 2) * sizeof(char));
+ r = result = gregorio_malloc(strlen(filename) * 4 + 2);
#ifdef _WIN32
*(r++) = '/';
diff --git a/Build/source/texk/gregorio/gregorio-src/src/struct.c b/Build/source/texk/gregorio/gregorio-src/src/struct.c
index 2130da6d45b..708ee38f41b 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/struct.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/struct.c
@@ -234,7 +234,7 @@ void gregorio_add_texverb_to_note(gregorio_note **current_note, char *str)
if (*current_note) {
if ((*current_note)->texverb) {
len = strlen((*current_note)->texverb) + strlen(str) + 1;
- res = gregorio_malloc(len * sizeof(char));
+ res = gregorio_malloc(len);
strcpy(res, (*current_note)->texverb);
strcat(res, str);
free((*current_note)->texverb);
diff --git a/Build/source/texk/gregorio/gregorio-src/src/support.c b/Build/source/texk/gregorio/gregorio-src/src/support.c
index 1862c9445a5..ed49f866041 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/support.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/support.c
@@ -36,7 +36,7 @@ void gregorio_snprintf(char *s, size_t size, const char *format, ...)
va_list args;
#ifdef _MSC_VER
- memset(s, 0, size * sizeof(char));
+ memset(s, 0, size);
#endif
va_start(args, format);
@@ -91,3 +91,45 @@ char *gregorio_strdup(const char *s)
}
return result;
}
+
+bool gregorio_readline(char **buf, size_t *bufsize, FILE *file)
+{
+ size_t oldsize;
+ if (*buf == NULL) {
+ *bufsize = 128;
+ *buf = (char *)gregorio_malloc(*bufsize);
+ } else {
+ if (*bufsize < 128) {
+ gregorio_message(_("invalid buffer size"), "gregorio_getline",
+ VERBOSITY_FATAL, 0);
+ exit(1);
+ }
+ }
+ (*buf)[0] = '\0';
+ oldsize = 1;
+ for (;;) {
+ (*buf)[*bufsize - 2] = '\0';
+
+ if (feof(file) || ferror(file)
+ || !fgets((*buf) + oldsize - 1, (int)(*bufsize - oldsize + 1),
+ file)
+ || (*buf)[*bufsize - 2] == '\0') {
+ if (ferror(file)) {
+ gregorio_message(_("Error reading from the file"),
+ "gregorio_getline", VERBOSITY_FATAL, 0);
+ exit(1);
+ }
+ return (*buf)[0] != '\0';
+ }
+
+ if (*bufsize >= MAX_BUF_GROWTH) {
+ gregorio_message(_("Line too long"), "gregorio_getline",
+ VERBOSITY_FATAL, 0);
+ exit(1);
+ }
+
+ oldsize = *bufsize;
+ *bufsize <<= 1;
+ *buf = gregorio_realloc(*buf, *bufsize);
+ }
+}
diff --git a/Build/source/texk/gregorio/gregorio-src/src/support.h b/Build/source/texk/gregorio/gregorio-src/src/support.h
index f6ec460121a..7e7425d57a9 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/support.h
+++ b/Build/source/texk/gregorio/gregorio-src/src/support.h
@@ -24,6 +24,12 @@
#define SUPPORT_H
#include <stdlib.h>
+#include <limits.h>
+#include "bool.h"
+
+#define GREGORIO_SZ_MAX (~((size_t)0))
+#define MAX_BUF_GROWTH \
+ ((size_t)((((INT_MAX < GREGORIO_SZ_MAX)? INT_MAX : GREGORIO_SZ_MAX) >> 1) + 1))
void gregorio_snprintf(char *s, size_t size, const char *format, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
@@ -31,5 +37,6 @@ void *gregorio_malloc(size_t size);
void *gregorio_calloc(size_t nmemb, size_t size);
void *gregorio_realloc(void *ptr, size_t size);
char *gregorio_strdup(const char *s);
+bool gregorio_readline(char **bufptr, size_t *bufsize, FILE *file);
#endif
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
index 78f76e8a7b6..a541af15fcd 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules-l.c
@@ -568,7 +568,7 @@ char *gregorio_vowel_rulefile_text;
static __inline void save_lval(void)
{
gregorio_vowel_rulefile_lval =
- gregorio_malloc((gregorio_vowel_rulefile_leng + 1) * sizeof(char));
+ gregorio_malloc(gregorio_vowel_rulefile_leng + 1);
strncpy(gregorio_vowel_rulefile_lval, gregorio_vowel_rulefile_text,
gregorio_vowel_rulefile_leng);
gregorio_vowel_rulefile_lval[gregorio_vowel_rulefile_leng] = '\0';
diff --git a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
index 72a04b2e0a6..54e939a9f78 100644
--- a/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
+++ b/Build/source/texk/gregorio/gregorio-src/src/vowel/vowel-rules.l
@@ -39,7 +39,7 @@
static __inline void save_lval(void)
{
gregorio_vowel_rulefile_lval =
- gregorio_malloc((gregorio_vowel_rulefile_leng + 1) * sizeof(char));
+ gregorio_malloc(gregorio_vowel_rulefile_leng + 1);
strncpy(gregorio_vowel_rulefile_lval, gregorio_vowel_rulefile_text,
gregorio_vowel_rulefile_leng);
gregorio_vowel_rulefile_lval[gregorio_vowel_rulefile_leng] = '\0';
diff --git a/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc b/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc
index 0b70f9577ce..e2cc1b2c8fc 100644
--- a/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc
+++ b/Build/source/texk/gregorio/gregorio-src/windows/gregorio-resources.rc
@@ -1,7 +1,7 @@
IDI_ICON1 ICON DISCARDABLE "gregorio.ico"
1 VERSIONINFO
-FILEVERSION 4,0,0,30
-PRODUCTVERSION 4,0,0,30
+FILEVERSION 4,0,1,30
+PRODUCTVERSION 4,0,1,30
BEGIN
BLOCK "StringFileInfo"
BEGIN
@@ -9,12 +9,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Gregorio project"
VALUE "FileDescription", "Gregorio"
- VALUE "FileVersion", "4.0.0"
+ VALUE "FileVersion", "4.0.1"
VALUE "InternalName", "gregorio"
VALUE "LegalCopyright", "See COPYING in the installation directory."
VALUE "OriginalFilename", "gregorio.exe"
VALUE "ProductName", "Gregorio"
- VALUE "ProductVersion", "4.0.0"
+ VALUE "ProductVersion", "4.0.1"
END
END
diff --git a/Build/source/texk/gregorio/version.ac b/Build/source/texk/gregorio/version.ac
index 742176fc972..2f5f5cf240c 100644
--- a/Build/source/texk/gregorio/version.ac
+++ b/Build/source/texk/gregorio/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current gregorio version
-m4_define([gregorio_version], [4.0.0])
+m4_define([gregorio_version], [4.0.1])