anchor.diff:  store(Pid,Set,ItemName,Flags,Tag) -> 
   	gen_fsm:sync_send_event(Pid,{store,Tag,imapd_util:list_to_seq(Set),imapc_util:build_store(ItemName),imapc_util:build_flags(Flags)}).
   
  -%%--------------------------------------------------------------------
  -%% Function: copy(Pid,MailBox,StatusCodes)
  -%%           Pid     = pid()
  -%%           Set     = list() of integer90
  -%%           MailBox = string()
  -%% Descrip.: Copies message set from selected mailbox to specified mailbox
  -%% Returns : ok
  -%%--------------------------------------------------------------------
  -
  -copy(Pid,Set,MailBox) -> copy(Pid,Set,MailBox,imapc_util:tag()).
  -copy(Pid,Set,MailBox,Tag) -> gen_fsm:sync_send_event(Pid,{copy,Tag,imapc_util:to_seq(Set),MailBox}).
   
   
   %%--------------------------------------------------------------------
  
positive.code: %%%----------------------------------------------------------------------
  %%% File        : imapc
  %%% Author      : Stuart Jackson <sjackson@simpleenigma.com> [http://www.simpleenigma.com]
  %%% Purpose     : IMAP Client API - Use these funcations instead of the FSM
  %%% Created     : 2006-11-04
  %%% Initial Rel : 0.0.1
  %%% Updated     : 2007-10-18
  %%%----------------------------------------------------------------------
  -module(imapc).
  -author('sjackson@simpleenigma.com').
  -include("../include/erlmail.hrl").
  -include("../include/imap.hrl").
  
  -export([connect/1,connect/2]).
  -export([login/3,logout/1,noop/1,authenticate/2,capability/1]).
  -export([select/1,select/2,close/1,examine/1,examine/2]).
  -export([create/2,delete/2,subscribe/2,unsubscribe/2,rename/3,list/3,lsub/3]).
  -export([append/3,append/4,check/1,store/4,uid/3]).
  -export([switch/2,copy/3,move/3,expunge/1,status/3,status/2,search/2,fetch/3,sort/3,sort/4]).
  -export([deletef/2,undeletef/2,draft/2,undraft/2,flag/2,unflag/2,seen/2,unseen/2]).
  -export([info/1,info/2]).
  -export([build/0,build/1]).
  
  %%--------------------------------------------------------------------
  %% Function: connect(IPAddress)
  %%         : connect(IPAddress,Port)
  %%           IPAddress = term() tuple, i.e {10,1,1,3}
  %%           Port      = integer(), Default 143  
  %% Descrip.: Connects to an IMAP server and starts a FSM
  %% Returns : {ok, Pid} | {error, Error}
  %%--------------------------------------------------------------------
  
  connect(IPAddress) -> connect(IPAddress,143).
  connect(IPAddress,Port) -> imapc_fsm:start_link(IPAddress,Port).
  
  %%--------------------------------------------------------------------
  %% Function: noop(Pid)
  %%           Pid = pid()
  %% Descrip.: Sends NOOP command to FSM: No Operation
  %% Returns : ok
  %%--------------------------------------------------------------------
  
  noop(Pid)     -> noop(Pid,imapc_util:tag()).
  noop(Pid,Tag) -> gen_fsm:sync_send_event(Pid,{noop,Tag}).
  
  %%--------------------------------------------------------------------
  %% Function: capability(Pid)
  %%           Pid = pid()
  %% Descrip.: Sends CAPABILITY command to FSM: No Operation
  %% Returns : List of Capabilities
  %%--------------------------------------------------------------------
  
  capability(Pid)     -> capability(Pid,imapc_util:tag()).
  capability(Pid,Tag) -> gen_fsm:sync_send_event(Pid,{capability,Tag}).
  
  %%--------------------------------------------------------------------
  %% Function: logout(Pid)
  
negative.code: %% Returns : term() = results from yacc, leex or both
  %%--------------------------------------------------------------------
  -define(DEV_PATH,"/sfe/erlang/releases/lib/erlmail-" ++ ?ERLMAIL_VERSION).
  
  %%-------------------------------------------------------------------------
  %% @spec () -> term()
  %% @doc  Build LEEX and YECC grammar files for IMAP client
  %% @end
  %%-------------------------------------------------------------------------
  build() -> build(both).
  %%-------------------------------------------------------------------------
  %% @spec (Type::[parser | scanner | both]) -> Response::term()
  %% @doc  Build LEEX and YECC grammar files for IMAP client
  %% @end
  %%-------------------------------------------------------------------------
  build(parser)  -> yecc:file(?DEV_PATH ++ "/src/imap_parser.yrl",[{verbose,true}]);
  build(scanner) -> leex:file(?DEV_PATH ++ "/src/imap_scan.xrl");
  build(yecc)    -> yecc:file(?DEV_PATH ++ "/src/imap_parser.yrl",[{verbose,true}]);
  build(leex)    -> leex:file(?DEV_PATH ++ "/src/imap_scan.xrl");
  build(both)    -> 
  	P = build(yecc),
  	S = build(leex),
  	{P,S}.