void-packages/srcpkgs/fbterm/patches/fix-gcc6-narrowing.patch
2016-10-26 14:25:02 +02:00

76 lines
1.8 KiB
Diff

--- src/lib/vterm_states.cpp 2015-05-09 08:36:45.000000000 +0200
+++ src/lib/vterm_states.cpp 2016-10-26 14:21:02.409309316 +0200
@@ -22,6 +22,7 @@
#include "vterm.h"
#define ADDSAME(len) ((len) << 8)
+#define END_OF_LIST static_cast<u16>(-1)
const VTerm::Sequence VTerm::control_sequences[] = {
{ 0, 0, ESkeep },
@@ -39,14 +40,14 @@
{ 0x1B, 0, ESesc },
{ 0x7F, 0, ESkeep },
{ 0x9B, 0, ESsquare },
- { -1}
+ { END_OF_LIST }
};
const VTerm::Sequence VTerm::escape_sequences[] = {
{ 0, 0, ESnormal },
// ESnormal
- { -1 },
+ { END_OF_LIST },
// ESesc
{ '[', &VTerm::clear_param, ESsquare },
@@ -65,7 +66,7 @@
{ '8', &VTerm::restore_cursor, ESnormal },
{ '>', &VTerm::keypad_numeric, ESnormal },
{ '=', &VTerm::keypad_application, ESnormal },
- { -1 },
+ { END_OF_LIST },
// ESsquare
{ '[', 0, ESfunckey },
@@ -104,7 +105,7 @@
{ '`', &VTerm::cursor_position_col, ESnormal },
{ ']', &VTerm::linux_specific, ESnormal },
{ '}', &VTerm::fbterm_specific, ESnormal },
- { -1 },
+ { END_OF_LIST },
// ESnonstd
{ '0' | ADDSAME(9), &VTerm::set_palette, ESkeep },
@@ -112,25 +113,25 @@
{ 'a' | ADDSAME(5), &VTerm::set_palette, ESkeep },
{ 'P', &VTerm::begin_set_palette, ESkeep },
{ 'R', &VTerm::reset_palette, ESnormal },
- { -1 },
+ { END_OF_LIST },
// ESpercent
{ '@', &VTerm::clear_utf8, ESnormal },
{ 'G', &VTerm::set_utf8, ESnormal },
{ '8', &VTerm::set_utf8, ESnormal },
- { -1 },
+ { END_OF_LIST },
// EScharset
{ '0', &VTerm::set_charset, ESnormal },
{ 'B', &VTerm::set_charset, ESnormal },
{ 'U', &VTerm::set_charset, ESnormal },
{ 'K', &VTerm::set_charset, ESnormal },
- { -1 },
+ { END_OF_LIST },
// EShash
{ '8', &VTerm::screen_align, ESnormal },
- { -1 },
+ { END_OF_LIST },
// ESfunckey
- { -1 },
+ { END_OF_LIST },
};