1 /* 2 Copyright 1999-2016 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. 6 obtain a copy of the License at 7 8 http://www.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 33 *datum; 34 35 size_t 36 length, 37 signature; 38 } StringInfo; 39 40 extern MagickExport char 41 *AcquireString(const char *), 42 *CloneString(char **,const char *), 43 *ConstantString(const char *), 44 *DestroyString(char *), 45 **DestroyStringList(char **), 46 *EscapeString(const char *,const char), 47 *FileToString(const char *,const size_t,ExceptionInfo *), 48 *GetEnvironmentValue(const char *), 49 *SanitizeString(const char *), 50 *StringInfoToHexString(const StringInfo *), 51 *StringInfoToString(const StringInfo *), 52 **StringToArgv(const char *,int *), 53 *StringToken(const char *,char **), 54 **StringToList(const char *); 55 56 extern MagickExport const char 57 *GetStringInfoPath(const StringInfo *); 58 59 extern MagickExport double 60 InterpretSiPrefixValue(const char *magick_restrict,char **magick_restrict), 61 *StringToArrayOfDoubles(const char *,ssize_t *,ExceptionInfo *); 62 63 extern MagickExport int 64 CompareStringInfo(const StringInfo *,const StringInfo *); 65 66 extern MagickExport MagickBooleanType 67 ConcatenateString(char **,const char *), 68 IsStringTrue(const char *), 69 IsStringFalse(const char *), 70 SubstituteString(char **,const char *,const char *); 71 72 extern MagickExport size_t 73 ConcatenateMagickString(char *,const char *,const size_t) 74 magick_attribute((__nonnull__)), 75 CopyMagickString(char *,const char *,const size_t) 76 magick_attribute((__nonnull__)), 77 GetStringInfoLength(const StringInfo *); 78 79 extern MagickExport ssize_t 80 FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *, 81 const size_t,char *), 82 FormatMagickTime(const time_t,const size_t,char *); 83 84 extern MagickExport StringInfo 85 *AcquireStringInfo(const size_t), 86 *BlobToStringInfo(const void *,const size_t), 87 *CloneStringInfo(const StringInfo *), 88 *ConfigureFileToStringInfo(const char *), 89 *DestroyStringInfo(StringInfo *), 90 *FileToStringInfo(const char *,const size_t,ExceptionInfo *), 91 *SplitStringInfo(StringInfo *,const size_t), 92 *StringToStringInfo(const char *); 93 94 extern MagickExport unsigned char 95 *GetStringInfoDatum(const StringInfo *); 96 97 extern MagickExport void 98 ConcatenateStringInfo(StringInfo *,const StringInfo *) 99 magick_attribute((__nonnull__)), 100 PrintStringInfo(FILE *file,const char *,const StringInfo *), 101 ResetStringInfo(StringInfo *), 102 SetStringInfo(StringInfo *,const StringInfo *), 103 SetStringInfoDatum(StringInfo *,const unsigned char *), 104 SetStringInfoLength(StringInfo *,const size_t), 105 SetStringInfoPath(StringInfo *,const char *), 106 StripString(char *); 107 108 #if defined(__cplusplus) || defined(c_plusplus) 109 } 110 #endif 111 112 #endif 113