#include "wizard/studio.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/memory_.h"#include "wizard/resource_.h"#include "wizard/utility.h"
Go to the source code of this file.
Defines | |
| #define | X_OK 1 |
Functions | |
| static int | IsDirectory (const char *) |
| WizardExport void | AppendFileExtension (const char *extension, char *filename) |
| WizardExport unsigned char * | Base64Decode (const char *source, size_t *length) |
| WizardExport char * | Base64Encode (const unsigned char *blob, const size_t blob_length, size_t *encode_length) |
| WizardExport void | ChopPathComponents (char *path, const size_t components) |
| WizardExport void | GetPathComponent (const char *path, PathType type, char *component) |
| WizardExport char ** | GetPathComponents (const char *path, size_t *number_components) |
| WizardExport WizardBooleanType | GetExecutionPath (char *path, const size_t extent) |
| WizardExport WizardBooleanType | IsAccessible (const char *path) |
| WizardExport WizardBooleanType | IsWizardTrue (const char *value) |
| WizardExport const char * | ParseWizardTime (const char *timestamp, time_t *target) |
| WizardExport FILE * | WizardOpenStream (const char *path, const char *mode) |
Variables | |
| static const char | Base64 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| #define X_OK 1 |
Referenced by IsDirectory().
| WizardExport void AppendFileExtension | ( | const char * | extension, | |
| char * | filename | |||
| ) |
Definition at line 91 of file utility.c.
References ConcatenateWizardString(), CopyWizardString(), GetPathComponent(), GetWizardModule, LogWizardEvent(), RootPath, and TraceEvent.
Referenced by AcquireFileLock(), and RelinquishFileLock().
| WizardExport unsigned char* Base64Decode | ( | const char * | source, | |
| size_t * | length | |||
| ) |
Definition at line 133 of file utility.c.
References AcquireQuantumMemory(), Base64, GetWizardModule, LogWizardEvent(), RelinquishWizardMemory(), and TraceEvent.
| WizardExport char* Base64Encode | ( | const unsigned char * | blob, | |
| const size_t | blob_length, | |||
| size_t * | encode_length | |||
| ) |
Definition at line 287 of file utility.c.
References AcquireQuantumMemory(), Base64, GetWizardModule, LogWizardEvent(), and TraceEvent.
Referenced by CanonicalXMLContent().
| WizardExport void ChopPathComponents | ( | char * | path, | |
| const size_t | components | |||
| ) |
Definition at line 373 of file utility.c.
References GetPathComponent(), and HeadPath.
Referenced by GetConfigurePaths().
| WizardExport WizardBooleanType GetExecutionPath | ( | char * | path, | |
| const size_t | extent | |||
| ) |
Definition at line 638 of file utility.c.
References AcquireQuantumMemory(), ConcatenateWizardString(), CopyWizardString(), DirectorySeparator, FormatWizardString(), getcwd, getpid, IsAccessible(), NTGetExecutionPath(), PATH_MAX, and RelinquishWizardMemory().
Referenced by WizardsToolkitGenesis().
| WizardExport void GetPathComponent | ( | const char * | path, | |
| PathType | type, | |||
| char * | component | |||
| ) |
Definition at line 410 of file utility.c.
References BasePath, CanonicalPath, CopyWizardMemory(), CopyWizardString(), ExtensionPath, FilesystemPath, GetWizardModule, HeadPath, IsAccessible(), IsBasenameSeparator, IsDirectory(), LogWizardEvent(), RootPath, SubnodePath, TailPath, TraceEvent, UndefinedPath, and WizardFalse.
Referenced by AddPathToXMLTree(), AppendFileExtension(), ChopPathComponents(), GetXMLTreePath(), LoadConfigureList(), LoadLogList(), LoadMimeList(), and WizardsToolkitGenesis().
| WizardExport char** GetPathComponents | ( | const char * | path, | |
| size_t * | number_components | |||
| ) |
Definition at line 571 of file utility.c.
References AcquireQuantumMemory(), CopyWizardString(), IsBasenameSeparator, ResourceFatalError, and ThrowFatalException.
Referenced by AddPathToXMLTree(), and GetXMLTreePath().
| WizardExport WizardBooleanType IsAccessible | ( | const char * | path | ) |
Definition at line 762 of file utility.c.
References access, F_OK, S_ISREG, WizardFalse, and WizardTrue.
Referenced by GetExecutionPath(), GetPathComponent(), IsGlob(), and LogWizardEventList().
| static int IsDirectory | ( | const char * | path | ) | [static] |
Definition at line 806 of file utility.c.
References access, S_ISDIR, WizardFalse, and X_OK.
Referenced by GetPathComponent().
| WizardExport WizardBooleanType IsWizardTrue | ( | const char * | value | ) |
Definition at line 856 of file utility.c.
References LocaleCompare(), WizardFalse, and WizardTrue.
Referenced by LoadConfigureList(), and LoadMimeList().
| WizardExport const char* ParseWizardTime | ( | const char * | timestamp, | |
| time_t * | target | |||
| ) |
Definition at line 897 of file utility.c.
References ResetWizardMemory().
| WizardExport FILE* WizardOpenStream | ( | const char * | path, | |
| const char * | mode | |||
| ) |
Definition at line 1107 of file utility.c.
References RelinquishWizardMemory().
Referenced by LogWizardEventList(), and OpenBlob().
const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [static] |
Definition at line 56 of file utility.c.
Referenced by Base64Decode(), and Base64Encode().
1.6.2-20100208