2b881cf4c6
Change 25 uses of errc() to err(). 2 of these were correct. 23 used errno for the arg so were just a verbose spelling of err(). 5 of these were just style bugs, and 18 depended on revert() saving errno. 1 warn() also depended on revert() saving errno. Remove 2 warnx()'s that duplicate the message from a later errx(). These used to be before returns, and should have reported errno in some cases. errno is also not reported for for openguess() failures. Only "restore" the video mode in revert() if the mode was just set (necessarily partially). Setting the mode to its current setting doesn't "restore" it, but resets it, with the least harmful change being to clear the screen. revert() is called even for some harmless syntax errors and usually did nothing except reset the mode. Now it usually does nothing. The only things that it tries to restore apart from the mode are the active vty number, the screen map, 2 colors that only need to be restored (only after a mode change) to fix kernel bugs, and 3 colors that can't be restored due to kernel bugs. (This is mostly for sc, since vt doesn't support mode changes.) revert() is not called for syntax and setting errors after [mode], so the mode reset is only done for failures to set raster mode after setting graphics mode. normal colors can only be set after [mode], and that is why reverting them should be unnecessary. |
||
---|---|---|
.. | ||
decode.c | ||
decode.h | ||
Makefile | ||
Makefile.depend | ||
path.h | ||
vidcontrol.1 | ||
vidcontrol.c |