2 Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://www.imagemagick.org/script/license.php
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.
16 MagickWand convert command-line method.
18 #ifndef _SCRIPT_TOKEN_H
19 #define _SCRIPT_TOKEN_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 /* Status of the Stream */
31 TokenStatusMemoryFailed
34 /* Initial length is MagickPathExtent/64 => 64 (divisor is a power of 4)
35 most tokens are never larger than this, so no need to waste memory!
36 Also no CLI option is larger than about 40 characters!
38 #define INITAL_TOKEN_LENGTH 64
42 *stream; /* the file stream we are reading from */
45 opened; /* was that stream opened? */
48 *token; /* array of characters to holding details of he token */
51 length, /* length of token char array */
52 curr_line, /* current location in script file */
54 token_line, /* start of last token (option or argument) */
58 status; /* Have we reached EOF? see Token Status */
65 extern WandExport ScriptTokenInfo
66 *AcquireScriptTokenInfo(const char *),
67 *DestroyScriptTokenInfo(ScriptTokenInfo *);
69 extern WandExport MagickBooleanType
70 GetScriptToken(ScriptTokenInfo *);
72 #if defined(__cplusplus) || defined(c_plusplus)