lib/vterm_states: fix C++11 compliance
In C++11, narrowing a type is no longer allowed in structure
results in the gcc-6 to whine out loudly, and fail:
error: narrowing conversion of ‘-1’ from ‘int’ to ‘u16 {aka short unsigned int}’ inside { } [-Wnarrowing]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN fbterm-1.7.0.orig/src/lib/vterm_states.cpp fbterm-1.7.0/src/lib/vterm_states.cpp
--- fbterm-1.7.0.orig/src/lib/vterm_states.cpp 2010-10-06 06:23:08.000000000 +0200
+++ fbterm-1.7.0/src/lib/vterm_states.cpp 2016-08-13 16:54:29.495451127 +0200
#define ADDSAME(len) ((len) << 8)
+#define ENDSEQ { ((u16)-1) }
const VTerm::Sequence VTerm::control_sequences[] = {
const VTerm::Sequence VTerm::escape_sequences[] = {
{ '[', &VTerm::clear_param, ESsquare },
{ '8', &VTerm::restore_cursor, ESnormal },
{ '>', &VTerm::keypad_numeric, ESnormal },
{ '=', &VTerm::keypad_application, ESnormal },
{ '`', &VTerm::cursor_position_col, ESnormal },
{ ']', &VTerm::linux_specific, ESnormal },
{ '}', &VTerm::fbterm_specific, ESnormal },
{ '0' | ADDSAME(9), &VTerm::set_palette, ESkeep },