pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/xclannad Fix const correctness.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4d0f1f1be41a
branches: trunk
changeset: 426077:4d0f1f1be41a
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Mar 26 02:33:34 2020 +0000
description:
Fix const correctness.
diffstat:
games/xclannad/distinfo | 5 ++-
games/xclannad/patches/patch-scn2k_scn2k__cmd.cc | 26 ++++++++++++++++++++++-
games/xclannad/patches/patch-scn2k_scn2k__impl.cc | 22 +++++++++++++++++++
3 files changed, 50 insertions(+), 3 deletions(-)
diffs (85 lines):
diff -r 4df13f8ef8e6 -r 4d0f1f1be41a games/xclannad/distinfo
--- a/games/xclannad/distinfo Thu Mar 26 02:33:15 2020 +0000
+++ b/games/xclannad/distinfo Thu Mar 26 02:33:34 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+$NetBSD: distinfo,v 1.2 2020/03/26 02:33:34 joerg Exp $
SHA1 (xclannad-7hc.tar.gz) = fbe63701a47a1bc90aca8ab8d0b41ca3b5c9d114
RMD160 (xclannad-7hc.tar.gz) = a7bea485587c59d7797aa1bde01f0eb963122d02
@@ -8,8 +8,9 @@
SHA1 (patch-font_font__peer__ft2.cc) = cb40078c701d1bf6c5113d21890ed8d9fbb18b62
SHA1 (patch-font_text__stream.cc) = 27b2812c199f69f4d58cc9324c9aa56b713b5abe
SHA1 (patch-music2_music.cc) = fe8c90d9901a86dc6c799a1482ffe8ca7ca53c98
-SHA1 (patch-scn2k_scn2k__cmd.cc) = cd13290660eab7748998e46782e751748f8d4685
+SHA1 (patch-scn2k_scn2k__cmd.cc) = b0710214e612a45fed159169ee36c0ab0126ab81
SHA1 (patch-scn2k_scn2k__grp.cc) = cf0c7efa5fcac698873665b9b51f98b62344fb1d
+SHA1 (patch-scn2k_scn2k__impl.cc) = 197b876d15608ba65cf4ea527bf7e108d3007ad5
SHA1 (patch-scn2k_scn2k__text.cc) = aef8170b267a5a2b3f9ddbe9246fbdab8d0856cb
SHA1 (patch-system_file.cc) = dd68b7bd6ec97961e1e367bbbb505ee3e6f0347e
SHA1 (patch-system_file.h) = f5a759c4716b8ecdb84672de017cb92dbe36e058
diff -r 4df13f8ef8e6 -r 4d0f1f1be41a games/xclannad/patches/patch-scn2k_scn2k__cmd.cc
--- a/games/xclannad/patches/patch-scn2k_scn2k__cmd.cc Thu Mar 26 02:33:15 2020 +0000
+++ b/games/xclannad/patches/patch-scn2k_scn2k__cmd.cc Thu Mar 26 02:33:34 2020 +0000
@@ -1,10 +1,34 @@
-$NetBSD: patch-scn2k_scn2k__cmd.cc,v 1.1 2020/01/03 02:35:51 tsutsui Exp $
+$NetBSD: patch-scn2k_scn2k__cmd.cc,v 1.2 2020/03/26 02:33:34 joerg Exp $
- don't assume signed char for arm and powerpc
- fix wrong casts
--- scn2k/scn2k_cmd.cc.orig 2008-08-31 09:52:12.000000000 +0000
+++ scn2k/scn2k_cmd.cc
+@@ -261,9 +261,9 @@ void Flags::Load(const char* save) {
+ char buf[1024];
+ int n;
+ if (sscanf(save, "V<C>[%04d]=",&n) == 1) {
+- char* s = strchr(save, '=');
++ const char* s = strchr(save, '=');
+ s++;
+- char* send = strchr(s, '\n');
++ const char* send = strchr(s, '\n');
+ int slen = send - s;
+ strncpy(buf, s, slen);
+ buf[slen] = 0;
+@@ -330,9 +330,9 @@ void Flags::LoadSys(const char* save) {
+ char buf[1024];
+ int n;
+ if (sscanf(save, "V<M>[%04d]=",&n) == 1) {
+- char* s = strchr(save, '=');
++ const char* s = strchr(save, '=');
+ s++;
+- char* send = strchr(s, '\n');
++ const char* send = strchr(s, '\n');
+ int slen = send - s;
+ strncpy(buf, s, slen);
+ buf[slen] = 0;
@@ -372,8 +372,8 @@ bool Flags::Exec(Cmd& cmd) {
string s = cmd.Str(cmd.args[1]);
const char* sc = s.c_str();
diff -r 4df13f8ef8e6 -r 4d0f1f1be41a games/xclannad/patches/patch-scn2k_scn2k__impl.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xclannad/patches/patch-scn2k_scn2k__impl.cc Thu Mar 26 02:33:34 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-scn2k_scn2k__impl.cc,v 1.1 2020/03/26 02:33:34 joerg Exp $
+
+--- scn2k/scn2k_impl.cc.orig 2020-03-26 01:19:18.835162701 +0000
++++ scn2k/scn2k_impl.cc
+@@ -1268,7 +1268,7 @@ void Scn2k::LoadImpl(const char* save) {
+ sscanf(save, "Point=%d", &save_point);
+ } else if (strncmp(save, "Title=", 6) == 0) {
+ save += 6;
+- char* s = strchr(save, '\n');
++ const char* s = strchr(save, '\n');
+ if (s == 0) window_title = save;
+ else window_title.assign(save, s-save);
+ const char* config_name = config.GetParaStr("#CAPTION");
+@@ -1288,7 +1288,7 @@ void Scn2k::LoadImpl(const char* save) {
+ stack.push_back( StackItem(scn, pt));
+ } else if (strncmp(save, "StackStr=", 9) == 0) {
+ save += 9;
+- char* s = strchr(save, '\n');
++ const char* s = strchr(save, '\n');
+ if (s == 0) stack_strbuffer.push_back("");
+ else stack_strbuffer.push_back(string(save, s-save));
+ } else if (strncmp(save, "Cmd=", 4) == 0) {
Home |
Main Index |
Thread Index |
Old Index