Commit Graph

19 Commits

Author SHA1 Message Date
Cameron Cawley
4016cffd7a COMMON: Make strdup a forbidden symbol 2018-08-18 16:30:05 +02:00
Peter Kohaut
652c29914b BUILD: Fixed mingw-w64 32 bits build 2017-03-10 00:07:09 +01:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01: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
Johannes Schickel
b0ba4b01a4 COMMON: Add wrapper for isprint.
This is done in the spirit of 658080deed.
2012-12-13 21:08:47 +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
dhewg
77c9be7998 COMMON: Fix compilation with mingw-w64
setjmp and longjmp are being used in system headers.
Allow these symbols globally instead of hacking the appropriate
defines in every file including windows.h.
2012-01-23 18:22:50 +01:00
Julien
53c4a190fc COMMON: Add abort() to the list of forbidden symbols 2011-06-23 15:11:38 +08:00
Max Horn
0403cfc060 COMMON: Attempt to make 'forbidden symbol' error more helpful 2011-06-06 17:10:03 +02:00
Max Horn
0a2fb9a465 COMMON: Make more symbols forbidden 2011-06-06 17:05:35 +02:00
Max Horn
c82f117488 COMMON: Add putc(har) and getc(har) to forbidden symbols
Sorry, buildbot...
2011-05-24 00:19:32 +02:00
Max Horn
20cad6e8b6 COMMON: Modify Base::processSettings, get rid of Common::kArgumentNotProcessed
Instead of defining a hacked up Common::Error code, split the return
value of processSettings into two parts: An error code, and a value
which indicates whether the specified command was completely handled
by processSettings or not.
2011-05-23 19:39:25 +02:00
Max Horn
6f6051a9e1 COMMON: Mark more symbols as forbidden 2011-05-23 19:12:26 +02:00
Max Horn
9b2ef340dc COMMON: Forbid use of some more symbols 2011-05-17 12:58:34 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
2fa63ca015 COMMON: Forbid use of getcwd&getwd; add macro to enable unistd.h compatibility 2011-05-03 14:30:25 +02:00
Max Horn
59e77ed667 ALL: Mark printf and various other symbols as forbidden
Right now, a few places in the frontend code still use printf and
consorts. We mark the affected files with a FIXME for now, and
add a dedicated exception for each. To be fixed!

Also tweak FORBIDDEN_SYMBOL_REPLACEMENT to hopefully really always
enforce a compiler error
2011-05-02 16:31:31 +02:00
Max Horn
e67ab53d89 COMMON: Document forbidden.h
svn-id: r53990
2010-10-31 21:50:20 +00:00
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00