MagickCore  7.0.3
string_.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License. You may
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  MagickCore string methods.
17 */
18 #ifndef MAGICKCORE_STRING_H_
19 #define MAGICKCORE_STRING_H_
20 
21 #include "MagickCore/exception.h"
22 
23 #if defined(__cplusplus) || defined(c_plusplus)
24 extern "C" {
25 #endif
26 
27 typedef struct _StringInfo
28 {
29  char
30  *path;
31 
32  unsigned char
34 
35  size_t
37  signature;
38 
39  char
40  *name;
41 } StringInfo;
42 
43 extern MagickExport char
44  *AcquireString(const char *),
45  *CloneString(char **,const char *),
46  *ConstantString(const char *),
47  *DestroyString(char *),
48  **DestroyStringList(char **),
49  *EscapeString(const char *,const char),
50  *FileToString(const char *,const size_t,ExceptionInfo *),
51  *GetEnvironmentValue(const char *),
52  *SanitizeString(const char *),
55  **StringToArgv(const char *,int *),
56  *StringToken(const char *,char **),
57  **StringToList(const char *),
58  **StringToStrings(const char *,size_t *);
59 
60 extern MagickExport const char
61  *GetStringInfoName(const StringInfo *),
62  *GetStringInfoPath(const StringInfo *);
63 
64 extern MagickExport double
65  InterpretSiPrefixValue(const char *magick_restrict,char **magick_restrict),
66  *StringToArrayOfDoubles(const char *,ssize_t *,ExceptionInfo *);
67 
68 extern MagickExport int
69  CompareStringInfo(const StringInfo *,const StringInfo *);
70 
72  ConcatenateString(char **,const char *),
73  IsStringTrue(const char *) magick_attribute((__pure__)),
74  IsStringFalse(const char *) magick_attribute((__pure__)),
75  SubstituteString(char **,const char *,const char *);
76 
77 extern MagickExport size_t
78  ConcatenateMagickString(char *,const char *,const size_t)
79  magick_attribute((__nonnull__)),
80  CopyMagickString(char *,const char *,const size_t)
81  magick_attribute((__nonnull__)),
83 
84 extern MagickExport ssize_t
85  FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *,
86  const size_t,char *);
87 
88 extern MagickExport StringInfo
89  *AcquireStringInfo(const size_t),
90  *BlobToStringInfo(const void *,const size_t),
91  *CloneStringInfo(const StringInfo *),
92  *ConfigureFileToStringInfo(const char *),
93  *DestroyStringInfo(StringInfo *),
94  *FileToStringInfo(const char *,const size_t,ExceptionInfo *),
95  *SplitStringInfo(StringInfo *,const size_t),
96  *StringToStringInfo(const char *);
97 
98 extern MagickExport unsigned char
99  *GetStringInfoDatum(const StringInfo *);
100 
101 extern MagickExport void
102  ConcatenateStringInfo(StringInfo *,const StringInfo *)
103  magick_attribute((__nonnull__)),
104  PrintStringInfo(FILE *file,const char *,const StringInfo *),
105  ResetStringInfo(StringInfo *),
106  SetStringInfo(StringInfo *,const StringInfo *),
107  SetStringInfoDatum(StringInfo *,const unsigned char *),
108  SetStringInfoLength(StringInfo *,const size_t),
109  SetStringInfoName(StringInfo *,const char *),
110  SetStringInfoPath(StringInfo *,const char *),
111  StripString(char *);
112 
113 #if defined(__cplusplus) || defined(c_plusplus)
114 }
115 #endif
116 
117 #endif
#define magick_restrict
Definition: MagickCore.h:41
MagickExport double InterpretSiPrefixValue(const char *magick_restrict string, char **magick_restrict sentinal)
Definition: string.c:1336
MagickExport ssize_t FormatMagickSize(const MagickSizeType size, const MagickBooleanType bi, const char *suffix, const size_t length, char *format)
Definition: string.c:1093
MagickExport MagickBooleanType IsStringFalse(const char *value)
Definition: string.c:1466
MagickExport int CompareStringInfo(const StringInfo *target, const StringInfo *source)
Definition: string.c:378
MagickExport StringInfo * StringToStringInfo(const char *string)
Definition: string.c:2475
MagickExport void SetStringInfoPath(StringInfo *string_info, const char *path)
Definition: string.c:1821
unsigned char * datum
Definition: string_.h:33
MagickExport char * EscapeString(const char *source, const char escape)
Definition: string.c:929
MagickExport size_t ConcatenateMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:426
MagickExport char * SanitizeString(const char *source)
Definition: string.c:1624
MagickExport void ConcatenateStringInfo(StringInfo *string_info, const StringInfo *source)
Definition: string.c:552
MagickExport void StripString(char *message)
Definition: string.c:2509
MagickExport char * FileToString(const char *filename, const size_t extent, ExceptionInfo *exception)
Definition: string.c:1000
#define magick_attribute(x)
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
Definition: string.c:1215
MagickBooleanType
Definition: magick-type.h:158
MagickExport char ** StringToList(const char *text)
Definition: string.c:2299
MagickExport char * AcquireString(const char *source)
Definition: string.c:129
MagickExport StringInfo * FileToStringInfo(const char *filename, const size_t extent, ExceptionInfo *exception)
Definition: string.c:1039
MagickExport StringInfo * DestroyStringInfo(StringInfo *string_info)
Definition: string.c:850
MagickExport void ResetStringInfo(StringInfo *string_info)
Definition: string.c:1592
MagickExport MagickBooleanType ConcatenateString(char **destination, const char *source)
Definition: string.c:492
size_t MagickSizeType
Definition: magick-type.h:130
MagickExport void PrintStringInfo(FILE *file, const char *id, const StringInfo *string_info)
Definition: string.c:1508
MagickExport MagickBooleanType IsStringTrue(const char *value)
Definition: string.c:1425
MagickExport StringInfo * BlobToStringInfo(const void *blob, const size_t length)
Definition: string.c:229
MagickExport double * StringToArrayOfDoubles(const char *string, ssize_t *count, ExceptionInfo *exception)
Definition: string.c:2137
MagickExport MagickBooleanType SubstituteString(char **string, const char *search, const char *replace)
Definition: string.c:2571
MagickExport char * GetEnvironmentValue(const char *name)
Definition: string.c:1182
MagickExport StringInfo * ConfigureFileToStringInfo(const char *filename)
Definition: string.c:592
MagickExport size_t CopyMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:755
MagickExport StringInfo * AcquireStringInfo(const size_t length)
Definition: string.c:187
MagickExport const char * GetStringInfoPath(const StringInfo *string_info)
Definition: string.c:1302
MagickExport void SetStringInfoName(StringInfo *string_info, const char *name)
Definition: string.c:1789
MagickExport char * StringToken(const char *delimiters, char **string)
Definition: string.c:2236
MagickExport void SetStringInfoLength(StringInfo *string_info, const size_t length)
Definition: string.c:1745
MagickExport char * DestroyString(char *string)
Definition: string.c:823
char * name
Definition: string_.h:40
MagickExport char ** DestroyStringList(char **list)
Definition: string.c:888
struct _StringInfo StringInfo
char * path
Definition: string_.h:30
size_t signature
Definition: string_.h:36
MagickExport char * CloneString(char **destination, const char *source)
Definition: string.c:286
MagickExport char ** StringToStrings(const char *text, size_t *count)
Definition: string.c:2330
size_t length
Definition: string_.h:36
#define MagickExport
MagickExport StringInfo * SplitStringInfo(StringInfo *string_info, const size_t offset)
Definition: string.c:1851
MagickExport char * StringInfoToString(const StringInfo *string_info)
Definition: string.c:1891
MagickExport char * StringInfoToHexString(const StringInfo *string_info)
Definition: string.c:1933
MagickExport char ** StringToArgv(const char *text, int *argc)
Definition: string.c:2022
MagickExport size_t GetStringInfoLength(const StringInfo *string_info)
Definition: string.c:1244
MagickExport const char * GetStringInfoName(const StringInfo *string_info)
Definition: string.c:1273
MagickExport char * ConstantString(const char *source)
Definition: string.c:700
MagickExport StringInfo * CloneStringInfo(const StringInfo *string_info)
Definition: string.c:338
MagickExport void SetStringInfoDatum(StringInfo *string_info, const unsigned char *source)
Definition: string.c:1712
MagickExport void SetStringInfo(StringInfo *string_info, const StringInfo *source)
Definition: string.c:1672