#include "magick/studio.h"#include "magick/property.h"#include "magick/blob.h"#include "magick/color.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/geometry.h"#include "magick/list.h"#include "magick/log.h"#include "magick/memory_.h"#include "magick/option.h"#include "magick/policy.h"#include "magick/resource_.h"#include "magick/semaphore.h"#include "magick/signature-private.h"#include "magick/statistic.h"#include "magick/string_.h"#include "magick/token.h"#include "magick/utility.h"
Go to the source code of this file.
Functions | |
| static int | IsPathDirectory (const char *) |
| MagickExport MagickBooleanType | AcquireUniqueFilename (char *path) |
| static size_t | MagickMin (const size_t x, const size_t y) |
| MagickExport MagickBooleanType | AcquireUniqueSymbolicLink (const char *source, char *destination) |
| MagickExport void | AppendImageFormat (const char *format, char *filename) |
| MagickExport unsigned char * | Base64Decode (const char *source, size_t *length) |
| MagickExport char * | Base64Encode (const unsigned char *blob, const size_t blob_length, size_t *encode_length) |
| MagickExport void | ChopPathComponents (char *path, const unsigned long components) |
| MagickExport void | ExpandFilename (char *path) |
| MagickExport MagickBooleanType | ExpandFilenames (int *number_arguments, char ***arguments) |
| MagickExport MagickBooleanType | GetExecutionPath (char *path, const size_t extent) |
| MagickExport long | GetMagickPageSize (void) |
| MagickExport MagickBooleanType | GetPathAttributes (const char *path, void *attributes) |
| MagickExport void | GetPathComponent (const char *path, PathType type, char *component) |
| MagickExport char ** | GetPathComponents (const char *path, unsigned long *number_components) |
| MagickExport MagickBooleanType | IsPathAccessible (const char *path) |
| MagickExport MagickBooleanType | IsMagickTrue (const char *value) |
| static int | FileCompare (const void *x, const void *y) |
| static int | MagickReadDirectory (DIR *directory, struct dirent *entry, struct dirent **result) |
| MagickExport char ** | ListFiles (const char *directory, const char *pattern, unsigned long *number_entries) |
| MagickExport unsigned long | MultilineCensus (const char *label) |
| MagickExport FILE * | OpenMagickStream (const char *path, const char *mode) |
| MagickExport int | SystemCommand (const MagickBooleanType verbose, const char *command, ExceptionInfo *exception) |
Variables | |
| static const char | Base64 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| MagickExport MagickBooleanType AcquireUniqueFilename | ( | char * | path | ) |
Definition at line 100 of file utility.c.
References AcquireUniqueFileResource(), close, MagickFalse, and MagickTrue.
Referenced by AcquireUniqueSymbolicLink(), InvokeDelegate(), TemporaryFilename(), and WriteImage().
| MagickExport MagickBooleanType AcquireUniqueSymbolicLink | ( | const char * | source, | |
| char * | destination | |||
| ) |
Definition at line 149 of file utility.c.
References AcquireQuantumMemory(), AcquireUniqueFilename(), AcquireUniqueFileResource(), close, ConcatenateMagickString(), DirectorySeparator, fstat, getcwd, MagickFalse, MagickMaxBufferExtent, MagickMin(), MagickTrue, MaxTextExtent, O_BINARY, open, read, RelinquishMagickMemory(), RelinquishUniqueFileResource(), stat, and write.
Referenced by InvokeDelegate().
| MagickExport void AppendImageFormat | ( | const char * | format, | |
| char * | filename | |||
| ) |
Definition at line 263 of file utility.c.
References CopyMagickString(), FormatMagickString(), GetMagickModule, GetPathComponent(), LocaleCompare(), LogMagickEvent(), MaxTextExtent, RootPath, and TraceEvent.
Referenced by RelinquishUniqueFileResource(), and XFileBrowserWidget().
| MagickExport unsigned char* Base64Decode | ( | const char * | source, | |
| size_t * | length | |||
| ) |
Definition at line 312 of file utility.c.
References AcquireQuantumMemory(), Base64, GetMagickModule, LogMagickEvent(), RelinquishMagickMemory(), and TraceEvent.
Referenced by ReadInlineImage().
| MagickExport char* Base64Encode | ( | const unsigned char * | blob, | |
| const size_t | blob_length, | |||
| size_t * | encode_length | |||
| ) |
Definition at line 466 of file utility.c.
References AcquireQuantumMemory(), Base64, GetMagickModule, LogMagickEvent(), and TraceEvent.
Referenced by CanonicalXMLContent().
| MagickExport void ChopPathComponents | ( | char * | path, | |
| const unsigned long | components | |||
| ) |
Definition at line 549 of file utility.c.
References GetPathComponent(), and HeadPath.
Referenced by GetConfigureBlob(), GetConfigurePaths(), and XFileBrowserWidget().
| MagickExport void ExpandFilename | ( | char * | path | ) |
Definition at line 581 of file utility.c.
References ConcatenateMagickString(), CopyMagickString(), DestroyString(), DirectorySeparator, GetEnvironmentValue(), and MaxTextExtent.
Referenced by ExpandFilenames(), XFileBrowserWidget(), XGetResourceDatabase(), and XUserPreferences().
| MagickExport MagickBooleanType ExpandFilenames | ( | int * | number_arguments, | |
| char *** | arguments | |||
| ) |
Definition at line 672 of file utility.c.
References AcquireExceptionInfo(), AcquireQuantumMemory(), AcquireString(), ConcatenateMagickString(), ConcatenateString(), ConfigureEvent, ConstantString(), CopyMagickString(), DestroyExceptionInfo(), DestroyString(), DirectorySeparator, ExpandFilename(), FileToString(), getcwd, GetMagickModule, GetPathComponent(), HeadPath, IsEventLogging(), IsGlob(), IsPathDirectory(), ListFiles(), LocaleCompare(), LogMagickEvent(), MagickCommandOptions, MagickFalse, MagickPath, MagickTrue, MaxTextExtent, OptionFatalError, ParseMagickOption(), RelinquishMagickMemory(), ResizeQuantumMemory(), ResourceLimitFatalError, StringToArgv(), StripString(), SubimagePath, TailPath, ThrowFatalException, and TraceEvent.
| static int FileCompare | ( | const void * | x, | |
| const void * | y | |||
| ) | [static] |
| MagickExport MagickBooleanType GetExecutionPath | ( | char * | path, | |
| const size_t | extent | |||
| ) |
Definition at line 902 of file utility.c.
References AcquireQuantumMemory(), ConcatenateMagickString(), CopyMagickString(), DirectorySeparator, FormatMagickString(), getcwd, getpid, IsPathAccessible(), MaxTextExtent, NTGetExecutionPath(), PATH_MAX, and RelinquishMagickMemory().
Referenced by MagickCoreGenesis().
| MagickExport long GetMagickPageSize | ( | void | ) |
Definition at line 1023 of file utility.c.
References sysconf.
Referenced by PersistPixelCache(), and ResourceComponentGenesis().
| MagickExport MagickBooleanType GetPathAttributes | ( | const char * | path, | |
| void * | attributes | |||
| ) |
Definition at line 1184 of file utility.c.
References MagickFalse, MagickTrue, RelinquishMagickMemory(), stat, and wstat.
Referenced by CopyDelegateFile(), GetBlobSize(), GetPathTemplate(), IsPathAccessible(), IsPathDirectory(), OpenBlob(), and ThumbnailImage().
| MagickExport void GetPathComponent | ( | const char * | path, | |
| PathType | type, | |||
| char * | component | |||
| ) |
Definition at line 1241 of file utility.c.
References BasePath, CanonicalPath, CopyMagickMemory(), CopyMagickString(), ExtensionPath, GetMagickModule, HeadPath, IsBasenameSeparator, IsGeometry(), IsMagickConflict(), IsPathAccessible(), IsPathDirectory(), IsSceneGeometry(), LogMagickEvent(), MagickFalse, MagickPath, MaxTextExtent, RootPath, SubimagePath, TailPath, TraceEvent, and UndefinedPath.
Referenced by AddPathToXMLTree(), AppendImageFormat(), ChopPathComponents(), ExpandFilenames(), GetMagickProperty(), GetXMLTreePath(), IdentifyImage(), InterpretImageProperties(), LoadCoderList(), LoadColorList(), LoadConfigureList(), LoadDelegateList(), LoadFontConfigFonts(), LoadLocaleList(), LoadLogList(), LoadMagicList(), LoadMimeList(), LoadPolicyList(), LoadTypeList(), MagickCoreGenesis(), OpenBlob(), SetImageInfo(), and ThrowMagickExceptionList().
| MagickExport char** GetPathComponents | ( | const char * | path, | |
| unsigned long * | number_components | |||
| ) |
Definition at line 1403 of file utility.c.
References AcquireQuantumMemory(), CopyMagickString(), IsBasenameSeparator, MaxTextExtent, ResourceLimitFatalError, and ThrowFatalException.
Referenced by AddPathToXMLTree(), and GetXMLTreePath().
| MagickExport MagickBooleanType IsMagickTrue | ( | const char * | value | ) |
Definition at line 1553 of file utility.c.
References LocaleCompare(), MagickFalse, and MagickTrue.
Referenced by CompositeImageChannel(), IdentifyImage(), LoadCoderList(), LoadColorList(), LoadConfigureList(), LoadDelegateList(), LoadMagicList(), LoadMimeList(), LoadPolicyList(), LoadTypeList(), WriteImage(), and XGetResourceInfo().
| MagickExport MagickBooleanType IsPathAccessible | ( | const char * | path | ) |
Definition at line 1466 of file utility.c.
References access, F_OK, GetPathAttributes(), MagickFalse, MagickTrue, S_ISREG, and stat.
Referenced by GetConfigureBlob(), GetExecutionPath(), GetMagickHomeURL(), GetPathComponent(), InterpretImageProperties(), IsGlob(), LoadTypeList(), LogMagickEventList(), ReadImage(), RenderType(), and WriteImage().
| static int IsPathDirectory | ( | const char * | path | ) | [static] |
Definition at line 1509 of file utility.c.
References GetPathAttributes(), MagickFalse, S_ISDIR, and stat.
Referenced by ExpandFilenames(), GetPathComponent(), and ListFiles().
| MagickExport char** ListFiles | ( | const char * | directory, | |
| const char * | pattern, | |||
| unsigned long * | number_entries | |||
| ) |
Definition at line 1635 of file utility.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), AcquireString(), closedir, ConcatenateMagickString(), dirent::d_name, DirectorySeparator, FileCompare(), GetMagickModule, GlobExpression(), IsPathDirectory(), LocaleCompare(), LogMagickEvent(), MagickFalse, MagickReadDirectory(), MagickTrue, MaxTextExtent, opendir, RelinquishMagickMemory(), ResizeQuantumMemory(), ResourceLimitFatalError, ThrowFatalException, and TraceEvent.
Referenced by ExpandFilenames(), and XFileBrowserWidget().
| static size_t MagickMin | ( | const size_t | x, | |
| const size_t | y | |||
| ) | [inline, static] |
Definition at line 142 of file utility.c.
Referenced by AcquireUniqueSymbolicLink().
| MagickExport unsigned long MultilineCensus | ( | const char * | label | ) |
Definition at line 1758 of file utility.c.
Referenced by MontageImageList().
| MagickExport FILE* OpenMagickStream | ( | const char * | path, | |
| const char * | mode | |||
| ) |
Definition at line 1799 of file utility.c.
References RelinquishMagickMemory().
Referenced by LogMagickEventList(), and OpenBlob().
| MagickExport int SystemCommand | ( | const MagickBooleanType | verbose, | |
| const char * | command, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1864 of file utility.c.
References DelegateError, DelegatePolicyDomain, DestroyString(), ExecutePolicyRights, GetExceptionMessage(), GetMagickModule, IsRightsAuthorized(), MACSystemCommand(), MagickFalse, NTSystemCommand(), PolicyError, RelinquishMagickMemory(), StringToArgv(), and ThrowMagickException().
Referenced by InvokeDelegate().
const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [static] |
Definition at line 69 of file utility.c.
Referenced by Base64Decode(), and Base64Encode().
1.6.1