While many agents may be created, there is still only one set of 
hook functions and I/O routines.  To manage the complexities of
identifying agents, the following data structures are used:

agent * soar_agent;             - The current soar agent
agent * global_agent;           - The Soar control or global agent

and a macro: current_agent(x)

Many globals and some variables local to files have been moved into
a struct termed "agent".  There are approximately 200 fields in
this struct and anyone with I/O code should check to see if any
globals have been moved into this struct.  All references to a field
"foo" should be made as "current_agent(foo)" so that you can pick
up the data relevant to the current agent.  E.g., any reference to 
"lexeme" would be replaced with "current_agent(lexeme)". Reference
soar_agent and global_agent only as pointers and avoid dereferencing
them to get fields of the agent struct.  The reason for this is that
the organization of records may change and the macro current_agent
will remain stable, while the access path to a record field may not.

A list of globals affected in this way may be found in the file
global_vars.c 
