=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/README,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- OpenXM/src/ox_toolkit/README 1999/12/22 11:29:15 1.6 +++ OpenXM/src/ox_toolkit/README 2000/01/14 10:23:34 1.7 @@ -1,6 +1,6 @@ # Author: ¾®¸¶¸ùǤ @ ¶âÂôÂç³ØÍý³ØÉô·×»»²Ê³Ø¶µ¼¼ # URI: http://omega.s.kanazawa-u.ac.jp/ohara/ -# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.5 1999/12/15 09:24:46 ohara Exp $ +# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.6 1999/12/22 11:29:15 ohara Exp $ /*&ja ox_toolkit ¥æ¡¼¥¶¥¬¥¤¥É @@ -8,6 +8,13 @@ /*&en A user's guide for OpenXM C library. */ +/* &ja ¤¤¤­¤µ¤Ä +¤³¤Î¥é¥¤¥Ö¥é¥ê¤Ï ox_math ¤ª¤è¤Ó math2ox ¤ò³«È¯¤¹¤ë¤¿¤á¤ËÀ߷פµ¤ì¤¿¡£ +¥é¥¤¥Ö¥é¥ê¼«¿È¤Ë¤Ï¡¢ Mathematica ¤Ë°Í¸¤·¤¿Éôʬ¤Ï¤Ê¤¤¡£ +*/ +/* &en Introduction + +*/ /*&ja libox.a ¤òÍøÍѤ¹¤ë¤Ë¤Ï¼¡¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ */ @@ -65,8 +72,8 @@ cmo_error2 */ /*&en -The cmo above is abstract base class; -you never make an object of cmo class. +The cmo above is abstract base class; you never make an object of cmo +class. */ /*&ja @@ -101,10 +108,8 @@ The ox above is abstract base class. /*&en 2. How to make CMObjects? -Use the following functions to generate an object. -It returns a pointer to the object. -*/ -/*&common +Use the following functions to generate an object. It returns a +pointer to the object. */ /*&common new_cmo_null(); new_cmo_int32(int i); @@ -141,8 +146,8 @@ High-level API is prepared to help an implementation o 3.1 How to make connections to OpenXM servers? -In order to open a connection to an OpenXM server, -you need to call ox_start() or to call ox_start_insecure_nonreverse(). +In order to open a connection to an OpenXM server, you need to call +ox_start() or to call ox_start_insecure_nonreverse(). */ /*&common @@ -167,6 +172,15 @@ portStream ¤Ï·×»»¥µ¡¼¥Ð¤È¤ÎÄÌ¿®¤Î¤¿¤á¤Î¥Ý¡¼¥ÈÈÖ¹æ¤Ç¤¢¤ ¤³¤Î¼±Ê̻ҤϹâ¿å½à API ¤Î³Æ´Ø¿ô¤ÇÍøÍѤµ¤ì¤ë¡£ */ +/*&en +The ox_start() function invoke an OpenXM server on its local machine +and open a connection to the server with "reverse" mode. The client +choose a port number of TCP/IP automatically. + +The ox_start_insecure_nonreverse() function open a connection to an +OpenXM server run on a remote host and you need to provide port numbers. + +*/ /*&ja 3.2 ÄÌ¿®¤Î½ªÎ» @@ -176,8 +190,8 @@ portStream ¤Ï·×»»¥µ¡¼¥Ð¤È¤ÎÄÌ¿®¤Î¤¿¤á¤Î¥Ý¡¼¥ÈÈÖ¹æ¤Ç¤¢¤ /*&en 3.2 How to close connections to OpenXM servers? -In order to close a connection to an OpenXM server, -you need to call ox_close() or to call ox_shutdown(). +In order to close a connection to an OpenXM server, you need to call +ox_close() or to call ox_shutdown(). */ /*&common @@ -190,7 +204,7 @@ void ox_shutdown(ox_file_t sv); ¥µ¡¼¥Ð¤ò½ªÎ»¤µ¤»¤ë¡£ÂèÆó¤Î´Ø¿ô¤Ï·×»»¥µ¡¼¥Ð¤Ë SM_shutdown ¤òÁ÷¤ë¤³¤È¤Ë ¤è¤Ã¤Æ¡¢¥µ¡¼¥Ð¤ò½ªÎ»¤µ¤»¤ë(ͽÄê)¡£ -/* +*/ /*&ja 3.3 SM ¥³¥Þ¥ó¥É¤ÎÁ÷¿® */ @@ -204,57 +218,103 @@ void ox_push_cmd(ox_file_t sv, int sm_code); */ /*&ja ¥µ¡¼¥Ð¤Ë¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¥³¥Þ¥ó¥É¤òÁ÷¤ë¡£¥³¥Þ¥ó¥É¤Ï¥³¥Þ¥ó¥ÉÈÖ¹æ¤ÇÍ¿¤¨¤ë¡£ + */ /*&en ox_push_cmd() sends an operation code to an OpenXM stack machine. -See oxtag.h. +See OpenXM/src/ox_toolkit/oxtag.h for a list of operation codes. + */ /*&ja - 3.4 CMO ¤ÎÁ÷¼õ¿® +*/ +/*&en +3.4 How to receive a CMO? +*/ +/*&common void ox_push_cmo(ox_file_t sv, cmo *c); cmo* ox_pop_cmo(ox_file_t sv); char* ox_popString(ox_file_t sv); +*/ +/*&ja ox_push_cmo ¤Ï cmo ¤òÁ÷¿®¡¢ox_pop_cmo ¤Ï cmo ¤ò¼õ¿®¤¹¤ë¡£ox_popString ¤Ï cmo ¤òʸ»úÎó·Á¼°¤ËÊÑ´¹¤·¤Æ¼õ¿®¤¹¤ë¤¬¡¢ÊÑ´¹¤Î·ë²Ì¤Ï¥µ¡¼¥Ð¤Ë¤è¤Ã¤Æ°Û ¤Ê¤ë¡£ +*/ +/*&en +*/ +/*&ja 3.5 ¥¹¥¿¥Ã¥¯½èÍý +*/ +/*&common int ox_pops(ox_file_t sv, int num); +*/ +/*&ja ¥¹¥¿¥Ã¥¯¾å¤Î num ¸Ä¤Î¥ª¥Ö¥¸¥§¥¯¥È¤òÇÑ´þ¤¹¤ë¡£ -3.6 +*/ +/*&ja +3.6 ÄÌ¿®Ï©¤Î¥Õ¥é¥Ã¥·¥å +*/ +/*&common int ox_flush(ox_file_t sv); +*/ +/*&ja ÄÌ¿®Ï©¤ò flush ¤¹¤ë(¼ÂºÝ¤Ë¤Ï²¿¤â¤·¤Ê¤¤)¡£ -3.7 +*/ +/*&ja +3.7 ÄÌ¿®¤ÎÃæÃÇ +*/ +/*&common void ox_reset(ox_file_t sv); +*/ +/*&ja ·×»»¤òÃæÃǤ¹¤ë¡£ -3.8 +*/ +/*&ja +3.8 ¥í¡¼¥«¥ë¸À¸ì¤Ç½ñ¤«¤ì¤¿¥³¥Þ¥ó¥É¤Îɾ²Á +*/ +/*&common void ox_execute_string(ox_file_t sv, char* str); +*/ +/*&ja ¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë¸À¸ì¤Ç½ñ¤«¤ì¤¿Ì¿Îá¤òɾ²Á¤·¡¢·ë²Ì¤ò¥¹¥¿¥Ã¥¯¤ËÀѤࡣ -3.9 +*/ +/*&ja +3.9 ´Ø¿ô¸Æ¤Ó½Ð¤· +*/ +/*&common int ox_cmo_rpc(ox_file_t sv, char *function, int argc, cmo *argv[]); +*/ +/*&ja function(argv[1], ...) ¤ò·×»»¤·¡¢·ë²Ì¤ò¥¹¥¿¥Ã¥¯¤ËÀѤࡣ -3.10 +*/ +/*&ja +3.10 Mathcap ¤Î¼õ¿® +*/ +/*&common cmo_mathcap* ox_mathcap(ox_file_t sv); +*/ +/*&ja Mathcap ¤ò¼õ¤±¼è¤ë¡£¸½ºß¤Ï Mathcap ¤Î½èÍý¤Ï¥æ¡¼¥¶¥×¥í¥°¥é¥à¤ËǤ¤µ¤ì¤Æ¤¤¤ë¡£ ¤¤¤º¤ì¤³¤Î´Ø¿ô¤ÏÇѻߤµ¤ì¤ëͽÄê¡£ */ @@ -273,9 +333,9 @@ Mathcap ¤ò¼õ¤±¼è¤ë¡£¸½ºß¤Ï Mathcap ¤Î½èÍý¤Ï¥æ¡¼¥¶¥×¥í¥ In this section, ``fd'' is an identifier of an OpenXM connection. 4.1 How to decide a byte order of integers? + */ /*&common - int decideByteOrderServer(int fd, int order); */ @@ -295,6 +355,8 @@ as an expression for integers. 4.2 +*/ +/*&common int send_int32(int fd, int integer); int receive_int32(int fd); @@ -311,6 +373,8 @@ receive_int32() reads 32bits integer from an OpenXM co 4.3 +*/ +/*&common int send_cmo(int fd, cmo* m); cmo* receive_cmo(int fd); @@ -327,6 +391,8 @@ receive_cmo() reads an CMObject from an OpenXM connect 4.4 +*/ +/*&common int next_serial(); */ @@ -340,6 +406,8 @@ next_serial() generates a serial number for ox message 4.5 +*/ +/*&common int send_ox_tag(int fd, int tag); int receive_ox_tag(int fd); @@ -358,6 +426,8 @@ receive_ox_tag() reads a tag and a serial number of an 4.6 +*/ +/*&common int send_ox(int fd, ox* m); int send_ox_cmo(int fd, cmo* m); void send_ox_command(int fd, int sm_command); @@ -371,22 +441,36 @@ ox ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë¡£ 5. OX expression ¥Ñ¡¼¥µ +*/ +/*&ja OpenXM C library ¤Ë¤Ï ʸ»úÎóɽ¸½¤µ¤ì¤¿ OX expression ¤ª¤è¤Ó CMO expression ¤«¤é¡¢ ox ¹½Â¤ÂΤޤ¿¤Ï cmo ¹½Â¤ÂΤòÀ¸À®¤¹¤ë¤¿¤á¤Î¥Ñ¡¼¥µ¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£ ¤³¤³¤Ç¤Ï¤³¤Î¥Ñ¡¼¥µ¤Ë¤Ä¤¤¤ÆÀâÌÀ¤¹¤ë¡£ +*/ +/*&common int setflag_parse(int flag); +*/ +/*&ja setflag_parse(PFLAG_ADDREV) ¤Ë¤è¤Ã¤Æ¡¢CMO ¤Îû½Ìɽ¸½¤òµö¤¹¡£ +*/ +/*&common int init_parser(char *str); +*/ +/*&ja ¥Ñ¡¼¥µ¤¬½èÍý¤¹¤Ù¤­Ê¸»úÎó¤ò¥»¥Ã¥È¤¹¤ë¡£ +*/ +/*&common cmo *parse(); +*/ +/*&ja Lisp ɽ¸½¤Ë¤è¤ë OX expression, CMO expression ¤Î¹½Ê¸²òÀÏ´ï¡£¤¢¤é¤«¤¸¤á ÀßÄꤵ¤ì¤¿Ê¸»úÎó¤ò²òÀϤ·¤Æ ox ¹½Â¤ÂΡ¢¤¢¤ë¤¤¤Ï cmo ¹½Â¤ÂΤòÀ¸À®¤¹¤ë¡£ */ @@ -394,19 +478,45 @@ Lisp ɽ¸½¤Ë¤è¤ë OX expression, CMO expression ¤Î¹½Ê¸²ò 7. ÉÕ°¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ +*/ +/*&en + +7. Sample programs. + +*/ +/*&common testclient +*/ +/*&ja ¥Æ¥¹¥ÈÍѤµ¤Ê OpenXM ¥¯¥é¥¤¥¢¥ó¥È¡£OX expression ¤òÆþÎϤ·¤ÆÁ÷¿®¤¹¤ë ¤³¤È¤Î¤ß²Äǽ¡£SM_popCMO, SM_popString ¤ò´Þ¤à¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤·¤¿¾ì¹ç¤Ë ¤Ï¡¢¥µ¡¼¥Ð¤«¤éÁ÷¤é¤ì¤Æ¤¯¤ë¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤¹¤ë¡£ +*/ +/*&en +This is a small OpenXM client. We send an OX message by inputting an +OX expression and display data messages gotten from a server. + +*/ +/*&common bconv +*/ +/*&ja ¥Ð¥¤¥È¥³¡¼¥É¥¨¥ó¥³¡¼¥À¡£OX expression ¤¢¤ë¤¤¤Ï CMO expression ¤òÆþÎϤ¹ ¤ë¤È¡¢Âбþ¤¹¤ë¥Ð¥¤¥ÈÎó¤òɽ¼¨¤¹¤ë¡£ +*/ +/*&en +A byte code encoder. It shows a byte stream which corresponds to an +OX expression. + +/*&common ox_Xsample +*/ +/*&ja GUI ɽ¼¨¤¹¤ë OpenXM ¥µ¡¼¥Ð¤Î¥µ¥ó¥×¥ë¡£ */