=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/sample.c,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -u -p -r1.1.1.1 -r1.4 --- OpenXM/src/kan96xx/plugin/sample.c 1999/10/08 02:12:05 1.1.1.1 +++ OpenXM/src/kan96xx/plugin/sample.c 2020/10/06 11:33:47 1.4 @@ -1,3 +1,4 @@ +/* $OpenXM: OpenXM/src/kan96xx/plugin/sample.c,v 1.3 2005/06/16 05:07:24 takayama Exp $ */ #include #include "../Kan/datatype.h" #include "../Kan/stackm.h" @@ -16,7 +17,7 @@ PLUGIN_LINKFLAG = */ static struct operandStack *SharedStack = NULL; -static struct object Kplugin_NullObject; +static struct object Kplugin_NullObject = OINIT; /* Sample is a very simple stack machine. There are only one operation "add" on the shared stack. @@ -28,8 +29,10 @@ static struct object Kplugin_NullObject; int Kplugin_sample(int opcode, struct object obj) { /* obj is assumed to be an array. */ - struct object ob1,ob2,ob3; - static initialized = 0; + struct object ob1 = OINIT; + struct object ob2 = OINIT; + struct object ob3 = OINIT; + static int initialized = 0; if (opcode != KPLUGIN_SAMPLE_INIT && !initialized) { errorSample("This component is not initialized."); return(-1); @@ -105,7 +108,7 @@ struct object Kplugin_peek(int k,struct operandStack * static void errorSample(char *s) { - fprintf(stderr,"Error in plugin/sample: %s\n"); + fprintf(stderr,"Error in plugin/sample: %s\n",s); /* or push error message in the sharedStack. */ }