Lines Matching refs:token_info
99 *token_info; in AcquireTokenInfo() local
101 token_info=(TokenInfo *) AcquireCriticalMemory(sizeof(*token_info)); in AcquireTokenInfo()
102 token_info->signature=MagickCoreSignature; in AcquireTokenInfo()
103 return(token_info); in AcquireTokenInfo()
129 MagickExport TokenInfo *DestroyTokenInfo(TokenInfo *token_info) in DestroyTokenInfo() argument
132 assert(token_info != (TokenInfo *) NULL); in DestroyTokenInfo()
133 assert(token_info->signature == MagickCoreSignature); in DestroyTokenInfo()
134 token_info->signature=(~MagickCoreSignature); in DestroyTokenInfo()
135 token_info=(TokenInfo *) RelinquishMagickMemory(token_info); in DestroyTokenInfo()
136 return(token_info); in DestroyTokenInfo()
809 static void StoreToken(TokenInfo *token_info,char *string, in StoreToken() argument
815 if ((token_info->offset < 0) || in StoreToken()
816 ((size_t) token_info->offset >= (max_token_length-1))) in StoreToken()
818 i=token_info->offset++; in StoreToken()
820 if (token_info->state == IN_QUOTE) in StoreToken()
822 switch (token_info->flag & 0x03) in StoreToken()
839 MagickExport int Tokenizer(TokenInfo *token_info,const unsigned flag, in Tokenizer() argument
854 token_info->state=IN_WHITE; in Tokenizer()
855 token_info->quote=(char) MagickFalse; in Tokenizer()
856 token_info->flag=flag; in Tokenizer()
857 for (token_info->offset=0; (int) line[*next] != 0; (*next)++) in Tokenizer()
863 switch (token_info->state) in Tokenizer()
871 token[token_info->offset]='\0'; in Tokenizer()
876 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
885 switch (token_info->state) in Tokenizer()
889 token_info->state=IN_QUOTE; in Tokenizer()
890 token_info->quote=quote[i]; in Tokenizer()
896 if (quote[i] != token_info->quote) in Tokenizer()
897 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
900 token_info->state=IN_OZONE; in Tokenizer()
901 token_info->quote='\0'; in Tokenizer()
909 token[token_info->offset]='\0'; in Tokenizer()
918 switch (token_info->state) in Tokenizer()
925 token_info->state=IN_OZONE; in Tokenizer()
930 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
941 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
943 token[token_info->offset]='\0'; in Tokenizer()
946 switch (token_info->state) in Tokenizer()
951 token_info->state=IN_TOKEN; in Tokenizer()
959 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
964 token[token_info->offset]='\0'; in Tokenizer()
970 switch (token_info->state) in Tokenizer()
974 token_info->state=IN_TOKEN; in Tokenizer()
975 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
981 StoreToken(token_info,token,max_token_length,c); in Tokenizer()
986 token[token_info->offset]='\0'; in Tokenizer()
991 token[token_info->offset]='\0'; in Tokenizer()