void-packages/srcpkgs/fbterm/patches/fix-gcc6-narrowing.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

76 lines
1.8 KiB
Diff

--- a/src/lib/vterm_states.cpp 2015-05-09 08:36:45.000000000 +0200
+++ b/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 },
};