Commit Graph
58 Commits
Author SHA1 Message Date
Strangerke 622dfcf950 SWORD25: Janitorial - Fix spacing errors 2013-11-24 18:52:48 +01:00
Eugene Sandulenko 8053989dd1 SWORD25: Remove explictit #includes
Makes Coverity happier.
2013-09-27 11:07:25 +03:00
Max Horn 4a55f52818 SWORD25: Silence warning in the Lua code
This fixes warnings like this that crop up when compiling sword25
with Apple clang 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
2013-04-18 17:09:32 +02:00
Filippos Karapetis 6286779d0a SWORD25: Fix some spacing in LUA 2013-02-03 18:18:43 +02:00
Filippos Karapetis afdb28b4e9 SWORD25: Replace calls to LUAI_THROW() with error() in LUA
This removes one of the uses of setjmp(), but its use in LUAI_TRY still
remains
2013-02-03 18:17:02 +02:00
Johannes Schickel 2773f5d7af COMMON: Forbid symbols for the rest of is* from ctype.h.
I also moved the isprint case to the correct position.

This adds a FIXME to our lua code from sword25, which uses iscntrl directly.
2012-12-13 21:08:48 +01:00
Christoph Mallon a64b5e2a77 ALL: Use GCC_ATLEAST(). 2012-03-17 20:09:49 +01:00
Max Horn 367131ef0e COMMON: Move Language and Platform functionality into separate files 2012-02-26 15:21:36 +01:00
Willem Jan Palenstijn 9ffe3e11d9 Merge pull request #182 from fingolfin/forbid-ctype
ALL: Avoid using is* macros from ctype.h
2012-02-21 11:33:32 -08:00
Max Horn 4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +01: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
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 23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02: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 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
eriktorbjorn 72aa426770 SWORD25: Fix locale-related bug when reading the volume settings
I don't really like this, but I can't think of any better way. It
seems that Lua doesn't like decimal comma at all, so we have to
format the volume settings with a decimal point instead. Otherwise,
all I'll ever get is either full volume or no volume, with nothing
in between.
2011-06-18 18:30:04 +02:00
eriktorbjorn a7234eef81 SWORD25: Fix getting volume settings from config file
The tests had been inverted, so that if there were config file
settings it would use the default settings instead.
2011-06-18 16:30:29 +02:00
Max Horn 0a2fb9a465 COMMON: Make more symbols forbidden 2011-06-06 17:05:35 +02:00
md5 984f53ac14 SWORD25 (LUA): Removed unused code for handling precompiled LUA scipts 2011-05-26 11:46:41 +03:00
Max Horn 2068bc1527 SWORD25: Fix warning: double format, float arg on DC 2011-05-26 08:22:36 +02:00
Max Horn 2c8a9b0e76 SWORD25: Avoid using strcoll 2011-05-26 08:14:57 +02:00
Matthew Hoops eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Max Horn fdf12c5c09 SWORD25: Remove more unused loadlib code + use of fopen
The functions loader_C and loader_Croot provably did not do anything
besides returning an error, so removing them was safe.

For loader_Lua, this was using luaL_loadfile. But that in turn now
uses Sword25FileProxy, which only supports loading config.lua,
and config.lua is not used via the loadlib mechanism.
Therefore, I deemed it safe to also remove this third loader.

This leaves loader_preload as only remaining loader. It is probably
unused, too, but I did not both to investigate further, as I already
achieved my primary goal (getting rid of fopen/fclose use).

All other removed functions were unused due to the removal of the
first three loader_* functions.
2011-05-25 13:01:06 +02:00
Max Horn 94122f7afb SWORD25: Remove unused Lua print stuff 2011-05-24 00:19:31 +02:00
Max Horn 6c5f50c246 COMMON: Add exit() to list of forbidden symbols 2011-05-23 19:39:26 +02:00
Max Horn e6c78b4f46 SWORD25: Include scummsys.h from lua.h, partially deal with the consequences
This should help mark the spots that are still non-portable, just follow
the FIXMEs.
2011-05-23 19:12:25 +02:00
Max Horn fa2c268d6a SWORD25: Replace some non-portable calls, add FIXMEs 2011-05-23 19:12:24 +02:00
Max Horn 252e7a1ec3 SWORD25: Fix ambiguous typing 2011-05-23 13:05:35 +02:00
Alyssa Milburn 9b43822a42 SWORD25: Fix error string parameter 2011-05-23 10:52:53 +02:00
Paul Gilbert c13275e657 SWORD25: Replaced accidental backslash in include filename 2011-05-23 18:50:57 +10:00
Paul Gilbert b5609eb4a1 SWORD25: Added proxy code for converting writing config.lua to update the ScummVM game settings 2011-05-23 18:41:17 +10:00
Paul Gilbert 3556875c49 SWORD25: Created proxy class that presents ScumMVM settings as a valid config.lua file 2011-05-23 18:41:16 +10:00
eriktorbjorn f6b3b72eae SWORD25: Don't assume that all locales use decimal point
The trydecpoint() function *is* used, though probably only in
countries which don't use a decimal point. We can't use the ISO C
locale functions here because they're not fully implemented on
some platforms, e.g. Android. Hopefully this method will work.
2011-05-20 18:34:42 +02:00
Paul Gilbert cbf7f740e4 SWORD25: Re-implement two LUA library I/O functions necessary for detecting and creating the config.lua configuration file 2011-05-20 18:45:33 +10:00
md5 5f583eda0d SWORD25 (LUA): Removed unused non-portable locale code 2011-05-15 13:46:22 +03:00
md5 b34e776e51 SWORD25 (LUA): Clarified the use of os_remove() 2011-05-15 11:25:46 +03:00
md5 cd54d761e1 SWORD25 (LUA): Disabled a lot of non-portable LUA functions
sword25 doesn't use these (thankfully)
2011-05-14 14:58:29 +03:00
md5 dcf9daf4cf SWORD25 (LUA): Some compilation optimizations
For Android, define stroll() inside luaconf.h
For PS2, don't use the visibility attribute, as the PS2 gcc isn't
particularly happy about it...
2011-05-14 12:32:34 +03:00
md5 ef96967285 SWORD25 (LUA): Whitespace fixes 2011-05-13 20:55:14 +03:00
md5 854783ea93 SWORD25 (LUA): Hopefully fixed compilation for the Android platform 2011-05-13 20:52:33 +03:00
D G Turner 2907f7d652 SWORD25: Fix MSVC Compilation. 2011-03-19 22:11:33 +00:00
dhewg 2def212de7 ALL: s/PI/M_PI/
Tip of the day: git grep -w PI
2011-03-19 11:24:06 +01:00
Eugene Sandulenko 4bc730f256 SWORD25: Strip off unportable functions
svn-id: r55319
2011-01-19 07:40:10 +00:00
Max Horn 44c6a90643 LUA: Tweak lua_ident to not conflict with SVN keywords (since this is not used at all, only used to 'mark' binaries compiling Lua in, I think we could safely remove it, too)
svn-id: r54056
2010-11-04 00:31:50 +00:00
Max Horn 0f7645dda9 Trying to fix weird keyword expansion quirk
svn-id: r54055
2010-11-04 00:13:23 +00:00
Max Horn ebf9911649 SWORD25: Work around for bug in Mac OS X 10.2 SDK
svn-id: r53604
2010-10-19 09:42:48 +00:00
Johannes Schickel 521751e8d7 SWORD25: Use const_cast to cast away constness.
This fixes a few warnings/errors in the LUA code. I added some FIXMEs at the
places where the casts happen, since usually this casting indicates bad
design.

svn-id: r53592
2010-10-18 22:17:18 +00:00
Eugene Sandulenko 3feac393b0 SWORD25: Renamed Lua .c files to .cpp and make it compilable
svn-id: r53568
2010-10-18 17:12:00 +00:00
Ori Avtalion e6ae9c4d98 SWORD25: Use C-style comments in C files
svn-id: r53538
2010-10-16 12:04:22 +00:00
Ori Avtalion ea9679cf72 SWORD25: Update svn keywords
svn-id: r53537
2010-10-16 12:02:59 +00:00