void-packages/srcpkgs/pilot-link/patches/fix-const_uchar.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

33 lines
978 B
Diff

--- a/libpisock/address.c 2007-01-15 01:29:59.000000000 +0100
+++ b/libpisock/address.c 2016-12-20 13:51:16.230458809 +0100
@@ -209,7 +209,7 @@
size_t i,
destlen = 4 + 16 * 22 + 2 + 2;
- unsigned char *start = record;
+ const unsigned char *start = record;
unsigned long r;
ai->type = address_v1;
--- a/libpisock/memo.c 2007-01-15 01:30:00.000000000 +0100
+++ b/libpisock/memo.c 2016-12-20 13:55:47.344644240 +0100
@@ -122,7 +122,7 @@
size_t len)
{
int i = unpack_CategoryAppInfo(&appinfo->category, record, len);
- unsigned char *start = record;
+ const unsigned char *start = record;
appinfo->type = memo_v1;
--- a/libpisock/todo.c 2007-01-15 01:30:00.000000000 +0100
+++ b/libpisock/todo.c 2016-12-20 14:33:36.738559189 +0100
@@ -232,7 +232,7 @@
unpack_ToDoAppInfo(ToDoAppInfo_t *appinfo, const unsigned char *record, size_t len)
{
int i;
- unsigned char *start = record;
+ const unsigned char *start = record;
appinfo->type = todo_v1;