Commit Graph

28 Commits

Author SHA1 Message Date
Bastien Bouclet 955e18c648 COMMON: Use nullptr instead of NULL or 0 where appropriate 2018-05-10 08:35:46 +02:00
Adrian Frühwirth 3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Alexander Tkachev f58abd9540 COMMON: Update GZipWriteStream::pos()
Though it seemed the _wrapped stream should return valid position, it
was always 0. That's why I've added a _pos field, which is updated in
write() and returned in pos().
2016-08-04 15:14:06 +06:00
Alexander Tkachev 7a89caac84 COMMON: Add WriteStream::pos()
It returns int32, because some complex streams are derived from both
WriteStream and ReadStream, and in ReadStream pos() returns int32,
because -1 means an error.

I had to change MemoryStream's uint32 to int32, which is probably not so
good.
2016-08-04 14:36:21 +06:00
Filippos Karapetis c3003eec85 COMMON: Reduce the warnings related to backwards seeking in ZIP files
The warnings are now changed to debug statements, are only shown once
per session (instead of once per stream) and are only enabled for debug
builds.
2014-03-28 01:30:38 +02:00
Johannes Schickel 854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Filippos Karapetis b4f8e45a3c COMMON: SEEK_END offsets are negative
This was taken directly from the old code, which either used different
semantics, or had a genuine bug
2013-11-02 19:59:22 +02:00
Filippos Karapetis 732fb69b1c COMMON: Reenable SEEK_END seeking in GZipReadStream()
This is needed by the "Mirage" Wintermute game.
Vorbis can do backward seeking, thus we need to enable this for ZIP
streams. Since this can be a potentially slow operation, we throw a
warning (once per stream) when it occurs. Originally, SEEK_END seeks
in GZipReadStream were disabled by commit 9138128f. Refer to patch
#2050337 for more information.
2013-11-02 19:19:26 +02:00
Johannes Schickel b4d0a8ba66 JANITORIAL: Enforce "} // End of namespace" with a single space after }. 2013-01-26 19:38:02 +01:00
Johannes Schickel 36bfaa6a30 COMMON: Return NULL in wrapCompressedReadStream for compressed streams when ZLIB is disabled. 2013-01-26 15:25:13 +01:00
Alyssa Milburn 31801137b5 Merge remote-tracking branch 'origin/master' into tony
Conflicts:
	common/coroutines.cpp
	common/coroutines.h
	devtools/create_project/msbuild.cpp
	devtools/create_project/visualstudio.cpp
2012-08-28 15:54:12 +02:00
Einar Johan Trøan Sømåen b398dcabaf COMMON: Add an optional argument to wrapCompressedReadStream, to simplify using streams that can't tell their size() 2012-07-18 13:54:15 +02:00
Matthew Hoops ab45e72e67 COMMON: Move InstallShield code to common
The code also now works for both data compressed with sync bytes and without
2012-05-28 16:54:49 -04:00
Andrea Corna c8826297a4 COMMON: Enhance zlib interface 2012-01-13 18:33:04 +01:00
Matthew Hoops f408456d14 COMMON: Add wrapper for inflating headerless zlib data 2011-08-20 16:41:10 -04:00
Christoph Mallon 84220d2ca0 COMMON: Remove superfluous Common:: qualifiers. 2011-08-07 15:19:07 +02:00
Christoph Mallon b3997f0562 COMMON: Use ScopedPtr<> to simplify resource management. 2011-08-07 15:19:07 +02:00
Christoph Mallon 17044f0784 COMMON: Simplify initialization of z_stream struct. 2011-08-07 15:19:06 +02:00
Alyssa Milburn a8896be85e COMMON: Initialize more z_stream fields before calling inflateInit2.
The zlib documentation and examples claim this is needed, as spotted
by LordHoto.
2011-08-04 21:55:28 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel c0bd496c90 COMMON: Fix compilation when zlib support is enabled. 2011-05-02 17:19:35 +02:00
Max Horn 5c7d7a85db COMMON: Push #include stream.h from zlib.h to zlib.cpp
svn-id: r54353
2010-11-19 00:10:09 +00:00
Max Horn 8ba75fc522 Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
2009-09-30 16:16:53 +00:00
Jordi Vilalta Prat b1999a2a16 Fixed indentation and removed whitespaces at the end of line
svn-id: r35481
2008-12-22 11:22:15 +00:00
Max Horn f3dfb5ebab Merged common/gzip-stream.* and common/zlib.*
svn-id: r34578
2008-09-16 11:50:10 +00:00
Max Horn 706fb37061 Modified uncompress in common/zlib.h to return a bool, so that we don't have to #include the real zlib.h; fixed PSP backend to not run uncompress inside an assert (which would cause it to not be invoked when turning off asserts)
svn-id: r34576
2008-09-16 11:42:21 +00:00
Lars Persson 967e56996a Different zlib.h included paths for Symbian OS to differenciate between system and user includes
svn-id: r30189
2008-01-03 08:39:49 +00:00
Torbjörn Andersson 90e4327a4a Added missing files from patch #1858158.
svn-id: r30043
2007-12-28 08:43:31 +00:00