Lines Matching refs:string_info
179 *string_info; in AcquireStringInfoContainer() local
181 string_info=(StringInfo *) AcquireCriticalMemory(sizeof(*string_info)); in AcquireStringInfoContainer()
182 (void) memset(string_info,0,sizeof(*string_info)); in AcquireStringInfoContainer()
183 string_info->signature=MagickCoreSignature; in AcquireStringInfoContainer()
184 return(string_info); in AcquireStringInfoContainer()
190 *string_info; in AcquireStringInfo() local
192 string_info=AcquireStringInfoContainer(); in AcquireStringInfo()
193 string_info->length=length; in AcquireStringInfo()
194 if (~string_info->length >= (MagickPathExtent-1)) in AcquireStringInfo()
195 string_info->datum=(unsigned char *) AcquireQuantumMemory( in AcquireStringInfo()
196 string_info->length+MagickPathExtent,sizeof(*string_info->datum)); in AcquireStringInfo()
197 if (string_info->datum == (unsigned char *) NULL) in AcquireStringInfo()
199 (void) memset(string_info->datum,0,(length+MagickPathExtent)* in AcquireStringInfo()
200 sizeof(*string_info->datum)); in AcquireStringInfo()
201 return(string_info); in AcquireStringInfo()
232 *string_info; in BlobToStringInfo() local
236 string_info=AcquireStringInfoContainer(); in BlobToStringInfo()
237 string_info->length=length; in BlobToStringInfo()
238 string_info->datum=(unsigned char *) AcquireQuantumMemory(length+ in BlobToStringInfo()
239 MagickPathExtent,sizeof(*string_info->datum)); in BlobToStringInfo()
240 if (string_info->datum == (unsigned char *) NULL) in BlobToStringInfo()
242 string_info=DestroyStringInfo(string_info); in BlobToStringInfo()
246 (void) memcpy(string_info->datum,blob,length); in BlobToStringInfo()
248 (void) memset(string_info->datum,0,length*sizeof(*string_info->datum)); in BlobToStringInfo()
249 (void) memset(string_info->datum+length,0,MagickPathExtent* in BlobToStringInfo()
250 sizeof(*string_info->datum)); in BlobToStringInfo()
251 return(string_info); in BlobToStringInfo()
338 MagickExport StringInfo *CloneStringInfo(const StringInfo *string_info) in CloneStringInfo() argument
343 assert(string_info != (StringInfo *) NULL); in CloneStringInfo()
344 assert(string_info->signature == MagickCoreSignature); in CloneStringInfo()
345 clone_info=AcquireStringInfo(string_info->length); in CloneStringInfo()
346 if (string_info->length != 0) in CloneStringInfo()
347 (void) memcpy(clone_info->datum,string_info->datum,string_info->length+1); in CloneStringInfo()
552 MagickExport void ConcatenateStringInfo(StringInfo *string_info, in ConcatenateStringInfo() argument
558 assert(string_info != (StringInfo *) NULL); in ConcatenateStringInfo()
559 assert(string_info->signature == MagickCoreSignature); in ConcatenateStringInfo()
561 length=string_info->length; in ConcatenateStringInfo()
564 SetStringInfoLength(string_info,length+source->length); in ConcatenateStringInfo()
565 (void) memcpy(string_info->datum+length,source->datum,source->length); in ConcatenateStringInfo()
607 *string_info; in ConfigureFileToStringInfo() local
667 string_info=AcquireStringInfoContainer(); in ConfigureFileToStringInfo()
668 string_info->path=ConstantString(filename); in ConfigureFileToStringInfo()
669 string_info->length=length; in ConfigureFileToStringInfo()
670 string_info->datum=(unsigned char *) string; in ConfigureFileToStringInfo()
671 return(string_info); in ConfigureFileToStringInfo()
850 MagickExport StringInfo *DestroyStringInfo(StringInfo *string_info) in DestroyStringInfo() argument
852 assert(string_info != (StringInfo *) NULL); in DestroyStringInfo()
853 assert(string_info->signature == MagickCoreSignature); in DestroyStringInfo()
854 if (string_info->datum != (unsigned char *) NULL) in DestroyStringInfo()
855 string_info->datum=(unsigned char *) RelinquishMagickMemory( in DestroyStringInfo()
856 string_info->datum); in DestroyStringInfo()
857 if (string_info->name != (char *) NULL) in DestroyStringInfo()
858 string_info->name=DestroyString(string_info->name); in DestroyStringInfo()
859 if (string_info->path != (char *) NULL) in DestroyStringInfo()
860 string_info->path=DestroyString(string_info->path); in DestroyStringInfo()
861 string_info->signature=(~MagickCoreSignature); in DestroyStringInfo()
862 string_info=(StringInfo *) RelinquishMagickMemory(string_info); in DestroyStringInfo()
863 return(string_info); in DestroyStringInfo()
1043 *string_info; in FileToStringInfo() local
1048 string_info=AcquireStringInfoContainer(); in FileToStringInfo()
1049 string_info->path=ConstantString(filename); in FileToStringInfo()
1050 string_info->datum=(unsigned char *) FileToBlob(filename,extent, in FileToStringInfo()
1051 &string_info->length,exception); in FileToStringInfo()
1052 if (string_info->datum == (unsigned char *) NULL) in FileToStringInfo()
1054 string_info=DestroyStringInfo(string_info); in FileToStringInfo()
1057 return(string_info); in FileToStringInfo()
1295 MagickExport unsigned char *GetStringInfoDatum(const StringInfo *string_info) in GetStringInfoDatum() argument
1297 assert(string_info != (StringInfo *) NULL); in GetStringInfoDatum()
1298 assert(string_info->signature == MagickCoreSignature); in GetStringInfoDatum()
1299 return(string_info->datum); in GetStringInfoDatum()
1324 MagickExport size_t GetStringInfoLength(const StringInfo *string_info) in GetStringInfoLength() argument
1326 assert(string_info != (StringInfo *) NULL); in GetStringInfoLength()
1327 assert(string_info->signature == MagickCoreSignature); in GetStringInfoLength()
1328 return(string_info->length); in GetStringInfoLength()
1353 MagickExport const char *GetStringInfoName(const StringInfo *string_info) in GetStringInfoName() argument
1355 assert(string_info != (StringInfo *) NULL); in GetStringInfoName()
1356 assert(string_info->signature == MagickCoreSignature); in GetStringInfoName()
1357 return(string_info->name); in GetStringInfoName()
1382 MagickExport const char *GetStringInfoPath(const StringInfo *string_info) in GetStringInfoPath() argument
1384 assert(string_info != (StringInfo *) NULL); in GetStringInfoPath()
1385 assert(string_info->signature == MagickCoreSignature); in GetStringInfoPath()
1386 return(string_info->path); in GetStringInfoPath()
1589 const StringInfo *string_info) in PrintStringInfo() argument
1599 assert(string_info != (StringInfo *) NULL); in PrintStringInfo()
1600 assert(string_info->signature == MagickCoreSignature); in PrintStringInfo()
1601 p=(char *) string_info->datum; in PrintStringInfo()
1602 for (i=0; i < string_info->length; i++) in PrintStringInfo()
1609 (void) FormatLocaleFile(file,"%s(%.20g):\n",id,(double) string_info->length); in PrintStringInfo()
1610 if (i == string_info->length) in PrintStringInfo()
1612 for (i=0; i < string_info->length; i++) in PrintStringInfo()
1613 (void) fputc(string_info->datum[i],file); in PrintStringInfo()
1620 p=(char *) string_info->datum; in PrintStringInfo()
1621 for (i=0; i < string_info->length; i+=CharsPerLine) in PrintStringInfo()
1624 for (j=1; j <= MagickMin(string_info->length-i,CharsPerLine); j++) in PrintStringInfo()
1638 for (j=1; j <= MagickMin(string_info->length-i,CharsPerLine); j++) in PrintStringInfo()
1672 MagickExport void ResetStringInfo(StringInfo *string_info) in ResetStringInfo() argument
1674 assert(string_info != (StringInfo *) NULL); in ResetStringInfo()
1675 assert(string_info->signature == MagickCoreSignature); in ResetStringInfo()
1676 (void) memset(string_info->datum,0,string_info->length); in ResetStringInfo()
1752 MagickExport void SetStringInfo(StringInfo *string_info, in SetStringInfo() argument
1755 assert(string_info != (StringInfo *) NULL); in SetStringInfo()
1756 assert(string_info->signature == MagickCoreSignature); in SetStringInfo()
1759 if (string_info->length == 0) in SetStringInfo()
1761 (void) memset(string_info->datum,0,string_info->length); in SetStringInfo()
1762 (void) memcpy(string_info->datum,source->datum,MagickMin(string_info->length, in SetStringInfo()
1792 MagickExport void SetStringInfoDatum(StringInfo *string_info, in SetStringInfoDatum() argument
1795 assert(string_info != (StringInfo *) NULL); in SetStringInfoDatum()
1796 assert(string_info->signature == MagickCoreSignature); in SetStringInfoDatum()
1797 if (string_info->length != 0) in SetStringInfoDatum()
1798 (void) memcpy(string_info->datum,source,string_info->length); in SetStringInfoDatum()
1825 MagickExport void SetStringInfoLength(StringInfo *string_info, in SetStringInfoLength() argument
1828 assert(string_info != (StringInfo *) NULL); in SetStringInfoLength()
1829 assert(string_info->signature == MagickCoreSignature); in SetStringInfoLength()
1830 if (string_info->length == length) in SetStringInfoLength()
1834 string_info->length=length; in SetStringInfoLength()
1835 if (string_info->datum == (unsigned char *) NULL) in SetStringInfoLength()
1836 string_info->datum=(unsigned char *) AcquireQuantumMemory(length+ in SetStringInfoLength()
1837 MagickPathExtent,sizeof(*string_info->datum)); in SetStringInfoLength()
1839 string_info->datum=(unsigned char *) ResizeQuantumMemory(string_info->datum, in SetStringInfoLength()
1840 length+MagickPathExtent,sizeof(*string_info->datum)); in SetStringInfoLength()
1841 if (string_info->datum == (unsigned char *) NULL) in SetStringInfoLength()
1869 MagickExport void SetStringInfoName(StringInfo *string_info,const char *name) in SetStringInfoName() argument
1871 assert(string_info != (StringInfo *) NULL); in SetStringInfoName()
1872 assert(string_info->signature == MagickCoreSignature); in SetStringInfoName()
1874 string_info->name=ConstantString(name); in SetStringInfoName()
1901 MagickExport void SetStringInfoPath(StringInfo *string_info,const char *path) in SetStringInfoPath() argument
1903 assert(string_info != (StringInfo *) NULL); in SetStringInfoPath()
1904 assert(string_info->signature == MagickCoreSignature); in SetStringInfoPath()
1906 string_info->path=ConstantString(path); in SetStringInfoPath()
1931 MagickExport StringInfo *SplitStringInfo(StringInfo *string_info, in SplitStringInfo() argument
1937 assert(string_info != (StringInfo *) NULL); in SplitStringInfo()
1938 assert(string_info->signature == MagickCoreSignature); in SplitStringInfo()
1939 if (offset > string_info->length) in SplitStringInfo()
1942 SetStringInfo(split_info,string_info); in SplitStringInfo()
1943 (void) memmove(string_info->datum,string_info->datum+offset, in SplitStringInfo()
1944 string_info->length-offset+MagickPathExtent); in SplitStringInfo()
1945 SetStringInfoLength(string_info,string_info->length-offset); in SplitStringInfo()
1971 MagickExport char *StringInfoToString(const StringInfo *string_info) in StringInfoToString() argument
1980 length=string_info->length; in StringInfoToString()
1986 (void) memcpy(string,(char *) string_info->datum,length*sizeof(*string)); in StringInfoToString()
2013 MagickExport char *StringInfoToHexString(const StringInfo *string_info) in StringInfoToHexString() argument
2033 length=string_info->length; in StringInfoToHexString()
2056 p=string_info->datum; in StringInfoToHexString()
2058 for (i=0; i < (ssize_t) string_info->length; i++) in StringInfoToHexString()
2558 *string_info; in StringToStringInfo() local
2561 string_info=AcquireStringInfo(strlen(string)); in StringToStringInfo()
2562 SetStringInfoDatum(string_info,(const unsigned char *) string); in StringToStringInfo()
2563 return(string_info); in StringToStringInfo()