Johannes Schickel
f23ca8b62b
COMMON: Use the file cache in ZipArchive::listMembers for performance.
...
This avoids a new iteration through the .zip file for every listMember call.
Instead it uses the "_hash" HashMap, which already contains all the filenames
and is filled on initializing the ZipArchive by unzOpen.
2012-04-30 00:09:56 +02:00
Tarek Soliman
a4798602d7
JANITORIAL: Fix missing whitespace in pointer cast
...
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Andrea Corna
a6ec4f70da
COMMON: Make more members of Archive constant.
2011-12-13 17:55:57 +01:00
Christoph Mallon
84220d2ca0
COMMON: Remove superfluous Common:: qualifiers.
2011-08-07 15:19:07 +02:00
Matthew Hoops
9539017ee3
ALL: initialise -> initialize
2011-05-25 11:17:11 -04: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
Ori Avtalion
9414d7a6e2
JANITORIAL: Reduce header dependencies in shared code
...
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Littleboy
55650f364c
COMMON: Add proper error handling to the ZipArchive class
...
- Add check in listMembers and skip files that can't be enumerated.
- Add checks for all function calls in createReadStreamForMember (and no longer return a stream from an uninitialized buffer when the file cannot be read).
2011-04-25 07:20:16 -04:00
Ori Avtalion
3354204f53
JANITORIAL: Remove extraneous parentheses
...
svn-id: r55890
2011-02-12 10:36:35 +00:00
Max Horn
2180b2d6b5
COMMON: Split common/stream.h into several headers
...
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
c975ed11a1
ALL: Fix various typos (patch #3093266 )
...
svn-id: r53762
2010-10-24 13:04:33 +00:00
Jordi Vilalta Prat
8388e0dfea
JANITORAL: Clean trailing whitespaces.
...
svn-id: r53160
2010-10-12 02:18:11 +00:00
Eugene Sandulenko
2bd5077d2e
COMMON: Add caching to ZipArchive. Patch #3048388
...
Based on patch #3048388 : "Hash map for ZipArchive class", though
I made the hashing by default and removed the old code.
It is a really good thing and will speed up any archive operations.
svn-id: r52204
2010-08-19 10:15:12 +00:00
Robert Špalek
02fb3f88e2
unzip.cpp can read uncompressed ZIP archives even when zlib is not linked in
...
svn-id: r50482
2010-06-29 06:33:31 +00:00
Johannes Schickel
d0c79d21e9
Fix file length of zip file members inside ZipArchive (thanks to fuzzie for reporting).
...
svn-id: r49321
2010-05-30 12:44:59 +00:00
Fabio Battaglia
23cf40db2b
Add a comment to document my removal of stream delete in previous commit
...
svn-id: r48155
2010-02-28 14:40:40 +00:00
Fabio Battaglia
d1e7fcbe75
do not delete the stream twice in makeZipArchive as it's already deleted by unzOpen if a problem is encountered
...
svn-id: r48154
2010-02-28 14:33:22 +00:00
Max Horn
8ac5d00d57
Hide ZipArchive implementation, only expose it via factory functions: makeZipArchive()
...
svn-id: r48040
2010-02-13 11:56:30 +00:00
Max Horn
2bbf708dea
Introduced new type Common::DisposeAfterUse::Flag
...
svn-id: r45233
2009-10-18 19:41:59 +00:00
Max Horn
65b5d31814
COMMON: Removed Stream::ioFailed() and clearIOFailed(), as they are deprecated; however, retained ioFailed in SeekableReadStream and File for now (so for now this mainly affects WriteStream subclasses)
...
svn-id: r40725
2009-05-19 11:42:14 +00:00
Max Horn
c397b37bfb
Modified ZipArchive::createReadStreamForMember to check whether the zip archive contains a file with the given name
...
svn-id: r38786
2009-02-22 16:27:48 +00:00
Max Horn
14c5bbbccf
Renamed Archive::openFile to createReadStreamForMember
...
svn-id: r36021
2009-01-23 04:45:44 +00:00
Max Horn
9861afd8fd
Renamed ArchiveMember::open -> createReadStream, and made it a cv member (const); same for Archive::openFile
...
svn-id: r36020
2009-01-23 04:36:18 +00:00
Max Horn
8f16458e9b
Renamed FSNode::openForReading / openForWriting to createReadStream / createWriteStream, again to make ownership of the returned stream clear
...
svn-id: r36014
2009-01-23 03:41:36 +00:00
Eugene Sandulenko
696897b058
Whoa! Removing trailing spaces.
...
svn-id: r35648
2009-01-01 15:06:43 +00:00
Max Horn
b3e72347a3
Improved ZipArchive to take arbitrary SeekableReadStream; also, the variant which is inited using a filename now uses SearchMan to lookup the filename's file
...
svn-id: r34899
2008-11-04 20:04:25 +00:00
Johannes Schickel
282ebbb0e5
Commit of patch #2207782 "ARCHIVE: New method 'getMember'".
...
svn-id: r34871
2008-11-01 12:49:29 +00:00
Vicent Marti
bb619b4578
- Fixed theme loading from Zip files.
...
- Changed Common::ZipArchive to use FSNodes instead of full paths (external API unchanged).
svn-id: r34761
2008-10-09 17:56:07 +00:00
Johannes Schickel
e417471177
Committed slightly modified patch #2034983 "Case-insensitivy and directory handling for engines".
...
svn-id: r34734
2008-10-03 16:57:40 +00:00
Max Horn
c7fde102e3
Renamed FilesystemNode -> FSNode
...
svn-id: r34716
2008-10-02 16:58:59 +00:00
Vicent Marti
87917e06d9
Fixed functionality of ZipArchive::getAllNames(). Now it expects a possibly non-empty string list and returns the amount of new filenames added to it.
...
svn-id: r34698
2008-09-30 11:53:37 +00:00
Vicent Marti
d11fa6484a
Ported ZipArchive::getAllNames() implementation from GUI branch.
...
svn-id: r34691
2008-09-29 22:29:07 +00:00
Max Horn
65ef827349
Perform error checking when reading from a ZIP file
...
svn-id: r34634
2008-09-23 10:10:29 +00:00
Max Horn
20aea4e5fa
cleanup
...
svn-id: r34633
2008-09-23 10:08:45 +00:00
Max Horn
9216eeabce
Moved ZipArchive to namespace Common; moved unzip internals from unzip.h to unzip.cpp (to be cleaned up)
...
svn-id: r34632
2008-09-23 09:50:03 +00:00
Max Horn
bfdff06e32
Moved ZipArchive implementation into unzip.cpp, added new ZipArchive::isOpen method
...
svn-id: r34630
2008-09-23 09:39:37 +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
Kostas Nakos
31b77a48ee
some source formatting fixes
...
svn-id: r29297
2007-10-28 17:45:34 +00:00
Nicola Mettifogo
258901bab9
Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
...
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
218e132e37
Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
...
svn-id: r27024
2007-05-30 21:56:52 +00:00
Chris Apers
5b214090f7
Renamed crc32 which conflicts with Tapwave system function
...
svn-id: r25692
2007-02-18 17:47:24 +00:00
Oystein Eftevaag
0aa06392f8
Applied the patch included in bug rep [ 1503716 ] Leak in File::Open (on OS X) and unzOpen (on all)
...
svn-id: r23019
2006-06-11 02:23:17 +00:00
Max Horn
a4338aeb19
Use File::size to determine the size of a file, instead of doing a seek(0, SEEK_END)
...
svn-id: r22184
2006-04-26 14:35:53 +00:00
Max Horn
36934b611d
Change CVS keywords to SVN keywords
...
svn-id: r20510
2006-02-11 09:53:53 +00:00
Eugene Sandulenko
fef533e93e
Proper RCS IDs
...
svn-id: r20236
2006-01-27 19:05:24 +00:00
Johannes Schickel
5051b080a2
- adds the new gui renderer also a new implementation for the classic gui
...
- adds a ImageMan and ImageDec class for loading and managing image files
- adds a loader for zip files which is used by the new theme and the image manager
- changes the widgets to use the new gui code
- changes the scumm dialogs to use the new gui code
- fixes a #include problem in the sky debugger with the new gui code
To use the new gui copy gui/themes/default-theme.zip to your extrapath.
If the theme zip can not be found the gui will fallback to the classic theme.
If you want to change the gui styles use "gui_theme=classic" for the classic theme
and "gui_theme=default-theme" for the new theme.
Thanks to eriktorbjorn for testing and help with the new theme and to sev for
reviewing this patch.
svn-id: r20227
2006-01-27 15:43:23 +00:00