Update of /cvsroot/pure-data/externals/iem/pdoctave In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23060
Modified Files: pdoctave_command.c pdoctave_get.c pdoctave_send.c Log Message: objects cannot be created when pdoctave is not present
Index: pdoctave_command.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/pdoctave/pdoctave_command.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pdoctave_command.c 22 Feb 2006 12:48:15 -0000 1.1 --- pdoctave_command.c 25 Mar 2006 10:53:12 -0000 1.2 *************** *** 85,89 **** post("getpdoctaveinstances returned %d", getPDOctaveInstances()); if (getPDOctaveInstances()<1) { ! post("Octave not running, insert a 'pdoctave' object!!"); } pdoctcmd_obj->pos = 0; --- 85,90 ---- post("getpdoctaveinstances returned %d", getPDOctaveInstances()); if (getPDOctaveInstances()<1) { ! error("Octave not running, insert a 'pdoctave' object!!"); ! return 0; } pdoctcmd_obj->pos = 0;
Index: pdoctave_get.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/pdoctave/pdoctave_get.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pdoctave_get.c 22 Feb 2006 12:48:15 -0000 1.1 --- pdoctave_get.c 25 Mar 2006 10:53:13 -0000 1.2 *************** *** 29,33 **** post("getpdoctaveinstances returned %d", getPDOctaveInstances()); if (getPDOctaveInstances()<1) { ! post("Octave not running, insert a 'pdoctave' object!!"); } if (argc>0) --- 29,34 ---- post("getpdoctaveinstances returned %d", getPDOctaveInstances()); if (getPDOctaveInstances()<1) { ! error("Octave not running, insert a 'pdoctave' object!!"); ! return 0; } if (argc>0) *************** *** 36,44 **** name = gensym ("pdm1");
! pdoctget_obj->sdf = newSharedDataFrame (); pdoctget_obj->data = 0; pdoctget_obj->oct_name = name->s_name; pdoctget_obj->outlet = outlet_new (&pdoctget_obj->x_obj, 0); - return ((void *) pdoctget_obj); } --- 37,47 ---- name = gensym ("pdm1");
! if ((pdoctget_obj->sdf = newSharedDataFrame ())==0) { ! error("pdoctave_get: failed to get shared memory"); ! return 0; ! } pdoctget_obj->data = 0; pdoctget_obj->oct_name = name->s_name; pdoctget_obj->outlet = outlet_new (&pdoctget_obj->x_obj, 0); return ((void *) pdoctget_obj); }
Index: pdoctave_send.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/pdoctave/pdoctave_send.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pdoctave_send.c 22 Feb 2006 12:48:15 -0000 1.1 --- pdoctave_send.c 25 Mar 2006 10:53:13 -0000 1.2 *************** *** 25,29 ****
if (getPDOctaveInstances()<1) { ! post("Octave not running, insert a 'pdoctave' object!!"); } if (argc>0) --- 25,30 ----
if (getPDOctaveInstances()<1) { ! error("Octave not running, insert a 'pdoctave' object!!"); ! return 0; } if (argc>0) *************** *** 32,36 **** name = gensym ("pdm1");
! pdoctsnd_obj->sdf = newSharedDataFrame (); pdoctsnd_obj->data = 0; pdoctsnd_obj->oct_name = name->s_name; --- 33,40 ---- name = gensym ("pdm1");
! if ((pdoctsnd_obj->sdf = newSharedDataFrame ())==0) { ! error("pdoctave_send: failed to get shared memory"); ! return 0; ! } pdoctsnd_obj->data = 0; pdoctsnd_obj->oct_name = name->s_name;