fix patch unzip-6.0-alt-iconv-utf8-print.patch

- remove "izu_" prefix for malloc|free functions (not interesting for Linux)
This commit is contained in:
Petr Stodulka 2015-12-02 17:59:46 +01:00
parent 848c7d24bf
commit 85a1bbca89

View File

@ -94,7 +94,7 @@ index 0ee4e93..741b7e0 100644
+ if (wslen != (size_t)-1)
+ {
+ /* Apparently valid Unicode. Allocate wide-char storage. */
+ wstring = (wchar_t *)izu_malloc((wslen + 1) * sizeof(wchar_t));
+ wstring = (wchar_t *)malloc((wslen + 1) * sizeof(wchar_t));
+ if (wstring == NULL) {
+ strcpy( (char *)space, raw);
+ return (char *)space;
@ -102,9 +102,9 @@ index 0ee4e93..741b7e0 100644
-#ifdef QDOS
- if (qlflag & 2) {
- if (*r == '/' || *r == '.') {
+ wostring = (wchar_t *)izu_malloc(2 * (wslen + 1) * sizeof(wchar_t));
+ wostring = (wchar_t *)malloc(2 * (wslen + 1) * sizeof(wchar_t));
+ if (wostring == NULL) {
+ izu_free(wstring);
+ free(wstring);
+ strcpy( (char *)space, raw);
+ return (char *)space;
+ }
@ -117,9 +117,9 @@ index 0ee4e93..741b7e0 100644
+
+ /* Convert filtered wide chars back to multi-byte. */
+ woslen = wcstombs( NULL, wostring, 0);
+ if ((newraw = izu_malloc(woslen + 1)) == NULL) {
+ izu_free(wstring);
+ izu_free(wostring);
+ if ((newraw = malloc(woslen + 1)) == NULL) {
+ free(wstring);
+ free(wostring);
+ strcpy( (char *)space, raw);
+ return (char *)space;
+ }
@ -164,9 +164,9 @@ index 0ee4e93..741b7e0 100644
+ *s = '\0';
+ }
+
+ izu_free(wstring);
+ izu_free(wostring);
+ izu_free(newraw);
+ free(wstring);
+ free(wostring);
+ free(newraw);
+ }
+ else
+# endif /* defined( UNICODE_SUPPORT) && defined( _MBCS) */