external/liblangtag/UnpackedTarball_langtag.mk | 1 external/liblangtag/liblangtag-0.5.1-include-last-record-in-language-subtag-registry.patch | 49 ++++++++++ 2 files changed, 50 insertions(+)
New commits: commit f854b05013a587a6ea568b32180f5c81de26eeeb Author: Eike Rathke <er...@redhat.com> Date: Sat Apr 5 20:04:37 2014 +0200 include last record in language-subtag-registry.xml Change-Id: Iaca0fc9ca12ee672f640be9c639b7b0d0dd3bc10 diff --git a/external/liblangtag/UnpackedTarball_langtag.mk b/external/liblangtag/UnpackedTarball_langtag.mk index 88f7f16..3bce944 100644 --- a/external/liblangtag/UnpackedTarball_langtag.mk +++ b/external/liblangtag/UnpackedTarball_langtag.mk @@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,langtag,\ external/liblangtag/liblangtag-0.5.1-undefined-have-sys-param-h.patch \ external/liblangtag/liblangtag-0.5.1-windows-do-not-prepend-dir-separator.patch \ external/liblangtag/liblangtag-0.5.1-unistd.patch \ + external/liblangtag/liblangtag-0.5.1-include-last-record-in-language-subtag-registry.patch \ )) ifeq ($(OS),WNT) diff --git a/external/liblangtag/liblangtag-0.5.1-include-last-record-in-language-subtag-registry.patch b/external/liblangtag/liblangtag-0.5.1-include-last-record-in-language-subtag-registry.patch new file mode 100644 index 0000000..c28727c3b --- /dev/null +++ b/external/liblangtag/liblangtag-0.5.1-include-last-record-in-language-subtag-registry.patch @@ -0,0 +1,49 @@ +Upstream 6564b87c2f6dac2482e530bc43b038a3e93a0e07 +resolves #6, include last record in language-subtag-registry.xml + +The '%%' in language-subtag-registry is a record delimiter, not record +end marker, it is not present on the last record at file end. + +(cherry picked from commit 4fff73a834f94a7ca256c086d99ea0a654a6c287) + +diff --git a/data/reg2xml.c b/data/reg2xml.c +--- UnpackedTarball/langtag.orig/data/reg2xml.c ++++ UnpackedTarball/langtag/data/reg2xml.c +@@ -48,6 +48,7 @@ _parse(const char *filename, + FILE *fp; + char buffer[1024], *range = NULL, *begin = NULL, *end = NULL; + lt_bool_t in_entry = FALSE; ++ lt_bool_t file_end = FALSE; + xmlNodePtr ent = NULL; + + if ((fp = fopen(filename, "rb")) == NULL) { +@@ -56,10 +57,13 @@ _parse(const char *filename, + } + while (1) { + fgets(buffer, 1024, fp); +- if (feof(fp)) +- break; ++ if (feof(fp)) { ++ if (!in_entry) ++ break; ++ file_end = TRUE; ++ } + _drop_crlf(buffer); +- if (lt_strcmp0(buffer, "%%") == 0) { ++ if (lt_strcmp0(buffer, "%%") == 0 || file_end) { + if (in_entry) { + if (ent) { + if (range) { +@@ -102,7 +106,7 @@ _parse(const char *filename, + ent = NULL; + range = NULL; + } +- in_entry = TRUE; ++ in_entry = !file_end; + } else { + if (!in_entry) { + /* ignore it */ + +--------------erAck-patch-parts-- + + _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits