MagickWand  7.0.7
Convert, Edit, Or Compose Bitmap Images
script-token.c File Reference
#include "MagickWand/studio.h"
#include "MagickWand/MagickWand.h"
#include "MagickWand/script-token.h"
#include "MagickCore/string-private.h"
#include "MagickCore/utility-private.h"
Include dependency graph for script-token.c:

Go to the source code of this file.

Macros

#define IN_WHITE   0
 
#define IN_TOKEN   1
 
#define IN_QUOTE   2
 
#define IN_COMMENT   3
 
#define GetChar(c)
 
#define SaveChar(c)
 

Functions

WandExport ScriptTokenInfoAcquireScriptTokenInfo (const char *filename)
 
WandExport ScriptTokenInfoDestroyScriptTokenInfo (ScriptTokenInfo *token_info)
 
WandExport MagickBooleanType GetScriptToken (ScriptTokenInfo *token_info)
 

Macro Definition Documentation

◆ GetChar

#define GetChar (   c)
Value:
{ \
c=fgetc(token_info->stream); \
token_info->curr_column++; \
if ( c == '\r' ) { \
c=fgetc(token_info->stream); \
ungetc(c,token_info->stream); \
c = (c!='\n')?'\n':'\r'; \
} \
if ( c == '\n' ) \
token_info->curr_line++, token_info->curr_column=0; \
if (c == EOF ) \
break; \
if ( (c>='\0' && c<'\a') || (c>'\r' && c<' ' && c!='\033') ) { \
token_info->status=TokenStatusBinary; \
break; \
} \
}

Definition at line 318 of file script-token.c.

Referenced by GetScriptToken().

◆ IN_COMMENT

#define IN_COMMENT   3

Definition at line 308 of file script-token.c.

Referenced by GetScriptToken().

◆ IN_QUOTE

#define IN_QUOTE   2

Definition at line 307 of file script-token.c.

Referenced by GetScriptToken().

◆ IN_TOKEN

#define IN_TOKEN   1

Definition at line 306 of file script-token.c.

Referenced by GetScriptToken().

◆ IN_WHITE

#define IN_WHITE   0

Definition at line 305 of file script-token.c.

Referenced by GetScriptToken().

◆ SaveChar

#define SaveChar (   c)
Value:
{ \
if ((size_t) offset >= (token_info->length-1)) { \
if ( token_info->length >= MagickPathExtent ) \
token_info->length += MagickPathExtent; \
else \
token_info->length *= 4; \
token_info->token = (char *) \
ResizeMagickMemory(token_info->token, token_info->length); \
if ( token_info->token == (char *) NULL ) { \
token_info->status=TokenStatusMemoryFailed; \
break; \
} \
} \
token_info->token[offset++]=(char) (c); \
}
#define MagickPathExtent

Definition at line 337 of file script-token.c.

Referenced by GetScriptToken().

Function Documentation

◆ AcquireScriptTokenInfo()

◆ DestroyScriptTokenInfo()

◆ GetScriptToken()