MagickWand  7.0.7
Convert, Edit, Or Compose Bitmap Images
script-token.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2018 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  https://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  MagickWand convert command-line method.
17 */
18 #ifndef _SCRIPT_TOKEN_H
19 #define _SCRIPT_TOKEN_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 /* Status of the Stream */
26 typedef enum {
32 } TokenStatus;
33 
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!
37 */
38 #define INITAL_TOKEN_LENGTH 64
39 typedef struct
40 {
41  FILE
42  *stream; /* the file stream we are reading from */
43 
44  MagickBooleanType
45  opened; /* was that stream opened? */
46 
47  char
48  *token; /* array of characters to holding details of he token */
49 
50  size_t
51  length, /* length of token char array */
52  curr_line, /* current location in script file */
53  curr_column,
54  token_line, /* start of last token (option or argument) */
55  token_column;
56 
57  TokenStatus
58  status; /* Have we reached EOF? see Token Status */
59 
60  size_t
63 
64 
66  *AcquireScriptTokenInfo(const char *),
68 
69 extern WandExport MagickBooleanType
71 
72 #if defined(__cplusplus) || defined(c_plusplus)
73 }
74 #endif
75 
76 #endif
#define WandExport
TokenStatus status
Definition: script-token.h:58
MagickBooleanType opened
Definition: script-token.h:45
WandExport ScriptTokenInfo * AcquireScriptTokenInfo(const char *)
TokenStatus
Definition: script-token.h:26
WandExport MagickBooleanType GetScriptToken(ScriptTokenInfo *)
Definition: script-token.c:354
WandExport ScriptTokenInfo * DestroyScriptTokenInfo(ScriptTokenInfo *)
Definition: script-token.c:266