i;
size_t
- length;
+ max_entries;
struct dirent
*buffer,
*entry;
- size_t
- max_entries;
-
/*
Locate all modules in the coder path.
*/
TagToCoderModuleName("magick",filename);
- length=GetMagickModulePath(filename,MagickImageCoderModule,module_path,
+ status=GetMagickModulePath(filename,MagickImageCoderModule,module_path,
exception);
- if (length == 0)
+ if (status == MagickFalse)
return((char **) NULL);
GetPathComponent(module_path,HeadPath,path);
max_entries=255;
modules=(char **) RelinquishMagickMemory(modules);
return((char **) NULL);
}
- buffer=(struct dirent *) AcquireAlignedMemory(1,sizeof(*buffer)+FILENAME_MAX+1);
+ buffer=(struct dirent *) AcquireAlignedMemory(1,sizeof(*buffer)+
+ FILENAME_MAX+1);
if (buffer == (struct dirent *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
i=0;
module_path=DestroyString(module_path);
}
#if defined(MAGICKCORE_INSTALLED_SUPPORT)
- else
+ else
#if defined(MAGICKCORE_CODER_PATH)
{
const char
ImageFilterHandler
*image_filter;
+ MagickBooleanType
+ status;
+
ModuleHandle
handle;
PolicyRights
rights;
- size_t
- length;
-
/*
Find the module.
*/
return(MagickFalse);
}
TagToFilterModuleName(tag,name);
- length=GetMagickModulePath(name,MagickImageFilterModule,path,exception);
- if (length == 0)
- return(MagickFalse);
+ status=GetMagickModulePath(name,MagickImageFilterModule,path,exception);
+ if (status == MagickFalse)
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
+ "UnableToLoadModule","`%s': %s",name,path);
+ return(MagickFalse);
+ }
/*
Open the module.
*/
name[MaxTextExtent],
path[MaxTextExtent];
+ MagickBooleanType
+ status;
+
ModuleHandle
handle;
register const CoderInfo
*p;
- size_t
- length;
-
size_t
signature;
(void) LogMagickEvent(ModuleEvent,GetMagickModule(),
"Searching for module \"%s\" using filename \"%s\"",module_name,filename);
*path='\0';
- length=GetMagickModulePath(filename,MagickImageCoderModule,path,exception);
- if (length == 0)
+ status=GetMagickModulePath(filename,MagickImageCoderModule,path,exception);
+ if (status == MagickFalse)
return(MagickFalse);
/*
Load module
(void) FormatMagickString(name,MaxTextExtent,"%s.dll",tag);
#else
(void) FormatMagickString(name,MaxTextExtent,"%s.la",tag);
- (void) LocaleLower(name);
#endif
}
\f