Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
djsrv
ba28d7fde6
ALL: Change listMatchingMembers pattern to a Path
...
This handles any potential differences in directory separators passed to
the function, as with the other Archive functions.
2021-08-09 17:47:30 -04:00
djsrv
2aa7e3e558
COMMON: Replace matchString pathMode with general wildcard exclusions
...
Different characters may need to be excluded for different path styles.
2021-08-09 17:43:12 -04:00
djsrv
7eb4841065
ALL: Use Path type in Archive functions
2021-08-07 10:44:37 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs
2021-04-15 21:20:36 +02:00
sluicebox
93eeffc84d
JANITORIAL: Update old bug tracker numbers
2021-03-03 02:15:05 +02:00
Thanasis Antoniou
0357293897
ANDROID: Fix crash due to adding '.' folder in SearchManager
2019-12-16 22:59:10 +02:00
Le Philousophe
d62bb15d71
COMMON: Add ignoreClashes flag to SearchSet and FSDirectory
...
This lets engine mute warnings about name clashes when there are useless
for its case. This will be used by Versailles as the tree has
directories with the same name at various places.
Files are duplicated too in different directories but are identical.
2019-11-03 00:44:23 +01:00
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
Eugene Sandulenko
940b2a20f1
Revert "COMMON: Change way the Singleton instances are instantiated"
...
This reverts commit eefa72afa1
.
With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat
eefa72afa1
COMMON: Change way the Singleton instances are instantiated
...
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Johannes Schickel
01d3d02679
COMMON: Fix formatting issues in archive.cpp.
2016-02-09 12:10:04 +01:00
Johannes Schickel
854e22b38b
COMMON: Make GPL headers consistent in themselves.
2014-02-18 02:39:33 +01:00
Alyssa Milburn
7840b5e4b9
COMMON: Add depth/flat parameters to addSubDirectoryMatching.
2013-06-06 21:41:14 +02: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
Christoph Mallon
23a0f5318c
JANITORIAL: Remove trailing empty lines.
2011-08-07 13:53:33 +02:00
Ori Avtalion
aa0f307e06
ALL: Require DECLARE_SINGLETON to be used in the Common namepsace
...
Silences the clang warning:
static data member specialization of '_singleton' must
originally be declared in namespace 'Common'; accepted as a C++0x
extension [-Wc++0x-extensions]
Wrapping "namespace Common {}" around the macro assignment causes clang
to complain about a spurious semicolon, and removing the semicolon at
the end of the macro causes some editors to misbehave.
Changing the requirement of using the macro in one namespace (the
global) to another (Common) seems a small price to pay to
silence a warning.
2011-06-30 22:41:41 +03:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +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
Max Horn
abe1959d36
COMMON: Simplify DECLARE_SINGLETON macro
...
This makes it possible to write
DECLARE_SINGLETON(foo);
instead of
DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.
svn-id: r54258
2010-11-16 08:23:13 +00:00
Johannes Schickel
40562798d6
Fix our DECLARE_SINGLETON macro to conform to the C++ specs.
...
We need to use a namespace Common { } there to make strict C++ compilers
like clang++ and comeau happy. I also added a slight comment about why
that is needed to the macro definition and a note that you need to use
it from the global namespace.
svn-id: r48254
2010-03-13 21:55:49 +00:00
Johannes Schickel
1ba750063c
Ooops...
...
svn-id: r46048
2009-11-21 20:26:55 +00:00
Johannes Schickel
e8c67bda4b
Change Archive::listMatchingMembers to match the pattern case-insensitively.
...
svn-id: r46046
2009-11-21 20:19:15 +00:00
Yotam Barnoy
1336b5464b
Fixed bug in archive.cpp that caused at least one engine (SAGA) not to work
...
svn-id: r44560
2009-10-03 20:12:44 +00:00
Johannes Schickel
c50940bbf4
Got rid of Common::File::addDefaultDirectory, instead implemented the solution proposed in "Case agnostic handling for directories (and files)" on -devel.
...
svn-id: r44266
2009-09-23 00:15:00 +00:00
Johannes Schickel
75113ad5f3
COMMON: Add "ignoreCase" parameter to matchString.
...
svn-id: r44265
2009-09-23 00:14:06 +00:00
Willem Jan Palenstijn
6e38259270
Add a 'flat' option to FSDirectory to allow searching recursively for files in subdirectories
...
svn-id: r41090
2009-06-01 00:01:32 +00:00
Max Horn
5181546c63
Rewrote Common::List iterator code to ensure const correctness is preserved.
...
We tried to implement the list iterators in a clever way, to reduce code
duplication. But this is essentially impossible to do properly, sadly --
this is one of the places where the ugly drawbacks of C++ really show.
As a consequence, our implementation had a bug which allowed one to
convert any const_iterator to an iterator, thus allowing modifying
elements of const lists.
This rewrite reintroduces code duplication but at least ensures that no
const list is written to accidentally.
Also fix some places which incorrectly used iterator instead of const_iterator
or (in the kyra code) accidentally wrote into a const list.
svn-id: r39279
2009-03-09 22:26:02 +00:00
Max Horn
d7b3c04588
Moved FSDirectory implementation from common/archive.cpp to common/fs.cpp
...
svn-id: r38824
2009-02-24 03:22:34 +00:00
Max Horn
9b45dd2849
Modified FSDirectory::lookupCache to return a FSNode *pointer*, so that we can distinguish between lookup failures and invalid cache entries. Also changed SearchSet::createReadStreamForMember to not use hasFile anymore, based on the assumption that any Archive::createReadStreamForMember implementation has to verify whether the member name is valid anyway (clarified the doxygen docs accordingly)
...
svn-id: r38787
2009-02-22 16:48:02 +00:00
Max Horn
f6de07921e
Changed Common::File and FSDirectory to invoke FSNode::exists a few times less, reducing overhead
...
svn-id: r38780
2009-02-22 04:40:10 +00:00
Max Horn
17014c4f47
Merged internal 'matchPath' method of class Archive into global matchString function (via an optional 'path mode' in the latter). Also changed Archive::listMatchingMembers to use path mode when matching, just like FSDirectory::listMatchingMembers
...
svn-id: r38277
2009-02-15 18:45:53 +00:00
Max Horn
7eaafd933f
Be paranoid about g_system being set
...
svn-id: r36131
2009-01-29 22:09:06 +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
Max Horn
87a2747744
Turned FSNode into a ArchiveMember subclass; removed the now obsolete FSDirectoryMember; moved FSDirectory from common/archive.h to common/fs.h
...
svn-id: r35578
2008-12-27 18:03:27 +00:00
Max Horn
2fec0a3088
Moved addDirectory from SearchManager to SearchSet; changed several places from using '++it' instead of 'it++' to iterate over a list (this is more efficient)
...
svn-id: r35576
2008-12-27 17:16:48 +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
Johannes Schickel
1f0b94a9ca
Committed slightly modified version of my patch at bug tracker item #2309974 "ALL: */? match path separator in FSDir::listMatchingMembers".
...
svn-id: r35450
2008-12-20 15:04:17 +00:00
Max Horn
ea3d4fe22d
cleanup
...
svn-id: r35381
2008-12-15 12:55:13 +00:00
Johannes Schickel
858de9b938
Formatting / Cleanup.
...
svn-id: r35141
2008-11-21 17:49:19 +00:00
Willem Jan Palenstijn
196e2cc92c
refactor inconsistent calls to cacheDirectoryRecursive
...
svn-id: r35140
2008-11-21 13:29:53 +00:00
Max Horn
a28b531ed0
Added ArchiveMember::getDisplayName() method; changed ArchiveMember::getName() to always return a name compatible with Archive::openFile()
...
svn-id: r35139
2008-11-21 12:17:35 +00:00
Nicola Mettifogo
71d7b5762a
Reverted my earlier commit r34926.
...
svn-id: r34930
2008-11-07 13:50:56 +00:00
Johannes Schickel
4cc5015fd0
Fixed leak when using SearchSet::add for an already existing name.
...
svn-id: r34928
2008-11-07 13:42:05 +00:00
Nicola Mettifogo
203db86869
Fixed leaks in SearchMan. Default directories are now added with the 'autoFree' parameter set to true.
...
svn-id: r34926
2008-11-07 11:09:16 +00:00
Johannes Schickel
282ebbb0e5
Commit of patch #2207782 "ARCHIVE: New method 'getMember'".
...
svn-id: r34871
2008-11-01 12:49:29 +00:00