diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-18 21:10:35 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-18 22:48:20 +0100 |
commit | f2dca7de3e8b164a4b3af3d58dde2f6776bfbee6 (patch) | |
tree | 0385adfcf5b1bb0f5ec8790de3db67cf45b46e3a /INSTALL | |
parent | 65dc58466260320303c7af8c5c8a8bfe3b0802c8 (diff) | |
download | calcurse-f2dca7de3e8b164a4b3af3d58dde2f6776bfbee6.tar.gz calcurse-f2dca7de3e8b164a4b3af3d58dde2f6776bfbee6.zip |
calcurse.c: Refactor the main loop
Break up the big switch statement into several functions. The functions
are declared inline to avoid unnecessary function calls.
Also:
* Add a "KEY_HANDLER" macro can be used as a short version of a "case"
statement, followed by a function call.
* Declare several state variables global to avoid having to pass them to
each of the new handlers.
* Pass the pressed key to each of the handler functions in order not to
break handlers that handled more than one key before the handlers were
pulled out.
These three changes were introduced to keep this patch as atomic as
possible and are intended to be removed in following patches.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions