=================================================================== RCS file: /home/cvs/OpenXM/doc/OpenXM-specs/library.tex,v retrieving revision 1.1 retrieving revision 1.6 diff -u -p -r1.1 -r1.6 --- OpenXM/doc/OpenXM-specs/library.tex 2000/01/20 08:52:46 1.1 +++ OpenXM/doc/OpenXM-specs/library.tex 2002/01/20 09:26:22 1.6 @@ -1,4 +1,4 @@ -%% $OpenXM$ +%% $OpenXM: OpenXM/doc/OpenXM-specs/library.tex,v 1.5 2000/09/08 18:57:49 takayama Exp $ /*&jp \section{ OX サーバに対する C ライブラリインタフェース } @@ -14,28 +14,31 @@ In some OX servers, one can use the OX server as a C l \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() +. +The API to the C library +is similar to Asir OX client API such as +{\tt ox\_push\_cmo()}, {\tt ox\_pop\_cmo()}. -CMO should be in the binary encoded form to call these functions. +CMO should be converted into the binary encoded form to call these functions. */ /*&C \medbreak \begin{verbatim} - int xxx_ox_byte_order(int type) + int xxx_ox_init(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. + This function initializes the library interface. + {\tt type} specifies the byte order to send int32 to the OX server xxx. + If type is equal to 0, the native byte order will be used. + If type is equal to 1, 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 を使用できないといけない?? + type = 0 の場合 native byte order が設定される. + type = 1 の場合 network byte order が設定される. 失敗した場合, -1 を戻す. */ @@ -43,22 +46,21 @@ CMO should be in the binary encoded form to call these \smallskip \begin{verbatim} - void xxx_ox_push_cmo(void *cmo, int size) + void xxx_ox_push_cmo(void *cmo) \end{verbatim} */ /*&eg -Push the binary encoded CMO {\tt cmo} of the size {\tt size} -onto the stack of the OX server xxx. +Push the binary encoded CMO {\tt cmo} onto the stack of the OX server xxx. */ /*&jp -Binary encoded された CMO (サイズは size) を, OX サーバ xxx +Binary encoded された CMO を, OX サーバ xxx の stack に push する. */ /*&C \smallskip \begin{verbatim} - int xxx_ox_pop_cmo(void *cmo, int limit) + int xxx_ox_pop_cmo(void cmo, int limit) \end{verbatim} */ /*&eg @@ -88,34 +90,44 @@ Return the size of the CMO at the top of the stack. /*&eg Return the size of the CMO at the top of the stack. */ +/*&jp +stack の一番上にある CMO のサイズを byte で戻す. +*/ -/*&C - -\smallskip +\smallbreak \begin{verbatim} - int xxx_ox_peek_cmo_size() + void xxx_ox_push_cmd(int cmd) \end{verbatim} +/*&eg +This function sends a stack machine command +({\tt OX\_COMMAND},int32 cmd) to a server. */ /*&jp -stack の一番上にある CMO のサイズを byte で戻す. -( ライブラリ版特有 ) +({\tt OX\_COMMAND},int32 cmd) をサーバに送る. */ -/*&C - -\smallbreak \begin{verbatim} -ox_push_cmd(), ox_execute_string() + void xxx_ox_execute_string(char *s) \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 * +This function requests a server to execute a command expressed by +a string {\tt s}. +{\tt s} should be acceptable by the parser of the server. */ /*&jp -については, Asir クライアントと同じインタフェース. -数は int32 で, 文字列は char * で. +文字列 {\tt s} をサーバに実行させる. {\tt s} はサーバのパーザ +が受理可能なものでなければならない. +*/ + +//&C + +/*&jp +ライブラリモードのサンプルソースは {\tt OpenXM/doc/oxlib} +にある. +*/ + +/*&eg +Sample source codes to use the library mode interface can be found in +{\tt OpenXM/doc/oxlib}. */