void-packages/srcpkgs/connman-ncurses/patches/lowercase-boolean.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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

39 lines
1.6 KiB
Diff

--- a/json_utils.c 2020-05-31 00:39:12.983378846 -0400
+++ b/json_utils.c 2020-05-31 00:39:26.062122347 -0400
@@ -81,7 +81,7 @@
key_is_trusted = json_object_object_get_ex(jtrusted, key,
&tmp_trusted);
- if (key_is_trusted == FALSE)
+ if (key_is_trusted == false)
return false;
res = __json_type_dispatch(val, tmp_trusted);
--- a/json_regex.c 2020-05-31 00:44:07.233613212 -0400
+++ b/json_regex.c 2020-05-31 00:48:33.307401463 -0400
@@ -22,6 +22,7 @@
#endif
#include <json.h>
+#include <stdbool.h>
#include "json_regex.h"
#include "keys.h"
@@ -62,7 +63,7 @@
json_object_object_add(jregex_agent_response, "Username", json_object_new_string("^([[:print:]]*)$"));
json_object_object_add(jregex_agent_response, "Password", json_object_new_string("^([[:print:]]*)$"));
- jregex_agent_retry_response = json_object_new_boolean(TRUE);
+ jregex_agent_retry_response = json_object_new_boolean(true);
// See commands.c __cmd_config_service for a better idea of the format.
jregex_config_service = json_object_new_object();
@@ -92,7 +93,7 @@
json_object_array_add(arr, json_object_new_string("^([[:print:]]*)$"));
json_object_object_add(tmp, key_serv_proxy_excludes, arr);
json_object_object_add(opt, key_serv_proxy_config, tmp);
- json_object_object_add(opt, key_serv_autoconnect, json_object_new_boolean(TRUE));
+ json_object_object_add(opt, key_serv_autoconnect, json_object_new_boolean(true));
arr = json_object_new_array();
json_object_array_add(arr, json_object_new_string("^([[:print:]]*)$"));
json_object_object_add(opt, key_serv_domains_config, arr);