=================================================================== RCS file: /home/cvs/OpenXM/src/kxx/openxxx.tex,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- OpenXM/src/kxx/openxxx.tex 2000/01/13 01:52:19 1.6 +++ OpenXM/src/kxx/openxxx.tex 2000/01/17 22:09:47 1.7 @@ -1,4 +1,4 @@ -%% $OpenXM: OpenXM/src/kxx/openxxx.tex,v 1.5 2000/01/02 07:35:15 takayama Exp $ +%% $OpenXM: OpenXM/src/kxx/openxxx.tex,v 1.6 2000/01/13 01:52:19 takayama Exp $ /*&jp %\documentclass{jarticle} \documentstyle{jarticle} @@ -8,7 +8,7 @@ } , 高山信毅\thanks{神戸大学理学部数学教室} } -\date{ 1999年, 12月31日} +\date{ 2000年, 1月18日} */ /*&eg %\documentclass{article} @@ -20,7 +20,7 @@ } , Nobuki Takayama\thanks{Department of Mathematics, Kobe University} } -\date{ December 31, 1999} +\date{ January 18, 2000 } */ /*&C \begin{document} @@ -3056,14 +3056,138 @@ Example: (OX\_DATA, ({\tt CMO\_STRING}, 5, "Hello")) \end{center} +*/ +/*&jp +\section{ OX サーバに対する C ライブラリインタフェース } +一部のOX サーバでは C のライブラリとしてリンクして使用するもできる. +ライブラリとして使用するための C の関数は +Asir の OX サーバ用クライアント関数に似たインタフェースを持つ. + +ライブラリ関数には, CMO を binary encoding して渡す. +ライブラリ関数からは, CMO が binary encoded form で戻る. + +*/ +/*&eg +\section{ OX servers as a C library} + +In some OX servers, one can use the OX server as a C library. +The interface functions of the C library +are similar to Asir OX client functions such as +\verb+ ox_push_cmo() +, \verb+ ox_pop_cmo() +. + +CMO should be in the binary encoded form to call these functions. +*/ +/*&C + +\medbreak +\begin{verbatim} + int xxx_ox_byte_order(int type) +\end{verbatim} +*/ +/*&eg + Specify the byte order to send int32 to the OX server xxx. + When type = 0, the network byte order will be used. + In case of error, -1 will be returned. +*/ +/*&jp + OX サーバ xxx へ int32 を送るための byte order を type で指定する. + ライブラリではあるが, + type = 0 で, network byte order を使用できないといけない?? + 失敗した場合, -1 を戻す. +*/ + +/*&C + +\smallskip +\begin{verbatim} + void xxx_ox_push_cmo(void *cmo, int size) +\end{verbatim} +*/ +/*&eg +Push the binary encoded CMO {\tt cmo} of the size {\tt size} +onto the stack of the OX server xxx. +*/ +/*&jp +Binary encoded された CMO (サイズは size) を, OX サーバ xxx +の stack に push する. +*/ +/*&C + +\smallskip +\begin{verbatim} + int xxx_ox_pop_cmo(void *cmo, int limit) +\end{verbatim} +*/ +/*&eg +Pop a binary encoded CMO from the OX server xxx +and write it at {\tt cmo}. +The return value is the size of the CMO in bytes. +In case of the stack underflow, the return value is 0. +If the size exceeds the {\tt limit}, -1 will be returned +and the CMO is not popped and will not be written to {\tt cmo}. +*/ +/*&jp +Binary encoded された CMO (サイズは size) を, OX サーバより +pop して, cmo に書き込む. +戻り値は CMO のサイズを byte で戻す. +Stack underflow の場合の戻り値は 0 である. +ただし, limit より大きいサイズの CMO は書き込まれない. +この場合, 戻り値は -1 となる. +*/ + +/*&C + +\smallskip +\begin{verbatim} + int xxx_ox_peek_cmo_size() +\end{verbatim} +*/ +/*&eg +Return the size of the CMO at the top of the stack. +*/ + +/*&C + +\smallskip +\begin{verbatim} + int xxx_ox_peek_cmo_size() +\end{verbatim} +*/ +/*&jp +stack の一番上にある CMO のサイズを byte で戻す. +( ライブラリ版特有 ) +*/ + +/*&C + +\smallbreak +\begin{verbatim} +ox_push_cmd(), ox_execute_string() +\end{verbatim} +*/ +/*&eg +These functions have the same specification with those +in Asir client functions. See Asir document. +Numbers should be given in int 32 and strings should be given +by char * +*/ +/*&jp +については, Asir クライアントと同じインタフェース. +数は int32 で, 文字列は char * で. +*/ + + +/*&C + \begin{thebibliography}{99} \bibitem{openmath} {\tt http://www.openmath.org} -\bibitem{openxxx} {\tt http://www.math.kobe-u.ac.jp/openxxx/ まだです.} -\bibitem{openasir-intro} 小原, 高山, 野呂: Open Asir 入門, 1999, -数式処理, Vol 7, No 2, 2--17. (ISBN4-87243-086-7, SEG 出版, Tokyo). \\ -{\tt http://www.math.kobe-u.ac.jp/openxxx/} +\bibitem{openxxx} {\tt http://www.math.kobe-u.ac.jp/OpenXM/ (under construction)} +\bibitem{openasir-intro} Ohara, Takayama, Noro: Introduction to Open Asir , +1999, (in Japanese), +Suushiki-Shyori, Vol 7, No 2, 2--17. (ISBN4-87243-086-7, SEG , Tokyo). \\ +{\tt http://www.math.kobe-u.ac.jp/OpenXM/} \end{thebibliography} */