/* $OpenXM: OpenXM_contrib2/asir2000/lib/xm,v 1.3 2000/01/16 06:28:00 takayama Exp $ */ /** xm **/ Xm_noX = 0$ /* 1 : using X-window system. 0 : not using X-window system. */ /* TODO: db.restore should be called after sm1 error and interruption. cf. var.sm1, debugMode */ print("xm Version 20000116. ox_help(0); ox_help(\"keyword\"); for help message ")$ /*&C-texi @c DO NOT EDIT THIS FILE oxxm.texi */ /*&jp-texi @node OpenXM-Contrib 一般函数,,, Top @chapter OpenXM-Contrib 一般函数 */ /*&eg-texi @node OpenXM-Contrib General Functions,,, Top @chapter OpenXM-Contrib General Functions */ /*&jp-texi @section{函数一覧} */ /*&eg-texi @section{Functions} */ Sm1_lib = getenv("OpenXM_HOME")$ if (Sm1_lib == 0) { Sm1_lib = "/usr/local/lib/sm1"$ } else { Sm1_lib = Sm1_lib+"/lib/sm1"$ } ToAsir_Debug = 0$ def ox_help(A) { if (type(A) == 0) { shell("ls "+getenv("OpenXM_HOME")+"/lib/asir/help/xm.help"); }else{ help("xm.help/"+A)$ } } def ox_get_errors(P) { ox_push_cmd(P,276); return(ox_pop_cmo(P)); } def ox_check_errors(P) { E = ox_get_errors(P); if (E == [ ]) return(P); else { print("Error during the initialization : double check binary ox-files, library files and environmental variables."); print(E); debug; } return(P); } /*&eg-texi @menu * ox_check_errors2:: @end menu @node ox_check_errors2,,, Top @subsection{@code{ox_check_errors2}} @findex ox_check_errors2 @table @t @item ox_check_errors2(@var{p}) :: get a list of error objects on the statck of the server @var{p}. @end table @table @var @item return List @item p Number @end table @itemize @bullet @item It gets a list of error objects on the server stack. @item It does not pop the error objects. @end itemize */ /*&jp-texi @menu * ox_check_errors2:: @end menu @node ox_check_errors2,,, Top @subsection{@code{ox_check_errors2}} @findex ox_check_errors2 @table @t @item ox_check_errors2(@var{p}) :: 識別番号 @var{p} のサーバのスタック上にあるエラーオブジェクトをリストで戻す. @end table @table @var @item return リスト @item p 数 @end table @itemize @bullet @item 識別番号 @var{p} のサーバのスタック上にあるエラーオブジェクトをリストで戻す. @item エラーオブジェクトのポップはしない. @end itemize */ /*&C-texi @example [219] P=sm1_start(); 0 [220] sm1(P," 0 get "); 0 [221] ox_check_errors2(P); [error([7,4294967295,executeString: Usage:get])] Type in ox_pops(P,N) to clean the stack of the ox server. (debug) @end example */ def ox_check_errors2(P) { E = ox_get_errors(P); if (E == [ ]) return(P); else { print(E); print("Type in ox_pops(P,N) to clean the stack of the ox server."); debug; } return(P); } def first(A) {return(A[0]);} load("sm1")$ load("gnuplot")$ load("tigers")$ load("phc")$ end$