Package: fbterm / 1.7-4

0001-Fix-build-with-gcc-6.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From 69917d25c6f718572433262d86691bf24e72e4c8 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Date: Wed, 13 Jul 2016 12:02:10 +0900
Subject: [PATCH] Fix build with gcc-6

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 src/lib/vterm.cpp        |  4 ++--
 src/lib/vterm_states.cpp | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/lib/vterm.cpp b/src/lib/vterm.cpp
index 3a5dcc7..f79f44c 100644
--- a/src/lib/vterm.cpp
+++ b/src/lib/vterm.cpp
@@ -68,13 +68,13 @@ u8 VTerm::control_map[MAX_CONTROL_CODE], VTerm::escape_map[NR_STATES][MAX_ESCAPE
 
 void VTerm::init_state()
 {
-	for (u8 i = 1; control_sequences[i].code != (u16)-1; i++) {
+	for (u8 i = 1; control_sequences[i].code != (u16)0xFFFF; i++) {
 		control_map[control_sequences[i].code] = i;
 	}
 
 	u8 state = ESnormal;
 	for (u8 i = 1; ; i++) {
-		if (escape_sequences[i].code == (u16)-1) {
+		if (escape_sequences[i].code == (u16)0xFFFF) {
 			state++;
 			if (state == NR_STATES) break;
 		} else {
diff --git a/src/lib/vterm_states.cpp b/src/lib/vterm_states.cpp
index 49e7588..6aaa8b3 100644
--- a/src/lib/vterm_states.cpp
+++ b/src/lib/vterm_states.cpp
@@ -39,14 +39,14 @@ const VTerm::Sequence VTerm::control_sequences[] = {
 	{ 0x1B, 0,	ESesc },
 	{ 0x7F, 0,	ESkeep },
 	{ 0x9B, 0,	ESsquare },
-	{ -1}
+	{ 0xFFFF}
 };
 
 const VTerm::Sequence VTerm::escape_sequences[] = {
 	{   0, 0, ESnormal },
 
 	// ESnormal
-	{ -1 },
+	{ 0xFFFF },
 
 	// ESesc
 	{ '[', &VTerm::clear_param,	ESsquare },
@@ -65,7 +65,7 @@ const VTerm::Sequence VTerm::escape_sequences[] = {
 	{ '8', &VTerm::restore_cursor,	ESnormal },
 	{ '>', &VTerm::keypad_numeric,	ESnormal },
 	{ '=', &VTerm::keypad_application,	ESnormal },
-	{ -1 },
+	{ 0xFFFF },
 
 	// ESsquare
 	{ '[', 0,	ESfunckey },
@@ -104,7 +104,7 @@ const VTerm::Sequence VTerm::escape_sequences[] = {
 	{ '`', &VTerm::cursor_position_col,	ESnormal },
 	{ ']', &VTerm::linux_specific, ESnormal },
 	{ '}', &VTerm::fbterm_specific, ESnormal },
-	{ -1 },
+	{ 0xFFFF },
 
 	// ESnonstd
 	{ '0' | ADDSAME(9), &VTerm::set_palette,    ESkeep },
@@ -112,25 +112,25 @@ const VTerm::Sequence VTerm::escape_sequences[] = {
 	{ 'a' | ADDSAME(5), &VTerm::set_palette,    ESkeep },
 	{ 'P', &VTerm::begin_set_palette, ESkeep },
 	{ 'R', &VTerm::reset_palette, ESnormal },
-	{ -1 },
+	{ 0xFFFF },
 
 	// ESpercent
 	{ '@', &VTerm::clear_utf8,	ESnormal },
 	{ 'G', &VTerm::set_utf8,	ESnormal },
 	{ '8', &VTerm::set_utf8,	ESnormal },
-	{ -1 },
+	{ 0xFFFF },
 
 	// EScharset
 	{ '0', &VTerm::set_charset, ESnormal },
 	{ 'B', &VTerm::set_charset, ESnormal },
 	{ 'U', &VTerm::set_charset, ESnormal },
 	{ 'K', &VTerm::set_charset, ESnormal },
-	{ -1 },
+	{ 0xFFFF },
 
 	// EShash
 	{ '8', &VTerm::screen_align,	ESnormal },
-	{ -1 },
+	{ 0xFFFF },
 
 	// ESfunckey
-	{ -1 },
+	{ 0xFFFF },
 };
-- 
2.8.1