diff options
author | marino <marino@FreeBSD.org> | 2014-08-15 18:11:10 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-08-15 18:11:10 +0800 |
commit | af2cdfc7dd4d2d68d0c85f4071b6759a27afd0b5 (patch) | |
tree | 8c9c10338f3c4becfa5b12ec66245fa9bdb2eb5b /archivers/unzip/files | |
parent | f90385ceafb77f4d747fbfaed409a1aa2a0ebab4 (diff) | |
download | freebsd-ports-gnome-af2cdfc7dd4d2d68d0c85f4071b6759a27afd0b5.tar.gz freebsd-ports-gnome-af2cdfc7dd4d2d68d0c85f4071b6759a27afd0b5.tar.zst freebsd-ports-gnome-af2cdfc7dd4d2d68d0c85f4071b6759a27afd0b5.zip |
Merge 4 unzip slave ports into archivers/unzip as non-default options
It is practically impossible to use any of the unzip slave ports. This
is because archivers/unzip is used by the ports infrastruction (via
USES=zip, USES=zip:infozip) and each slave port conflicts with it.
If you install the slave port first, then the port infrastructure can't
install archivers/unzip (although if attempted, the extracts dependency
might be satisfied by the slave port so it might actually work).
In any case, this change:
* Adds "iconv" support as an non-default option
* Add a localization group that can have zero or one selection
* That group contains Chinese, Korean, or Russian support
* WITH_UNZIP_UNREDUCE support was removed (I'm not sure it even worked)
* Makefile was simplified (several loops removed)
* Removes unzip-iconv, Chinese, Korean, Russian slave ports
PR: 190349
Reported by: Mikhail Rokhin
Unzip overhaul: marino
Approved by: maintainer (ehaupt@)
Diffstat (limited to 'archivers/unzip/files')
-rw-r--r-- | archivers/unzip/files/extra-iconv-patch-unix_unix.c | 103 | ||||
-rw-r--r-- | archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h | 33 | ||||
-rw-r--r-- | archivers/unzip/files/extra-iconv-patch-unzip.c | 137 | ||||
-rw-r--r-- | archivers/unzip/files/extra-iconv-patch-unzpriv.h | 11 | ||||
-rw-r--r-- | archivers/unzip/files/extra-iconv-patch-zipinfo.c | 85 | ||||
-rw-r--r-- | archivers/unzip/files/extra-ko-patch-fileio.c | 14 | ||||
-rw-r--r-- | archivers/unzip/files/extra-ko-patch-unzip.c | 25 | ||||
-rw-r--r-- | archivers/unzip/files/extra-ko-patch-unzip.h | 10 | ||||
-rw-r--r-- | archivers/unzip/files/extra-ru-patch-ebcdic.h | 78 | ||||
-rw-r--r-- | archivers/unzip/files/extra-zh-patch-fileio.c | 14 | ||||
-rw-r--r-- | archivers/unzip/files/patch-consts.h (renamed from archivers/unzip/files/patch-contsts.h) | 4 | ||||
-rw-r--r-- | archivers/unzip/files/patch-process.c | 6 | ||||
-rw-r--r-- | archivers/unzip/files/patch-unix_Makefile (renamed from archivers/unzip/files/patch-aa) | 6 | ||||
-rw-r--r-- | archivers/unzip/files/patch-unix_unix.c (renamed from archivers/unzip/files/patch-ab) | 6 |
14 files changed, 521 insertions, 11 deletions
diff --git a/archivers/unzip/files/extra-iconv-patch-unix_unix.c b/archivers/unzip/files/extra-iconv-patch-unix_unix.c new file mode 100644 index 000000000000..e869ca3b0484 --- /dev/null +++ b/archivers/unzip/files/extra-iconv-patch-unix_unix.c @@ -0,0 +1,103 @@ +--- unix/unix.c.orig 2009-01-23 23:31:26 UTC ++++ unix/unix.c +@@ -30,6 +30,9 @@ + #define UNZIP_INTERNAL + #include "unzip.h" + ++#include <iconv.h> ++#include <langinfo.h> ++ + #ifdef SCO_XENIX + # define SYSNDIR + #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +@@ -1874,3 +1877,90 @@ static void qlfix(__G__ ef_ptr, ef_len) + } + } + #endif /* QLZIP */ ++ ++ ++typedef struct { ++ char *local_charset; ++ char *archive_charset; ++} CHARSET_MAP; ++ ++/* A mapping of local <-> archive charsets used by default to convert filenames ++ * of DOS/Windows Zip archives. Currently very basic. */ ++static CHARSET_MAP dos_charset_map[] = { ++ { "ANSI_X3.4-1968", "CP850" }, ++ { "ISO-8859-1", "CP850" }, ++ { "CP1252", "CP850" }, ++ { "UTF-8", "CP866" }, ++ { "KOI8-R", "CP866" }, ++ { "KOI8-U", "CP866" }, ++ { "ISO-8859-5", "CP866" } ++}; ++ ++char OEM_CP[MAX_CP_NAME] = ""; ++char ISO_CP[MAX_CP_NAME] = ""; ++ ++/* Try to guess the default value of OEM_CP based on the current locale. ++ * ISO_CP is left alone for now. */ ++void init_conversion_charsets() ++{ ++ const char *local_charset; ++ int i; ++ ++ /* Make a guess only if OEM_CP not already set. */ ++ if(*OEM_CP == '\0') { ++ local_charset = nl_langinfo(CODESET); ++ for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++) ++ if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) { ++ strncpy(OEM_CP, dos_charset_map[i].archive_charset, ++ sizeof(OEM_CP)); ++ break; ++ } ++ } ++} ++ ++/* Convert a string from one encoding to the current locale using iconv(). ++ * Be as non-intrusive as possible. If error is encountered during covertion ++ * just leave the string intact. */ ++static void charset_to_intern(char *string, char *from_charset) ++{ ++ iconv_t cd; ++ char *s,*d, *buf; ++ size_t slen, dlen, buflen; ++ const char *local_charset; ++ ++ if(*from_charset == '\0') ++ return; ++ ++ buf = NULL; ++ local_charset = nl_langinfo(CODESET); ++ ++ if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1) ++ return; ++ ++ slen = strlen(string); ++ s = string; ++ dlen = buflen = 2*slen; ++ d = buf = malloc(buflen + 1); ++ if(!d) ++ goto cleanup; ++ bzero(buf,buflen); ++ if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1) ++ goto cleanup; ++ strncpy(string, buf, buflen); ++ ++ cleanup: ++ free(buf); ++ iconv_close(cd); ++} ++ ++/* Convert a string from OEM_CP to the current locale charset. */ ++inline void oem_intern(char *string) ++{ ++ charset_to_intern(string, OEM_CP); ++} ++ ++/* Convert a string from ISO_CP to the current locale charset. */ ++inline void iso_intern(char *string) ++{ ++ charset_to_intern(string, ISO_CP); ++} diff --git a/archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h b/archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h new file mode 100644 index 000000000000..538b85659602 --- /dev/null +++ b/archivers/unzip/files/extra-iconv-patch-unix_unxcfg.h @@ -0,0 +1,33 @@ +--- unix/unxcfg.h.orig 2009-04-16 18:36:12 UTC ++++ unix/unxcfg.h +@@ -227,4 +227,30 @@ typedef struct stat z_stat; + /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ + /* and notfirstcall are used by do_wild(). */ + ++ ++#define MAX_CP_NAME 25 ++ ++#ifdef SETLOCALE ++# undef SETLOCALE ++#endif ++#define SETLOCALE(category, locale) setlocale(category, locale) ++#include <locale.h> ++ ++#ifdef _ISO_INTERN ++# undef _ISO_INTERN ++#endif ++#define _ISO_INTERN(str1) iso_intern(str1) ++ ++#ifdef _OEM_INTERN ++# undef _OEM_INTERN ++#endif ++#ifndef IZ_OEM2ISO_ARRAY ++# define IZ_OEM2ISO_ARRAY ++#endif ++#define _OEM_INTERN(str1) oem_intern(str1) ++ ++void iso_intern(char *); ++void oem_intern(char *); ++void init_conversion_charsets(void); ++ + #endif /* !__unxcfg_h */ diff --git a/archivers/unzip/files/extra-iconv-patch-unzip.c b/archivers/unzip/files/extra-iconv-patch-unzip.c new file mode 100644 index 000000000000..36e8e75054a3 --- /dev/null +++ b/archivers/unzip/files/extra-iconv-patch-unzip.c @@ -0,0 +1,137 @@ +--- unzip.c.orig 2009-04-16 18:26:52 UTC ++++ unzip.c +@@ -327,11 +327,21 @@ static ZCONST char Far ZipInfoUsageLine2 + -2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ + -v verbose, multi-page format\n"; + ++#ifndef UNIX + static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment -T print file times in sortable decimal format\ + \n -C be case-insensitive %s\ + -x exclude filenames that follow from listing\n"; ++#else /* UNIX */ ++static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ ++ -h print header line -t print totals for listed files or for all\n\ ++ -z print zipfile comment %c-T%c print file times in sortable decimal format\ ++\n %c-C%c be case-insensitive %s\ ++ -x exclude filenames that follow from listing\n\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; ++#endif /* !UNIX */ + #ifdef MORE + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +@@ -665,6 +675,17 @@ modifiers:\n\ + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ + -C match filenames case-insensitively -L make (some) names \ + lowercase\n %-42s -V retain VMS version numbers\n%s"; ++#elif (defined UNIX) ++static ZCONST char Far UnzipUsageLine4[] = "\ ++modifiers:\n\ ++ -n never overwrite existing files -q quiet mode (-qq => quieter)\n\ ++ -o overwrite files WITHOUT prompting -a auto-convert any text files\n\ ++ -j junk paths (do not make directories) -aa treat ALL files as text\n\ ++ -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ ++ -C match filenames case-insensitively -L make (some) names \ ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n\n"; + #else /* !VMS */ + static ZCONST char Far UnzipUsageLine4[] = "\ + modifiers:\n\ +@@ -803,6 +824,10 @@ int unzip(__G__ argc, argv) + #endif /* UNICODE_SUPPORT */ + + ++#ifdef UNIX ++ init_conversion_charsets(); ++#endif ++ + #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + +@@ -1336,6 +1361,11 @@ int uz_opts(__G__ pargc, pargv) + argc = *pargc; + argv = *pargv; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif ++ + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +@@ -1517,6 +1547,35 @@ int uz_opts(__G__ pargc, pargv) + } + break; + #endif /* MACOS */ ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; +@@ -1592,6 +1651,35 @@ int uz_opts(__G__ pargc, pargv) + } else + ++uO.overwrite_all; + break; ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; diff --git a/archivers/unzip/files/extra-iconv-patch-unzpriv.h b/archivers/unzip/files/extra-iconv-patch-unzpriv.h new file mode 100644 index 000000000000..c91cb1205bed --- /dev/null +++ b/archivers/unzip/files/extra-iconv-patch-unzpriv.h @@ -0,0 +1,11 @@ +--- unzpriv.h.orig 2009-04-19 23:59:26 UTC ++++ unzpriv.h +@@ -3008,7 +3008,7 @@ char *GetLoadPath OF((__GPRO)); + !(((islochdr) || (isuxatt)) && \ + ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ + (hostnum) == FS_HPFS_ || \ +- ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ ++ ((hostnum) == FS_NTFS_ /* && (hostver) == 50 */ )) { \ + _OEM_INTERN((string)); \ + } else { \ + _ISO_INTERN((string)); \ diff --git a/archivers/unzip/files/extra-iconv-patch-zipinfo.c b/archivers/unzip/files/extra-iconv-patch-zipinfo.c new file mode 100644 index 000000000000..9d8e9833c8dd --- /dev/null +++ b/archivers/unzip/files/extra-iconv-patch-zipinfo.c @@ -0,0 +1,85 @@ +--- zipinfo.c.orig 2009-02-08 17:04:30 UTC ++++ zipinfo.c +@@ -457,6 +457,10 @@ int zi_opts(__G__ pargc, pargv) + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif + + #ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +@@ -501,6 +505,35 @@ int zi_opts(__G__ pargc, pargv) + uO.lflag = 0; + } + break; ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; +@@ -521,6 +554,35 @@ int zi_opts(__G__ pargc, pargv) + G.M_flag = TRUE; + break; + #endif ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; diff --git a/archivers/unzip/files/extra-ko-patch-fileio.c b/archivers/unzip/files/extra-ko-patch-fileio.c new file mode 100644 index 000000000000..8d0b0aaf3514 --- /dev/null +++ b/archivers/unzip/files/extra-ko-patch-fileio.c @@ -0,0 +1,14 @@ +--- fileio.c.orig 2009-04-20 00:03:44 UTC ++++ fileio.c +@@ -2240,8 +2240,9 @@ int do_string(__G__ length, option) /* + + /* translate the Zip entry filename coded in host-dependent "extended + ASCII" into the compiler's (system's) internal text code page */ +- Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver, +- G.pInfo->HasUxAtt, (option == DS_FN_L)); ++ if (!uO.dotflag) ++ Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver, ++ G.pInfo->HasUxAtt, (option == DS_FN_L)); + + if (G.pInfo->lcflag) /* replace with lowercase filename */ + STRLOWER(G.filename, G.filename); diff --git a/archivers/unzip/files/extra-ko-patch-unzip.c b/archivers/unzip/files/extra-ko-patch-unzip.c new file mode 100644 index 000000000000..6cbf21e7998d --- /dev/null +++ b/archivers/unzip/files/extra-ko-patch-unzip.c @@ -0,0 +1,25 @@ +--- unzip.c.orig 2009-04-16 18:26:52 UTC ++++ unzip.c +@@ -664,7 +664,8 @@ modifiers:\n\ + -j junk paths (do not make directories) -aa treat ALL files as text\n\ + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ + -C match filenames case-insensitively -L make (some) names \ +-lowercase\n %-42s -V retain VMS version numbers\n%s"; ++lowercase\n %-42s -V retain VMS version numbers\n\ ++ -. don't translate filenames\n%s"; + #else /* !VMS */ + static ZCONST char Far UnzipUsageLine4[] = "\ + modifiers:\n\ +@@ -1829,6 +1830,12 @@ int uz_opts(__G__ pargc, pargv) + ++uO.cflxflag; + break; + #endif /* UNIX */ ++ case ('.'): ++ if (negative) ++ uO.dotflag = FALSE, negative = 0; ++ else ++ uO.dotflag = TRUE; ++ break; + default: + error = TRUE; + break; diff --git a/archivers/unzip/files/extra-ko-patch-unzip.h b/archivers/unzip/files/extra-ko-patch-unzip.h new file mode 100644 index 000000000000..e033ab8c80c0 --- /dev/null +++ b/archivers/unzip/files/extra-ko-patch-unzip.h @@ -0,0 +1,10 @@ +--- unzip.h.orig 2009-02-15 18:12:54 UTC ++++ unzip.h +@@ -559,6 +559,7 @@ typedef struct _UzpOpts { + #ifdef UNIX + int cflxflag; /* -^: allow control chars in extracted filenames */ + #endif ++ int dotflag; /* -.: don't translate filenames to local charset */ + #endif /* !FUNZIP */ + } UzpOpts; + diff --git a/archivers/unzip/files/extra-ru-patch-ebcdic.h b/archivers/unzip/files/extra-ru-patch-ebcdic.h new file mode 100644 index 000000000000..68424b592bf7 --- /dev/null +++ b/archivers/unzip/files/extra-ru-patch-ebcdic.h @@ -0,0 +1,78 @@ +--- ebcdic.h.orig 2008-03-21 12:04:22 UTC ++++ ebcdic.h +@@ -237,43 +237,43 @@ ZCONST uch ascii[] = { + + #ifdef IZ_ISO2OEM_ARRAY + ZCONST uch Far iso2oem_850[] = { +- 0x3F, 0x3F, 0x27, 0x9F, 0x22, 0x2E, 0xC5, 0xCE, /* 80 - 87 */ +- 0x5E, 0x25, 0x53, 0x3C, 0x4F, 0x3F, 0x3F, 0x3F, /* 88 - 8F */ +- 0x3F, 0x27, 0x27, 0x22, 0x22, 0x07, 0x2D, 0x2D, /* 90 - 97 */ +- 0x7E, 0x54, 0x73, 0x3E, 0x6F, 0x3F, 0x3F, 0x59, /* 98 - 9F */ +- 0xFF, 0xAD, 0xBD, 0x9C, 0xCF, 0xBE, 0xDD, 0xF5, /* A0 - A7 */ +- 0xF9, 0xB8, 0xA6, 0xAE, 0xAA, 0xF0, 0xA9, 0xEE, /* A8 - AF */ +- 0xF8, 0xF1, 0xFD, 0xFC, 0xEF, 0xE6, 0xF4, 0xFA, /* B0 - B7 */ +- 0xF7, 0xFB, 0xA7, 0xAF, 0xAC, 0xAB, 0xF3, 0xA8, /* B8 - BF */ +- 0xB7, 0xB5, 0xB6, 0xC7, 0x8E, 0x8F, 0x92, 0x80, /* C0 - C7 */ +- 0xD4, 0x90, 0xD2, 0xD3, 0xDE, 0xD6, 0xD7, 0xD8, /* C8 - CF */ +- 0xD1, 0xA5, 0xE3, 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, 0xED, 0xE9, 0xE7, 0xEA, /* D8 - DF */ ++ 0x9E, 0x80, 0x81, 0x96, 0x84, 0x85, 0x94, 0x83, /* E0 - E7 */ ++ 0x95, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, /* E8 - EF */ ++ 0x8F, 0x9F, 0x90, 0x91, 0x92, 0x93, 0x86, 0x82, /* F0 - F7 */ ++ 0x9C, 0x9B, 0x87, 0x98, 0x9D, 0x99, 0x97, 0x9A, /* F8 - FF */ + }; + #endif /* IZ_ISO2OEM_ARRAY */ + + #ifdef IZ_OEM2ISO_ARRAY + ZCONST uch Far oem2iso_850[] = { +- 0xC7, 0xFC, 0xE9, 0xE2, 0xE4, 0xE0, 0xE5, 0xE7, /* 80 - 87 */ +- 0xEA, 0xEB, 0xE8, 0xEF, 0xEE, 0xEC, 0xC4, 0xC5, /* 88 - 8F */ +- 0xC9, 0xE6, 0xC6, 0xF4, 0xF6, 0xF2, 0xFB, 0xF9, /* 90 - 97 */ +- 0xFF, 0xD6, 0xDC, 0xF8, 0xA3, 0xD8, 0xD7, 0x83, /* 98 - 9F */ +- 0xE1, 0xED, 0xF3, 0xFA, 0xF1, 0xD1, 0xAA, 0xBA, /* A0 - A7 */ +- 0xBF, 0xAE, 0xAC, 0xBD, 0xBC, 0xA1, 0xAB, 0xBB, /* A8 - AF */ +- 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xC1, 0xC2, 0xC0, /* B0 - B7 */ +- 0xA9, 0xA6, 0xA6, 0x2B, 0x2B, 0xA2, 0xA5, 0x2B, /* B8 - BF */ +- 0x2B, 0x2D, 0x2D, 0x2B, 0x2D, 0x2B, 0xE3, 0xC3, /* C0 - C7 */ +- 0x2B, 0x2B, 0x2D, 0x2D, 0xA6, 0x2D, 0x2B, 0xA4, /* C8 - CF */ +- 0xF0, 0xD0, 0xCA, 0xCB, 0xC8, 0x69, 0xCD, 0xCE, /* D0 - D7 */ +- 0xCF, 0x2B, 0x2B, 0xA6,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0xD5, 0xC6, 0xC8, 0xC3, 0xDE, /* E0 - E7 */ ++ 0xDB, 0xDD, 0xDF, 0xD9, 0xD8, 0xDC, 0xC0, 0xD1, /* E8 - EF */ ++ 0xB3, 0xA3, 0x90, 0x91, 0x92, 0x93, 0x86, 0x82, /* F0 - F7 */ ++ 0x9C, 0x95, 0x9E, 0x96, 0x9D, 0x99, 0x94, 0x9A, /* F8 - FF */ + }; + #endif /* IZ_OEM2ISO_ARRAY */ + diff --git a/archivers/unzip/files/extra-zh-patch-fileio.c b/archivers/unzip/files/extra-zh-patch-fileio.c new file mode 100644 index 000000000000..b470e62a3f9c --- /dev/null +++ b/archivers/unzip/files/extra-zh-patch-fileio.c @@ -0,0 +1,14 @@ +--- fileio.c.orig 2009-04-20 00:03:44 UTC ++++ fileio.c +@@ -2240,8 +2240,11 @@ int do_string(__G__ length, option) /* + + /* translate the Zip entry filename coded in host-dependent "extended + ASCII" into the compiler's (system's) internal text code page */ ++#if 0 ++/* cnoize is lazy to read it carefully */ + Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, G.pInfo->hostver, + G.pInfo->HasUxAtt, (option == DS_FN_L)); ++#endif + + if (G.pInfo->lcflag) /* replace with lowercase filename */ + STRLOWER(G.filename, G.filename); diff --git a/archivers/unzip/files/patch-contsts.h b/archivers/unzip/files/patch-consts.h index e3947732d0dc..b77a1452e46e 100644 --- a/archivers/unzip/files/patch-contsts.h +++ b/archivers/unzip/files/patch-consts.h @@ -1,6 +1,6 @@ ---- unzip-5.52.orig/consts.h +--- consts.h.orig 2002-03-23 15:52:48 UTC +++ consts.h -@@ -34,9 +34,9 @@ +@@ -34,9 +34,9 @@ ZCONST char Far CentSigMsg[] = "error: expected central file header signature not found (file #%lu).\n"; ZCONST char Far SeekMsg[] = "error [%s]: attempt to seek before beginning of zipfile\n%s"; diff --git a/archivers/unzip/files/patch-process.c b/archivers/unzip/files/patch-process.c index 089210d1f4b4..074520a9de13 100644 --- a/archivers/unzip/files/patch-process.c +++ b/archivers/unzip/files/patch-process.c @@ -1,6 +1,6 @@ ---- process.c.orig 2009-03-06 04:25:10.000000000 +0300 -+++ process.c 2009-10-26 16:08:15.000000000 +0300 -@@ -101,10 +101,10 @@ +--- process.c.orig 2009-03-06 01:25:10 UTC ++++ process.c +@@ -101,10 +101,10 @@ static ZCONST char Far CannotAllocateBuf /* do_seekable() strings */ # ifdef UNIX static ZCONST char Far CannotFindZipfileDirMsg[] = diff --git a/archivers/unzip/files/patch-aa b/archivers/unzip/files/patch-unix_Makefile index 2ba157517618..fdf1e61ccafa 100644 --- a/archivers/unzip/files/patch-aa +++ b/archivers/unzip/files/patch-unix_Makefile @@ -1,5 +1,5 @@ ---- unix/Makefile.orig 2009-01-19 01:41:18.000000000 +0300 -+++ unix/Makefile 2009-10-26 13:15:47.000000000 +0300 +--- unix/Makefile.orig 2009-01-18 22:41:18 UTC ++++ unix/Makefile @@ -42,12 +42,12 @@ # such as -DDOSWILD). @@ -15,7 +15,7 @@ CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC) CF = $(CFLAGS) $(CF_NOOPT) LFLAGS1 = -@@ -763,8 +763,8 @@ +@@ -763,8 +763,8 @@ dnix: unix_make # FreeBSD on Intel: freebsd: unix_make @echo 'NOTE: use bsd target for non-Intel FreeBSD compiles (if any).' diff --git a/archivers/unzip/files/patch-ab b/archivers/unzip/files/patch-unix_unix.c index 1df0101edef6..b6e38873144c 100644 --- a/archivers/unzip/files/patch-ab +++ b/archivers/unzip/files/patch-unix_unix.c @@ -1,6 +1,6 @@ ---- unix/unix.c.orig 2009-01-24 02:31:26.000000000 +0300 -+++ unix/unix.c 2009-10-26 13:22:08.000000000 +0300 -@@ -610,7 +610,7 @@ +--- unix/unix.c.orig 2009-01-23 23:31:26 UTC ++++ unix/unix.c +@@ -610,7 +610,7 @@ int mapname(__G__ renamed) * else allow 8-bit characters (e.g. UTF-8) in filenames: */ if (uO.cflxflag || |