Age | Commit message (Collapse) | Author |
|
|
|
Since lua_pushlightuserdata and lua_touserdata operate on (void *)
values, it is tricky to fix these warnings "correctly" without looking
at invasive changes to a significant amount of Lua internal code.
Since these pointers to consts are already being recast to drop the
const qualifications, then removing the const on the underlying value
declaration does not further expose this to change and stops the
compiler warnings associated with this.
Anyone with a better fix for this can restore the const
qualifications later.
|
|
I think these are the last one that were already flagged as being
deliberate.
|
|
|
|
|
|
The original was ignoring Lua errors in that scene and was
restoring the state with longjmp.
We are yet to see the platform compatibility, but Lua's code
is too tangled to make simple replacement with error() work.
Another possible alternative would be to rework the original
game scripts. We will do it if this commit is problematic.
|
|
|
|
|
|
Thanks to fingolfin for pointing out this unused code
|
|
PS2: Pull request to master for latest PS2 code
|
|
|
|
|
|
|
|
Makes Coverity happier.
|
|
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)
|
|
|
|
This removes one of the uses of setjmp(), but its use in LUAI_TRY still
remains
|
|
I also moved the isprint case to the correct position.
This adds a FIXME to our lua code from sword25, which uses iscntrl directly.
|
|
|
|
|
|
ALL: Avoid using is* macros from ctype.h
|
|
|
|
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)
|
|
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.
|
|
|
|
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
|
|
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]*$//'
|
|
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.
|
|
The tests had been inverted, so that if there were config file
settings it would use the default settings instead.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
This should help mark the spots that are still non-portable, just follow
the FIXMEs.
|
|
|
|
|
|
|
|
|
|
ScummVM game settings
|
|
config.lua file
|
|
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.
|
|
and creating the config.lua configuration file
|
|
|
|
|
|
sword25 doesn't use these (thankfully)
|
|
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...
|