diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2008-04-06 08:34:57 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2008-04-06 08:34:57 +0000 |
commit | aadb4be16d2b654d5d77e4102f39552447599613 (patch) | |
tree | 931e0c45c3a89489498e9ec433d6cf25bd630a4e /archivers | |
parent | de7343febdf9a6c6a2e61037c82a312d04d4e6de (diff) | |
download | ports-aadb4be16d2b654d5d77e4102f39552447599613.tar.gz ports-aadb4be16d2b654d5d77e4102f39552447599613.zip |
Notes
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/unrar-iconv/Makefile | 2 | ||||
-rw-r--r-- | archivers/unrar-iconv/files/patch-iconv | 34 |
2 files changed, 19 insertions, 17 deletions
diff --git a/archivers/unrar-iconv/Makefile b/archivers/unrar-iconv/Makefile index 85ac71e31f7f..027171d42792 100644 --- a/archivers/unrar-iconv/Makefile +++ b/archivers/unrar-iconv/Makefile @@ -18,5 +18,7 @@ CONFLICTS= unrar-[0-9]* zh-unrar-[0-9]* post-install: @${ECHO_MSG} "===> Added iconv support, see new switches:" @${ECHO_MSG} " la, ll and lo at \"unrar -?\"" + @${ECHO_MSG} "===> REMEMBER!!!: Windows rar archives using old DOS encodings as internal encoding." + @${ECHO_MSG} " CP866 for russian lang for exmaple." .include "${MASTERDIR}/Makefile" diff --git a/archivers/unrar-iconv/files/patch-iconv b/archivers/unrar-iconv/files/patch-iconv index 422bb9255dc5..78318007e629 100644 --- a/archivers/unrar-iconv/files/patch-iconv +++ b/archivers/unrar-iconv/files/patch-iconv @@ -152,10 +152,10 @@ #ifdef S_IFLNK #define SAVE_LINKS #endif ---- strfn.cpp Tue Oct 4 11:57:54 2005 -+++ strfn.cpp Mon Jan 16 18:04:41 2006 +--- strfn.cpp.orig 2007-09-10 17:49:28.000000000 +0600 ++++ strfn.cpp 2008-04-03 21:15:08.000000000 +0600 @@ -22,23 +22,49 @@ - + void ExtToInt(const char *Src,char *Dest) { +#ifdef WITH_ICONV @@ -163,23 +163,23 @@ + ret = (size_t)(-1); + if (h_E2I != (iconv_t)(-1)) { + static size_t inbytesleft, outbytesleft; -+ -+ inbytesleft = strlen(Src); -+ outbytesleft = inbytesleft; ++ inbytesleft = strlen(Src)+1; ++ outbytesleft = NM; + ret = iconv(h_E2I, &Src, &inbytesleft, &Dest, &outbytesleft); ++ Dest[outbytesleft-inbytesleft]=NULL; + } -+ if (ret == (size_t)(-1)) strcpy(Dest, Src); -+#else /* !WITH_ICONV */ ++ if (ret == (size_t)(-1)) strcpy(Dest, Src); ++#else /* !WITH_ICONV */ #if defined(_WIN_32) CharToOem(Src,Dest); #else if (Dest!=Src) strcpy(Dest,Src); #endif -+#endif /* !WITH_ICONV */ ++#endif /* !WITH_ICONV */ } - - + + void IntToExt(const char *Src,char *Dest) { +#ifdef WITH_ICONV @@ -187,18 +187,18 @@ + ret = (size_t)(-1); + if (h_I2E != (iconv_t)(-1)) { + static size_t inbytesleft, outbytesleft; -+ -+ inbytesleft = strlen(Src); -+ outbytesleft = inbytesleft; ++ inbytesleft = strlen(Src)+1; ++ outbytesleft = NM; + ret = iconv(h_I2E, &Src, &inbytesleft, &Dest, &outbytesleft); ++ Dest[outbytesleft-inbytesleft]=NULL; + } -+ if (ret == (size_t)(-1)) strcpy(Dest, Src); -+#else /* !WITH_ICONV */ ++ if (ret == (size_t)(-1)) strcpy(Dest,Src); ++#else /* !WITH_ICONV */ #if defined(_WIN_32) OemToChar(Src,Dest); #else if (Dest!=Src) strcpy(Dest,Src); #endif -+#endif /* !WITH_ICONV */ ++#endif /* !WITH_ICONV */ } |