MagickCore
7.0.0
|
#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/random_.h"
#include "MagickCore/registry.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 MagickSizeType | MagickMin (const MagickSizeType x, const MagickSizeType 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) |
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) |
MagickPrivate MagickBooleanType | ShredFile (const char *path) |
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 110 of file utility.c.
References AcquireUniqueFileResource(), MagickFalse, and MagickTrue.
Referenced by AcquireUniqueSymbolicLink(), InvokeDelegate(), and WriteImage().
MagickExport MagickBooleanType AcquireUniqueSymbolicLink | ( | const char * | source, |
char * | destination | ||
) |
Definition at line 160 of file utility.c.
References AcquireQuantumMemory(), AcquireUniqueFilename(), AcquireUniqueFileResource(), ConcatenateMagickString(), DirectorySeparator, MagickFalse, MagickMaxBufferExtent, MagickMin(), MagickTrue, MaxTextExtent, O_BINARY, open_utf8(), RelinquishMagickMemory(), and RelinquishUniqueFileResource().
Referenced by InvokeDelegate().
MagickExport void AppendImageFormat | ( | const char * | format, |
char * | filename | ||
) |
Definition at line 275 of file utility.c.
References CopyMagickString(), ExtensionPath, FormatLocaleString(), GetMagickModule, GetPathComponent(), LocaleCompare(), LogMagickEvent(), MaxTextExtent, RootPath, and TraceEvent.
Referenced by RelinquishUniqueFileResource().
MagickExport unsigned char* Base64Decode | ( | const char * | source, |
size_t * | length | ||
) |
Definition at line 339 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 493 of file utility.c.
References AcquireQuantumMemory(), Base64, GetMagickModule, LogMagickEvent(), and TraceEvent.
Referenced by CanonicalXMLContent().
MagickPrivate void ChopPathComponents | ( | char * | path, |
const size_t | components | ||
) |
Definition at line 576 of file utility.c.
References GetPathComponent(), and HeadPath.
MagickPrivate void ExpandFilename | ( | char * | path | ) |
Definition at line 608 of file utility.c.
References ConcatenateMagickString(), CopyMagickString(), DestroyString(), DirectorySeparator, GetEnvironmentValue(), and MaxTextExtent.
MagickExport MagickBooleanType ExpandFilenames | ( | int * | number_arguments, |
char *** | arguments | ||
) |
Definition at line 727 of file utility.c.
References AcquireExceptionInfo(), AcquireQuantumMemory(), AcquireString(), ConcatenateMagickString(), ConcatenateString(), ConfigureEvent, ConstantString(), CopyMagickString(), DestroyExceptionInfo(), DestroyString(), DirectorySeparator, ExpandFilename(), FileToString(), GetMagickModule, GetPathComponent(), HeadPath, IsEventLogging(), IsGlob(), IsPathDirectory(), ListFiles(), LocaleCompare(), LogMagickEvent(), MagickCommandOptions, MagickFalse, MagickPath, MagickTrue, MaxTextExtent, OptionFatalError, ParseCommandOption(), RelinquishMagickMemory(), ResizeQuantumMemory(), ResourceLimitFatalError, StringToArgv(), SubimagePath, TailPath, ThrowFatalException, and TraceEvent.
|
static |
MagickPrivate MagickBooleanType GetExecutionPath | ( | char * | path, |
const size_t | extent | ||
) |
Definition at line 978 of file utility.c.
References AcquireQuantumMemory(), ConcatenateMagickString(), CopyMagickString(), DirectorySeparator, FormatLocaleString(), IsPathAccessible(), MaxTextExtent, PATH_MAX, and RelinquishMagickMemory().
MagickPrivate ssize_t GetMagickPageSize | ( | void | ) |
Definition at line 1108 of file utility.c.
Referenced by PersistPixelCache(), and ResourceComponentGenesis().
MagickExport MagickBooleanType GetPathAttributes | ( | const char * | path, |
void * | attributes | ||
) |
Definition at line 1151 of file utility.c.
References MagickFalse, MagickTrue, and stat_utf8().
Referenced by CopyDelegateFile(), GetBlobSize(), GetPathTemplate(), IsPathAccessible(), IsPathDirectory(), OpenBlob(), and ThumbnailImage().
MagickExport void GetPathComponent | ( | const char * | path, |
PathType | type, | ||
char * | component | ||
) |
Definition at line 1198 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(), GetMagickPropertyLetter(), GetXMLTreePath(), IdentifyImage(), LoadCoderList(), LoadColorList(), LoadConfigureList(), LoadDelegateList(), LoadLocaleList(), LoadLogList(), LoadMagicList(), LoadMimeList(), LoadPolicyList(), LoadTypeList(), MagickCoreGenesis(), OpenBlob(), ReadImage(), SetImageInfo(), ThrowMagickExceptionList(), and WriteImage().
MagickPrivate char** GetPathComponents | ( | const char * | path, |
size_t * | number_components | ||
) |
Definition at line 1371 of file utility.c.
References AcquireQuantumMemory(), CopyMagickString(), IsBasenameSeparator, MaxTextExtent, ResourceLimitFatalError, and ThrowFatalException.
MagickExport MagickBooleanType IsPathAccessible | ( | const char * | path | ) |
Definition at line 1434 of file utility.c.
References access_utf8(), GetPathAttributes(), MagickFalse, MagickTrue, and S_ISREG.
Referenced by GetExecutionPath(), GetMagickHomeURL(), GetPathComponent(), InterpretImageProperties(), IsGlob(), LoadTypeList(), LogMagickEventList(), MagickCoreGenesis(), ReadImage(), RenderType(), and WriteImage().
|
static |
Definition at line 1477 of file utility.c.
References GetPathAttributes(), MagickFalse, 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 1562 of file utility.c.
References AcquireMagickMemory(), AcquireQuantumMemory(), AcquireString(), closedir(), dirent::d_name, FileCompare(), GetMagickModule, GlobExpression(), IsPathDirectory(), LocaleCompare(), LogMagickEvent(), MagickFalse, MagickReadDirectory(), MagickTrue, opendir(), RelinquishMagickMemory(), ResizeQuantumMemory(), ResourceLimitFatalError, ThrowFatalException, and TraceEvent.
Referenced by ExpandFilenames().
MagickPrivate void MagickDelay | ( | const MagickSizeType | milliseconds | ) |
|
inlinestatic |
Definition at line 152 of file utility.c.
Referenced by AcquireUniqueSymbolicLink(), and ShredFile().
MagickExport size_t MultilineCensus | ( | const char * | label | ) |
Definition at line 1749 of file utility.c.
Referenced by MontageImageList().
MagickPrivate MagickBooleanType ShredFile | ( | const char * | path | ) |
Definition at line 1790 of file utility.c.
References AcquireExceptionInfo(), AcquireRandomInfo(), DestroyExceptionInfo(), DestroyRandomInfo(), DestroyStringInfo(), GetEnvironmentValue(), GetImageRegistry(), GetRandomKey(), GetStringInfoDatum(), MagickFalse, MagickMaxBufferExtent, MagickMin(), MagickTrue, O_BINARY, open_utf8(), random_info, remove_utf8(), ResetStringInfo(), S_MODE, StringRegistryType, and StringToInteger().
Referenced by AsynchronousResourceComponentTerminus(), DestroyTemporaryResources(), and RelinquishUniqueFileResource().
MagickExport int SystemCommand | ( | const MagickBooleanType | asynchronous, |
const MagickBooleanType | verbose, | ||
const char * | command, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1924 of file utility.c.
References AcquireString(), ConcatenateMagickString(), DelegateError, DelegatePolicyDomain, DestroyString(), ExecutePolicyRights, FormatLocaleFile(), GetMagickModule, IsRightsAuthorized(), MACSystemCommand(), MagickFalse, MaxTextExtent, PolicyError, RelinquishMagickMemory(), StringToArgv(), and ThrowMagickException().
Referenced by InvokeDelegate().
|
static |
Definition at line 79 of file utility.c.
Referenced by Base64Decode(), and Base64Encode().