aboutsummaryrefslogtreecommitdiff
path: root/common/forbidden.h
AgeCommit message (Collapse)Author
2011-06-06COMMON: Attempt to make 'forbidden symbol' error more helpfulMax Horn
2011-06-06COMMON: Make more symbols forbiddenMax Horn
2011-05-24COMMON: Add putc(har) and getc(har) to forbidden symbolsMax Horn
Sorry, buildbot...
2011-05-23COMMON: Modify Base::processSettings, get rid of Common::kArgumentNotProcessedMax Horn
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-23COMMON: Mark more symbols as forbiddenMax Horn
2011-05-17COMMON: Forbid use of some more symbolsMax Horn
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-05-03COMMON: Forbid use of getcwd&getwd; add macro to enable unistd.h compatibilityMax Horn
2011-05-02ALL: Mark printf and various other symbols as forbiddenMax Horn
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
2010-10-31COMMON: Document forbidden.hMax Horn
svn-id: r53990
2010-10-30ALL: Add code to help stop people from accidentally using "bad" APIsMax Horn
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