summaryrefslogtreecommitdiffstats
path: root/compat/zlib/contrib/minizip/crypt.h
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-03-16 09:01:02 (GMT)
committernijtmans <nijtmans>2010-03-16 09:01:02 (GMT)
commitd8aa6f53b956aac50cc8abbee8efde417120f022 (patch)
treead38e8daca52c2a4a161ed744d7579720ced7cb8 /compat/zlib/contrib/minizip/crypt.h
parent6b64f45b9a293ab9cd7c97afa0399c6c37bd4a00 (diff)
downloadtcl-d8aa6f53b956aac50cc8abbee8efde417120f022.zip
tcl-d8aa6f53b956aac50cc8abbee8efde417120f022.tar.gz
tcl-d8aa6f53b956aac50cc8abbee8efde417120f022.tar.bz2
Upgrade zlib to version 1.2.4
Diffstat (limited to 'compat/zlib/contrib/minizip/crypt.h')
-rw-r--r--compat/zlib/contrib/minizip/crypt.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/compat/zlib/contrib/minizip/crypt.h b/compat/zlib/contrib/minizip/crypt.h
index 622f4bc..a01d08d 100644
--- a/compat/zlib/contrib/minizip/crypt.h
+++ b/compat/zlib/contrib/minizip/crypt.h
@@ -87,13 +87,12 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
# endif
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
- const char *passwd; /* password string */
- unsigned char *buf; /* where to write header */
- int bufSize;
- unsigned long* pkeys;
- const unsigned long* pcrc_32_tab;
- unsigned long crcForCrypting;
+static int crypthead(const char* passwd, /* password string */
+ unsigned char* buf, /* where to write header */
+ int bufSize,
+ unsigned long* pkeys,
+ const unsigned long* pcrc_32_tab,
+ unsigned long crcForCrypting)
{
int n; /* index in random header */
int t; /* temporary */
@@ -124,8 +123,8 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
{
buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
}
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
+ buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
return n;
}