From 02d6107c97b48888362e7c6a70dcac323c89d741 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 17 Dec 2023 21:23:58 +0100 Subject: ZipArchive: Update to the 4.6.9 release --- zip/ZipArchive/ZipAbstractFile.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'zip/ZipArchive/ZipAbstractFile.h') diff --git a/zip/ZipArchive/ZipAbstractFile.h b/zip/ZipArchive/ZipAbstractFile.h index 86d0012..dc28c63 100644 --- a/zip/ZipArchive/ZipAbstractFile.h +++ b/zip/ZipArchive/ZipAbstractFile.h @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// -// This source file is part of the ZipArchive library source distribution and -// is Copyrighted 2000 - 2007 by Artpol Software - Tadeusz Dracz +// This source file is part of the ZipArchive Library Open Source distribution +// and is Copyrighted 2000 - 2022 by Artpol Software - Tadeusz Dracz // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -9,7 +9,7 @@ // // For the licensing details refer to the License.txt file. // -// Web Site: http://www.artpol-software.com +// Web Site: https://www.artpol-software.com //////////////////////////////////////////////////////////////////////////////// /** @@ -23,6 +23,7 @@ #if _MSC_VER > 1000 #pragma once +#pragma warning( push ) #endif #include "ZipExport.h" #include "ZipString.h" @@ -31,19 +32,24 @@ class ZIP_API CZipAbstractFile { public: - enum { begin = SEEK_SET, // 0 - current = SEEK_CUR, // 1 - end = SEEK_END // 2 + enum + { begin = SEEK_SET, // 0 + current = SEEK_CUR, // 1 + end = SEEK_END // 2 }; +#if _MSC_VER > 1000 + #pragma warning (disable : 26455) + #pragma warning (disable : 26432) +#endif CZipAbstractFile(){} virtual bool Open(LPCTSTR , UINT , bool ){return false;} virtual void Close() = 0; virtual void Flush() = 0; virtual ZIP_FILE_USIZE GetPosition() const = 0; virtual ZIP_FILE_USIZE Seek(ZIP_FILE_SIZE lOff, int nFrom) = 0; - ZIP_FILE_USIZE Seek(ZIP_FILE_USIZE lOff, bool fromBeginning = true) + ZIP_FILE_USIZE SafeSeek(ZIP_FILE_USIZE lOff, bool fromBeginning = true) { - ZIP_FILE_SIZE offset; + ZIP_FILE_SIZE offset = 0; if (lOff > ZIP_FILE_SIZEMAX) { offset = GetLength() - lOff; @@ -62,13 +68,16 @@ public: virtual ZIP_FILE_USIZE SeekToBegin(){return Seek(0, begin);} virtual ZIP_FILE_USIZE SeekToEnd(){return Seek(0, end);} virtual CZipString GetFilePath() const = 0; - virtual UINT Read(void *lpBuf, UINT nCount) = 0; - virtual void Write(const void* lpBuf, UINT nCount) = 0; + virtual bool HasFilePath() const = 0; + virtual size_t Read(void *lpBuf, size_t nCount) = 0; + virtual void Write(const void* lpBuf, size_t nCount) = 0; virtual bool IsClosed() const = 0; virtual ~CZipAbstractFile(){}; }; - +#if _MSC_VER > 1000 +#pragma warning( pop ) +#endif #endif // !defined(ZIPARCHIVE_ZIPABSTRACTFILE_DOT_H) -- cgit v1.2.3