cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | fe676ee | 2013-11-18 13:03:38 +0000 | [diff] [blame] | 2 | Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 | #if defined(__cplusplus) || defined(c_plusplus) |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 25 | #include "MagickCore/exception.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 26 | |
| 27 | typedef struct _StringInfo |
| 28 | { |
| 29 | char |
| 30 | path[MaxTextExtent]; |
| 31 | |
| 32 | unsigned char |
| 33 | *datum; |
| 34 | |
| 35 | size_t |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 36 | length, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 *), |
cristy | 99bbf2c | 2011-09-26 18:27:50 +0000 | [diff] [blame] | 48 | *GetEnvironmentValue(const char *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 49 | *StringInfoToHexString(const StringInfo *), |
| 50 | *StringInfoToString(const StringInfo *), |
| 51 | **StringToArgv(const char *,int *), |
| 52 | *StringToken(const char *,char **), |
| 53 | **StringToList(const char *); |
| 54 | |
| 55 | extern MagickExport const char |
| 56 | *GetStringInfoPath(const StringInfo *); |
| 57 | |
cristy | dbdd0e3 | 2011-11-04 23:29:40 +0000 | [diff] [blame] | 58 | extern MagickExport double |
anthony | b1d483a | 2012-04-14 12:53:56 +0000 | [diff] [blame] | 59 | InterpretSiPrefixValue(const char *restrict,char **restrict), |
cristy | 5208573 | 2013-11-09 02:32:27 +0000 | [diff] [blame] | 60 | *StringToArrayOfDoubles(const char *,ssize_t *,ExceptionInfo *); |
cristy | dbdd0e3 | 2011-11-04 23:29:40 +0000 | [diff] [blame] | 61 | |
cristy | de58b41 | 2010-02-18 03:53:40 +0000 | [diff] [blame] | 62 | extern MagickExport int |
| 63 | CompareStringInfo(const StringInfo *,const StringInfo *), |
| 64 | LocaleCompare(const char *,const char *), |
| 65 | LocaleNCompare(const char *,const char *,const size_t); |
| 66 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 67 | extern MagickExport MagickBooleanType |
| 68 | ConcatenateString(char **,const char *), |
anthony | 6f20131 | 2012-03-30 04:08:15 +0000 | [diff] [blame] | 69 | IsStringTrue(const char *), |
| 70 | IsStringNotFalse(const char *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 71 | SubstituteString(char **,const char *,const char *); |
| 72 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 73 | extern MagickExport size_t |
cristy | d2fe6cb | 2009-11-19 19:00:50 +0000 | [diff] [blame] | 74 | ConcatenateMagickString(char *,const char *,const size_t) |
cristy | 7338053 | 2012-02-18 20:26:28 +0000 | [diff] [blame] | 75 | magick_attribute((__nonnull__)), |
cristy | d2fe6cb | 2009-11-19 19:00:50 +0000 | [diff] [blame] | 76 | CopyMagickString(char *,const char *,const size_t) |
cristy | 7338053 | 2012-02-18 20:26:28 +0000 | [diff] [blame] | 77 | magick_attribute((__nonnull__)), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 78 | GetStringInfoLength(const StringInfo *); |
| 79 | |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 80 | extern MagickExport ssize_t |
cristy | 99bbf2c | 2011-09-26 18:27:50 +0000 | [diff] [blame] | 81 | FormatMagickSize(const MagickSizeType,const MagickBooleanType,char *), |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 82 | FormatMagickTime(const time_t,const size_t,char *); |
| 83 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 84 | extern MagickExport StringInfo |
| 85 | *AcquireStringInfo(const size_t), |
cristy | 8723e4b | 2011-09-01 13:11:19 +0000 | [diff] [blame] | 86 | *BlobToStringInfo(const void *,const size_t), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 87 | *CloneStringInfo(const StringInfo *), |
cristy | 99bbf2c | 2011-09-26 18:27:50 +0000 | [diff] [blame] | 88 | *ConfigureFileToStringInfo(const char *), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 |
cristy | d2fe6cb | 2009-11-19 19:00:50 +0000 | [diff] [blame] | 98 | ConcatenateStringInfo(StringInfo *,const StringInfo *) |
cristy | 7338053 | 2012-02-18 20:26:28 +0000 | [diff] [blame] | 99 | magick_attribute((__nonnull__)), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 100 | LocaleLower(char *), |
| 101 | LocaleUpper(char *), |
| 102 | PrintStringInfo(FILE *file,const char *,const StringInfo *), |
| 103 | ResetStringInfo(StringInfo *), |
| 104 | SetStringInfo(StringInfo *,const StringInfo *), |
| 105 | SetStringInfoDatum(StringInfo *,const unsigned char *), |
| 106 | SetStringInfoLength(StringInfo *,const size_t), |
| 107 | SetStringInfoPath(StringInfo *,const char *), |
| 108 | StripString(char *); |
| 109 | |
| 110 | #if defined(__cplusplus) || defined(c_plusplus) |
| 111 | } |
| 112 | #endif |
| 113 | |
| 114 | #endif |