pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/xnc Deal with abs and const issues.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d8ad86887a30
branches:  trunk
changeset: 427731:d8ad86887a30
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Apr 20 00:46:51 2020 +0000

description:
Deal with abs and const issues.

diffstat:

 sysutils/xnc/distinfo                                   |   9 ++++++-
 sysutils/xnc/patches/patch-src_bookmark.cxx             |  22 +++++++++++++++++
 sysutils/xnc/patches/patch-src_include_commonfuncs.h    |  13 ++++++++++
 sysutils/xnc/patches/patch-src_lib_tool_commonfuncs.cxx |  16 ++++++++++++
 sysutils/xnc/patches/patch-src_lib_vfs_afs.cxx          |  22 +++++++++++++++++
 sysutils/xnc/patches/patch-src_lib_vfs_ftpfs.cxx        |  13 ++++++++++
 sysutils/xnc/patches/patch-src_plugins_aqua_aquagui.cxx |  22 +++++++++++++++++
 sysutils/xnc/patches/patch-src_plugins_five_fivegui.cxx |  22 +++++++++++++++++
 8 files changed, 138 insertions(+), 1 deletions(-)

diffs (179 lines):

diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/distinfo
--- a/sysutils/xnc/distinfo     Mon Apr 20 00:46:22 2020 +0000
+++ b/sysutils/xnc/distinfo     Mon Apr 20 00:46:51 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2015/11/04 01:32:42 agc Exp $
+$NetBSD: distinfo,v 1.10 2020/04/20 00:46:51 joerg Exp $
 
 SHA1 (xnc-5.0.4.src.tar.gz) = 4673ba128f4df88342bfd4968a2427e894f6f3cb
 RMD160 (xnc-5.0.4.src.tar.gz) = 46366a75eca41f10f68ae7d4ad95b76ed4d576e2
@@ -8,4 +8,11 @@
 SHA1 (patch-ab) = 2ec2bbbc1eb542527c5e45756a10e91337b7719d
 SHA1 (patch-ak) = 8174f9791016fbaa179efbefa4971423677f7652
 SHA1 (patch-am) = 5522a4a41bf5e0512f38017c28300cc9529c9c23
+SHA1 (patch-src_bookmark.cxx) = 713abda8d075dc004bf396dee0f1e666e1c4bb92
+SHA1 (patch-src_include_commonfuncs.h) = f6ec3f86bd6938e07404ac9045e7c455ac6b0b5c
 SHA1 (patch-src_lib_image2_sdl__image_IMG__png.c) = 63b12a13d81a608c141f9383a4f745d14beaed1e
+SHA1 (patch-src_lib_tool_commonfuncs.cxx) = b521a5b5526d85bc6d8c8e63e781c0f6a4e30d09
+SHA1 (patch-src_lib_vfs_afs.cxx) = 1df148b20ee9962ec5b55bcac3b744b44a43654f
+SHA1 (patch-src_lib_vfs_ftpfs.cxx) = 106e33851c1d963b2b3b961d31e94ece531faa87
+SHA1 (patch-src_plugins_aqua_aquagui.cxx) = 858c2d7ca95711e9e88703fdd753f62b82945201
+SHA1 (patch-src_plugins_five_fivegui.cxx) = ae4b3b5fa1a472b01cc0f508a900aad33e828ac1
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_bookmark.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_bookmark.cxx       Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_bookmark.cxx,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/bookmark.cxx.orig      2020-04-19 23:17:54.222880929 +0000
++++ src/bookmark.cxx
+@@ -1243,7 +1243,7 @@ void   BookMark::click()
+           {
+             XDrawLine(disp, Main, rgc, rwx, rwy, rwx, rwy + h);
+             XDrawLine(disp, Main, rgc, rwx + 1, rwy, rwx + 1, rwy + h);
+-            if (abs(rwx - (Mainl - l) / 2) < STICKY_CENTER)
++            if (abs(rwx - int(Mainl - l) / 2) < STICKY_CENTER)
+               rwx = (Mainl - l) / 2;
+             if (rwx < (Mainl - l) * MIN_PERCENT / 100)
+               rwx = (Mainl - l) * MIN_PERCENT / 100;
+@@ -1277,7 +1277,7 @@ void   BookMark::click()
+           {
+             if (cx > leftrx && cx < rightrx)
+               {
+-                if (abs(cx - (Mainl - l) / 2) < STICKY_CENTER)
++                if (abs(cx - int(Mainl - l) / 2) < STICKY_CENTER)
+                   cx = (Mainl - l) / 2;
+                 XDrawLine(disp, Main, rgc, rwx, rwy, rwx, rwy + h);
+                 XDrawLine(disp, Main, rgc, rwx + 1, rwy, rwx + 1, rwy + h);
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_include_commonfuncs.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_include_commonfuncs.h      Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_include_commonfuncs.h,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/include/commonfuncs.h.orig     2020-04-19 23:21:50.091150267 +0000
++++ src/include/commonfuncs.h
+@@ -15,7 +15,7 @@ extern int   path_cmp(char *dir1, char *
+ extern int   path_to_fullpath(char* dest, char *srcdir);
+ extern void  add_path_content(char *curdir, const char *cont, int vms_host=0);
+ extern void  upper_path(char *curdir, int vms_host=0);
+-extern char* get_first_content(const char *curdir, char *cont);
++extern const char* get_first_content(const char *curdir, char *cont);
+ extern void  get_last_content(char *curdir, char *cont);
+ extern void  get_last_and_rest_content(char* curdir, char* last, char* rest);
+ extern void  str_swap(char *str1, char *str2);
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_lib_tool_commonfuncs.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_lib_tool_commonfuncs.cxx   Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_lib_tool_commonfuncs.cxx,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/lib/tool/commonfuncs.cxx.orig  2020-04-19 23:21:06.744870536 +0000
++++ src/lib/tool/commonfuncs.cxx
+@@ -117,9 +117,9 @@ void   upper_path(char *curdir, int vms_
+ }
+ 
+ //Get first content of dirname
+-char*   get_first_content(const char *curdir, char *cont)
++const char*   get_first_content(const char *curdir, char *cont)
+ {
+-        char *b=strchr(curdir,'/');
++        const char *b=strchr(curdir,'/');
+         if(b)
+           {
+                   strncpy(cont,curdir,b-curdir);
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_lib_vfs_afs.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_lib_vfs_afs.cxx    Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_lib_vfs_afs.cxx,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/lib/vfs/afs.cxx.orig   2020-04-19 23:44:54.825370720 +0000
++++ src/lib/vfs/afs.cxx
+@@ -29,7 +29,7 @@ int    dont_update = 0;                /
+ // The return value is static, so copy it before using the
+ // method again!
+ 
+-char *create_dirs(char *rootdir, char* dirlist)
++char *create_dirs(char *rootdir, const char* dirlist)
+ {
+    char str[L_MAXPATH];
+    char cont[FLIST_NAME];
+@@ -1350,7 +1350,7 @@ int    AFS::direc(char *dir_ch)
+     add_path_content(curdir, to_dir);
+   } else        //If we here then we doing cd not to subdir but to subdir/subdir...
+   {
+-    char *s=to_dir;
++    const char *s=to_dir;
+     if(*s)
+     {
+       do
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_lib_vfs_ftpfs.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_lib_vfs_ftpfs.cxx  Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_lib_vfs_ftpfs.cxx,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/lib/vfs/ftpfs.cxx.orig 2020-04-19 23:46:16.047568214 +0000
++++ src/lib/vfs/ftpfs.cxx
+@@ -1413,7 +1413,7 @@ void FTP::create_ftp_cachedir(char *dir)
+                  return;
+          if(strcmp(dir,"/"))
+          {
+-                 char *s=dir;
++                 const char *s=dir;
+                  if(*s=='/')         //Skip leading '/'
+                          s++;
+                  do
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_plugins_aqua_aquagui.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_plugins_aqua_aquagui.cxx   Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_plugins_aqua_aquagui.cxx,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/plugins/aqua/aquagui.cxx.orig  2020-04-19 23:23:41.525988818 +0000
++++ src/plugins/aqua/aquagui.cxx
+@@ -971,7 +971,7 @@ void   AquaBookMark::click()
+           {
+             XDrawLine(disp, Main, rgc, rwx, rwy, rwx, rwy + h);
+             XDrawLine(disp, Main, rgc, rwx + 1, rwy, rwx + 1, rwy + h);
+-            if (abs(rwx - (Mainl - l) / 2) < STICKY_CENTER)
++            if (abs(rwx - int(Mainl - l) / 2) < STICKY_CENTER)
+               rwx = (Mainl - l) / 2;
+             if (rwx < (Mainl - l) * MIN_PERCENT / 100)
+               rwx = (Mainl - l) * MIN_PERCENT / 100;
+@@ -1005,7 +1005,7 @@ void   AquaBookMark::click()
+           {
+             if (cx > leftrx && cx < rightrx)
+               {
+-                if (abs(cx - (Mainl - l) / 2) < STICKY_CENTER)
++                if (abs(cx - int(Mainl - l) / 2) < STICKY_CENTER)
+                   cx = (Mainl - l) / 2;
+                 XDrawLine(disp, Main, rgc, rwx, rwy, rwx, rwy + h);
+                 XDrawLine(disp, Main, rgc, rwx + 1, rwy, rwx + 1, rwy + h);
diff -r 572ffb5844b5 -r d8ad86887a30 sysutils/xnc/patches/patch-src_plugins_five_fivegui.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xnc/patches/patch-src_plugins_five_fivegui.cxx   Mon Apr 20 00:46:51 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_plugins_five_fivegui.cxx,v 1.1 2020/04/20 00:46:51 joerg Exp $
+
+--- src/plugins/five/fivegui.cxx.orig  2020-04-19 23:22:58.500838204 +0000
++++ src/plugins/five/fivegui.cxx
+@@ -1831,7 +1831,7 @@ void   FiveBookMark::click()
+           {
+             XDrawLine(disp, Main, rgc, rwx, rwy, rwx, rwy + h);
+             XDrawLine(disp, Main, rgc, rwx + 1, rwy, rwx + 1, rwy + h);
+-            if (abs(rwx - (Mainl - l) / 2) < STICKY_CENTER)
++            if (abs(rwx - int(Mainl - l) / 2) < STICKY_CENTER)
+               rwx = (Mainl - l) / 2;
+             if (rwx < (Mainl - l) * MIN_PERCENT / 100)
+               rwx = (Mainl - l) * MIN_PERCENT / 100;
+@@ -1865,7 +1865,7 @@ void   FiveBookMark::click()
+           {
+             if (cx > leftrx && cx < rightrx)
+               {
+-                if (abs(cx - (Mainl - l) / 2) < STICKY_CENTER)
++                if (abs(cx - int(Mainl - l) / 2) < STICKY_CENTER)
+                   cx = (Mainl - l) / 2;
+                 XDrawLine(disp, Main, rgc, rwx, rwy, rwx, rwy + h);
+                 XDrawLine(disp, Main, rgc, rwx + 1, rwy, rwx + 1, rwy + h);



Home | Main Index | Thread Index | Old Index