45
45
46
46
#define WRITEBUFFERSIZE (16384 )
47
47
48
- bool ZipLoadFile (PGLOBAL g, char * zfn, char * fn, char * entry, bool append, bool mul);
48
+ bool ZipLoadFile (PGLOBAL g, PCSZ zfn, PCSZ fn, PCSZ entry, bool append, bool mul);
49
49
50
50
/* **********************************************************************/
51
51
/* Compress a file in zip when creating a table. */
52
52
/* **********************************************************************/
53
- static bool ZipFile (PGLOBAL g, ZIPUTIL *zutp, char * fn, char * entry, char *buf)
53
+ static bool ZipFile (PGLOBAL g, ZIPUTIL *zutp, PCSZ fn, PCSZ entry, char *buf)
54
54
{
55
55
int rc = RC_OK, size_read, size_buf = WRITEBUFFERSIZE;
56
56
FILE *fin;
@@ -88,7 +88,7 @@ static bool ZipFile(PGLOBAL g, ZIPUTIL *zutp, char *fn, char *entry, char *buf)
88
88
/* **********************************************************************/
89
89
/* Find and Compress several files in zip when creating a table. */
90
90
/* **********************************************************************/
91
- static bool ZipFiles (PGLOBAL g, ZIPUTIL *zutp, char * pat, char *buf)
91
+ static bool ZipFiles (PGLOBAL g, ZIPUTIL *zutp, PCSZ pat, char *buf)
92
92
{
93
93
char filename[_MAX_PATH];
94
94
int rc;
@@ -203,7 +203,7 @@ static bool ZipFiles(PGLOBAL g, ZIPUTIL *zutp, char *pat, char *buf)
203
203
/* **********************************************************************/
204
204
/* Load and Compress a file in zip when creating a table. */
205
205
/* **********************************************************************/
206
- bool ZipLoadFile (PGLOBAL g, char * zfn, char * fn, char * entry, bool append, bool mul)
206
+ bool ZipLoadFile (PGLOBAL g, PCSZ zfn, PCSZ fn, PCSZ entry, bool append, bool mul)
207
207
{
208
208
char *buf;
209
209
bool err;
@@ -228,7 +228,7 @@ bool ZipLoadFile(PGLOBAL g, char *zfn, char *fn, char *entry, bool append, bool
228
228
/* **********************************************************************/
229
229
/* Constructors. */
230
230
/* **********************************************************************/
231
- ZIPUTIL::ZIPUTIL (PSZ tgt)
231
+ ZIPUTIL::ZIPUTIL (PCSZ tgt)
232
232
{
233
233
zipfile = NULL ;
234
234
target = tgt;
@@ -269,7 +269,7 @@ void ZIPUTIL::getTime(tm_zip& tmZip)
269
269
/* append: set true to append the zip file */
270
270
/* return: true if open, false otherwise. */
271
271
/* **********************************************************************/
272
- bool ZIPUTIL::open (PGLOBAL g, char * filename, bool append)
272
+ bool ZIPUTIL::open (PGLOBAL g, PCSZ filename, bool append)
273
273
{
274
274
if (!zipfile && !(zipfile = zipOpen64 (filename,
275
275
append ? APPEND_STATUS_ADDINZIP
@@ -295,7 +295,7 @@ void ZIPUTIL::close()
295
295
/* **********************************************************************/
296
296
/* OpenTableFile: Open a DOS/UNIX table file from a ZIP file. */
297
297
/* **********************************************************************/
298
- bool ZIPUTIL::OpenTable (PGLOBAL g, MODE mode, char * fn, bool append)
298
+ bool ZIPUTIL::OpenTable (PGLOBAL g, MODE mode, PCSZ fn, bool append)
299
299
{
300
300
/* ********************************************************************/
301
301
/* The file will be compressed. */
@@ -338,7 +338,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, char *fn, bool append)
338
338
/* **********************************************************************/
339
339
/* Add target in zip file. */
340
340
/* **********************************************************************/
341
- bool ZIPUTIL::addEntry (PGLOBAL g, char * entry)
341
+ bool ZIPUTIL::addEntry (PGLOBAL g, PCSZ entry)
342
342
{
343
343
// ?? we dont need the stinking time
344
344
zip_fileinfo zi = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
@@ -382,7 +382,7 @@ void ZIPUTIL::closeEntry()
382
382
/* **********************************************************************/
383
383
/* Constructors. */
384
384
/* **********************************************************************/
385
- UNZIPUTL::UNZIPUTL (PSZ tgt, bool mul)
385
+ UNZIPUTL::UNZIPUTL (PCSZ tgt, bool mul)
386
386
{
387
387
zipfile = NULL ;
388
388
target = tgt;
@@ -439,8 +439,8 @@ UNZIPUTL::UNZIPUTL(PZIPUTIL zutp)
439
439
/* This code is the copyright property of Alessandro Felice Cantatore. */
440
440
/* http://xoomer.virgilio.it/acantato/dev/wildcard/wildmatch.html */
441
441
/* **********************************************************************/
442
- bool UNZIPUTL::WildMatch (PSZ pat, PSZ str) {
443
- PSZ s, p;
442
+ bool UNZIPUTL::WildMatch (PCSZ pat, PCSZ str) {
443
+ PCSZ s, p;
444
444
bool star = FALSE ;
445
445
446
446
loopStart:
@@ -474,7 +474,7 @@ bool UNZIPUTL::WildMatch(PSZ pat, PSZ str) {
474
474
/* param: filename path and the filename of the zip file to open. */
475
475
/* return: true if open, false otherwise. */
476
476
/* **********************************************************************/
477
- bool UNZIPUTL::open (PGLOBAL g, char * filename)
477
+ bool UNZIPUTL::open (PGLOBAL g, PCSZ filename)
478
478
{
479
479
if (!zipfile && !(zipfile = unzOpen64 (filename)))
480
480
sprintf (g->Message , " Zipfile open error on %s" , filename);
@@ -564,7 +564,7 @@ int UNZIPUTL::nextEntry(PGLOBAL g)
564
564
/* **********************************************************************/
565
565
/* OpenTableFile: Open a DOS/UNIX table file from a ZIP file. */
566
566
/* **********************************************************************/
567
- bool UNZIPUTL::OpenTable (PGLOBAL g, MODE mode, char * fn)
567
+ bool UNZIPUTL::OpenTable (PGLOBAL g, MODE mode, PCSZ fn)
568
568
{
569
569
/* ********************************************************************/
570
570
/* The file will be decompressed into virtual memory. */
@@ -636,7 +636,7 @@ bool UNZIPUTL::OpenTable(PGLOBAL g, MODE mode, char *fn)
636
636
/* **********************************************************************/
637
637
/* Insert only if the entry does not exist. */
638
638
/* **********************************************************************/
639
- bool UNZIPUTL::IsInsertOk (PGLOBAL g, char * fn)
639
+ bool UNZIPUTL::IsInsertOk (PGLOBAL g, PCSZ fn)
640
640
{
641
641
bool ok = true , b = open (g, fn);
642
642
0 commit comments