version 1.1, 2000/01/20 08:52:46 |
version 1.4, 2000/03/16 04:59:53 |
|
|
%% $OpenXM$ |
%% $OpenXM: OpenXM/doc/OpenXM-specs/library.tex,v 1.3 2000/01/24 02:48:24 noro Exp $ |
/*&jp |
/*&jp |
\section{ OX ¥µ¡¼¥Ð¤ËÂФ¹¤ë C ¥é¥¤¥Ö¥é¥ê¥¤¥ó¥¿¥Õ¥§¡¼¥¹ } |
\section{ OX ¥µ¡¼¥Ð¤ËÂФ¹¤ë C ¥é¥¤¥Ö¥é¥ê¥¤¥ó¥¿¥Õ¥§¡¼¥¹ } |
|
|
Line 16 Asir ¤Î OX ¥µ¡¼¥ÐÍÑ¥¯¥é¥¤¥¢¥ó¥È´Ø¿ô¤Ë»÷¤¿¥¤¥ó¥¿¥Õ¥§¡¼¥ |
|
Line 16 Asir ¤Î OX ¥µ¡¼¥ÐÍÑ¥¯¥é¥¤¥¢¥ó¥È´Ø¿ô¤Ë»÷¤¿¥¤¥ó¥¿¥Õ¥§¡¼¥ |
|
In some OX servers, one can use the OX server 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 |
The interface functions of the C library |
are similar to Asir OX client functions such as |
are similar to Asir OX client functions such as |
\verb+ ox_push_cmo() +, \verb+ ox_pop_cmo() +. |
{\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 |
/*&C |
|
|
\medbreak |
\medbreak |
\begin{verbatim} |
\begin{verbatim} |
int xxx_ox_byte_order(int type) |
int xxx_ox_init(int type) |
\end{verbatim} |
\end{verbatim} |
*/ |
*/ |
/*&eg |
/*&eg |
Specify the byte order to send int32 to the OX server xxx. |
This function initializes the library interface. |
When type = 0, the network byte order will be used. |
{\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. |
In case of error, -1 will be returned. |
*/ |
*/ |
/*&jp |
/*&jp |
|
¤³¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î½é´ü²½¤ò¹Ô¤¦. |
OX ¥µ¡¼¥Ð xxx ¤Ø int32 ¤òÁ÷¤ë¤¿¤á¤Î byte order ¤ò type ¤Ç»ØÄꤹ¤ë. |
OX ¥µ¡¼¥Ð xxx ¤Ø int32 ¤òÁ÷¤ë¤¿¤á¤Î byte order ¤ò type ¤Ç»ØÄꤹ¤ë. |
¥é¥¤¥Ö¥é¥ê¤Ç¤Ï¤¢¤ë¤¬, |
type = 0 ¤Î¾ì¹ç native byte order ¤¬ÀßÄꤵ¤ì¤ë. |
type = 0 ¤Ç, network byte order ¤ò»ÈÍѤǤ¤Ê¤¤¤È¤¤¤±¤Ê¤¤?? |
type = 1 ¤Î¾ì¹ç network byte order ¤¬ÀßÄꤵ¤ì¤ë. |
¼ºÇÔ¤·¤¿¾ì¹ç, -1 ¤òÌ᤹. |
¼ºÇÔ¤·¤¿¾ì¹ç, -1 ¤òÌ᤹. |
*/ |
*/ |
|
|
Line 43 CMO should be in the binary encoded form to call these |
|
Line 46 CMO should be in the binary encoded form to call these |
|
|
|
\smallskip |
\smallskip |
\begin{verbatim} |
\begin{verbatim} |
void xxx_ox_push_cmo(void *cmo, int size) |
void xxx_ox_push_cmo(void *cmo) |
\end{verbatim} |
\end{verbatim} |
*/ |
*/ |
/*&eg |
/*&eg |
Push the binary encoded CMO {\tt cmo} of the size {\tt size} |
Push the binary encoded CMO {\tt cmo} onto the stack of the OX server xxx. |
onto the stack of the OX server xxx. |
|
*/ |
*/ |
/*&jp |
/*&jp |
Binary encoded ¤µ¤ì¤¿ CMO (¥µ¥¤¥º¤Ï size) ¤ò, OX ¥µ¡¼¥Ð xxx |
Binary encoded ¤µ¤ì¤¿ CMO ¤ò, OX ¥µ¡¼¥Ð xxx |
¤Î stack ¤Ë push ¤¹¤ë. |
¤Î stack ¤Ë push ¤¹¤ë. |
*/ |
*/ |
/*&C |
/*&C |
|
|
\smallskip |
\smallskip |
\begin{verbatim} |
\begin{verbatim} |
int xxx_ox_pop_cmo(void *cmo, int limit) |
int xxx_ox_pop_cmo(void cmo, int limit) |
\end{verbatim} |
\end{verbatim} |
*/ |
*/ |
/*&eg |
/*&eg |
Line 88 Stack underflow ¤Î¾ì¹ç¤ÎÌá¤êÃÍ¤Ï 0 ¤Ç¤¢¤ë. |
|
Line 90 Stack underflow ¤Î¾ì¹ç¤ÎÌá¤êÃÍ¤Ï 0 ¤Ç¤¢¤ë. |
|
/*&eg |
/*&eg |
Return the size of the CMO at the top of the stack. |
Return the size of the CMO at the top of the stack. |
*/ |
*/ |
|
/*&jp |
|
stack ¤Î°ìÈÖ¾å¤Ë¤¢¤ë CMO ¤Î¥µ¥¤¥º¤ò byte ¤ÇÌ᤹. |
|
*/ |
|
|
/*&C |
\smallbreak |
|
|
\smallskip |
|
\begin{verbatim} |
\begin{verbatim} |
int xxx_ox_peek_cmo_size() |
void xxx_ox_push_cmd(int cmd) |
\end{verbatim} |
\end{verbatim} |
|
/*&eg |
|
This function sends a stack machine command |
|
({\tt OX\_COMMAND},int32 cmd) to a server. |
*/ |
*/ |
/*&jp |
/*&jp |
stack ¤Î°ìÈÖ¾å¤Ë¤¢¤ë CMO ¤Î¥µ¥¤¥º¤ò byte ¤ÇÌ᤹. |
({\tt OX\_COMMAND},int32 cmd) ¤ò¥µ¡¼¥Ð¤ËÁ÷¤ë. |
( ¥é¥¤¥Ö¥é¥êÈÇÆÃÍ ) |
|
*/ |
*/ |
|
|
/*&C |
|
|
|
\smallbreak |
|
\begin{verbatim} |
\begin{verbatim} |
ox_push_cmd(), ox_execute_string() |
void xxx_ox_execute_string(char *s) |
\end{verbatim} |
\end{verbatim} |
*/ |
|
/*&eg |
/*&eg |
These functions have the same specification with those |
These function requests a server to execute a string {\tt s}. |
in Asir client functions. See Asir document. |
{\tt s} should be acceptable by the parser of the server. |
Numbers should be given in int 32 and strings should be given |
|
by char * |
|
*/ |
*/ |
/*&jp |
/*&jp |
¤Ë¤Ä¤¤¤Æ¤Ï, Asir ¥¯¥é¥¤¥¢¥ó¥È¤ÈƱ¤¸¥¤¥ó¥¿¥Õ¥§¡¼¥¹. |
ʸ»úÎó {\tt s} ¤ò¥µ¡¼¥Ð¤Ë¼Â¹Ô¤µ¤»¤ë. {\tt s} ¤Ï¥µ¡¼¥Ð¤Î¥Ñ¡¼¥¶ |
¿ô¤Ï int32 ¤Ç, ʸ»úÎó¤Ï char * ¤Ç. |
¤¬¼õÍý²Äǽ¤Ê¤â¤Î¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤. |
*/ |
*/ |
|
|