about summary refs log tree commit diff
path: root/lib/libppmcolor.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2018-05-12 20:00:11 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2018-05-12 20:00:11 +0000
commit40a120115a9201d590d90d7a62f31dbcb006bdb0 (patch)
tree7dbc86bb2229397cab75e66bc3daa090ff87ca17 /lib/libppmcolor.c
parent522a4d03e91ba0e45dd9246ee5cc657b28d51803 (diff)
downloadnetpbm-mirror-40a120115a9201d590d90d7a62f31dbcb006bdb0.tar.gz
netpbm-mirror-40a120115a9201d590d90d7a62f31dbcb006bdb0.tar.xz
netpbm-mirror-40a120115a9201d590d90d7a62f31dbcb006bdb0.zip
Add pnm_colorspec_*, pnm_parsecolor2, pnm_allocpamtuplen, pnm_freepamtuplen. Make normalized tuple functions respect pam.allocation_depth
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3250 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libppmcolor.c')
-rw-r--r--lib/libppmcolor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libppmcolor.c b/lib/libppmcolor.c
index df9e5295..27340d5f 100644
--- a/lib/libppmcolor.c
+++ b/lib/libppmcolor.c
@@ -78,7 +78,7 @@ ppm_colorname(const pixel * const colorP,
     f = pm_openColornameFile(NULL, !hexok);
 
     if (!f)
-        strcpy(colorname, "");
+        STRSCPY(colorname, "");
     else {
         int bestDiff;
         bool eof;
@@ -94,7 +94,7 @@ ppm_colorname(const pixel * const colorP,
 
                 if (thisDiff < bestDiff) {
                     bestDiff = thisDiff;
-                    strcpy(colorname, ce.colorname);
+                    STRSCPY(colorname, ce.colorname);
                 }
             } else
                 eof = TRUE;
@@ -105,12 +105,12 @@ ppm_colorname(const pixel * const colorP,
             /* Color file contain no entries, so we can't even pick a close
                one
             */
-            strcpy(colorname, "");
+            STRSCPY(colorname, "");
         } else if (bestDiff > 0 && hexok) {
             /* We didn't find an exact match and user is willing to accept
                hex, so we don't have to use an approximate match.
             */
-            strcpy(colorname, "");
+            STRSCPY(colorname, "");
         }
     }