=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/README,v retrieving revision 1.8 retrieving revision 1.11 diff -u -p -r1.8 -r1.11 --- OpenXM/src/ox_toolkit/README 2000/01/19 18:31:33 1.8 +++ OpenXM/src/ox_toolkit/README 2000/10/10 05:23:19 1.11 @@ -1,6 +1,6 @@ # Author: ¾®¸¶¸ùǤ @ ¶âÂôÂç³ØÍý³ØÉô·×»»²Ê³Ø¶µ¼¼ # URI: http://omega.s.kanazawa-u.ac.jp/ohara/ -# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.7 2000/01/14 10:23:34 ohara Exp $ +# $OpenXM: OpenXM/src/ox_toolkit/README,v 1.10 2000/03/10 12:24:38 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,8 +129,36 @@ new_cmo_error2(cmo* ob); */ /*&ja -3. ¹â¿å½à API +2.5 ¥³¥Í¥¯¥·¥ç¥ó +OXFILE ¤Ï OpenXM ¤Ç¤ÎÄÌ¿®Ï©¤òɽ¸½¤¹¤ë¥¯¥é¥¹¤Ç¤¢¤ë¡£¤³¤Î¥¯¥é¥¹¤Î¥ª¥Ö¥¸¥§ +¥¯¥È¤òÌÀ¼¨Åª¤Ë¤ÏÀ¸À®¤·¤Ê¤¤¤³¤È¡£É¬¤º¥³¥ó¥¹¥È¥é¥¯¥¿¤òÍøÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤é +¤Ê¤¤¡£¤³¤ì¤Ï¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤ÇÀܳ»þ¤Î¼ê½ç¤¬°Û¤Ê¤ë¤³¤È¤ËͳÍ褹¤ë¡£ +¥Ð¥¤¥È¥ª¡¼¥À¤Ë´ØÏ¢¤·¤¿½èÍý¤Ï¤³¤Î¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤Ç¼Â¸½¤µ¤ì¤ë¡£¤³¤Î¥¯¥é +¥¹¤Î¥á¥½¥Ã¥É¤È¤·¤Æ¼¡¤Î¤â¤Î¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¡£ + +2.5.1 ¥³¥ó¥¹¥È¥é¥¯¥¿ +OXFILE *oxf_connect_active(char *hostname, short port); +OXFILE *oxf_connect_passive(int listened); +OXFILE *oxf_open(int fd); + +2.5.2 ǧ¾Ú¤Ë´ØÏ¢¤·¤¿¥á¥½¥Ã¥É +int oxf_confirm_client(OXFILE *oxfp, char *passwd); +int oxf_confirm_server(OXFILE *oxfp, char *passwd); +void oxf_determine_byteorder_client(OXFILE *oxfp); +void oxf_determine_byteorder_server(OXFILE *oxfp); +void oxf_setopt(OXFILE *oxfp, int mode); + +2.5.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); + +*/ +/*&ja +3. ¹â¿å½à API(¤³¤Îµ­½Ò¤Ï¸Å¤¤¤Î¤Ç»È¤ï¤Ê¤¤¤³¤È) + ¹â¿å½à API ¤Ï¡ÖOpenXM ¥¯¥é¥¤¥¢¥ó¥È¡×¤«¤éÍøÍѤ¹¤ë¤³¤È¤òÁ°Äó¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£ 3.1 ÄÌ¿®¤Î³«»Ï @@ -151,8 +177,8 @@ 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 @@ -195,8 +221,8 @@ 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 @@ -213,7 +239,7 @@ void ox_shutdown(ox_file_t sv); */ /*&common -void ox_push_cmd(ox_file_t sv, int sm_code); +void ox_push_cmd(OXFILE *sv, int sm_code); */ /*&ja @@ -222,7 +248,7 @@ 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 @@ -233,9 +259,9 @@ See OpenXM/src/ox_toolkit/oxtag.h for a list of operat */ /*&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 @@ -251,7 +277,7 @@ ox_push_cmo ¤Ï cmo ¤òÁ÷¿®¡¢ox_pop_cmo ¤Ï cmo ¤ò¼õ¿®¤¹¤ */ /*&common -int ox_pops(ox_file_t sv, int num); +int ox_pops(OXFILE *sv, int num); */ /*&ja @@ -263,7 +289,7 @@ int ox_pops(ox_file_t sv, int num); */ /*&common -int ox_flush(ox_file_t sv); +int ox_flush(OXFILE *sv); */ /*&ja @@ -275,7 +301,7 @@ int ox_flush(ox_file_t sv); */ /*&common -void ox_reset(ox_file_t sv); +void ox_reset(OXFILE *sv); */ /*&ja @@ -287,7 +313,7 @@ void ox_reset(ox_file_t sv); */ /*&common -void ox_execute_string(ox_file_t sv, char* str); +void ox_execute_string(OXFILE *sv, char* str); */ /*&ja @@ -299,7 +325,7 @@ void ox_execute_string(ox_file_t sv, char* str); */ /*&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 @@ -311,7 +337,7 @@ function(argv[1], ...) ¤ò·×»»¤·¡¢·ë²Ì¤ò¥¹¥¿¥Ã¥¯¤ËÀѤࡠ*/ /*&common -cmo_mathcap* ox_mathcap(ox_file_t sv); +cmo_mathcap* ox_mathcap(OXFILE *sv); */ /*&ja @@ -424,7 +450,7 @@ receive_ox_tag() reads a tag and a serial number of an */ /*&common -4.6 +4.6 Sending OX messages. */ /*&common @@ -434,7 +460,7 @@ void send_ox_command(int fd, int sm_command); */ /*&ja -ox ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë¡£ +OX ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë¡£ */ /*&ja @@ -442,31 +468,70 @@ ox ¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë¡£ 5. OX expression ¥Ñ¡¼¥µ */ +/*&en + +5. Parser for OX expressions + +*/ /*&ja -OpenXM C library ¤Ë¤Ï ʸ»úÎóɽ¸½¤µ¤ì¤¿ -OX expression ¤ª¤è¤Ó CMO expression ¤«¤é¡¢ -ox ¹½Â¤ÂΤޤ¿¤Ï cmo ¹½Â¤ÂΤòÀ¸À®¤¹¤ë¤¿¤á¤Î¥Ñ¡¼¥µ¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£ +OpenXM C library ¤Ë¤Ï ʸ»úÎóɽ¸½¤µ¤ì¤¿ OX expression ¤ª¤è¤Ó CMO +expression ¤«¤é¡¢ox ¹½Â¤ÂΤޤ¿¤Ï cmo ¹½Â¤ÂΤòÀ¸À®¤¹¤ë¤¿¤á¤Î¥Ñ¡¼¥µ¤¬ÉÕ +°¤·¤Æ¤¤¤ë¡£¤³¤³¤Ç¤Ï¤³¤Î¥Ñ¡¼¥µ¤Ë¤Ä¤¤¤ÆÀâÌÀ¤¹¤ë¡£ +*/ +/*&en +We have a parser which generate an OX object or a CMO from a string +encoded OX/CMO expression. In this section, we explain the parser. +*/ +/*&en -¤³¤³¤Ç¤Ï¤³¤Î¥Ñ¡¼¥µ¤Ë¤Ä¤¤¤ÆÀâÌÀ¤¹¤ë¡£ +5.1 Setting an option +*/ +/*&ja +5.1 ¥ª¥×¥·¥ç¥ó */ /*&common + int setflag_parse(int flag); */ /*&ja setflag_parse(PFLAG_ADDREV) ¤Ë¤è¤Ã¤Æ¡¢CMO ¤Îû½Ìɽ¸½¤òµö¤¹¡£ +*/ +/*&en +We set an option for the parser. If we call +setflag_parse(PFLAG_ADDREV), then the parser admits external +expressios. +*/ +/*&en +5.2 Initializing */ +/*&ja + +5.2 ½é´ü²½ +*/ /*&common + int init_parser(char *str); */ /*&ja ¥Ñ¡¼¥µ¤¬½èÍý¤¹¤Ù¤­Ê¸»úÎó¤ò¥»¥Ã¥È¤¹¤ë¡£ +*/ +/*&en +We give the parser an OX/CMO expression, that is, a Lisp style string. +*/ +/*&en +5.3 Getting an object */ +/*&ja + +5.3 ·ë²Ì¤òÆÀ¤ë +*/ /*&common + cmo *parse(); */ @@ -474,6 +539,10 @@ cmo *parse(); Lisp ɽ¸½¤Ë¤è¤ë OX expression, CMO expression ¤Î¹½Ê¸²òÀÏ´ï¡£¤¢¤é¤«¤¸¤á ÀßÄꤵ¤ì¤¿Ê¸»úÎó¤ò²òÀϤ·¤Æ ox ¹½Â¤ÂΡ¢¤¢¤ë¤¤¤Ï cmo ¹½Â¤ÂΤòÀ¸À®¤¹¤ë¡£ */ +/*&en +The parser returns an OX/CMO object. If the given string is illegal, +then the parser returns NULL. +*/ /*&ja 7. ÉÕ°¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ @@ -512,6 +581,7 @@ bconv A byte code encoder. It shows a byte stream which corresponds to an OX expression. +*/ /*&common ox_Xsample