%% $OpenXM: OpenXM/src/kan96xx/Doc/phc.sm1,v 1.2 2002/04/24 00:31:58 takayama Exp $ %% 1999/sm1-prog/phc.sm1 /tmp.phc.out (tmp.phc.out) def [(ostype)] extension 0 get (windows) eq { [(getenv) (OPENXMHOMEWIN)] extension /@@@.phc.path set @@@.phc.path tag 0 eq { [(getenv) (OpenXM_HOME)] extension /@@@.phc.path set } { } ifelse @@@.phc.path tag 0 eq { [(getenv) (OPENXM_HOME)] extension /@@@.phc.path set } { } ifelse @@@.phc.path tag 0 eq { %% Hard encoding: /@@@.phc.path (\OpenXM-win) def }{ } ifelse }{ [(getenv) (OpenXM_HOME)] extension /@@@.phc.path set } ifelse /phc { /arg1 set [/in-phc /eqs /n /cstr /nl ] pushVariables [ /eqs arg1 def /n eqs length def /nl 10 (string) dc def %%/nl (\n) def [(/bin/rm -f ) tmp.phc.out] cat system [(echo "Phc=" > ) tmp.phc.out] cat system [@@@.phc.path (/bin/phc6 -i ) (") n toString nl eqs { toString ( ; ) nl } map (") ( >> ) tmp.phc.out ] flatten cat /cstr set cstr message cstr system [(echo "$ end$" >> ) tmp.phc.out] cat system %%[(parse) (tmp.phc.out) pushfile] extension pop tmp.phc.out pushfile /arg1 set ] pop popVariables arg1 } def