]> git.saurik.com Git - wxWidgets.git/commitdiff
Elimiante include of defs.h for VisualAge compiles
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 22 Oct 2001 22:13:51 +0000 (22:13 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 22 Oct 2001 22:13:51 +0000 (22:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/extended.c
src/common/unzip.c

index e6869ff475a99a78ad73d18c017f13020f24f1e7..e2f061f195890e6ab708877605b14b5d533ef43f 100644 (file)
@@ -1,4 +1,7 @@
+#ifndef __VISAGECPP__ /* DW: why does anyone need this for this module? */
 #include "wx/defs.h"
+#endif
+
 #include "wx/setup.h"
 
 #include <math.h>
index 402cd3cf0fef87c6201d238c2295ce1cf21e4a4b..284c8e4745147cd2eb9967436a822aaff4581373 100644 (file)
@@ -12,8 +12,10 @@ $Id$
 
 */
 
-
+#ifndef __VISAGECPP__
 #include "wx/defs.h"
+#endif
+
 #include "wx/setup.h"
 
 #if wxUSE_ZLIB && wxUSE_ZIPSTREAM
@@ -322,13 +324,13 @@ local uLong unzlocal_SearchCentralDir(fin)
        uLong uBackRead;
        uLong uMaxBack=0xffff; /* maximum size of global comment */
        uLong uPosFound=0;
-       
+
        if (fseek(fin,0,SEEK_END) != 0)
                return 0;
 
 
        uSizeFile = ftell( fin );
-       
+
        if (uMaxBack>uSizeFile)
                uMaxBack = uSizeFile;
 
@@ -346,7 +348,7 @@ local uLong unzlocal_SearchCentralDir(fin)
                else
                        uBackRead+=BUFREADCOMMENT;
                uReadPos = uSizeFile-uBackRead ;
-               
+
                uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
                      (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
                if (fseek(fin,uReadPos,SEEK_SET)!=0)
@@ -511,12 +513,12 @@ extern unzFile ZEXPORT unzOpen (path)
                                    (us.offset_central_dir+us.size_central_dir);
        us.central_pos = central_pos;
     us.pfile_in_zip_read = NULL;
-       
+
 
        s=(unz_s*)ALLOC(sizeof(unz_s));
        *s=us;
-       unzGoToFirstFile((unzFile)s);   
-       return (unzFile)s;      
+       unzGoToFirstFile((unzFile)s);
+       return (unzFile)s;
 }
 
 
@@ -695,7 +697,7 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
                lSeek -= uSizeRead;
        }
 
-       
+
        if ((err==UNZ_OK) && (extraField!=NULL))
        {
                uLong uSizeRead ;
@@ -720,7 +722,7 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
        else
                lSeek+=file_info.size_file_extra;
 
-       
+
        if ((err==UNZ_OK) && (szComment!=NULL))
        {
                uLong uSizeRead ;
@@ -814,7 +816,7 @@ extern int ZEXPORT unzGoToFirstFile (file)
 extern int ZEXPORT unzGoToNextFile (file)
        unzFile file;
 {
-       unz_s* s;       
+       unz_s* s;
        int err;
 
        if (file==NULL)
@@ -849,7 +851,7 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
        const char *szFileName;
        int iCaseSensitivity;
 {
-       unz_s* s;       
+       unz_s* s;
        int err;
     const char *c;
     char *c2;
@@ -862,7 +864,7 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
         if (*c == '\\') *c2 = '/';
         else *c2 = *c;
     *c2 = '\0';
-       
+
        if (file==NULL)
                return UNZ_PARAMERROR;
 
@@ -991,7 +993,7 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
 
        return err;
 }
-                                                                                               
+
 /*
   Open for reading data the current file in the zipfile.
   If there is no error and the file is opened, the return value is UNZ_OK.
@@ -1037,7 +1039,7 @@ extern int ZEXPORT unzOpenCurrentFile (file)
        }
 
        pfile_in_zip_read_info->stream_initialised=0;
-       
+
        if ((s->cur_file_info.compression_method!=0) &&
         (s->cur_file_info.compression_method!=Z_DEFLATED))
                err=UNZ_BADZIPFILE;
@@ -1074,11 +1076,11 @@ extern int ZEXPORT unzOpenCurrentFile (file)
        pfile_in_zip_read_info->rest_read_uncompressed =
             s->cur_file_info.uncompressed_size ;
 
-       
+
        pfile_in_zip_read_info->pos_in_zipfile =
             s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
                          iSizeVar;
-       
+
        pfile_in_zip_read_info->stream.avail_in = (uInt)0;
 
 
@@ -1123,7 +1125,7 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
        pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
 
        pfile_in_zip_read_info->stream.avail_out = (uInt)len;
-       
+
        if (len>pfile_in_zip_read_info->rest_read_uncompressed)
                pfile_in_zip_read_info->stream.avail_out =
                  (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
@@ -1148,7 +1150,7 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
                        pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
 
                        pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
-                       
+
                        pfile_in_zip_read_info->stream.next_in =
                 (Bytef*)pfile_in_zip_read_info->read_buffer;
                        pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
@@ -1162,11 +1164,11 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
                                uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
                        else
                                uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
-                               
+
                        for (i=0;i<uDoCopy;i++)
                                *(pfile_in_zip_read_info->stream.next_out+i) =
                         *(pfile_in_zip_read_info->stream.next_in+i);
-                                       
+
                        pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
                                                                pfile_in_zip_read_info->stream.next_out,
                                                                uDoCopy);
@@ -1198,7 +1200,7 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
 
                        uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
                        uOutThis = uTotalOutAfter-uTotalOutBefore;
-                       
+
                        pfile_in_zip_read_info->crc32 =
                 crc32(pfile_in_zip_read_info->crc32,bufBefore,
                         (uInt)(uOutThis));
@@ -1256,7 +1258,7 @@ extern int ZEXPORT unzeof (file)
 
        if (pfile_in_zip_read_info==NULL)
                return UNZ_PARAMERROR;
-       
+
        if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
                return 1;
        else
@@ -1300,7 +1302,7 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
 
        if (buf==NULL)
                return (int)size_to_read;
-       
+
        if (len>size_to_read)
                read_now = (uInt)size_to_read;
        else
@@ -1308,7 +1310,7 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
 
        if (read_now==0)
                return 0;
-       
+
        if (fseek(pfile_in_zip_read_info->file,
               pfile_in_zip_read_info->offset_local_extrafield +
                          pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0)