diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-09-09 15:45:24 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-09-09 15:45:24 +0000 |
commit | 6c4a391425e6cb5c833fbab4ebee515ac08375db (patch) | |
tree | 207bee81be20455a262dd35a7786e621becf9fe1 /lib/libppmcolor.c | |
parent | 2dbf45166703d8b899e9786e440c5432832caaf4 (diff) | |
download | netpbm-mirror-6c4a391425e6cb5c833fbab4ebee515ac08375db.tar.gz netpbm-mirror-6c4a391425e6cb5c833fbab4ebee515ac08375db.tar.xz netpbm-mirror-6c4a391425e6cb5c833fbab4ebee515ac08375db.zip |
Make strishex() library function
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@38 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libppmcolor.c')
-rw-r--r-- | lib/libppmcolor.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/libppmcolor.c b/lib/libppmcolor.c index d5323be3..a200ab2b 100644 --- a/lib/libppmcolor.c +++ b/lib/libppmcolor.c @@ -248,22 +248,6 @@ parseNewDecX11(char const colorname[], -static bool -isHexString(char const string[], - int const hexit[]) { - - bool retval; - const char * p; - - for (p = &string[0], retval = true; *p && retval == true; ++p) { - if (hexit[(unsigned int)*p] == -1) - retval = false; - } - return retval; -} - - - static void parseOldX11(char const colorname[], pixval const maxval, @@ -279,7 +263,7 @@ parseOldX11(char const colorname[], computeHexTable(hexit); - if (!isHexString(&colorname[1], hexit)) + if (!strishex(&colorname[1])) pm_error("Non-hexadecimal characters in #-type color specification"); switch (strlen(colorname) - 1 /* (Number of hex digits) */) { |