MagickCore  7.1.0
string_.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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 *),
56  **StringToArgv(const char *,int *),
57  *StringToken(const char *,char **),
58  **StringToList(const char *),
59  **StringToStrings(const char *,size_t *);
60 
61 extern MagickExport const char
62  *GetStringInfoName(const StringInfo *),
63  *GetStringInfoPath(const StringInfo *);
64 
65 extern MagickExport double
67  *StringToArrayOfDoubles(const char *,ssize_t *,ExceptionInfo *);
68 
69 extern MagickExport int
70  CompareStringInfo(const StringInfo *,const StringInfo *);
71 
74  IsStringTrue(const char *) magick_attribute((__pure__)),
75  IsStringFalse(const char *) magick_attribute((__pure__)),
76  SubstituteString(char **,const char *,const char *);
77 
78 extern MagickExport size_t
80  const size_t) magick_attribute((__nonnull__)),
82  const size_t) magick_attribute((__nonnull__)),
84  StripMagickString(char *);
85 
86 extern MagickExport ssize_t
87  FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *,
88  const size_t,char *);
89 
91  *AcquireStringInfo(const size_t),
92  *BlobToStringInfo(const void *,const size_t),
93  *CloneStringInfo(const StringInfo *),
94  *ConfigureFileToStringInfo(const char *),
96  *FileToStringInfo(const char *,const size_t,ExceptionInfo *),
97  *SplitStringInfo(StringInfo *,const size_t),
98  *StringToStringInfo(const char *);
99 
100 extern MagickExport unsigned char
101  *GetStringInfoDatum(const StringInfo *);
102 
103 extern MagickExport void
105  magick_attribute((__nonnull__)),
106  PrintStringInfo(FILE *file,const char *,const StringInfo *),
109  SetStringInfoDatum(StringInfo *,const unsigned char *),
110  SetStringInfoLength(StringInfo *,const size_t),
111  SetStringInfoName(StringInfo *,const char *),
112  SetStringInfoPath(StringInfo *,const char *),
113  StripString(char *);
114 
115 #if defined(__cplusplus) || defined(c_plusplus)
116 }
117 #endif
118 
119 #endif
#define magick_restrict
Definition: MagickCore.h:41
MagickExport ssize_t FormatMagickSize(const MagickSizeType, const MagickBooleanType, const char *, const size_t, char *)
Definition: string.c:1058
MagickExport char ** StringToList(const char *)
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *)
Definition: string.c:1180
unsigned char * datum
Definition: string_.h:33
MagickExport double * StringToArrayOfDoubles(const char *, ssize_t *, ExceptionInfo *)
Definition: string.c:2140
MagickExport StringInfo * AcquireStringInfo(const size_t)
MagickExport char ** StringToArgv(const char *, int *)
MagickExport int CompareStringInfo(const StringInfo *, const StringInfo *)
Definition: string.c:344
MagickExport void SetStringInfoPath(StringInfo *, const char *)
MagickExport char * StringToken(const char *, char **)
MagickExport size_t StripMagickString(char *)
Definition: string.c:2522
MagickExport char * StringInfoToHexString(const StringInfo *)
MagickExport char * EscapeString(const char *, const char)
MagickExport char * SanitizeString(const char *)
MagickExport void SetStringInfoName(StringInfo *, const char *)
MagickExport MagickBooleanType IsStringFalse(const char *) magick_attribute((__pure__))
#define magick_attribute(x)
MagickExport void SetStringInfoDatum(StringInfo *, const unsigned char *)
MagickExport StringInfo * StringToStringInfo(const char *)
Definition: string.c:2482
MagickExport const char * GetStringInfoName(const StringInfo *)
MagickBooleanType
Definition: magick-type.h:169
MagickExport char * StringInfoToDigest(const StringInfo *)
MagickExport StringInfo * SplitStringInfo(StringInfo *, const size_t)
MagickExport void ResetStringInfo(StringInfo *)
MagickExport MagickBooleanType IsStringTrue(const char *) magick_attribute((__pure__))
MagickExport char * ConstantString(const char *)
MagickExport size_t ConcatenateMagickString(char *magick_restrict, const char *magick_restrict, const size_t) magick_attribute((__nonnull__))
MagickExport const char * GetStringInfoPath(const StringInfo *)
Definition: string.c:1267
MagickExport char ** DestroyStringList(char **)
size_t MagickSizeType
Definition: magick-type.h:134
MagickExport char ** StringToStrings(const char *, size_t *)
Definition: string.c:2333
MagickExport size_t CopyMagickString(char *magick_restrict, const char *magick_restrict, const size_t) magick_attribute((__nonnull__))
MagickExport void ConcatenateStringInfo(StringInfo *, const StringInfo *) magick_attribute((__nonnull__))
MagickExport StringInfo * FileToStringInfo(const char *, const size_t, ExceptionInfo *)
MagickExport void SetStringInfoLength(StringInfo *, const size_t)
MagickExport MagickBooleanType ConcatenateString(char **magick_restrict, const char *magick_restrict)
MagickExport StringInfo * DestroyStringInfo(StringInfo *)
MagickExport char * CloneString(char **, const char *)
MagickExport char * FileToString(const char *, const size_t, ExceptionInfo *)
char * name
Definition: string_.h:40
MagickExport char * AcquireString(const char *)
MagickExport char * DestroyString(char *)
struct _StringInfo StringInfo
MagickExport StringInfo * BlobToStringInfo(const void *, const size_t)
MagickExport MagickBooleanType SubstituteString(char **, const char *, const char *)
Definition: string.c:2587
MagickExport void SetStringInfo(StringInfo *, const StringInfo *)
char * path
Definition: string_.h:30
MagickExport char * StringInfoToString(const StringInfo *)
MagickExport size_t GetStringInfoLength(const StringInfo *)
size_t signature
Definition: string_.h:36
size_t length
Definition: string_.h:36
#define MagickExport
MagickExport double InterpretSiPrefixValue(const char *magick_restrict, char **magick_restrict)
MagickExport StringInfo * ConfigureFileToStringInfo(const char *)
MagickExport void StripString(char *)
Definition: string.c:2517
MagickExport char * GetEnvironmentValue(const char *)
MagickExport StringInfo * CloneStringInfo(const StringInfo *)
MagickExport void PrintStringInfo(FILE *file, const char *, const StringInfo *)