about summary refs log tree commit diff
path: root/other
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-09-08 21:18:26 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-09-08 21:18:26 +0000
commitb0267f8b5613f39d94bcfabea233d97d17be163f (patch)
tree646e3a4b4586e89d7837f45ea1df5c1df283a415 /other
parentcf97c97e5da0fadc0bca18bcb8637f80fb9461b5 (diff)
downloadnetpbm-mirror-b0267f8b5613f39d94bcfabea233d97d17be163f.tar.gz
netpbm-mirror-b0267f8b5613f39d94bcfabea233d97d17be163f.tar.xz
netpbm-mirror-b0267f8b5613f39d94bcfabea233d97d17be163f.zip
Replace obsolete bcopy, index, rindex with modern memcpy, strchr, strrchr
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1730 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other')
-rw-r--r--other/pamx/send.c2
-rw-r--r--other/pamx/window.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/other/pamx/send.c b/other/pamx/send.c
index 5413308b..597b76c7 100644
--- a/other/pamx/send.c
+++ b/other/pamx/send.c
@@ -587,7 +587,7 @@ makeXImage(XImageInfo * const ximageinfoP,
         MALLOCARRAY(data, byteCount);
         if (data == NULL)
             pm_error("Can't allocate space for %u byte image", byteCount);
-        bcopy(imageP->data, data, byteCount);
+        memcpy(data, imageP->data, byteCount);
 
         ximageinfoP->ximageP =
             XCreateImage(disp, visualP, 1, XYBitmap,
diff --git a/other/pamx/window.c b/other/pamx/window.c
index 29f85d92..ec2a77fe 100644
--- a/other/pamx/window.c
+++ b/other/pamx/window.c
@@ -499,10 +499,10 @@ iconName(const char * const s) {
         char * t;
 
         STRSCPY(buf, s);
-        /* strip off stuff following 1st word.  This strips
+        /* chop off stuff following 1st word.  This strips
            info added by processing functions too.
         */
-        t = index(buf, ' ');
+        t = strchr(buf, ' ');
         if (t)
             *t = '\0';
     
@@ -510,15 +510,15 @@ iconName(const char * const s) {
            You might want to change this.
         */
     
-        t= rindex(buf, '/');
+        t= strrchr(buf, '/');
         if (t) {
             char * p;
             for (p = buf, ++t; *t; ++p, ++t)
                 *p = *t;
             *p = '\0';
         }
-        /* look for an extension and strip it off */
-        t = index(buf, '.');
+        /* Chop off any filename extension */
+        t = strchr(buf, '.');
         if (t)
             *t = '\0';
     }