Defines | Functions | Variables

utility.c File Reference

#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"

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 Documentation

#define X_OK   1

Referenced by IsDirectory().


Function Documentation

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 
)

References GetPathComponent(), and HeadPath.

Referenced by GetConfigurePaths().

WizardExport WizardBooleanType GetExecutionPath ( char *  path,
const size_t  extent 
)
WizardExport void GetPathComponent ( const char *  path,
PathType  type,
char *  component 
)
WizardExport char** GetPathComponents ( const char *  path,
size_t *  number_components 
)
WizardExport WizardBooleanType IsAccessible ( const char *  path  ) 
static int IsDirectory ( const char *  path  )  [static]

References access, S_ISDIR, WizardFalse, and X_OK.

Referenced by GetPathComponent().

WizardExport WizardBooleanType IsWizardTrue ( const char *  value  ) 
WizardExport const char* ParseWizardTime ( const char *  timestamp,
time_t *  target 
)

References ResetWizardMemory().

WizardExport FILE* WizardOpenStream ( const char *  path,
const char *  mode 
)

References RelinquishWizardMemory().

Referenced by LogWizardEventList(), and OpenBlob().


Variable Documentation

const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [static]

Referenced by Base64Decode(), and Base64Encode().