=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/README,v retrieving revision 1.9 retrieving revision 1.15 diff -u -p -r1.9 -r1.15 --- OpenXM/src/ox_toolkit/README 2000/01/20 17:18:55 1.9 +++ OpenXM/src/ox_toolkit/README 2000/11/21 07:59:08 1.15 @@ -1,6 +1,6 @@ # Author: ¾®¸¶¸ùǤ @ ¶âÂôÂç³ØÍý³ØÉô·×»»²Ê³Ø¶µ¼¼ # URI: http://omega.s.kanazawa-u.ac.jp/ohara/ -# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.8 2000/01/19 18:31:33 ohara Exp $ +# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.14 2000/11/20 17:59:34 ohara Exp $ /*&ja ox_toolkit ¥æ¡¼¥¶¥¬¥¤¥É @@ -25,9 +25,7 @@ In order to use libox.a, you need to include the follo */ /*&common -#include -#include -#include +#include */ /*&ja @@ -42,7 +40,7 @@ In order to use libox.a, you need to include the follo 1. Types 1.1 CMO (Common Math Object) -The following structures are defined in ox.h: +The following structures are defined in ox_toolkit.h: */ /*&common @@ -82,7 +80,7 @@ class. */ /*&en 1.2 OX objects -The following structures are defined in ox.h: +The following structures are defined in ox_toolkit.h: */ /*&common @@ -131,28 +129,82 @@ new_cmo_error2(cmo* ob); */ /*&ja -3. ¹â¿å½à API +3. ¥³¥Í¥¯¥·¥ç¥ó +OXFILE ¤Ï OpenXM ¤Ç¤ÎÄÌ¿®Ï©¤òɽ¸½¤¹¤ë¥¯¥é¥¹¤Ç¤¢¤ë¡£¤³¤Î¥¯¥é¥¹¤Î¥ª¥Ö¥¸¥§ +¥¯¥È¤òÌÀ¼¨Åª¤Ë¤ÏÀ¸À®¤·¤Ê¤¤¤³¤È¡£É¬¤º¥³¥ó¥¹¥È¥é¥¯¥¿¤òÍøÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤é +¤Ê¤¤¡£¤³¤ì¤Ï¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤ÇÀܳ»þ¤Î¼ê½ç¤¬°Û¤Ê¤ë¤³¤È¤ËͳÍ褹¤ë¡£ +¥Ð¥¤¥È¥ª¡¼¥À¤Ë´ØÏ¢¤·¤¿½èÍý¤Ï¤³¤Î¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤Ç¼Â¸½¤µ¤ì¤ë¡£¤³¤Î¥¯¥é +¥¹¤Î¥á¥½¥Ã¥É¤È¤·¤Æ¼¡¤Î¤â¤Î¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¡£ + +3.1 ¥³¥ó¥¹¥È¥é¥¯¥¿ + +OXFILE *oxf_connect_active(char *hostname, short port); + +ǽưŪ¤ËÀܳ¤¹¤ë¾ì¹ç¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¡£Ä̾¥µ¡¼¥Ð¤ÇÍøÍѤ¹¤ë¡£ + +OXFILE *oxf_connect_passive(int listened); + +¼õưŪ¤ËÀܳ¤¹¤ë¤¿¤á¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¡£ +ÆâÉô¤Ç accept() ¤ò¸Æ¤Ö¤Î¤Ç¡¢listened ¤Ë¤Ï mysocketListen() ¤ÎÊÖ¤·¤¿Ãͤ¬É¬Íס£ + +OXFILE *oxf_open(int fd); + +¥¤¥ó¥¹¥¿¥ó¥¹¤òÀ¸À®¤¹¤ë¤À¤±¤Ç¡¢Àܳ¤Ï¹Ô¤ï¤Ê¤¤¡£¤¹¤Ç¤Ë¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡ +¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò fd ¤Ë»ØÄꤹ¤ë¡£·×»»¥µ¡¼¥Ð¤Ç¤ÎÍøÍѤòÁÛÄê¡£ + +3.2 ǧ¾Ú¤Ë´ØÏ¢¤·¤¿¥á¥½¥Ã¥É + +int oxf_confirm_client(OXFILE *oxfp, char *passwd); + +¥¯¥é¥¤¥¢¥ó¥È¦¤Ç¤Îǧ¾Ú¤ò¹Ô¤¦¡£ÊÖ¤êÃͤ¬1¤Î¤È¤­¤ËÀ®¸ù¡¢0¤Î¤È¤­¤Ë¼ºÇÔ¡£ + +int oxf_confirm_server(OXFILE *oxfp, char *passwd); + +¥µ¡¼¥Ð¦¤Ç¤Îǧ¾Ú¤ò¹Ô¤¦¡£¾ï¤ËÀ®¸ù¤¹¤ë¡£ + +void oxf_determine_byteorder_client(OXFILE *oxfp); +void oxf_determine_byteorder_server(OXFILE *oxfp); + +oxfp ¤Î»Ø¤¹ÄÌ¿®Ï©¤Ç¤Î¥Ð¥¤¥È¥ª¡¼¥À¤ò·èÄꤷ¡¢oxfp ¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤ò½ñ¤­´¹¤¨¤ë¡£ + +void oxf_setopt(OXFILE *oxfp, int mode); + +oxfp ¤ÎÀßÄê¤ò¹Ô¤¦¡£oxf_determine_byteorder_XXX() ¤ÇÍѤ¤¤é¤ì¤Æ¤¤¤ë¡£ + +3.3 ¤½¤Î¾¤Î¥á¥½¥Ã¥É + +int oxf_read(void *buffer, size_t size, size_t num, OXFILE *oxfp); +int oxf_write(void *buffer, size_t size, size_t num, OXFILE *oxfp); +void oxf_flush(OXFILE *oxfp); +void oxf_close(OXFILE *oxfp); + +fread, fwrite, fflush, fclose ¤Ë½àµò¡£ + +*/ +/*&ja +4. ¹â¿å½à API(¤³¤Îµ­½Ò¤Ï¸Å¤¤¤Î¤Ç»È¤ï¤Ê¤¤¤³¤È) + ¹â¿å½à API ¤Ï¡ÖOpenXM ¥¯¥é¥¤¥¢¥ó¥È¡×¤«¤éÍøÍѤ¹¤ë¤³¤È¤òÁ°Äó¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£ -3.1 ÄÌ¿®¤Î³«»Ï +4.1 ÄÌ¿®¤Î³«»Ï ÄÌ¿®¤ò³«»Ï¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢¼¡¤Î´Ø¿ô¤Î¤¤¤º¤ì¤«¤òÍøÍѤ¹¤ë¡£ */ /*&en -3. High-level API +4. High-level API High-level API is prepared to help an implementation of OpenXM clients. -3.1 How to make connections to OpenXM servers? +4.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(). */ /*&common -ox_file_t ox_start(char* host, char* prog1, char* prog2); -ox_file_t ox_start_insecure_nonreverse(char* host, short portControl, short portStream); +OXFILE *ox_start(char* host, char* prog1, char* prog2); +OXFILE *ox_start_insecure_nonreverse(char* host, short portControl, short portStream); */ /*&ja @@ -182,21 +234,21 @@ OpenXM server run on a remote host and you need to pro */ /*&ja -3.2 ÄÌ¿®¤Î½ªÎ» +4.2 ÄÌ¿®¤Î½ªÎ» ÄÌ¿®¤Î½ªÎ»¤Î¤¿¤á¤Ë¤Ï¼¡¤ÎÆó¤Ä¤Î´Ø¿ô¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¡£ */ /*&en -3.2 How to close connections to OpenXM servers? +4.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(). */ /*&common -void ox_close(ox_file_t sv); -void ox_shutdown(ox_file_t sv); +void ox_close(OXFILE *sv); +void ox_shutdown(OXFILE *sv); */ /*&ja @@ -206,14 +258,14 @@ void ox_shutdown(ox_file_t sv); */ /*&ja -3.3 SM ¥³¥Þ¥ó¥É¤ÎÁ÷¿® +4.3 SM ¥³¥Þ¥ó¥É¤ÎÁ÷¿® */ /*&en -3.3 How to command to OpenXM stack machines? +4.3 How to command to OpenXM stack machines? */ /*&common -void ox_push_cmd(ox_file_t sv, int sm_code); +void ox_push_cmd(OXFILE *sv, int sm_code); */ /*&ja @@ -222,20 +274,20 @@ void ox_push_cmd(ox_file_t sv, int sm_code); */ /*&en ox_push_cmd() sends an operation code to an OpenXM stack machine. -See OpenXM/src/ox_toolkit/oxtag.h for a list of operation codes. +See OpenXM/include/ox_toolkit_tags.h for a list of operation codes. */ /*&ja -3.4 CMO ¤ÎÁ÷¼õ¿® +4.4 CMO ¤ÎÁ÷¼õ¿® */ /*&en -3.4 How to receive a CMO? +4.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); +void ox_push_cmo(OXFILE *sv, cmo *c); +cmo* ox_pop_cmo(OXFILE *sv); +char* ox_popString(OXFILE *sv); */ /*&ja @@ -247,11 +299,11 @@ ox_push_cmo ¤Ï cmo ¤òÁ÷¿®¡¢ox_pop_cmo ¤Ï cmo ¤ò¼õ¿®¤¹¤ /*&en */ /*&ja -3.5 ¥¹¥¿¥Ã¥¯½èÍý +4.5 ¥¹¥¿¥Ã¥¯½èÍý */ /*&common -int ox_pops(ox_file_t sv, int num); +int ox_pops(OXFILE *sv, int num); */ /*&ja @@ -259,11 +311,11 @@ int ox_pops(ox_file_t sv, int num); */ /*&ja -3.6 ÄÌ¿®Ï©¤Î¥Õ¥é¥Ã¥·¥å +4.6 ÄÌ¿®Ï©¤Î¥Õ¥é¥Ã¥·¥å */ /*&common -int ox_flush(ox_file_t sv); +int ox_flush(OXFILE *sv); */ /*&ja @@ -271,11 +323,11 @@ int ox_flush(ox_file_t sv); */ /*&ja -3.7 ÄÌ¿®¤ÎÃæÃÇ +4.7 ÄÌ¿®¤ÎÃæÃÇ */ /*&common -void ox_reset(ox_file_t sv); +void ox_reset(OXFILE *sv); */ /*&ja @@ -283,11 +335,11 @@ void ox_reset(ox_file_t sv); */ /*&ja -3.8 ¥í¡¼¥«¥ë¸À¸ì¤Ç½ñ¤«¤ì¤¿¥³¥Þ¥ó¥É¤Îɾ²Á +4.8 ¥í¡¼¥«¥ë¸À¸ì¤Ç½ñ¤«¤ì¤¿¥³¥Þ¥ó¥É¤Îɾ²Á */ /*&common -void ox_execute_string(ox_file_t sv, char* str); +void ox_execute_string(OXFILE *sv, char* str); */ /*&ja @@ -295,11 +347,11 @@ void ox_execute_string(ox_file_t sv, char* str); */ /*&ja -3.9 ´Ø¿ô¸Æ¤Ó½Ð¤· +4.9 ´Ø¿ô¸Æ¤Ó½Ð¤· */ /*&common -int ox_cmo_rpc(ox_file_t sv, char *function, int argc, cmo *argv[]); +int ox_cmo_rpc(OXFILE *sv, char *function, int argc, cmo *argv[]); */ /*&ja @@ -307,11 +359,11 @@ function(argv[1], ...) ¤ò·×»»¤·¡¢·ë²Ì¤ò¥¹¥¿¥Ã¥¯¤ËÀѤࡠ*/ /*&ja -3.10 Mathcap ¤Î¼õ¿® +4.10 Mathcap ¤Î¼õ¿® */ /*&common -cmo_mathcap* ox_mathcap(ox_file_t sv); +cmo_mathcap* ox_mathcap(OXFILE *sv); */ /*&ja @@ -320,19 +372,19 @@ Mathcap ¤ò¼õ¤±¼è¤ë¡£¸½ºß¤Ï Mathcap ¤Î½èÍý¤Ï¥æ¡¼¥¶¥×¥í¥ */ /*&ja -4. Äã¿å½à API +5. Äã¿å½à API Äã¿å½à API ¤Ï¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òľÀÜÍøÍѤ¹¤ë¡£ -4.1 ÄÌ¿®¤Ë»È¤ï¤ì¤ë¥Ð¥¤¥È¥ª¡¼¥À¤Î·èÄê +5.1 ÄÌ¿®¤Ë»È¤ï¤ì¤ë¥Ð¥¤¥È¥ª¡¼¥À¤Î·èÄê */ /*&en -4. Low-level API. +5. Low-level API. In this section, ``fd'' is an identifier of an OpenXM connection. -4.1 How to decide a byte order of integers? +5.1 How to decide a byte order of integers? */ /*&common @@ -353,7 +405,7 @@ as an expression for integers. */ /*&common -4.2 +5.2 */ /*&common @@ -371,7 +423,7 @@ receive_int32() reads 32bits integer from an OpenXM co */ /*&common -4.3 +5.3 */ /*&common @@ -389,7 +441,7 @@ receive_cmo() reads an CMObject from an OpenXM connect */ /*&common -4.4 +5.4 */ /*&common @@ -404,7 +456,7 @@ next_serial() generates a serial number for ox message */ /*&common -4.5 +5.5 */ /*&common @@ -424,7 +476,7 @@ receive_ox_tag() reads a tag and a serial number of an */ /*&common -4.6 Sending OX messages. +5.6 Sending OX messages. */ /*&common @@ -439,12 +491,12 @@ OX ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë¡£ /*&ja -5. OX expression ¥Ñ¡¼¥µ +6. OX expression ¥Ñ¡¼¥µ */ /*&en -5. Parser for OX expressions +6. Parser for OX expressions */ /*&ja @@ -458,11 +510,11 @@ encoded OX/CMO expression. In this section, we explai */ /*&en -5.1 Setting an option +6.1 Setting an option */ /*&ja -5.1 ¥ª¥×¥·¥ç¥ó +6.1 ¥ª¥×¥·¥ç¥ó */ /*&common @@ -479,11 +531,11 @@ expressios. */ /*&en -5.2 Initializing +6.2 Initializing */ /*&ja -5.2 ½é´ü²½ +6.2 ½é´ü²½ */ /*&common @@ -498,11 +550,11 @@ We give the parser an OX/CMO expression, that is, a Li */ /*&en -5.3 Getting an object +6.3 Getting an object */ /*&ja -5.3 ·ë²Ì¤òÆÀ¤ë +6.3 ·ë²Ì¤òÆÀ¤ë */ /*&common @@ -519,12 +571,50 @@ then the parser returns NULL. */ /*&ja -7. ÉÕ°¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ +7. Mathcap ¥¯¥é¥¹ +¥Ç¡¼¥¿¥Ù¡¼¥¹ +7.1. ³µÍ× + +Mathcap ¥¯¥é¥¹¤Ï OpenXM ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î Mathcap ¤òɽ¸½¤¹¤ë¥¯¥é¥¹¤Ç +¤¢¤ë¡£¤³¤ì¤Ï cmo_mathcap ¤È¤ÏÊÌʪ¤Ç¤¢¤ë¡£Mathcap ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹ +¤Ï³ÆÄÌ¿®Ï©¤´¤È¤ËÀ¸À®¤µ¤ì¡¢OXFILE ¥¯¥é¥¹¤Î¥á¥ó¥Ð¤Ë¤Ê¤ë¡£¤³¤Î¤³¤È¤Ï¡¢Ê£ +¿ô¤Î·×»»¥×¥í¥»¥¹¤ÈƱ»þ¤ËÄÌ¿®¤¹¤ë¥¯¥é¥¤¥¢¥ó¥È¤òºîÀ®¤¹¤ë¤¿¤á¤Ç¤¢¤ë¡£¤µ¤Æ¡¢ +Mathcap ¥¯¥é¥¹¤Ï¡¢ÀÅŪ¥á¥ó¥Ð¤â¤â¤Ä¡£¤³¤ì¤éÀÅŪ¥á¥ó¥Ð¤Ï¡¢ÄÌ¿®Ï©¤«¤éÆÈΩ +¤·¤¿¡¢ OpenXM ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¼«ÂΤξðÊó¤òÊÝ»ý¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£¤Þ¤¿¡£ +¥¤¥ó¥¹¥¿¥ó¥¹¤ÎÀ¸À®»þ¤Ë¤â¤½¤Î¾ðÊó¤ÏÍøÍѤµ¤ì¤ë¡£ + +7.2. ¥á¥½¥Ã¥É + +Mathcap ¥¯¥é¥¹¤Ï mathcap.c ¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£¥æ¡¼¥¶¤Ï¼¡¤Î´Ø¿ô¤ò²ð¤·¤Æ¡¢ +Mathcap ¥¯¥é¥¹¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ + +void mathcap_init(int version, char *id, char *sysname, int cmo[], sm_cmd[]); + +ÀÅŪ¥á¥ó¥Ð¤ò½é´ü²½¤¹¤ë¡£Mathcap ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÀ¸À®¤¹¤ë¤Þ¤¨¤Ë¡¢ +¤·¤¿¤¬¤Ã¤Æ¡¢¥¯¥é¥¤¥¢¥ó¥È¤ª¤è¤Ó¥µ¡¼¥Ð¤Ï¥×¥í¥°¥é¥à¤ò³«»Ï¤¹¤ë¤È¤­¤Ë¡¢¤³¤Î +´Ø¿ô¤ò¸Æ¤Ð¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£cmo ¤Ï¡¢¤½¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÍøÍѤ¹¤ë CMO +¤Î¥¿¥°¤Î¥ê¥¹¥È¤Ç¤¢¤Ã¤Æ¡¢0 ¤Ç½ªÃ¼¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£NULL ¤Î¤È¤­¤Ë¤Ï´û +ÄêÃͤ¬ÍѤ¤¤é¤ì¤ë¡£sm_cmd ¤âƱÍÍ¡£ + +cmo_mathcap *mathcap_get(mathcap *this); + +Mathcap ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤ò cmo_mathcap ¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤ËÊÑ´¹¤¹¤ë¡£ + +mathcap *mathcap_update(mathcap *this, cmo_mathcap *mc); + +ÄÌ¿®Áê¼ê¤«¤éÆþ¼ê¤·¤¿ cmo_mathcap ¥ª¥Ö¥¸¥§¥¯¥È¤òÍѤ¤¤Æ¡¢Mathcap ¥¯¥é¥¹¤Î +¥¤¥ó¥¹¥¿¥ó¥¹¤ò¹¹¿·¤¹¤ë¡£ + */ +/*&ja + +8. ÉÕ°¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ + +*/ /*&en -7. Sample programs. +8. Sample programs. */ /*&common @@ -565,9 +655,9 @@ GUI ɽ¼¨¤¹¤ë OpenXM ¥µ¡¼¥Ð¤Î¥µ¥ó¥×¥ë¡£ */ /*&ja -8. ÉÕÏ¿ +9. ÉÕÏ¿ -8.1 ox.c ¤Ë¤ª¤±¤ë´Ø¿ô¤Î̿̾µ¬Â§ +9.1 ox.c ¤Ë¤ª¤±¤ë´Ø¿ô¤Î̿̾µ¬Â§ (1) receive_cmo ´Ø¿ô¤ÏCMO¥¿¥°¤È¥Ç¡¼¥¿ËÜÂΤò¼õ¿®¤¹¤ë. ¤³¤Î´Ø¿ô¤Ï CMO¥¿ ¥°¤ÎÃͤ¬»öÁ°¤Ëʬ¤«¤é¤Ê¤¤¤È¤­¤Ë»ÈÍѤ¹¤ë. ÊÖ¤êÃͤȤ·¤Æ¡¢cmo ¤Ø¤Î¥Ý¥¤¥ó¥¿