pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/xevil Match const correctness of C++ string.h



details:   https://anonhg.NetBSD.org/pkgsrc/rev/baaddd3e8c1e
branches:  trunk
changeset: 414337:baaddd3e8c1e
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Mar 26 02:33:57 2020 +0000

description:
Match const correctness of C++ string.h

diffstat:

 games/xevil/distinfo         |   6 +++---
 games/xevil/patches/patch-at |  13 ++++++++++++-
 games/xevil/patches/patch-au |  23 ++++++++++++++++++++---
 3 files changed, 35 insertions(+), 7 deletions(-)

diffs (78 lines):

diff -r 14aab7119f38 -r baaddd3e8c1e games/xevil/distinfo
--- a/games/xevil/distinfo      Thu Mar 26 02:33:34 2020 +0000
+++ b/games/xevil/distinfo      Thu Mar 26 02:33:57 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2016/05/07 09:57:53 joerg Exp $
+$NetBSD: distinfo,v 1.12 2020/03/26 02:33:57 joerg Exp $
 
 SHA1 (xevilsrc2.02r2.zip) = e9a262daffc7ee5c06196dc94cf35c199be86bbc
 RMD160 (xevilsrc2.02r2.zip) = dca82298ac2dfe66e4e92a02731bb6851563b67e
@@ -22,8 +22,8 @@
 SHA1 (patch-aq) = 2a781bd3118bda38244f7b7a0bb1a202a90c3983
 SHA1 (patch-ar) = 8be1ce3f1ed2bd55dfc77042fa5f62fc6b036903
 SHA1 (patch-as) = 4c4e4ef0e626b8f04a120c996ec155cacf0c0ddf
-SHA1 (patch-at) = 6344907d83f7e6ee426e60970de88a0dc1686f48
-SHA1 (patch-au) = f1092ff4228d4bb6f13e6aeb0ea70a5b4b9635b6
+SHA1 (patch-at) = 5a6bc7e322d87c79595d8bcfb10a86db0aa79044
+SHA1 (patch-au) = 31ca4e555c886388542a3440c2ed6df315df2f29
 SHA1 (patch-cmn_game.h) = 47db702d729158290118cf75a0c437362f9af1c3
 SHA1 (patch-cmn_streams.cpp) = bb32e15807cc5ff2289df2e1dc1c1661c8949ad4
 SHA1 (patch-cmn_world.cpp) = 7bae7dfe426bf7dcf06906d62cd60c50efe98d4f
diff -r 14aab7119f38 -r baaddd3e8c1e games/xevil/patches/patch-at
--- a/games/xevil/patches/patch-at      Thu Mar 26 02:33:34 2020 +0000
+++ b/games/xevil/patches/patch-at      Thu Mar 26 02:33:57 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-at,v 1.3 2012/10/26 20:21:33 joerg Exp $
+$NetBSD: patch-at,v 1.4 2020/03/26 02:33:57 joerg Exp $
 
 --- x11/serverping.cpp.orig    2003-03-22 21:55:12.000000000 +0000
 +++ x11/serverping.cpp
@@ -14,6 +14,17 @@
  #include "utils.h"
  #include "streams.h"
  #include "xetp_basic.h"
+@@ -112,8 +113,8 @@ ServerPing::ServerPing(int argc,char** a
+   }
+ 
+ 
+-  char* sString = argv[argc - 1];
+-  char* port = Utils::strchr(sString,':');
++  const char* sString = argv[argc - 1];
++  const char* port = Utils::strchr(sString,':');
+   // server:port
+   if (port) {
+     serverName = new char[port - sString + 1];
 @@ -355,7 +356,7 @@ void ServerPing::print_results_and_exit(
  
  
diff -r 14aab7119f38 -r baaddd3e8c1e games/xevil/patches/patch-au
--- a/games/xevil/patches/patch-au      Thu Mar 26 02:33:34 2020 +0000
+++ b/games/xevil/patches/patch-au      Thu Mar 26 02:33:57 2020 +0000
@@ -1,7 +1,24 @@
-$NetBSD: patch-au,v 1.1 2008/08/17 23:50:06 dholland Exp $
+$NetBSD: patch-au,v 1.2 2020/03/26 02:33:57 joerg Exp $
 
---- cmn/utils.h~       2003-03-19 10:03:50.000000000 -0500
-+++ cmn/utils.h        2008-08-17 19:21:44.000000000 -0400
+--- cmn/utils.h.orig   2003-03-19 10:03:50.000000000 +0000
++++ cmn/utils.h
+@@ -237,13 +237,13 @@ class Utils {
+   /* EFFECTS: Wrapper for C library strcmp().  Return 0 if strings are the
+      same. */
+ 
+-  static char* strchr(const char* cs,int c)
++  static const char* strchr(const char* cs,int c)
+     {return ::strchr(cs,c);}
+ 
+-  static char* strrchr(const char* cs,int c)
++  static const char* strrchr(const char* cs,int c)
+     {return ::strrchr(cs,c);}
+ 
+-  static char* strstr(const char* cs,const char* ct)
++  static const char* strstr(const char* cs,const char* ct)
+     {return ::strstr(cs,ct);}
+ 
+   static void strcpy(char* s,const char* ct)
 @@ -376,8 +376,10 @@ public:
    int get_write_length() const {return get_write_length(len);}
    /* EFFECTS: write_length of this list */



Home | Main Index | Thread Index | Old Index