=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/oxmisc2.c,v retrieving revision 1.4 retrieving revision 1.6 diff -u -p -r1.4 -r1.6 --- OpenXM/src/kan96xx/plugin/oxmisc2.c 1999/11/27 01:41:11 1.4 +++ OpenXM/src/kan96xx/plugin/oxmisc2.c 2000/03/20 01:53:47 1.6 @@ -1,9 +1,12 @@ -/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc2.c,v 1.3 1999/11/18 00:54:17 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc2.c,v 1.5 2000/02/02 03:30:48 takayama Exp $ */ #include #include "ox_kan.h" #include "oxmisc2.h" /* This file requires sm1 object description. */ #include "cmo.h" extern FILE *MyErrorOut; +#define SET_MYERROROUT { if (MyErrorOut == NULL) MyErrorOut=stdout; } +/* It is also defined in oxmisc.c */ + extern int SerialOX; /* defined in SerialOX */ extern int OxVersion; @@ -79,6 +82,7 @@ int oxGetFromControl(oxclientp client) int oxReq(oxclientp client,int func,struct object ob) { struct object *ob1p; + SET_MYERROROUT; /* request to the control channel */ if (func == SM_control_reset_connection || func == SM_control_kill) { @@ -677,7 +681,9 @@ static int cmoCheck00(struct object obj,int cmo[], int #define CHECK00_N 4098 /* look up stackm.h and kclass.h */ static int typeTrans[CHECK00_N]; static int init = 0; - if (n == 0) return(1); /* For null cmolist, OK. */ + /* if n == 0, report the cmo tag of the object obj. + If it cannot be translated to cmo, then return -1. */ + if (!init) { for (i=0; i