Merge latest changes.  Probably not working.
g_bind.cpp now compiles (KeyBindingsSubSystem refactoring)
Update the rest of the code to use the new keybindings subsystem.
Merge from trunk, everything compiles.
Merge from trunk.
* Add vi(m) modelines (tabs -> spaces, 3 space indents) to all .cpp and .h files
* Modify CMakeLists.txt to use FIND_PACKAGE(OpenGL) instead of FIND_LIBRARY
* Dynamically allocate the input event list, doubling the size if an overflow would ever occur
Merge from trunk
First commit of new interface system.  See kb-branch-changes.txt for a summary of changes made so far.

Preliminary testing indicates that very basic usage works, more testing is required and planned.
Revert big blob commit (2012-12-30T21:40:09Z!ladna@intldoomleague.net) before breaking it up into smaller pieces.
* Add Vim modelines to all source files (except Mac OS X and 3rd-party-ish stuff)
* Remove trailing whitespace from all source files (except Mac OS X and 3rd-party-ish stuff)
Fix dumb mistakes using the now-dynamically-allocated input event array.
Merge from trunk
* Restore old key bindings system.  The plan is to add the new system beside the old system, and transition interfaces (automap, intermission, finale, etc.) to the new system one by one.
* Fix some more mistakes with the events.
Control access to gamestate via new functions.
* Add the new bind & interface system side-by-side with the old system.
* Add the Print Screen and SysRq keys.
* FYI, the old bind system no longer saves command batches to keys.csc.
Make an effort to finish implementing the new bind system and interfaces.  The original plan was to upgrade each interface (AutoMap, Console, etc.) one at a time, but this is impossible because interfaces require the new bind system, which cannot exist in tandem with the old bind system.  Therefore, this is as piecemeal as it gets.
Rename g_newbind.* to g_bind.*.
Everything compiles happily; maybe one day I'll merge from trunk....... :D.