Lines Matching refs:string_info
143 *string_info; in AcquireStringInfoContainer() local
145 string_info=(StringInfo *) AcquireCriticalMemory(sizeof(*string_info)); in AcquireStringInfoContainer()
146 (void) memset(string_info,0,sizeof(*string_info)); in AcquireStringInfoContainer()
147 string_info->signature=MagickCoreSignature; in AcquireStringInfoContainer()
148 return(string_info); in AcquireStringInfoContainer()
154 *string_info; in AcquireStringInfo() local
156 string_info=AcquireStringInfoContainer(); in AcquireStringInfo()
157 string_info->length=length; in AcquireStringInfo()
158 if (~string_info->length >= (MagickPathExtent-1)) in AcquireStringInfo()
159 string_info->datum=(unsigned char *) AcquireQuantumMemory( in AcquireStringInfo()
160 string_info->length+MagickPathExtent,sizeof(*string_info->datum)); in AcquireStringInfo()
161 if (string_info->datum == (unsigned char *) NULL) in AcquireStringInfo()
163 (void) memset(string_info->datum,0,(length+MagickPathExtent)* in AcquireStringInfo()
164 sizeof(*string_info->datum)); in AcquireStringInfo()
165 return(string_info); in AcquireStringInfo()
196 *string_info; in BlobToStringInfo() local
200 string_info=AcquireStringInfoContainer(); in BlobToStringInfo()
201 string_info->length=length; in BlobToStringInfo()
202 string_info->datum=(unsigned char *) AcquireQuantumMemory(length+ in BlobToStringInfo()
203 MagickPathExtent,sizeof(*string_info->datum)); in BlobToStringInfo()
204 if (string_info->datum == (unsigned char *) NULL) in BlobToStringInfo()
206 string_info=DestroyStringInfo(string_info); in BlobToStringInfo()
210 (void) memcpy(string_info->datum,blob,length); in BlobToStringInfo()
212 (void) memset(string_info->datum,0,length*sizeof(*string_info->datum)); in BlobToStringInfo()
213 (void) memset(string_info->datum+length,0,MagickPathExtent* in BlobToStringInfo()
214 sizeof(*string_info->datum)); in BlobToStringInfo()
215 return(string_info); in BlobToStringInfo()
302 MagickExport StringInfo *CloneStringInfo(const StringInfo *string_info) in CloneStringInfo() argument
307 assert(string_info != (StringInfo *) NULL); in CloneStringInfo()
308 assert(string_info->signature == MagickCoreSignature); in CloneStringInfo()
309 clone_info=AcquireStringInfo(string_info->length); in CloneStringInfo()
310 (void) CloneString(&clone_info->path,string_info->path); in CloneStringInfo()
311 (void) CloneString(&clone_info->name,string_info->name); in CloneStringInfo()
312 if (string_info->length != 0) in CloneStringInfo()
313 (void) memcpy(clone_info->datum,string_info->datum,string_info->length+1); in CloneStringInfo()
518 MagickExport void ConcatenateStringInfo(StringInfo *string_info, in ConcatenateStringInfo() argument
524 assert(string_info != (StringInfo *) NULL); in ConcatenateStringInfo()
525 assert(string_info->signature == MagickCoreSignature); in ConcatenateStringInfo()
527 length=string_info->length; in ConcatenateStringInfo()
530 SetStringInfoLength(string_info,length+source->length); in ConcatenateStringInfo()
531 (void) memcpy(string_info->datum+length,source->datum,source->length); in ConcatenateStringInfo()
573 *string_info; in ConfigureFileToStringInfo() local
633 string_info=AcquireStringInfoContainer(); in ConfigureFileToStringInfo()
634 string_info->path=ConstantString(filename); in ConfigureFileToStringInfo()
635 string_info->length=length; in ConfigureFileToStringInfo()
636 string_info->datum=(unsigned char *) string; in ConfigureFileToStringInfo()
637 return(string_info); in ConfigureFileToStringInfo()
803 MagickExport StringInfo *DestroyStringInfo(StringInfo *string_info) in DestroyStringInfo() argument
805 assert(string_info != (StringInfo *) NULL); in DestroyStringInfo()
806 assert(string_info->signature == MagickCoreSignature); in DestroyStringInfo()
807 if (string_info->datum != (unsigned char *) NULL) in DestroyStringInfo()
808 string_info->datum=(unsigned char *) RelinquishMagickMemory( in DestroyStringInfo()
809 string_info->datum); in DestroyStringInfo()
810 if (string_info->name != (char *) NULL) in DestroyStringInfo()
811 string_info->name=DestroyString(string_info->name); in DestroyStringInfo()
812 if (string_info->path != (char *) NULL) in DestroyStringInfo()
813 string_info->path=DestroyString(string_info->path); in DestroyStringInfo()
814 string_info->signature=(~MagickCoreSignature); in DestroyStringInfo()
815 string_info=(StringInfo *) RelinquishMagickMemory(string_info); in DestroyStringInfo()
816 return(string_info); in DestroyStringInfo()
996 *string_info; in FileToStringInfo() local
1001 string_info=AcquireStringInfoContainer(); in FileToStringInfo()
1002 string_info->path=ConstantString(filename); in FileToStringInfo()
1003 string_info->datum=(unsigned char *) FileToBlob(filename,extent, in FileToStringInfo()
1004 &string_info->length,exception); in FileToStringInfo()
1005 if (string_info->datum == (unsigned char *) NULL) in FileToStringInfo()
1007 string_info=DestroyStringInfo(string_info); in FileToStringInfo()
1010 return(string_info); in FileToStringInfo()
1168 MagickExport unsigned char *GetStringInfoDatum(const StringInfo *string_info) in GetStringInfoDatum() argument
1170 assert(string_info != (StringInfo *) NULL); in GetStringInfoDatum()
1171 assert(string_info->signature == MagickCoreSignature); in GetStringInfoDatum()
1172 return(string_info->datum); in GetStringInfoDatum()
1197 MagickExport size_t GetStringInfoLength(const StringInfo *string_info) in GetStringInfoLength() argument
1199 assert(string_info != (StringInfo *) NULL); in GetStringInfoLength()
1200 assert(string_info->signature == MagickCoreSignature); in GetStringInfoLength()
1201 return(string_info->length); in GetStringInfoLength()
1226 MagickExport const char *GetStringInfoName(const StringInfo *string_info) in GetStringInfoName() argument
1228 assert(string_info != (StringInfo *) NULL); in GetStringInfoName()
1229 assert(string_info->signature == MagickCoreSignature); in GetStringInfoName()
1230 return(string_info->name); in GetStringInfoName()
1255 MagickExport const char *GetStringInfoPath(const StringInfo *string_info) in GetStringInfoPath() argument
1257 assert(string_info != (StringInfo *) NULL); in GetStringInfoPath()
1258 assert(string_info->signature == MagickCoreSignature); in GetStringInfoPath()
1259 return(string_info->path); in GetStringInfoPath()
1462 const StringInfo *string_info) in PrintStringInfo() argument
1472 assert(string_info != (StringInfo *) NULL); in PrintStringInfo()
1473 assert(string_info->signature == MagickCoreSignature); in PrintStringInfo()
1474 p=(char *) string_info->datum; in PrintStringInfo()
1475 for (i=0; i < string_info->length; i++) in PrintStringInfo()
1482 (void) FormatLocaleFile(file,"%s(%.20g):\n",id,(double) string_info->length); in PrintStringInfo()
1483 if (i == string_info->length) in PrintStringInfo()
1485 for (i=0; i < string_info->length; i++) in PrintStringInfo()
1486 (void) fputc(string_info->datum[i],file); in PrintStringInfo()
1493 p=(char *) string_info->datum; in PrintStringInfo()
1494 for (i=0; i < string_info->length; i+=CharsPerLine) in PrintStringInfo()
1497 for (j=1; j <= MagickMin(string_info->length-i,CharsPerLine); j++) in PrintStringInfo()
1511 for (j=1; j <= MagickMin(string_info->length-i,CharsPerLine); j++) in PrintStringInfo()
1545 MagickExport void ResetStringInfo(StringInfo *string_info) in ResetStringInfo() argument
1547 assert(string_info != (StringInfo *) NULL); in ResetStringInfo()
1548 assert(string_info->signature == MagickCoreSignature); in ResetStringInfo()
1549 (void) memset(string_info->datum,0,string_info->length); in ResetStringInfo()
1625 MagickExport void SetStringInfo(StringInfo *string_info, in SetStringInfo() argument
1628 assert(string_info != (StringInfo *) NULL); in SetStringInfo()
1629 assert(string_info->signature == MagickCoreSignature); in SetStringInfo()
1632 if (string_info->length == 0) in SetStringInfo()
1634 (void) memset(string_info->datum,0,string_info->length); in SetStringInfo()
1635 (void) memcpy(string_info->datum,source->datum,MagickMin(string_info->length, in SetStringInfo()
1665 MagickExport void SetStringInfoDatum(StringInfo *string_info, in SetStringInfoDatum() argument
1668 assert(string_info != (StringInfo *) NULL); in SetStringInfoDatum()
1669 assert(string_info->signature == MagickCoreSignature); in SetStringInfoDatum()
1670 if (string_info->length != 0) in SetStringInfoDatum()
1671 (void) memcpy(string_info->datum,source,string_info->length); in SetStringInfoDatum()
1698 MagickExport void SetStringInfoLength(StringInfo *string_info, in SetStringInfoLength() argument
1701 assert(string_info != (StringInfo *) NULL); in SetStringInfoLength()
1702 assert(string_info->signature == MagickCoreSignature); in SetStringInfoLength()
1703 if (string_info->length == length) in SetStringInfoLength()
1707 string_info->length=length; in SetStringInfoLength()
1708 if (string_info->datum == (unsigned char *) NULL) in SetStringInfoLength()
1709 string_info->datum=(unsigned char *) AcquireQuantumMemory(length+ in SetStringInfoLength()
1710 MagickPathExtent,sizeof(*string_info->datum)); in SetStringInfoLength()
1712 string_info->datum=(unsigned char *) ResizeQuantumMemory(string_info->datum, in SetStringInfoLength()
1713 length+MagickPathExtent,sizeof(*string_info->datum)); in SetStringInfoLength()
1714 if (string_info->datum == (unsigned char *) NULL) in SetStringInfoLength()
1742 MagickExport void SetStringInfoName(StringInfo *string_info,const char *name) in SetStringInfoName() argument
1744 assert(string_info != (StringInfo *) NULL); in SetStringInfoName()
1745 assert(string_info->signature == MagickCoreSignature); in SetStringInfoName()
1747 string_info->name=ConstantString(name); in SetStringInfoName()
1774 MagickExport void SetStringInfoPath(StringInfo *string_info,const char *path) in SetStringInfoPath() argument
1776 assert(string_info != (StringInfo *) NULL); in SetStringInfoPath()
1777 assert(string_info->signature == MagickCoreSignature); in SetStringInfoPath()
1779 string_info->path=ConstantString(path); in SetStringInfoPath()
1804 MagickExport StringInfo *SplitStringInfo(StringInfo *string_info, in SplitStringInfo() argument
1810 assert(string_info != (StringInfo *) NULL); in SplitStringInfo()
1811 assert(string_info->signature == MagickCoreSignature); in SplitStringInfo()
1812 if (offset > string_info->length) in SplitStringInfo()
1815 SetStringInfo(split_info,string_info); in SplitStringInfo()
1816 (void) memmove(string_info->datum,string_info->datum+offset, in SplitStringInfo()
1817 string_info->length-offset+MagickPathExtent); in SplitStringInfo()
1818 SetStringInfoLength(string_info,string_info->length-offset); in SplitStringInfo()
1844 MagickExport char *StringInfoToString(const StringInfo *string_info) in StringInfoToString() argument
1853 length=string_info->length; in StringInfoToString()
1859 (void) memcpy(string,(char *) string_info->datum,length*sizeof(*string)); in StringInfoToString()
1886 MagickExport char *StringInfoToHexString(const StringInfo *string_info) in StringInfoToHexString() argument
1906 length=string_info->length; in StringInfoToHexString()
1929 p=string_info->datum; in StringInfoToHexString()
1931 for (i=0; i < (ssize_t) string_info->length; i++) in StringInfoToHexString()
2435 *string_info; in StringToStringInfo() local
2438 string_info=AcquireStringInfo(strlen(string)); in StringToStringInfo()
2439 SetStringInfoDatum(string_info,(const unsigned char *) string); in StringToStringInfo()
2440 return(string_info); in StringToStringInfo()