Fold hyphen-c99.patch.0 into hyphen-fdo48017-wfopen.patch

Change-Id: I2f866aa16704bc5492e0e0b78136fdfe41caa7a5
This commit is contained in:
Stephan Bergmann
2014-05-23 09:51:11 +02:00
parent 2a99a22af0
commit 24819d71ec
3 changed files with 4 additions and 17 deletions
-1
View File
@@ -18,7 +18,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,hyphen,\
external/hyphen/hyphen-rhmin.patch \
external/hyphen/hyphen-build.patch \
external/hyphen/hyphen-fdo48017-wfopen.patch \
external/hyphen/hyphen-c99.patch.0 \
))
# vim: set noet sw=4 ts=4:
-13
View File
@@ -1,13 +0,0 @@
--- hyphen.c
+++ hyphen.c
@@ -382,8 +382,9 @@
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));
+ FILE * f;
MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
- FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
+ f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
free(buff);
return f;
}
+4 -3
View File
@@ -13,7 +13,7 @@ diff -u hyphen/hyphen.c build/hyphen/hyphen.c
#define noVERBOSE
/* calculate hyphenmin values with long ligature length (2 or 3 characters
@@ -371,6 +376,21 @@
@@ -371,6 +376,22 @@
}
}
@@ -23,8 +23,9 @@ diff -u hyphen/hyphen.c build/hyphen/hyphen.c
+ 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));
+ FILE * f;
+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
+ FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
+ f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
+ free(buff);
+ return f;
+ }
@@ -35,7 +36,7 @@ diff -u hyphen/hyphen.c build/hyphen/hyphen.c
HyphenDict *
hnj_hyphen_load (const char *fn)
{
@@ -383,7 +403,7 @@
@@ -383,7 +404,7 @@
HashEntry *e;
int state_num = 0;