Commit e4e801d4 authored by Sergei Golubchik's avatar Sergei Golubchik

connect: compilation errors and few obvious bugs

parent 3e589d4b
...@@ -97,7 +97,7 @@ bool ZIPUTIL::WildMatch(PSZ pat, PSZ str) { ...@@ -97,7 +97,7 @@ bool ZIPUTIL::WildMatch(PSZ pat, PSZ str) {
if (!*++pat) return TRUE; if (!*++pat) return TRUE;
goto loopStart; goto loopStart;
default: default:
if (mapCaseTable[*s] != mapCaseTable[*p]) if (mapCaseTable[(unsigned)*s] != mapCaseTable[(unsigned)*p])
goto starCheck; goto starCheck;
break; break;
} /* endswitch */ } /* endswitch */
...@@ -151,7 +151,7 @@ int ZIPUTIL::findEntry(PGLOBAL g, bool next) ...@@ -151,7 +151,7 @@ int ZIPUTIL::findEntry(PGLOBAL g, bool next)
if (rc == UNZ_END_OF_LIST_OF_FILE) if (rc == UNZ_END_OF_LIST_OF_FILE)
return RC_EF; return RC_EF;
else if (rc != UNZ_OK) { else if (rc != UNZ_OK) {
sprintf(g->Message, "unzGoToNextFile rc = ", rc); sprintf(g->Message, "unzGoToNextFile rc = %d", rc);
return RC_FX; return RC_FX;
} // endif rc } // endif rc
...@@ -261,7 +261,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, char *fn) ...@@ -261,7 +261,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, char *fn)
fp->Memory = memory; fp->Memory = memory;
fp->Mode = mode; fp->Mode = mode;
fp->File = this; fp->File = this;
fp->Handle = NULL; fp->Handle = 0;
} // endif fp } // endif fp
} else } else
...@@ -297,7 +297,7 @@ bool ZIPUTIL::openEntry(PGLOBAL g) ...@@ -297,7 +297,7 @@ bool ZIPUTIL::openEntry(PGLOBAL g)
memory = new char[size + 1]; memory = new char[size + 1];
if ((rc = unzReadCurrentFile(zipfile, memory, size)) < 0) { if ((rc = unzReadCurrentFile(zipfile, memory, size)) < 0) {
sprintf(g->Message, "unzReadCurrentFile rc = ", rc); sprintf(g->Message, "unzReadCurrentFile rc = %d", rc);
unzCloseCurrentFile(zipfile); unzCloseCurrentFile(zipfile);
free(memory); free(memory);
memory = NULL; memory = NULL;
......
...@@ -129,8 +129,9 @@ extern "C" { ...@@ -129,8 +129,9 @@ extern "C" {
#endif #endif
#endif #endif
#ifndef OF
#define OF(args) args
#endif
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment