Annotation of OpenXM_contrib2/asir2000/lib/xm, Revision 1.3
1.3 ! takayama 1: /* $OpenXM: OpenXM_contrib2/asir2000/lib/xm,v 1.2 1999/12/11 13:50:13 takayama Exp $ */
1.1 noro 2: /** xm **/
3: Xm_noX = 0$
4: /* 1 : using X-window system. 0 : not using X-window system. */
5: /* TODO: db.restore should be called after sm1 error and interruption.
6: cf. var.sm1, debugMode
7: */
8:
1.3 ! takayama 9: print("xm Version 20000116. ox_help(0); ox_help(\"keyword\"); for help message ")$
1.1 noro 10:
11:
12: /*&C-texi
13: @c DO NOT EDIT THIS FILE oxxm.texi
14: */
15: /*&jp-texi
16: @node OpenXM-Contrib $B0lHLH!?t(B,,, Top
17: @chapter OpenXM-Contrib $B0lHLH!?t(B
18: */
19: /*&eg-texi
20: @node OpenXM-Contrib General Functions,,, Top
21: @chapter OpenXM-Contrib General Functions
22: */
23: /*&jp-texi
24: @section{$BH!?t0lMw(B}
25: */
26: /*&eg-texi
27: @section{Functions}
28: */
29:
30:
31: Sm1_lib = getenv("OpenXM_HOME")$
32: if (Sm1_lib == 0) {
33: Sm1_lib = "/usr/local/lib/sm1"$
34: } else {
35: Sm1_lib = Sm1_lib+"/lib/sm1"$
36: }
37: ToAsir_Debug = 0$
38:
39: def ox_help(A) {
40: if (type(A) == 0) {
1.2 takayama 41: shell("ls "+getenv("OpenXM_HOME")+"/lib/asir/help/xm.help");
1.1 noro 42: }else{
1.2 takayama 43: help("xm.help/"+A)$
1.1 noro 44: }
45: }
46:
47:
48: def ox_get_errors(P) {
49: ox_push_cmd(P,276);
50: return(ox_pop_cmo(P));
51: }
52: def ox_check_errors(P) {
53: E = ox_get_errors(P);
54: if (E == [ ]) return(P);
55: else {
56: print("Error during the initialization : double check binary ox-files, library files and environmental variables.");
57: print(E);
58: debug;
59: }
60: return(P);
61: }
62:
63: /*&eg-texi
64: @menu
65: * ox_check_errors2::
66: @end menu
67: @node ox_check_errors2,,, Top
68: @subsection{@code{ox_check_errors2}}
69: @findex ox_check_errors2
70: @table @t
71: @item ox_check_errors2(@var{p})
72: :: get a list of error objects on the statck of the server @var{p}.
73: @end table
74:
75: @table @var
76: @item return
77: List
78: @item p
79: Number
80: @end table
81:
82: @itemize @bullet
83: @item It gets a list of error objects on the server stack.
84: @item It does not pop the error objects.
85: @end itemize
86: */
87: /*&jp-texi
88: @menu
89: * ox_check_errors2::
90: @end menu
91: @node ox_check_errors2,,, Top
92: @subsection{@code{ox_check_errors2}}
93: @findex ox_check_errors2
94: @table @t
95: @item ox_check_errors2(@var{p})
96: :: $B<1JLHV9f(B @var{p} $B$N%5!<%P$N%9%?%C%/>e$K$"$k%(%i!<%*%V%8%'%/%H$r%j%9%H$GLa$9(B.
97: @end table
98:
99: @table @var
100: @item return
101: $B%j%9%H(B
102: @item p
103: $B?t(B
104: @end table
105:
106: @itemize @bullet
107: @item $B<1JLHV9f(B @var{p} $B$N%5!<%P$N%9%?%C%/>e$K$"$k%(%i!<%*%V%8%'%/%H$r%j%9%H$GLa$9(B.
108: @item $B%(%i!<%*%V%8%'%/%H$N%]%C%W$O$7$J$$(B.
109: @end itemize
110: */
111: /*&C-texi
112: @example
113: [219] P=sm1_start();
114: 0
115: [220] sm1(P," 0 get ");
116: 0
117: [221] ox_check_errors2(P);
118: [error([7,4294967295,executeString: Usage:get])]
119: Type in ox_pops(P,N) to clean the stack of the ox server.
120: (debug)
121: @end example
122: */
123: def ox_check_errors2(P) {
124: E = ox_get_errors(P);
125: if (E == [ ]) return(P);
126: else {
127: print(E);
128: print("Type in ox_pops(P,N) to clean the stack of the ox server.");
129: debug;
130: }
131: return(P);
132: }
1.3 ! takayama 133:
! 134: def first(A) {return(A[0]);}
1.1 noro 135:
136: load("sm1")$
137: load("gnuplot")$
138: load("tigers")$
139: load("phc")$
140:
141: end$
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>