Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/gcvs Fix const use around string functions



details:   https://anonhg.NetBSD.org/pkgsrc/rev/067742992b44
branches:  trunk
changeset: 429162:067742992b44
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Apr 17 00:21:56 2020 +0000

description:
Fix const use around string functions

diffstat:

 devel/gcvs/distinfo                            |   8 ++++++--
 devel/gcvs/patches/patch-af                    |  22 ++++++++++++++++++++--
 devel/gcvs/patches/patch-common_AppGlue.cpp    |  13 +++++++++++++
 devel/gcvs/patches/patch-common_CvsArgs.cpp    |  22 ++++++++++++++++++++++
 devel/gcvs/patches/patch-common_TextBinary.cpp |  13 +++++++++++++
 devel/gcvs/patches/patch-rf_umenu.cpp          |  22 ++++++++++++++++++++++
 6 files changed, 96 insertions(+), 4 deletions(-)

diffs (155 lines):

diff -r 2275e4346d2f -r 067742992b44 devel/gcvs/distinfo
--- a/devel/gcvs/distinfo       Fri Apr 17 00:21:17 2020 +0000
+++ b/devel/gcvs/distinfo       Fri Apr 17 00:21:56 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2015/11/03 03:27:27 agc Exp $
+$NetBSD: distinfo,v 1.14 2020/04/17 00:21:56 joerg Exp $
 
 SHA1 (gcvs-1.0.tar.gz) = 42b2469d0a9acc0e69a127b44000cd1b11bb895e
 RMD160 (gcvs-1.0.tar.gz) = 195698283848cd1f22d00eb37df7dd0f6b52cffc
@@ -13,7 +13,7 @@
 SHA1 (patch-ac) = d3aea42a044fab09542cbda6956f4bdcb5a05f0b
 SHA1 (patch-ad) = 595277d9fcf9f4bc62637beae6bf5b9e70a0fb7d
 SHA1 (patch-ae) = acc2f668834409f379403b08e67ccc0ce4e1ff18
-SHA1 (patch-af) = 6048ade2cb3fe3fda6332159099190e5d8377e23
+SHA1 (patch-af) = 208ecfdc4af4b1fbfa3d1cbb8af01b2cccb48f0d
 SHA1 (patch-ag) = 495ec4b0b6e54834b2c54facd9ad1f853be188df
 SHA1 (patch-ah) = fa23ed2155af00d85cfe62d15c01dc77c9ddb55c
 SHA1 (patch-ai) = c349a5c49d8e0a481a4dd7eb56b713475b3c9e67
@@ -29,8 +29,11 @@
 SHA1 (patch-as) = c56bf78b4b72ff39eabc6011dce65c2e5650baa2
 SHA1 (patch-at) = 9ab6cef9e6122b2f2b4148be1610948f9764b387
 SHA1 (patch-au) = 62e0a709039fc73ea131a975fd4a4cbd9e5b134e
+SHA1 (patch-common_AppGlue.cpp) = 136104d0d4bbb90f74a1bd20251ed685f9fdf7c7
 SHA1 (patch-common_AppGlue.h) = 3ddf2f3cb842cd159407a232bc2122c2c89a5863
+SHA1 (patch-common_CvsArgs.cpp) = e8e13b823ac0718a499ff0e5500ef7241b80f9bb
 SHA1 (patch-common_Persistent.h) = 4df5170a64a6d3135cb4bb5aad90b4f86f2ed1b9
+SHA1 (patch-common_TextBinary.cpp) = c8f62175cb6470d333c005c053780555e1588d0a
 SHA1 (patch-common_UCvsConsole.cpp) = 276990c24811183c682410f4324f9e93de356931
 SHA1 (patch-common_getline_c) = 038fb5200c692e4b4d82041008b762a2bec55be2
 SHA1 (patch-common_getline_h) = ea1153a559b349da6083de7cd913840802c8caa9
@@ -40,3 +43,4 @@
 SHA1 (patch-cvsunix_lib_getline_h) = c717385903f2f36e992213cbc8f010d683858d5a
 SHA1 (patch-cvsunix_src_client.c) = 7f07bf41740470f3c6123a20dba9b005b5dca329
 SHA1 (patch-cvsunix_src_server.c) = dce0f6cd59df4dda7f5baf3222f222e1bd1d8deb
+SHA1 (patch-rf_umenu.cpp) = 2469c96295a5e0e1fdd8a446fcc0246736af7686
diff -r 2275e4346d2f -r 067742992b44 devel/gcvs/patches/patch-af
--- a/devel/gcvs/patches/patch-af       Fri Apr 17 00:21:17 2020 +0000
+++ b/devel/gcvs/patches/patch-af       Fri Apr 17 00:21:56 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-af,v 1.1 2004/09/08 16:21:53 wiz Exp $
+$NetBSD: patch-af,v 1.2 2020/04/17 00:21:56 joerg Exp $
 
---- common/UCvsFiles.cpp.orig  2002-08-13 13:46:40.000000000 +0200
+--- common/UCvsFiles.cpp.orig  2002-08-13 11:46:40.000000000 +0000
 +++ common/UCvsFiles.cpp
 @@ -1214,7 +1214,7 @@ int UCvsFiles::OnCmdUpone(void)
  {
@@ -20,3 +20,21 @@
        }
        else
        {
+@@ -2017,7 +2017,7 @@ static int revcmp(const char *rev1, cons
+       char *tmp;
+       int v1, v2;
+ 
+-      if((tmp = strchr(r1, '.')) != 0L)
++      if((tmp = strchr((char *)r1, '.')) != 0L)
+       {
+               tmp[0] = '\0';
+               q1 = tmp + 1;
+@@ -2025,7 +2025,7 @@ static int revcmp(const char *rev1, cons
+ 
+       v1 = atoi(r1);
+ 
+-      if((tmp = strchr(r2, '.')) != 0L)
++      if((tmp = strchr((char *)r2, '.')) != 0L)
+       {
+               tmp[0] = '\0';
+               q2 = tmp + 1;
diff -r 2275e4346d2f -r 067742992b44 devel/gcvs/patches/patch-common_AppGlue.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gcvs/patches/patch-common_AppGlue.cpp       Fri Apr 17 00:21:56 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-common_AppGlue.cpp,v 1.1 2020/04/17 00:21:56 joerg Exp $
+
+--- common/AppGlue.cpp.orig    2020-04-16 19:58:12.070945815 +0000
++++ common/AppGlue.cpp
+@@ -260,7 +260,7 @@ CVS_EXTERN_C const char *glue_getenv(cha
+               // extract from the cvsroot
+               const char *ccvsroot = gCvsPrefs;
+               ccvsroot = Authen::skiptoken(ccvsroot);
+-              char *login = strchr(ccvsroot, '@');
++              const char *login = strchr(ccvsroot, '@');
+               if(login == NULL)
+               {
+                       // for WIN32 this means the CVSROOT is local
diff -r 2275e4346d2f -r 067742992b44 devel/gcvs/patches/patch-common_CvsArgs.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gcvs/patches/patch-common_CvsArgs.cpp       Fri Apr 17 00:21:56 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-common_CvsArgs.cpp,v 1.1 2020/04/17 00:21:56 joerg Exp $
+
+--- common/CvsArgs.cpp.orig    2020-04-16 19:55:52.305420243 +0000
++++ common/CvsArgs.cpp
+@@ -198,7 +198,7 @@ void CvsArgs::print(const char *indirect
+       {
+               CStr newarg;
+               newarg = argv[i];
+-              bool hasLF = strchr(newarg, '\n') != 0L;
++              bool hasLF = strchr((const char *)newarg, '\n') != 0L;
+               size_t len = newarg.length();
+ 
+               if(len > MAX_PRINT_ARG)
+@@ -207,7 +207,7 @@ void CvsArgs::print(const char *indirect
+               if(hasLF)
+                       newarg = expandLF(newarg, buf);
+ 
+-              bool hasSpace = strchr(newarg, ' ') != 0L;
++              bool hasSpace = strchr((const char *)newarg, ' ') != 0L;
+               if(hasSpace)
+                       cvs_out("\"");
+               cvs_outstr(newarg, newarg.length());
diff -r 2275e4346d2f -r 067742992b44 devel/gcvs/patches/patch-common_TextBinary.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gcvs/patches/patch-common_TextBinary.cpp    Fri Apr 17 00:21:56 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-common_TextBinary.cpp,v 1.1 2020/04/17 00:21:56 joerg Exp $
+
+--- common/TextBinary.cpp.orig 2020-04-16 19:58:28.460381420 +0000
++++ common/TextBinary.cpp
+@@ -463,7 +463,7 @@ bool SplitPath(const char *dir, CStr & u
+ 
+ void GetExtension(const char *file, CStr & base, CStr & ext)
+ {
+-      char *tmp = strrchr(file, '.');
++      const char *tmp = strrchr(file, '.');
+ 
+       if(tmp == 0L)
+       {
diff -r 2275e4346d2f -r 067742992b44 devel/gcvs/patches/patch-rf_umenu.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gcvs/patches/patch-rf_umenu.cpp     Fri Apr 17 00:21:56 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-rf_umenu.cpp,v 1.1 2020/04/17 00:21:56 joerg Exp $
+
+--- rf/umenu.cpp.orig  2020-04-16 20:01:12.335654114 +0000
++++ rf/umenu.cpp
+@@ -254,7 +254,7 @@ static void GetMenuTitle(const char *nam
+       // get the accelerator
+       UStr copy(name);
+       char *tmp;
+-      if((tmp = strchr(copy, '\t')) != 0L)
++      if((tmp = strchr((char *)copy, '\t')) != 0L)
+       {
+               *tmp++ = '\0';
+               if(strncmp(tmp, CTRLALT_STROKE, strlen(CTRLALT_STROKE)) == 0)
+@@ -277,7 +277,7 @@ static void GetMenuTitle(const char *nam
+ 
+       title = name;
+ #ifndef WIN32
+-      if((tmp = strchr(title, '&')) != 0L)
++      if((tmp = strchr((char *)title, '&')) != 0L)
+       {
+               size_t l = tmp - (const char *)title;
+               memmove(&title[l], &title[l + 1], title.length() - l);



Home | Main Index | Thread Index | Old Index