$display can take 0 arguments.
This commit is contained in:
parent
f2c1902984
commit
e03859b834
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: sys_display.c,v 1.22 2001/02/10 19:50:33 steve Exp $"
|
#ident "$Id: sys_display.c,v 1.23 2001/03/18 00:31:32 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vpi_user.h"
|
# include "vpi_user.h"
|
||||||
|
|
@ -35,18 +35,24 @@ struct strobe_cb_info {
|
||||||
|
|
||||||
static void array_from_iterator(struct strobe_cb_info*info, vpiHandle argv)
|
static void array_from_iterator(struct strobe_cb_info*info, vpiHandle argv)
|
||||||
{
|
{
|
||||||
vpiHandle item;
|
if (argv) {
|
||||||
unsigned nitems = 1;
|
vpiHandle item;
|
||||||
vpiHandle*items = malloc(sizeof(vpiHandle));
|
unsigned nitems = 1;
|
||||||
items[0] = vpi_scan(argv);
|
vpiHandle*items = malloc(sizeof(vpiHandle));
|
||||||
for (item = vpi_scan(argv) ; item ; item = vpi_scan(argv)) {
|
items[0] = vpi_scan(argv);
|
||||||
items = realloc(items, (nitems+1)*sizeof(vpiHandle));
|
for (item = vpi_scan(argv) ; item ; item = vpi_scan(argv)) {
|
||||||
items[nitems] = item;
|
items = realloc(items, (nitems+1)*sizeof(vpiHandle));
|
||||||
nitems += 1;
|
items[nitems] = item;
|
||||||
}
|
nitems += 1;
|
||||||
|
}
|
||||||
|
|
||||||
info->nitems = nitems;
|
info->nitems = nitems;
|
||||||
info->items = items;
|
info->items = items;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
info->nitems = 0;
|
||||||
|
info->items = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -600,6 +606,9 @@ void sys_display_register()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: sys_display.c,v $
|
* $Log: sys_display.c,v $
|
||||||
|
* Revision 1.23 2001/03/18 00:31:32 steve
|
||||||
|
* $display can take 0 arguments.
|
||||||
|
*
|
||||||
* Revision 1.22 2001/02/10 19:50:33 steve
|
* Revision 1.22 2001/02/10 19:50:33 steve
|
||||||
* Slightly more specific error message.
|
* Slightly more specific error message.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue