<?xml version="1.0" encoding="Shift_JIS" ?>


<SetMainInterpreter>-1</SetMainInterpreter>
<SetThisAgentName> gbmp </SetThisAgentName>

<Load option="exec"> xlconf/std/account.xl </Load>


<Load option="exec"> xlconf/std/root.passwd.xl </Load>

<MoveDefine> ^GetUserInfo <CurrentEnvironment/> ^Env0 </MoveDefine>

<Load option="exec"> xlconf/std/agent.xl </Load>
<Load option="exec"> xlscript/std/agent.prefix.xl </Load>
<SetLogPath> (+ DatabaseRoot "xllog/") ^LogSize ^LogFileNo </SetLogPath>

<Sequence> ^Env1
	<SetPrefixMode xlsys="precedence">
		.mta gbmp xl Get </SetPrefixMode>
	<SetPrefixMode xlsys="precedence">
		.mpt gbmp xl Get </SetPrefixMode>
	<SetPrefixMode xlsys="precedence">
		.par gbmp xl Get </SetPrefixMode>
	<SetPrefixMode xlsys="precedence">
		.chi gbmp xl Get </SetPrefixMode>
</Sequence>


<!-- Define the confirmation environment (ConfEnv).
	This env has only SetAgent function -->

<Define> ^ConfEnv 
	<NewEnvironment>()</NewEnvironment>
</Define>
<MoveDefine> ^Sync
	<CurrentEnvironment/> ^ConfEnv </MoveDefine>
<MoveDefine> ^SetAgent
	<CurrentEnvironment/> ^ConfEnv </MoveDefine>
<MoveDefine> ^GetPrefixMode
	<CurrentEnvironment/> ^ConfEnv </MoveDefine>
<MoveDefine> ^MemoryStatistics
	<CurrentEnvironment/> ^ConfEnv </MoveDefine>
<MoveDefine> ^SetResultFormat
	<CurrentEnvironment/> ^ConfEnv </MoveDefine>

<Define> ^ExecEnv
	<NewEnvironment>()</NewEnvironment>
</Define>
<MoveDefine> ^MPTrigger
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^MPgetLoopLockTable
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^MPcindex
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^MPPurge
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^MPRouting
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^MPstatus
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^gv-cpu
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>
<MoveDefine> ^GetCPUStatus
	<CurrentEnvironment/> ^ExecEnv </MoveDefine>

<Define> ^RootEnv
	<NewEnvironment>()</NewEnvironment>
</Define>
<MoveDefine> ^Exit ^Env1 ^RootEnv </MoveDefine>

<MoveDefine> ^GetXLIinfo ^Env0 ^ExecEnv </MoveDefine>

<DefineAgent passwd="anonymous">
	nichibun.ac.jp
	gbmp
	user
	^ExecEnv
	()
</DefineAgent>

<DefineAgent passwd="required">
	nichibun.ac.jp
	server
	root
	^RootEnv
	()
</DefineAgent>

<Sequence> ^Env1

<Define> ^MPrule ()
<Arguments/>
<Sequence> ()
<Define> ^ret () </Define>
<Rule target="1by1">
	<Accept> xldocs/**/*.crd </Accept>
	<Accept> xldocs/*.crd </Accept>
	<Define> ^to (Leaf 1 from) </Define>
	<set> ^ret (cons to ret) </set>
</Rule>
^ret
</Sequence>
</Define>

<Define> ^MAPPINGrule ()
<Arguments/>
<Sequence> ()
<Define> ^ret () </Define>
<Rule target="1by1">
	<Accept> xldocs/**/*.map </Accept>
	<Accept> xldocs/*.map </Accept>
	<Define> ^to (Leaf 1 from) </Define>
	<set> ^ret (cons to ret) </set>
</Rule>
^ret
</Sequence>
</Define>


</Sequence>


<!-- Open the accept port -->

<If> (Not (= 0
<GetElement>
<ErrHandler>
<OpenInterpreter>
	accept
	^ConfEnv

	<Port>^MPPort</Port>
	<MaxConnection> 10 </MaxConnection>
	<ConnectionTimeout> ^MaxConnectionTime </ConnectionTimeout>
	<SilentTimeout> ^MaxSilentTime </SilentTimeout>
	<Permission>
		<list>root user</list>
		<Allow>domain localhost</Allow>
		<Deny>all</Deny>
	</Permission>
</OpenInterpreter>
</ErrHandler>		
	5
</GetElement>))
<Then> <Sequence> ^RootEnv <Exit/> </Sequence> </Then>
</If>

<MPStart/>

