• Home
  • Raw
  • Download

Lines Matching refs:token_info

208     *token_info;  in AcquireScriptTokenInfo()  local
210 token_info=(ScriptTokenInfo *) AcquireMagickMemory(sizeof(*token_info)); in AcquireScriptTokenInfo()
211 if (token_info == (ScriptTokenInfo *) NULL) in AcquireScriptTokenInfo()
212 return token_info; in AcquireScriptTokenInfo()
213 (void) memset(token_info,0,sizeof(*token_info)); in AcquireScriptTokenInfo()
215 token_info->opened=MagickFalse; in AcquireScriptTokenInfo()
217 token_info->stream=stdin; in AcquireScriptTokenInfo()
218 token_info->opened=MagickFalse; in AcquireScriptTokenInfo()
221 token_info->stream=fdopen(StringToLong(filename+3),"r"); in AcquireScriptTokenInfo()
222 token_info->opened=MagickFalse; in AcquireScriptTokenInfo()
225 token_info->stream=fopen_utf8(filename, "r"); in AcquireScriptTokenInfo()
227 if ( token_info->stream == (FILE *) NULL ) { in AcquireScriptTokenInfo()
228 token_info=(ScriptTokenInfo *) RelinquishMagickMemory(token_info); in AcquireScriptTokenInfo()
229 return(token_info); in AcquireScriptTokenInfo()
232 token_info->curr_line=1; in AcquireScriptTokenInfo()
233 token_info->length=INITAL_TOKEN_LENGTH; in AcquireScriptTokenInfo()
234 token_info->token=(char *) AcquireQuantumMemory(1,token_info->length); in AcquireScriptTokenInfo()
236 token_info->status=(token_info->token != (char *) NULL) in AcquireScriptTokenInfo()
238 token_info->signature=MagickWandSignature; in AcquireScriptTokenInfo()
240 return token_info; in AcquireScriptTokenInfo()
266 WandExport ScriptTokenInfo * DestroyScriptTokenInfo(ScriptTokenInfo *token_info) in DestroyScriptTokenInfo() argument
268 assert(token_info != (ScriptTokenInfo *) NULL); in DestroyScriptTokenInfo()
269 assert(token_info->signature == MagickWandSignature); in DestroyScriptTokenInfo()
271 if ( token_info->opened != MagickFalse ) in DestroyScriptTokenInfo()
272 fclose(token_info->stream); in DestroyScriptTokenInfo()
274 if (token_info->token != (char *) NULL ) in DestroyScriptTokenInfo()
275 token_info->token=(char *) RelinquishMagickMemory(token_info->token); in DestroyScriptTokenInfo()
276 token_info=(ScriptTokenInfo *) RelinquishMagickMemory(token_info); in DestroyScriptTokenInfo()
277 return(token_info); in DestroyScriptTokenInfo()
320 c=fgetc(token_info->stream); \
321 token_info->curr_column++; \
323 c=fgetc(token_info->stream); \
324 ungetc(c,token_info->stream); \
328 token_info->curr_line++, token_info->curr_column=0; \
332 token_info->status=TokenStatusBinary; \
339 if ((size_t) offset >= (token_info->length-1)) { \
340 if ( token_info->length >= MagickPathExtent ) \
341 token_info->length += MagickPathExtent; \
343 token_info->length *= 4; \
344 token_info->token=(char *) ResizeQuantumMemory(token_info->token, \
345 token_info->length,sizeof(*token_info->token)); \
346 if ( token_info->token == (char *) NULL ) { \
347 token_info->status=TokenStatusMemoryFailed; \
351 token_info->token[offset++]=(char) (c); \
354 WandExport MagickBooleanType GetScriptToken(ScriptTokenInfo *token_info) in GetScriptToken() argument
367 if (token_info == (ScriptTokenInfo *) NULL) in GetScriptToken()
369 if (token_info->status != TokenStatusOK) in GetScriptToken()
371 token_info->token[0]='\0'; in GetScriptToken()
393 ( token_info->curr_column==1 && (c == ':' || c == '@' ) ) ) in GetScriptToken()
399 token_info->token[offset]='\0'; in GetScriptToken()
411 token_info->token_line=token_info->curr_line; in GetScriptToken()
412 token_info->token_column=token_info->curr_column; in GetScriptToken()
450 token_info->token_line=token_info->curr_line; in GetScriptToken()
451 token_info->token_column=token_info->curr_column; in GetScriptToken()
465 token_info->token_line=token_info->curr_line; in GetScriptToken()
466 token_info->token_column=token_info->curr_column; in GetScriptToken()
477 token_info->token[offset]='\0'; in GetScriptToken()
478 if ( token_info->status != TokenStatusOK ) in GetScriptToken()
480 token_info->status = TokenStatusEOF; in GetScriptToken()
482 token_info->status = TokenStatusBadQuotes; in GetScriptToken()