summaryrefslogtreecommitdiff
path: root/user/mcpp/05-gniibe-fix-13.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-11-11 16:44:51 -0600
committerZach van Rijn <me@zv.io>2022-11-11 16:58:38 -0600
commitab1c259053596aaee4310a5e3f09591755e4ccf8 (patch)
tree7946463282d30de809ba08895558675f5a49acea /user/mcpp/05-gniibe-fix-13.patch
parent451e5cf47f3a45ebf46cad0940f07ef05324f4c5 (diff)
downloadpackages-ab1c259053596aaee4310a5e3f09591755e4ccf8.tar.gz
packages-ab1c259053596aaee4310a5e3f09591755e4ccf8.tar.bz2
packages-ab1c259053596aaee4310a5e3f09591755e4ccf8.tar.xz
packages-ab1c259053596aaee4310a5e3f09591755e4ccf8.zip
user/mcpp: pull miscellaneous patches. fixes #169.
Diffstat (limited to 'user/mcpp/05-gniibe-fix-13.patch')
-rw-r--r--user/mcpp/05-gniibe-fix-13.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/user/mcpp/05-gniibe-fix-13.patch b/user/mcpp/05-gniibe-fix-13.patch
new file mode 100644
index 000000000..717b16fe9
--- /dev/null
+++ b/user/mcpp/05-gniibe-fix-13.patch
@@ -0,0 +1,52 @@
+Description: Fix for a bug reported to sourceforge.net #13
+ by fixing error messages.
+ Also, fix erroneous messages.
+Author: NIIBE Yutaka
+
+Index: mcpp/src/support.c
+===================================================================
+--- mcpp.orig/src/support.c
++++ mcpp/src/support.c
+@@ -822,7 +822,7 @@ escape:
+ if (diag && iscntrl( c) && ((char_type[ c] & SPA) == 0)
+ && (warn_level & 1))
+ cwarn(
+- "Illegal control character %.0s0lx%02x in quotation" /* _W1_ */
++ "Illegal control character %.0s0x%02x in quotation" /* _W1_ */
+ , NULL, (long) c, NULL);
+ *out_p++ = c;
+ chk_limit:
+@@ -861,10 +861,10 @@ chk_limit:
+ if (mcpp_mode != POST_STD && option_flags.lang_asm) {
+ /* STD, KR */
+ if (warn_level & 1)
+- cwarn( unterm_char, out, 0L, NULL); /* _W1_ */
++ cwarn( unterm_char, NULL, (long)delim, NULL); /* _W1_ */
+ goto done;
+ } else {
+- cerror( unterm_char, out, 0L, skip); /* _E_ */
++ cerror( unterm_char, NULL, (long)delim, skip); /* _E_ */
+ }
+ } else {
+ cerror( "Unterminated header name %s%.0ld%s" /* _E_ */
+@@ -875,9 +875,9 @@ chk_limit:
+ if (mcpp_mode != POST_STD && option_flags.lang_asm) {
+ /* STD, KR */
+ if (warn_level & 1)
+- cwarn( empty_const, out, 0L, skip); /* _W1_ */
++ cwarn( empty_const, NULL, (long)delim, skip); /* _W1_ */
+ } else {
+- cerror( empty_const, out, 0L, skip); /* _E_ */
++ cerror( empty_const, NULL, (long)delim, skip); /* _E_ */
+ out_p = NULL;
+ goto done;
+ }
+@@ -1774,7 +1774,7 @@ not_comment:
+ default:
+ if (iscntrl( c)) {
+ cerror( /* Skip the control character */
+- "Illegal control character %.0s0x%lx, skipped the character" /* _E_ */
++ "Illegal control character %.0s0x%02x, skipped the character" /* _E_ */
+ , NULL, (long) c, NULL);
+ } else { /* Any valid character */
+ *tp++ = c;