void-packages/srcpkgs/nootka/patches/signed-char.patch
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: convert patches to -Np1
```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

50 lines
2.3 KiB
Diff

commit 17a9c38e654aa0b77c5387991cea1cd6d04c2517
Author: q66 <daniel@octaforge.org>
Date: Thu Jan 2 00:36:14 2020 +0100
fix build on systems with unsigned chars by default
diff --git src/libs/core/music/tkeysignature.cpp src/libs/core/music/tkeysignature.cpp
index 51ccf34..0024770 100644
--- a/src/libs/core/music/tkeysignature.cpp
+++ b/src/libs/core/music/tkeysignature.cpp
@@ -25,7 +25,7 @@
/*static*/
-const char TkeySignature::scalesDefArr[15][7] = {
+const signed char TkeySignature::scalesDefArr[15][7] = {
{-1,-1,-1,-1,-1,-1,-1}, // Cb/ab
{-1,-1,-1, 0,-1,-1,-1}, // Gb/eb
{ 0,-1,-1, 0,-1,-1,-1}, // Db/bb
@@ -43,8 +43,8 @@ const char TkeySignature::scalesDefArr[15][7] = {
{ 1, 1, 1, 1, 1, 1, 1}, // C#/a#
};
-const char TkeySignature::majorKeys[15] = { 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0 };
-const char TkeySignature::minorKeys[15] = { 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5 };
+const signed char TkeySignature::majorKeys[15] = { 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0 };
+const signed char TkeySignature::minorKeys[15] = { 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5 };
QString TkeySignature::majorNames[15] = { QString(), QString(), QString(), QString(), QString(),
QString(), QString(), QString(), QString(), QString(),
diff --git src/libs/core/music/tkeysignature.h src/libs/core/music/tkeysignature.h
index 6c98d66..676d3b9 100644
--- a/src/libs/core/music/tkeysignature.h
+++ b/src/libs/core/music/tkeysignature.h
@@ -43,13 +43,13 @@ public:
/** Array with definitions of each scale.
* @p scalesDefArr[7] is C-major/a-minor and has 7 times 0 (no accids).
* The order os from 7b [0] to 7# [15]*/
- static const char scalesDefArr[15][7];
+ static const signed char scalesDefArr[15][7];
/** Those smart arrays keep which note in @p scalesDefArr is 1-st in key scale.
* F.e. For G-major is @p majorKeys[8] = 4,
* like @p scalesDefArr[8][4] point on accid of a G note.
* This is faster way then calculate it and takes less memory.*/
- static const char majorKeys[15], minorKeys[15];
+ static const signed char majorKeys[15], minorKeys[15];
/** This method fulfills majorNames and minorNames arrays
* appropriate keys names depends on naming style