[BACK]Return to library.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Annotation of OpenXM/doc/OpenXM-specs/library.tex, Revision 1.3

1.3     ! noro        1: %% $OpenXM: OpenXM/doc/OpenXM-specs/library.tex,v 1.2 2000/01/24 00:57:11 noro Exp $
1.1       noro        2: /*&jp
                      3: \section{ OX サーバに対する C ライブラリインタフェース }
                      4:
                      5: 一部のOX サーバでは C のライブラリとしてリンクして使用するもできる.
                      6: ライブラリとして使用するための C の関数は
                      7: Asir の OX サーバ用クライアント関数に似たインタフェースを持つ.
                      8:
                      9: ライブラリ関数には, CMO を binary encoding して渡す.
                     10: ライブラリ関数からは, CMO が binary encoded form で戻る.
                     11:
                     12: */
                     13: /*&eg
                     14: \section{ OX servers as a C library}
                     15:
                     16: In some OX servers, one can use the OX server as a C library.
                     17: The interface functions of the C library
                     18: are similar to Asir OX client functions such as
1.3     ! noro       19: {\tt ox\_push\_cmo()}, {\tt ox\_pop\_cmo()}.
1.1       noro       20:
1.3     ! noro       21: CMO should be converted into the binary encoded form to call these functions.
1.1       noro       22: */
                     23: /*&C
                     24:
                     25: \medbreak
                     26: \begin{verbatim}
1.2       noro       27:   int xxx_ox_init(int type)
1.1       noro       28: \end{verbatim}
                     29: */
                     30: /*&eg
1.2       noro       31:   This function initializes the library interface.
                     32:   {\tt type} specifies the byte order to send int32 to the OX server xxx.
                     33:   If type is equal to 0, the network byte order will be used.
                     34:   If type is equal to 1, the little endian order will be used.
1.1       noro       35:   In case of error, -1 will be returned.
                     36: */
                     37: /*&jp
1.2       noro       38:   この関数はライブラリインタフェースの初期化を行う.
1.1       noro       39:   OX サーバ xxx へ int32 を送るための byte order を type で指定する.
1.2       noro       40:   type = 0 の場合 network byte order が設定される.
                     41:   type = 1 の場合 little endian order が設定される.
1.1       noro       42:   失敗した場合, -1 を戻す.
                     43: */
                     44:
                     45: /*&C
                     46:
                     47: \smallskip
                     48: \begin{verbatim}
1.2       noro       49:   void xxx_ox_push_cmo(void *cmo)
1.1       noro       50: \end{verbatim}
                     51: */
                     52: /*&eg
1.2       noro       53: Push the binary encoded CMO {\tt cmo} onto the stack of the OX server xxx.
1.1       noro       54: */
                     55: /*&jp
1.2       noro       56: Binary encoded された CMO を, OX サーバ xxx
1.1       noro       57: の stack に push する.
                     58: */
                     59: /*&C
                     60:
                     61: \smallskip
                     62: \begin{verbatim}
1.2       noro       63:   int xxx_ox_pop_cmo(void cmo, int limit)
1.1       noro       64: \end{verbatim}
                     65: */
                     66: /*&eg
                     67: Pop a binary encoded CMO from the OX server xxx
                     68: and write it at {\tt cmo}.
                     69: The return value is the size of the CMO in bytes.
                     70: In case of the stack underflow, the return value is 0.
                     71: If the size exceeds the {\tt limit}, -1 will be returned
                     72: and the CMO is not popped and will not be written to {\tt cmo}.
                     73: */
                     74: /*&jp
                     75: Binary encoded された CMO (サイズは size) を,  OX サーバより
                     76: pop して, cmo に書き込む.
                     77: 戻り値は CMO のサイズを byte で戻す.
                     78: Stack underflow の場合の戻り値は 0 である.
                     79: ただし, limit より大きいサイズの CMO は書き込まれない.
                     80: この場合, 戻り値は -1 となる.
                     81: */
                     82:
                     83: /*&C
                     84:
                     85: \smallskip
                     86: \begin{verbatim}
                     87:   int xxx_ox_peek_cmo_size()
                     88: \end{verbatim}
                     89: */
                     90: /*&eg
                     91: Return the size of the CMO at the top of the stack.
                     92: */
                     93: /*&jp
                     94: stack の一番上にある CMO のサイズを byte で戻す.
                     95: */
                     96:
1.2       noro       97: \smallbreak
                     98: \begin{verbatim}
1.3     ! noro       99:  void xxx_ox_push_cmd(int cmd)
1.2       noro      100: \end{verbatim}
                    101: /*&eg
                    102: This function sends a stack machine command
                    103: ({\tt OX\_COMMAND},int32 cmd) to a server.
                    104: */
                    105: /*&jp
                    106: ({\tt OX\_COMMAND},int32 cmd) をサーバに送る.
                    107: */
1.1       noro      108:
                    109: \begin{verbatim}
1.3     ! noro      110:  void xxx_ox_execute_string(char *s)
1.1       noro      111: \end{verbatim}
                    112: /*&eg
1.2       noro      113: These function requests a server to execute a string {\tt s}.
                    114: {\tt s} should be acceptable by the parser of the server.
1.1       noro      115: */
                    116: /*&jp
1.2       noro      117: 文字列 {\tt s} をサーバに実行させる. {\tt s} はサーバのパーザ
                    118: が受理可能なものでなければならない.
1.1       noro      119: */
                    120:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>