]> granicus.if.org Git - imagemagick/blobdiff - magick/configure.c
(no commit message)
[imagemagick] / magick / configure.c
index a4c9cabadd3982832432a618d24eff2138dbc4b6..ab519324c209bdd5062c1ec8e8bb3577ebb51fb0 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 2003                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -286,7 +286,7 @@ MagickExport const ConfigureInfo *GetConfigureInfo(const char *name,
 %  The format of the GetConfigureInfoList function is:
 %
 %      const ConfigureInfo **GetConfigureInfoList(const char *pattern,
-%        unsigned long *number_options,ExceptionInfo *exception)
+%        size_t *number_options,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -321,7 +321,7 @@ static int ConfigureInfoCompare(const void *x,const void *y)
 #endif
 
 MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern,
-  unsigned long *number_options,ExceptionInfo *exception)
+  size_t *number_options,ExceptionInfo *exception)
 {
   const ConfigureInfo
     **options;
@@ -329,7 +329,7 @@ MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern,
   register const ConfigureInfo
     *p;
 
-  register long
+  register ssize_t
     i;
 
   /*
@@ -337,7 +337,7 @@ MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern,
   */
   assert(pattern != (char *) NULL);
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",pattern);
-  assert(number_options != (unsigned long *) NULL);
+  assert(number_options != (size_t *) NULL);
   *number_options=0;
   p=GetConfigureInfo("*",exception);
   if (p == (const ConfigureInfo *) NULL)
@@ -362,7 +362,7 @@ MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern,
   UnlockSemaphoreInfo(configure_semaphore);
   qsort((void *) options,(size_t) i,sizeof(*options),ConfigureInfoCompare);
   options[i]=(ConfigureInfo *) NULL;
-  *number_options=(unsigned long) i;
+  *number_options=(size_t) i;
   return(options);
 }
 \f
@@ -383,7 +383,7 @@ MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern,
 %  The format of the GetConfigureList function is:
 %
 %      char **GetConfigureList(const char *pattern,
-%        unsigned long *number_options,ExceptionInfo *exception)
+%        size_t *number_options,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -415,7 +415,7 @@ static int ConfigureCompare(const void *x,const void *y)
 #endif
 
 MagickExport char **GetConfigureList(const char *pattern,
-  unsigned long *number_options,ExceptionInfo *exception)
+  size_t *number_options,ExceptionInfo *exception)
 {
   char
     **options;
@@ -423,7 +423,7 @@ MagickExport char **GetConfigureList(const char *pattern,
   register const ConfigureInfo
     *p;
 
-  register long
+  register ssize_t
     i;
 
   /*
@@ -431,7 +431,7 @@ MagickExport char **GetConfigureList(const char *pattern,
   */
   assert(pattern != (char *) NULL);
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",pattern);
-  assert(number_options != (unsigned long *) NULL);
+  assert(number_options != (size_t *) NULL);
   *number_options=0;
   p=GetConfigureInfo("*",exception);
   if (p == (const ConfigureInfo *) NULL)
@@ -453,7 +453,7 @@ MagickExport char **GetConfigureList(const char *pattern,
   UnlockSemaphoreInfo(configure_semaphore);
   qsort((void *) options,(size_t) i,sizeof(*options),ConfigureCompare);
   options[i]=(char *) NULL;
-  *number_options=(unsigned long) i;
+  *number_options=(size_t) i;
   return(options);
 }
 \f
@@ -749,6 +749,10 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
       (void) AppendValueToLinkedList(paths,ConstantString(path));
 #endif
     }
+  /*
+    Search current directory.
+  */
+  (void) AppendValueToLinkedList(paths,ConstantString(""));
 #endif
   {
     char
@@ -803,10 +807,6 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
       }
   }
 #endif
-  /*
-    Search current directory.
-  */
-  (void) AppendValueToLinkedList(paths,ConstantString(""));
   return(paths);
 }
 \f
@@ -916,13 +916,13 @@ MagickExport MagickBooleanType ListConfigureInfo(FILE *file,
   const ConfigureInfo
     **configure_info;
 
-  long
+  ssize_t
     j;
 
-  register long
+  register ssize_t
     i;
 
-  unsigned long
+  size_t
     number_options;
 
   if (file == (const FILE *) NULL)
@@ -931,7 +931,7 @@ MagickExport MagickBooleanType ListConfigureInfo(FILE *file,
   if (configure_info == (const ConfigureInfo **) NULL)
     return(MagickFalse);
   path=(const char *) NULL;
-  for (i=0; i < (long) number_options; i++)
+  for (i=0; i < (ssize_t) number_options; i++)
   {
     if (configure_info[i]->stealth != MagickFalse)
       continue;
@@ -949,7 +949,7 @@ MagickExport MagickBooleanType ListConfigureInfo(FILE *file,
     if (configure_info[i]->name != (char *) NULL)
       name=configure_info[i]->name;
     (void) fprintf(file,"%s",name);
-    for (j=(long) strlen(name); j <= 12; j++)
+    for (j=(ssize_t) strlen(name); j <= 12; j++)
       (void) fprintf(file," ");
     (void) fprintf(file," ");
     value="unknown";
@@ -981,7 +981,7 @@ MagickExport MagickBooleanType ListConfigureInfo(FILE *file,
 %  The format of the LoadConfigureList method is:
 %
 %      MagickBooleanType LoadConfigureList(const char *xml,const char *filename,
-%        const unsigned long depth,ExceptionInfo *exception)
+%        const size_t depth,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -995,7 +995,7 @@ MagickExport MagickBooleanType ListConfigureInfo(FILE *file,
 %
 */
 static MagickBooleanType LoadConfigureList(const char *xml,const char *filename,
-  const unsigned long depth,ExceptionInfo *exception)
+  const size_t depth,ExceptionInfo *exception)
 {
   char
     keyword[MaxTextExtent],
@@ -1209,7 +1209,7 @@ static MagickBooleanType LoadConfigureLists(const char *filename,
   MagickStatusType
     status;
 
-  register long
+  register ssize_t
     i;
 
   /*
@@ -1226,7 +1226,7 @@ static MagickBooleanType LoadConfigureLists(const char *filename,
           return(MagickFalse);
         }
     }
-  for (i=0; i < (long) (sizeof(ConfigureMap)/sizeof(*ConfigureMap)); i++)
+  for (i=0; i < (ssize_t) (sizeof(ConfigureMap)/sizeof(*ConfigureMap)); i++)
   {
     ConfigureInfo
       *configure_info;