=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/ox.sm1,v retrieving revision 1.15 retrieving revision 1.16 diff -u -p -r1.15 -r1.16 --- OpenXM/src/kan96xx/Doc/ox.sm1 2000/12/06 00:29:51 1.15 +++ OpenXM/src/kan96xx/Doc/ox.sm1 2001/08/22 02:36:34 1.16 @@ -1,4 +1,4 @@ -%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.14 2000/12/05 12:03:43 takayama Exp $ +%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.15 2000/12/06 00:29:51 takayama Exp $ %%%%%%%%%%%% Configuration: Specify your server path %%%%% ox, ox_sm1, oxlog are contained in kxx.tgz %%%%% These should be under /usr/local/lib/sm1 or LOAD_SM1_PATH @@ -53,7 +53,7 @@ ox.version [(Version)] system_variable gt (Please get it from http://www.math.kobe-u.ac.jp/KAN) message error } { } ifelse -(ox.sm1, --- open sm1 protocol module 11/11,1999 (C) N.Takayama. oxhelp for help) message-quiet +(ox.sm1, ---OpenXM protocol module 08/22, 2001 (C) N.Takayama. oxhelp for help) message-quiet /ox.ccc load isArray { } @@ -954,5 +954,67 @@ ox.verbose { popVariables arg1 } def + +/OxWorkDirCreated false def +/oxWorkDir { + [/in-oxWorkDir /workHome /work] pushVariables + [ + [(getenv) (OpenXM_tmp)] extension tag 0 eq { + /workHome [ + [(getenv) (HOME)] extension + (/OpenXM_tmp) + ] cat def + }{ + /workHome + [(getenv) (OpenXM_tmp)] extension + def + }ifelse + /work [workHome (/) [(getpid)] extension toString] cat def + + OxWorkDirCreated not { + [(stat) workHome] extension 0 get tag 0 eq { + [(Working directory ) workHome ( will be created.)] cat + message + [(mkdir ) workHome] cat system + }{ + } ifelse + + [(stat) work] extension 0 get tag 0 eq { + [(Working directory ) work ( will be created.)] cat + message + [(mkdir ) work] cat system + }{ + } ifelse + /OxWorkDirCreated true def + }{ } ifelse + /arg1 work def + ] pop + popVariables + arg1 +} def +[(oxWorkDir) + [(oxWorkDir returns a name of working directory for OpenXM processes.) + (If the working direcotry does not exist, it creates ~/OpenXM_tmp/[pid].) + (The name can be changed by setting a value to the environmental variable) + (OpenXM_tmp. cf. oxNewFileName) + ] +] putUsages + +/OxFileName 0 def +/oxNewFileName { + [/in-oxNewFileName /name] pushVariables + [ + /name [(work) OxFileName toString] cat def + /OxFileName OxFileName 1 add def + /arg1 name def + ] pop + popVariables + arg1 +} def +[(oxNewFileName) + [(oxNewFileName returns a unique file name for a working file.) + (cf. oxWorkDir) + ] +] putUsages initializePathNamesForOx %% This should be