upgrade to hyphen-2.8.9
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: Ie0e3ca3dfea06ddd149ae7c912988035d0fed9a2 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2741 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 6179066836bfaae04bafd87011915f2df20b160d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205281 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
3901c16372
commit
4feaf5d0c6
+2
-2
@@ -337,8 +337,8 @@ HUNSPELL_TARBALL := hunspell-1.7.3.tar.gz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
HYPHEN_SHA256SUM := 304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705
|
||||
HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
|
||||
HYPHEN_SHA256SUM := 783743daf477de8c4d16e3c74b4d2827377017718d8e17e2d9440210246f6abe
|
||||
HYPHEN_TARBALL := 442b985e604f8143a5a0e7bacd6b2e40-hyphen-2.8.9.tar.gz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
|
||||
-1
@@ -17,7 +17,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,hyphen,2))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,hyphen,\
|
||||
external/hyphen/hyphen-build.patch \
|
||||
external/hyphen/hyphen-fdo48017-wfopen.patch \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
diff -u hyphen/hyphen.c build/hyphen/hyphen.c
|
||||
--- hyphen/hyphen.c 2014-05-22 00:28:13.164587974 +0200
|
||||
+++ build/hyphen/hyphen.c 2015-05-22 11:08:55.000000000 +0200
|
||||
@@ -44,6 +44,11 @@
|
||||
#include <unistd.h> /* for exit */
|
||||
#endif
|
||||
|
||||
+#ifdef _WIN32
|
||||
+#include <windows.h>
|
||||
+#include <wchar.h>
|
||||
+#endif
|
||||
+
|
||||
#define noVERBOSE
|
||||
|
||||
/* calculate hyphenmin values with long ligature length (2 or 3 characters
|
||||
@@ -371,12 +376,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
+FILE * hnj_fopen(const char * path, const char * mode) {
|
||||
+#ifdef _WIN32
|
||||
+#define WIN32_LONG_PATH_PREFIX "\\\\?\\"
|
||||
+ if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
|
||||
+ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
|
||||
+ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
|
||||
+ wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
|
||||
+ FILE * f = NULL;
|
||||
+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
|
||||
+ if (_wfullpath( buff2, buff, len ) != NULL) {
|
||||
+ f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
|
||||
+ }
|
||||
+ free(buff);
|
||||
+ free(buff2);
|
||||
+ return f;
|
||||
+ }
|
||||
+#endif
|
||||
+ return fopen(path, mode);
|
||||
+}
|
||||
+
|
||||
HyphenDict *
|
||||
hnj_hyphen_load (const char *fn)
|
||||
{
|
||||
HyphenDict *result;
|
||||
FILE *f;
|
||||
- f = fopen (fn, "r");
|
||||
+ f = hnj_fopen (fn, "r");
|
||||
if (f == NULL)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user