setterm: use string utils to numeric parsing

Check the input numbers are numbers, which makes also the code shorter,
and user experience better as half invalid imputs will error.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: move show_tabs() and screendump() functions

Earlier the function was in the middle of option parsing code segment,
and screendump() required function prototype.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: remove usage comment segment

It is enough trouble to keep usage output aligned with getopt() parsing,
manual page, and bash-completion, so get rid of the unnecessary effort
duplication.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: add option control structure

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: add init_terminal() to make main() shorter

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: clean up screendump()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: remove devfs and /dev/vcsa0 support

The devfs files /dev/vcc/a* does not need to be supported, and vcsa0 has
not existed in years if ever.

Reference: http://lwn.net/Articles/65197/
Reference: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devices.txt?id=14186fea0cb06bc43181ce239efe0df6f1af260a#n260
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: make -msglevel 0 to work as is did earlier

Commit 3393c136 caused regression.  The klogctl() logging range is 1-8,
but the value 0 is special according to setterm.1 manual page.  It turns
on loging, same way as '-msg on' option.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: correct usage() bright color argument

This has been wrong since commit 2dc8716.  The bright is a prefix
attribute to other colors.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: improve perform_sequence() coding style

Delete pointless braces, new lines, and add spacing between operators.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: tell user when options does not effect

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: improve error messages

Reuse messages to make translation work easier.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: various visual terminal effects are not console specific

Setting colors, making line not to wrap, and so on can be attempted in
other than consoles.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: mark some options to be exclusive with each other

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: add set_blanking() action

This make over long perform_sequence() function a little bit shorter.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>