Max Horn
4f8665fc83
COMMON: Move isFoo functions to namespace Common, add doxygen comments
2012-02-20 16:18:27 +01:00
Max Horn
658080deed
ALL: Avoid using is* macros from ctype.h
...
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00
Christoph Mallon
c6d5d74835
COMMON: Make constants actually const.
2011-08-07 15:19:07 +02: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
Littleboy
b694a78f62
ANALYSIS: Add static casts to is* functions
...
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00
Max Horn
da3fff8ab3
COMMON: Make use of Common::parseBool
2011-06-17 10:38:16 +02: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
Klaus Reimer
48dbbdcd74
COMMON: Fix usage of wrong variable when keymapper is active
2011-04-12 11:05:48 +02:00
dhewg
b84b56b248
COMMON: Remove newlines from debug()
...
They were interfering with my precious debug spew :P
2011-03-02 23:18:34 +01:00
Johannes Schickel
4ad14abef3
COMMON: Some style fixes in config-manager.cpp.
...
svn-id: r55315
2011-01-18 21:13:47 +00:00
Johannes Schickel
da6fdff421
COMMON: Some slight formatting fixes in config-manager.cpp.
...
svn-id: r55228
2011-01-13 16:38:14 +00:00
Yotam Barnoy
42c8cacde6
CONFIGMANAGER: small changes to support old config files with no 'gameId' keys. As discussed on -devel.
...
svn-id: r55222
2011-01-13 11:30:37 +00:00
Yotam Barnoy
77a6dc7046
CONFIG-MGR: added ability to add other non-game domains
...
The way we determine if a domain is a game domain or not when loading from the config file is by checking for a 'gameId' key. This required changing the method of loading somewhat. MiscDomains (ie. non-game domains) are saved to the config file before game domains but after the main domains.
This change shouldn't mess anything up but it could probably use a look-through just in case.
svn-id: r55060
2010-12-29 15:16:31 +00: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
Yotam Barnoy
fdc2a2cd81
CONFIGMAN: added defragmentation methods for one-plugin-at-a-time
...
One-plugin-at-a-time can have fragmentation caused by the ConfigManager if a game changes any configuration value. By reallocating and copying over the ConfigManager, we avoid this problem.
svn-id: r54243
2010-11-15 13:37:06 +00:00
Max Horn
f77b8aee75
COMMON: Switch ConfigManager::setInt & ConfigManager::registerDefault to use String::format
...
svn-id: r54009
2010-11-01 16:04:04 +00:00
Max Horn
7a85365004
COMMON: Change some (f)printf to debug calls; clenaup hashmap.h
...
svn-id: r54003
2010-11-01 16:00:53 +00:00
Max Horn
db7e69b258
CONFIG: Always sort 'scummvm' and keymapper domains first
...
svn-id: r52296
2010-08-23 10:00:40 +00:00
Max Horn
69b86db74c
Print message when creating new INI; don't rewrite it directly after reading.
...
Together with the r48651, this addresses bug #2983718 :
"Incomprehensible message for missing scummvm.ini"
svn-id: r48653
2010-04-13 10:08:17 +00:00
Max Horn
4bac9e1b75
COMMON: Cleanup ConfigManager code
...
* get rid of ConfigManager::_emptyString
* get rid of ConfigManager::Domain::get (use getVal instead)
* remove some dead code
svn-id: r48417
2010-03-29 20:31:23 +00:00
Max Horn
c934642bdb
COMMON: Move typedef StringList from str.h to new header str-array.h
...
This removes the dependency on array.h from str.h.
Also, begun migration from the confusing type name "StringList" to
the more appropriate StringArray.
svn-id: r48282
2010-03-18 15:09:24 +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
Max Horn
b0e02675e7
Get rid of Common::String::emptyString, and also of some port specific hackery (getting rid of certain global C++ objs)
...
svn-id: r46781
2009-12-30 23:01:36 +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
Eugene Sandulenko
7d79a092b5
Store global keymaps into a separate section
...
svn-id: r40427
2009-05-10 17:33:31 +00:00
Willem Jan Palenstijn
f23b6f91b7
typo
...
svn-id: r38440
2009-02-17 19:54:11 +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
e4b013f616
Renamed OSystem::openConfigFileForReading & openConfigFileForWriting to createConfigReadStream & createConfigWriteStream, in order to make it clear that the *caller* is responsible for deleting the streams (i.e., 'owns' them)
...
svn-id: r36013
2009-01-23 03:30:40 +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
d387206175
Pushed down some header deps
...
svn-id: r34845
2008-10-23 07:59:10 +00:00
Max Horn
c7fde102e3
Renamed FilesystemNode -> FSNode
...
svn-id: r34716
2008-10-02 16:58:59 +00:00
Max Horn
cdc66fc120
Fixing ConfigManager::loadConfigFile
...
svn-id: r34707
2008-09-30 15:42:19 +00:00
Max Horn
ad87f08192
Changed some code to use the new Stream::readLine() method
...
svn-id: r34318
2008-09-03 18:40:49 +00:00
Max Horn
39d2c3bdad
If no default config file is present, just don't load it, instead of crashing
...
svn-id: r33729
2008-08-09 22:42:03 +00:00
Max Horn
6377b8bdd5
New OSystem API for loading/storing default config file
...
svn-id: r33584
2008-08-03 16:54:18 +00:00
Max Horn
9034ce2a7c
Fix for bug #1972625 'ALL: On-the-fly targets are written to the config file'
...
svn-id: r33550
2008-08-02 22:32:32 +00:00
Max Horn
4632a33087
Revert my accidental commit of the OSystem changes (oops)
...
svn-id: r33456
2008-07-30 15:44:34 +00:00
Max Horn
fbe4f0dd48
Simplified advanced detector file sys scanning code
...
svn-id: r33455
2008-07-30 15:38:42 +00:00
Max Horn
bcac496615
CONFIGMAN: Store domains in the order they were added
...
svn-id: r33413
2008-07-29 16:12:42 +00:00
Max Horn
0be985ce83
Changed class File (and derived classes) to only support read-only access; added a new class DumpFile for writing
...
svn-id: r33412
2008-07-29 16:09:10 +00:00
Max Horn
ec1212eadf
Fix for bug #1971499 : ALL: config manager crashes when reading too long lines
...
svn-id: r33140
2008-07-20 16:52:25 +00:00
Max Horn
805f21e369
Removed Common::Array::contains()
...
svn-id: r31501
2008-04-14 12:11:10 +00:00
Oystein Eftevaag
deb6baf0db
Migration code for users updating to the 1.1.3 iPhone firmware, which has a different directory structure and permission setup
...
svn-id: r30761
2008-02-03 12:36:51 +00:00
Jordi Vilalta Prat
66e9d4f5e8
Removed trailing spaces.
...
svn-id: r30664
2008-01-27 19:47:41 +00:00
Oystein Eftevaag
05b5a493f8
Initial commit of the iPhone/iPod Touch backend
...
svn-id: r29488
2007-11-13 08:06:15 +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