From: Rolf K. <lab...@us...> - 2007-09-16 14:26:21
|
Update of /cvsroot/opengtoolkit/lvzip/c_source In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12350 Modified Files: macbin.c macbin.h zlibvc.dsp Log Message: Addition of memory stream for ZIP file Index: macbin.c =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/macbin.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** macbin.c 15 Sep 2007 23:05:38 -0000 1.27 --- macbin.c 16 Sep 2007 14:26:17 -0000 1.28 *************** *** 10,13 **** --- 10,14 ---- #include "zlib.h" #include "ioapi.h" + #include "iomem.h" #include "macbin.h" *************** *** 42,46 **** err = FPathToText(path, (LStrPtr)&pathLen); if (err) ! DebugPrintf("FPathToText1: err = %ld", err); if (!err) { --- 43,47 ---- err = FPathToText(path, (LStrPtr)&pathLen); if (err) ! DEBUGPRINTF(("FPathToText1: err = %ld", err)); if (!err) { *************** *** 55,59 **** lstr->str[lstr->cnt] = 0; if (err) ! DebugPrintf("FPathToText2: err = %ld", err); if (!err) { --- 56,60 ---- lstr->str[lstr->cnt] = 0; if (err) ! DEBUGPRINTF(("FPathToText2: err = %ld", err)); if (!err) { *************** *** 62,67 **** err = OSErrToLVErr(ret); if (err) ! DebugPrintf("MakeFileSpec: ret = %d, err = %ld", ret, err); ! DebugPrintf("MakeFileSpec: len = %ld, len2 = %d, path = %s", lstr->cnt, (int16)name[0], lstr->str); } } --- 63,68 ---- err = OSErrToLVErr(ret); if (err) ! DEBUGPRINTF(("MakeFileSpec: ret = %d, err = %ld", ret, err)); ! DEBUGPRINTF(("MakeFileSpec: len = %ld, len2 = %d, path = %s", lstr->cnt, (int16)name[0], lstr->str)); } } *************** *** 78,82 **** if (err) { ! DebugPrintf("MakeFSSpec: err = %ld", err); if (fnfErr == err) { --- 79,83 ---- if (err) { ! DEBUGPRINTF(("MakeFSSpec: err = %ld", err)); if (fnfErr == err) { *************** *** 93,97 **** int32 i; ! DebugPrintf("MakeFileSpec: trying with subpaths"); /* remove the last elt of the path and see if we have success */ PStrCpy(temp, path); --- 94,98 ---- int32 i; ! DEBUGPRINTF(("MakeFileSpec: trying with subpaths")); /* remove the last elt of the path and see if we have success */ PStrCpy(temp, path); *************** *** 102,111 **** PStrLen(temp) = PStrLen(path) - i; err = MakeFileSpec(vol, dirID, temp, &fst); ! DebugPrintf("MakeFileSpec: err2 = %ld", err); if (!err || (fnfErr == err)) { PStrLen(p) = i; err = FSMakeFSSpec(vol, fst.parID, p, fss); ! DebugPrintf("MakeFSSpec: err3 = %ld", err); } } --- 103,112 ---- PStrLen(temp) = PStrLen(path) - i; err = MakeFileSpec(vol, dirID, temp, &fst); ! DEBUGPRINTF(("MakeFileSpec: err2 = %ld", err)); if (!err || (fnfErr == err)) { PStrLen(p) = i; err = FSMakeFSSpec(vol, fst.parID, p, fss); ! DEBUGPRINTF(("MakeFSSpec: err3 = %ld", err)); } } *************** *** 465,469 **** if (err = MakeMacSpec(path, &fss)) { ! DebugPrintf("MakeMacSpec: err = %ld", err); return err; } --- 466,470 ---- if (err = MakeMacSpec(path, &fss)) { ! DEBUGPRINTF(("MakeMacSpec: err = %ld", err)); return err; } *************** *** 662,666 **** err = FNewRefNum(path, ioRefNum, refnum); else ! DebugPrintf("OpenFile: err = %ld, rsrc = %d", err, rsrc); return err; --- 663,667 ---- err = FNewRefNum(path, ioRefNum, refnum); else ! DEBUGPRINTF(("OpenFile: err = %ld, rsrc = %d", err, rsrc)); return err; *************** *** 695,699 **** if (err = MakeMacSpec(path, &fss)) { ! DebugPrintf("MakeMacSpec: err = %ld", err); return err; } --- 696,700 ---- if (err = MakeMacSpec(path, &fss)) { ! DEBUGPRINTF(("MakeMacSpec: err = %ld", err)); return err; } *************** *** 706,710 **** err = OSErrToLVErr(PBGetCatInfoSync(&cpb)); if (err) ! DebugPrintf("PBGetCatInfo: err = %ld", err); if (!err) --- 707,711 ---- err = OSErrToLVErr(PBGetCatInfoSync(&cpb)); if (err) ! DEBUGPRINTF(("PBGetCatInfo: err = %ld", err)); if (!err) *************** *** 716,720 **** err = OSErrToLVErr(PBDTGetPath(&dtpb)); if (err) ! DebugPrintf("PBGetPath: err = %ld", err); if (!err) { --- 717,721 ---- err = OSErrToLVErr(PBDTGetPath(&dtpb)); if (err) ! DEBUGPRINTF(("PBGetPath: err = %ld", err)); if (!err) { *************** *** 751,755 **** err = OSErrToLVErr(PBSetCatInfoSync(&cpb)); if (err) ! DebugPrintf("PBSetCatInfo: err = %ld", err); if (!err && comment) { --- 752,756 ---- err = OSErrToLVErr(PBSetCatInfoSync(&cpb)); if (err) ! DEBUGPRINTF(("PBSetCatInfo: err = %ld", err)); if (!err && comment) { *************** *** 954,965 **** } ! extern long ZEXPORT InitializeFileFuncs (zlib_filefunc_def* pzlib_filefunc_def) { if (pzlib_filefunc_def) { #if Win32 ! fill_win32_filefunc(pzlib_filefunc_def); #else ! fill_fopen_filefunc(pzlib_filefunc_def); #endif return noErr; --- 955,969 ---- } ! extern long ZEXPORT InitializeFileFuncs (zlib_filefunc_def* pzlib_filefunc_def, LStrHandle memory) { if (pzlib_filefunc_def) { + if (memory) + fill_mem_filefunc(pzlib_filefunc_def, memory); + else #if Win32 ! fill_win32_filefunc(pzlib_filefunc_def); #else ! fill_fopen_filefunc(pzlib_filefunc_def); #endif return noErr; Index: macbin.h =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/macbin.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** macbin.h 15 Sep 2007 23:05:38 -0000 1.20 --- macbin.h 16 Sep 2007 14:26:17 -0000 1.21 *************** *** 17,21 **** #define MacOSX 1 #endif ! #define BigEndian 1 #elif defined(__GNUC__) || defined(linux) #define Unix 1 --- 17,25 ---- #define MacOSX 1 #endif ! #if defined(__i386__) ! #define BigEndian 0 ! #else ! #define BigEndian 1 ! #endif #elif defined(__GNUC__) || defined(linux) #define Unix 1 *************** *** 37,49 **** #define DoDebugger() #endif ! #define DebugPrintf DbgPrintf #else #define DoDebugger() ! ! long DebugPrintf(char* fmt, ...); long DebugPrintf(char* fmt, ...) { return 0; } #endif --- 41,54 ---- #define DoDebugger() #endif ! #define DEBUGPRINTF(args) DbgPrintf args #else #define DoDebugger() ! #define DEBUGPRINTF(args) ! /* long DebugPrintf(char* fmt, ...); long DebugPrintf(char* fmt, ...) { return 0; } + */ #endif *************** *** 263,267 **** uInt32 denyMode)); ! extern long ZEXPORT InitializeFileFuncs OF((zlib_filefunc_def* pzlib_filefunc_def)); #ifdef __cplusplus --- 268,272 ---- uInt32 denyMode)); ! extern long ZEXPORT InitializeFileFuncs OF((zlib_filefunc_def* pzlib_filefunc_def, LStrHandle memory)); #ifdef __cplusplus Index: zlibvc.dsp =================================================================== RCS file: /cvsroot/opengtoolkit/lvzip/c_source/zlibvc.dsp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** zlibvc.dsp 25 Oct 2006 08:58:37 -0000 1.9 --- zlibvc.dsp 16 Sep 2007 14:26:17 -0000 1.10 *************** *** 246,249 **** --- 246,253 ---- # Begin Source File + SOURCE=.\iomem.c + # End Source File + # Begin Source File + SOURCE=.\iowin32.c # End Source File *************** *** 323,326 **** --- 327,334 ---- # Begin Source File + SOURCE=.\iomem.h + # End Source File + # Begin Source File + SOURCE=.\iowin32.h # End Source File |