|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/property.h"#include "MagickCore/blob.h"#include "MagickCore/color.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/geometry.h"#include "MagickCore/list.h"#include "MagickCore/log.h"#include "MagickCore/magick-private.h"#include "MagickCore/memory_.h"#include "MagickCore/nt-base-private.h"#include "MagickCore/option.h"#include "MagickCore/policy.h"#include "MagickCore/resource_.h"#include "MagickCore/semaphore.h"#include "MagickCore/signature-private.h"#include "MagickCore/statistic.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/token.h"#include "MagickCore/token-private.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.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) |
| MagickPrivate void | ChopPathComponents (char *path, const size_t components) |
| MagickPrivate void | ExpandFilename (char *path) |
| MagickExport MagickBooleanType | ExpandFilenames (int *number_arguments, char ***arguments) |
| MagickPrivate MagickBooleanType | GetExecutionPath (char *path, const size_t extent) |
| MagickPrivate ssize_t | GetMagickPageSize (void) |
| MagickExport MagickBooleanType | GetPathAttributes (const char *path, void *attributes) |
| MagickExport void | GetPathComponent (const char *path, PathType type, char *component) |
| MagickPrivate char ** | GetPathComponents (const char *path, size_t *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) |
| MagickPrivate char ** | ListFiles (const char *directory, const char *pattern, size_t *number_entries) |
| MagickPrivate void | MagickDelay (const MagickSizeType milliseconds) |
| MagickExport size_t | MultilineCensus (const char *label) |
| MagickExport int | SystemCommand (const MagickBooleanType asynchronous, const MagickBooleanType verbose, const char *command, ExceptionInfo *exception) |
Variables | |
| static const char | Base64 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| MagickExport MagickBooleanType AcquireUniqueFilename | ( | char * | path | ) |
Definition at line 108 of file utility.c.
References AcquireUniqueFileResource(), MagickFalse, and MagickTrue.
Referenced by WriteImage(), InvokeDelegate(), and AcquireUniqueSymbolicLink().
| MagickExport MagickBooleanType AcquireUniqueSymbolicLink | ( | const char * | source, |
| char * | destination | ||
| ) |
Definition at line 157 of file utility.c.
References AcquireUniqueFilename(), RelinquishUniqueFileResource(), DirectorySeparator, MagickTrue, MaxTextExtent, MagickFalse, ConcatenateMagickString(), AcquireUniqueFileResource(), open_utf8(), O_BINARY, MagickMaxBufferExtent, MagickMin(), AcquireQuantumMemory(), and RelinquishMagickMemory().
Referenced by InvokeDelegate().
| MagickExport void AppendImageFormat | ( | const char * | format, |
| char * | filename | ||
| ) |
Definition at line 271 of file utility.c.
References MaxTextExtent, LogMagickEvent(), TraceEvent, GetMagickModule, LocaleCompare(), FormatLocaleString(), CopyMagickString(), GetPathComponent(), ExtensionPath, and RootPath.
Referenced by RelinquishUniqueFileResource().
| MagickExport unsigned char* Base64Decode | ( | const char * | source, |
| size_t * | length | ||
| ) |
Definition at line 335 of file utility.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, AcquireQuantumMemory(), Base64, and RelinquishMagickMemory().
Referenced by ReadInlineImage().
| MagickExport char* Base64Encode | ( | const unsigned char * | blob, |
| const size_t | blob_length, | ||
| size_t * | encode_length | ||
| ) |
Definition at line 489 of file utility.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, AcquireQuantumMemory(), and Base64.
Referenced by CanonicalXMLContent().
| MagickPrivate void ChopPathComponents | ( | char * | path, |
| const size_t | components | ||
| ) |
Definition at line 572 of file utility.c.
References GetPathComponent(), and HeadPath.
| MagickPrivate void ExpandFilename | ( | char * | path | ) |
Definition at line 604 of file utility.c.
References MaxTextExtent, CopyMagickString(), DirectorySeparator, ConcatenateMagickString(), GetEnvironmentValue(), and DestroyString().
| MagickExport MagickBooleanType ExpandFilenames | ( | int * | number_arguments, |
| char *** | arguments | ||
| ) |
Definition at line 695 of file utility.c.
References MaxTextExtent, LogMagickEvent(), TraceEvent, GetMagickModule, AcquireQuantumMemory(), ThrowFatalException, ResourceLimitFatalError, ConstantString(), MagickTrue, ParseCommandOption(), MagickCommandOptions, MagickFalse, GetPathComponent(), TailPath, MagickPath, LocaleCompare(), IsGlob(), HeadPath, SubimagePath, ExpandFilename(), ListFiles(), AcquireExceptionInfo(), FileToString(), DestroyExceptionInfo(), StringToArgv(), DestroyString(), IsPathDirectory(), RelinquishMagickMemory(), ResizeQuantumMemory(), CopyMagickString(), ConcatenateMagickString(), DirectorySeparator, OptionFatalError, IsEventLogging(), AcquireString(), ConcatenateString(), and ConfigureEvent.
| static int FileCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
| MagickPrivate MagickBooleanType GetExecutionPath | ( | char * | path, |
| const size_t | extent | ||
| ) |
Definition at line 945 of file utility.c.
References MaxTextExtent, PATH_MAX, FormatLocaleString(), CopyMagickString(), DirectorySeparator, ConcatenateMagickString(), AcquireQuantumMemory(), RelinquishMagickMemory(), and IsPathAccessible().
Referenced by MagickCoreGenesis().
| MagickPrivate ssize_t GetMagickPageSize | ( | void | ) |
Definition at line 1067 of file utility.c.
Referenced by PersistPixelCache(), and ResourceComponentGenesis().
| MagickExport MagickBooleanType GetPathAttributes | ( | const char * | path, |
| void * | attributes | ||
| ) |
Definition at line 1110 of file utility.c.
References MagickFalse, stat_utf8(), and MagickTrue.
Referenced by GetBlobSize(), OpenBlob(), CopyDelegateFile(), ThumbnailImage(), GetPathTemplate(), IsPathAccessible(), and IsPathDirectory().
| MagickExport void GetPathComponent | ( | const char * | path, |
| PathType | type, | ||
| char * | component | ||
| ) |
Definition at line 1154 of file utility.c.
References MaxTextExtent, LogMagickEvent(), TraceEvent, GetMagickModule, CopyMagickString(), IsPathDirectory(), IsPathAccessible(), MagickFalse, IsMagickConflict(), IsSceneGeometry(), IsGeometry(), IsBasenameSeparator, MagickPath, RootPath, HeadPath, TailPath, CopyMagickMemory(), BasePath, ExtensionPath, SubimagePath, CanonicalPath, and UndefinedPath.
Referenced by OpenBlob(), LoadCoderList(), LoadColorList(), LoadConfigureList(), ReadImage(), WriteImage(), LoadDelegateList(), ThrowMagickExceptionList(), IdentifyImage(), SetImageInfo(), LoadLocaleList(), LoadLogList(), LoadMagicList(), MagickCoreGenesis(), LoadMimeList(), LoadPolicyList(), GetMagickProperty(), InterpretImageProperties(), LoadTypeList(), AppendImageFormat(), ChopPathComponents(), ExpandFilenames(), AddPathToXMLTree(), and GetXMLTreePath().
| MagickPrivate char** GetPathComponents | ( | const char * | path, |
| size_t * | number_components | ||
| ) |
Definition at line 1327 of file utility.c.
References IsBasenameSeparator, AcquireQuantumMemory(), ThrowFatalException, ResourceLimitFatalError, MaxTextExtent, and CopyMagickString().
| MagickExport MagickBooleanType IsMagickTrue | ( | const char * | value | ) |
Definition at line 1477 of file utility.c.
References MagickFalse, LocaleCompare(), and MagickTrue.
Referenced by LoadCoderList(), LoadColorList(), CompositeOverImage(), CompositeImage(), LoadConfigureList(), WriteImage(), LoadDelegateList(), IdentifyImage(), GetImageInfo(), LoadMagicList(), LoadMimeList(), MorphologyApply(), MorphologyImage(), LoadPolicyList(), SetResampleFilter(), AcquireResizeFilter(), and LoadTypeList().
| MagickExport MagickBooleanType IsPathAccessible | ( | const char * | path | ) |
Definition at line 1390 of file utility.c.
References MagickFalse, GetPathAttributes(), S_ISREG, access_utf8(), and MagickTrue.
Referenced by RenderType(), ReadImage(), WriteImage(), LogMagickEventList(), MagickCoreGenesis(), InterpretImageProperties(), IsGlob(), LoadTypeList(), GetExecutionPath(), GetPathComponent(), and GetMagickHomeURL().
| static int IsPathDirectory | ( | const char * | path | ) | [static] |
Definition at line 1433 of file utility.c.
References MagickFalse, GetPathAttributes(), and S_ISDIR.
Referenced by ExpandFilenames(), GetPathComponent(), and ListFiles().
| MagickPrivate char** ListFiles | ( | const char * | directory, |
| const char * | pattern, | ||
| size_t * | number_entries | ||
| ) |
Definition at line 1559 of file utility.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, opendir(), AcquireQuantumMemory(), closedir(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, MagickReadDirectory(), dirent::d_name, IsPathDirectory(), GlobExpression(), MagickTrue, MagickFalse, ResizeQuantumMemory(), LocaleCompare(), AcquireString(), RelinquishMagickMemory(), and FileCompare().
Referenced by ExpandFilenames().
| MagickPrivate void MagickDelay | ( | const MagickSizeType | milliseconds | ) |
| static size_t MagickMin | ( | const size_t | x, |
| const size_t | y | ||
| ) | [inline, static] |
Definition at line 150 of file utility.c.
Referenced by AcquireUniqueSymbolicLink().
| MagickExport size_t MultilineCensus | ( | const char * | label | ) |
Definition at line 1746 of file utility.c.
Referenced by MontageImageList().
| MagickExport int SystemCommand | ( | const MagickBooleanType | asynchronous, |
| const MagickBooleanType | verbose, | ||
| const char * | command, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1795 of file utility.c.
References StringToArgv(), ExecutePolicyRights, DelegatePolicyDomain, IsRightsAuthorized(), MagickFalse, ThrowMagickException(), GetMagickModule, PolicyError, DestroyString(), RelinquishMagickMemory(), FormatLocaleFile(), AcquireString(), ConcatenateMagickString(), MaxTextExtent, MACSystemCommand(), and DelegateError.
Referenced by InvokeDelegate().
const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [static] |
Definition at line 77 of file utility.c.
Referenced by Base64Decode(), and Base64Encode().