diff --git a/coders/cin.c b/coders/cin.c
index 5594393..26442fc 100644
--- a/coders/cin.c
+++ b/coders/cin.c
@@ -1103,12 +1103,12 @@
   cin.film.prefix=0UL;
   value=GetCINProperty(image_info,image,"cin:film.prefix");
   if (value != (const char *) NULL)
-    cin.film.prefix=(unsigned long) StringToLong(value);
+    cin.film.prefix=StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,cin.film.prefix);
   cin.film.count=0UL;
   value=GetCINProperty(image_info,image,"cin:film.count");
   if (value != (const char *) NULL)
-    cin.film.count=(unsigned long) StringToLong(value);
+    cin.film.count=StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,cin.film.count);
   value=GetCINProperty(image_info,image,"cin:film.format");
   if (value != (const char *) NULL)
@@ -1118,7 +1118,7 @@
   cin.film.frame_position=0UL;
   value=GetCINProperty(image_info,image,"cin:film.frame_position");
   if (value != (const char *) NULL)
-    cin.film.frame_position=(unsigned long) StringToLong(value);
+    cin.film.frame_position=StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,cin.film.frame_position);
   cin.film.frame_rate=0.0f;
   value=GetCINProperty(image_info,image,"cin:film.frame_rate");
diff --git a/coders/dcm.c b/coders/dcm.c
index 392666c..95a608f 100644
--- a/coders/dcm.c
+++ b/coders/dcm.c
@@ -3174,7 +3174,7 @@
             /*
               Number of frames.
             */
-            number_scenes=(unsigned long) StringToLong((char *) data);
+            number_scenes=StringToUnsignedLong((char *) data);
             break;
           }
           case 0x0010:
@@ -3252,7 +3252,7 @@
             /*
               Visible pixel range: width.
             */
-            window_width=(unsigned long) StringToLong((char *) data);
+            window_width=StringToUnsignedLong((char *) data);
             break;
           }
           case 0x1200:
diff --git a/coders/dpx.c b/coders/dpx.c
index 43b283a..39a7014 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -1612,12 +1612,12 @@
   dpx.orientation.x_offset=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_offset");
   if (value != (const char *) NULL)
-    dpx.orientation.x_offset=(unsigned int) StringToLong(value);
+    dpx.orientation.x_offset=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.x_offset);
   dpx.orientation.y_offset=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_offset");
   if (value != (const char *) NULL)
-    dpx.orientation.y_offset=(unsigned int) StringToLong(value);
+    dpx.orientation.y_offset=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.y_offset);
   dpx.orientation.x_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_center");
@@ -1632,12 +1632,12 @@
   dpx.orientation.x_size=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_size");
   if (value != (const char *) NULL)
-    dpx.orientation.x_size=(unsigned int) StringToLong(value);
+    dpx.orientation.x_size=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.x_size);
   dpx.orientation.y_size=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_size");
   if (value != (const char *) NULL)
-    dpx.orientation.y_size=(unsigned int) StringToLong(value);
+    dpx.orientation.y_size=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.orientation.y_size);
   value=GetDPXProperty(image_info,image,"dpx:orientation.filename");
   if (value != (const char *) NULL)
@@ -1726,17 +1726,17 @@
   dpx.film.frame_position=0U;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_position");
   if (value != (const char *) NULL)
-    dpx.film.frame_position=(unsigned int) StringToLong(value);
+    dpx.film.frame_position=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.film.frame_position);
   dpx.film.sequence_extent=0U;
   value=GetDPXProperty(image_info,image,"dpx:film.sequence_extent");
   if (value != (const char *) NULL)
-    dpx.film.sequence_extent=(unsigned int) StringToLong(value);
+    dpx.film.sequence_extent=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.film.sequence_extent);
   dpx.film.held_count=0U;
   value=GetDPXProperty(image_info,image,"dpx:film.held_count");
   if (value != (const char *) NULL)
-    dpx.film.held_count=(unsigned int) StringToLong(value);
+    dpx.film.held_count=(unsigned int) StringToUnsignedLong(value);
   offset+=WriteBlobLong(image,dpx.film.held_count);
   dpx.film.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_rate");
diff --git a/coders/hald.c b/coders/hald.c
index 921f48f..edecbb4 100644
--- a/coders/hald.c
+++ b/coders/hald.c
@@ -118,7 +118,7 @@
   image=AcquireImage(image_info);
   level=0;
   if (*image_info->filename != '\0')
-    level=(unsigned long) StringToLong(image_info->filename);
+    level=StringToUnsignedLong(image_info->filename);
   if (level < 2)
     level=8;
   status=MagickTrue;
diff --git a/coders/meta.c b/coders/meta.c
index 5837442..7049636 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -362,7 +362,7 @@
                   dataset = (unsigned char) StringToLong(newstr);
                 break;
               case 1:
-                recnum = (unsigned int) StringToLong(newstr);
+                recnum = (unsigned int) StringToUnsignedLong(newstr);
                 break;
               case 2:
                 name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
@@ -638,7 +638,7 @@
                   dataset = (unsigned char) StringToLong(newstr);
                 break;
               case 1:
-                recnum=(unsigned int) StringToLong(newstr);
+                recnum=(unsigned int) StringToUnsignedLong(newstr);
                 break;
               case 2:
                 name=(char *) AcquireQuantumMemory(strlen(newstr)+MaxTextExtent,
diff --git a/coders/miff.c b/coders/miff.c
index c6ac0c9..10f6dd4 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -624,7 +624,7 @@
                   }
                 if (LocaleCompare(keyword,"colors") == 0)
                   {
-                    colors=(unsigned long) StringToLong(options);
+                    colors=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"colorspace") == 0)
@@ -653,7 +653,7 @@
                   }
                 if (LocaleCompare(keyword,"columns") == 0)
                   {
-                    image->columns=(unsigned long) StringToLong(options);
+                    image->columns=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -664,12 +664,12 @@
               {
                 if (LocaleCompare(keyword,"delay") == 0)
                   {
-                    image->delay=(unsigned long) StringToLong(options);
+                    image->delay=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"depth") == 0)
                   {
-                    image->depth=(unsigned long) StringToLong(options);
+                    image->depth=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"dispose") == 0)
@@ -748,7 +748,7 @@
                   }
                 if (LocaleCompare(keyword,"iterations") == 0)
                   {
-                    image->iterations=(unsigned long) StringToLong(options);
+                    image->iterations=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -849,7 +849,7 @@
               {
                 if (LocaleCompare(keyword,"quality") == 0)
                   {
-                    image->quality=(unsigned long) StringToLong(options);
+                    image->quality=StringToUnsignedLong(options);
                     break;
                   }
                 if ((LocaleCompare(keyword,"quantum-format") == 0) ||
@@ -904,7 +904,7 @@
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
                   {
-                    image->rows=(unsigned long) StringToLong(options);
+                    image->rows=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -915,7 +915,7 @@
               {
                 if (LocaleCompare(keyword,"scene") == 0)
                   {
-                    image->scene=(unsigned long) StringToLong(options);
+                    image->scene=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
diff --git a/coders/mpc.c b/coders/mpc.c
index ece2d72..2d78cae 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -367,7 +367,7 @@
                   }
                 if (LocaleCompare(keyword,"colors") == 0)
                   {
-                    image->colors=(unsigned long) StringToLong(options);
+                    image->colors=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"colorspace") == 0)
@@ -396,7 +396,7 @@
                   }
                 if (LocaleCompare(keyword,"columns") == 0)
                   {
-                    image->columns=(unsigned long) StringToLong(options);
+                    image->columns=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -407,12 +407,12 @@
               {
                 if (LocaleCompare(keyword,"delay") == 0)
                   {
-                    image->delay=(unsigned long) StringToLong(options);
+                    image->delay=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"depth") == 0)
                   {
-                    image->depth=(unsigned long) StringToLong(options);
+                    image->depth=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"dispose") == 0)
@@ -484,7 +484,7 @@
                   }
                 if (LocaleCompare(keyword,"iterations") == 0)
                   {
-                    image->iterations=(unsigned long) StringToLong(options);
+                    image->iterations=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -592,12 +592,12 @@
               {
                 if (LocaleCompare(keyword,"quality") == 0)
                   {
-                    image->quality=(unsigned long) StringToLong(options);
+                    image->quality=StringToUnsignedLong(options);
                     break;
                   }
                 if (LocaleCompare(keyword,"quantum-depth") == 0)
                   {
-                    quantum_depth=(unsigned long) StringToLong(options);
+                    quantum_depth=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -637,7 +637,7 @@
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
                   {
-                    image->rows=(unsigned long) StringToLong(options);
+                    image->rows=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -648,7 +648,7 @@
               {
                 if (LocaleCompare(keyword,"scene") == 0)
                   {
-                    image->scene=(unsigned long) StringToLong(options);
+                    image->scene=StringToUnsignedLong(options);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
diff --git a/coders/msl.c b/coders/msl.c
index 038867e..58bf575 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -5343,7 +5343,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) StringToLong(value);
+                      geometry.height=StringToUnsignedLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5714,7 +5714,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) StringToLong(value);
+                      geometry.height=StringToUnsignedLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5790,7 +5790,7 @@
                 {
                   if (LocaleCompare(keyword,"height") == 0)
                     {
-                      geometry.height=(unsigned long) StringToLong(value);
+                      geometry.height=StringToUnsignedLong(value);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
diff --git a/coders/pnm.c b/coders/pnm.c
index ca4dd42..44881fb 100644
--- a/coders/pnm.c
+++ b/coders/pnm.c
@@ -366,11 +366,11 @@
             Assign a value to the specified keyword.
           */
           if (LocaleCompare(keyword,"depth") == 0)
-            packet_size=(unsigned long) StringToLong(value);
+            packet_size=StringToUnsignedLong(value);
           if (LocaleCompare(keyword,"height") == 0)
-            image->rows=(unsigned long) StringToLong(value);
+            image->rows=StringToUnsignedLong(value);
           if (LocaleCompare(keyword,"maxval") == 0)
-            max_value=(unsigned long) StringToLong(value);
+            max_value=StringToUnsignedLong(value);
           if (LocaleCompare(keyword,"TUPLTYPE") == 0)
             {
               if (LocaleCompare(value,"BLACKANDWHITE") == 0)
@@ -405,7 +405,7 @@
                 }
             }
           if (LocaleCompare(keyword,"width") == 0)
-            image->columns=(unsigned long) StringToLong(value);
+            image->columns=StringToUnsignedLong(value);
         }
       }
     if ((image->columns == 0) || (image->rows == 0))