% MagickCore String Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% August 2003 %
% %
% %
-% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the license. You may %
*/
#if !defined(MAGICKCORE_HAVE_STRCASECMP) || !defined(MAGICKCORE_HAVE_STRNCASECMP)
static const unsigned char
- asciimap[] =
+ AsciiMap[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
size_t
length;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(destination != (char **) NULL);
if (source == (const char *) NULL)
{
StringInfo
*clone_info;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
clone_info=AcquireStringInfo(string_info->length);
int
status;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(target != (StringInfo *) NULL);
assert(target->signature == MagickSignature);
assert(source != (StringInfo *) NULL);
size_t
length;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
assert(source != (const StringInfo *) NULL);
*/
MagickExport StringInfo *DestroyStringInfo(StringInfo *string_info)
{
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
if (string_info->datum != (unsigned char *) NULL)
size_t
length;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(source != (const char *) NULL);
length=strlen(source);
for (p=source; *p != '\0'; p++)
j;
assert(id != (const char *) NULL);
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",id);
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
p=(char *) string_info->datum;
break;
p++;
}
+ (void) FormatLocaleFile(file,"%s(%.20g): ",id,(double) string_info->length);
if (i == string_info->length)
{
for (i=0; i < string_info->length; i++)
*/
MagickExport void ResetStringInfo(StringInfo *string_info)
{
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
(void) ResetMagickMemory(string_info->datum,0,string_info->length);
MagickExport void SetStringInfo(StringInfo *string_info,
const StringInfo *source)
{
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
assert(source != (StringInfo *) NULL);
MagickExport void SetStringInfoDatum(StringInfo *string_info,
const unsigned char *source)
{
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
if (string_info->length != 0)
MagickExport void SetStringInfoLength(StringInfo *string_info,
const size_t length)
{
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
if (~length < MaxTextExtent)
*/
MagickExport void SetStringInfoPath(StringInfo *string_info,const char *path)
{
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
assert(path != (const char *) NULL);
StringInfo
*split_info;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickSignature);
if (offset > string_info->length)
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% StringToArrayOfDoubles() converts a string of space or comma seperated
+% StringToArrayOfDoubles() converts a string of space or comma separated
% numbers into array of floating point numbers (doubles). Any number that
% failes to parse properly will produce a syntax error. As will two commas
% without a number between them. However a final comma at the end will
%
% The format of the StringToArrayOfDoubles method is:
%
-% double *StringToArrayOfDoubles(const char *string,size_t *count,
-% ExceptionInfo *exception)
+% double *StringToArrayOfDoubles(const char *string,size_t *count)
%
% A description of each parameter follows:
%
-% o string: the string containing the comma/space seperated values.
+% o string: the string containing the comma/space separated values.
%
% o count: returns number of arguments in returned array
%
-% o exception: return 'memory failure' exceptions
+% o exception: return any errors or warnings in this structure.
%
*/
MagickExport double *StringToArrayOfDoubles(const char *string,ssize_t *count,
*count=i;
array=(double *) AcquireQuantumMemory((size_t) i,sizeof(*array));
if (array == (double *) NULL)
- ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ ResourceLimitError,"MemoryAllocationFailed","`%s'","");
+ return((double *) NULL);
+ }
/*
Fill in the floating point values.
*/
StringInfo
*string_info;
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(string != (const char *) NULL);
string_info=AcquireStringInfo(strlen(string));
SetStringInfoDatum(string_info,(const unsigned char *) string);