From b3bb79992a6037019abd466e34483408bea346d8 Mon Sep 17 00:00:00 2001 From: steve Date: Fri, 26 Oct 2001 02:29:10 +0000 Subject: [PATCH] const/non-const warnings. (Stephan Boettcher) --- vpi/sys_vcd.c | 7 +++++-- vpip/vpi_memory.c | 7 +++++-- vpip/vpi_priv.c | 7 +++++-- vpip/vpi_priv.h | 7 +++++-- vpip/vpi_signal.c | 7 +++++-- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index d9c976baa..c9945f197 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: sys_vcd.c,v 1.25 2001/10/25 04:19:53 steve Exp $" +#ident "$Id: sys_vcd.c,v 1.26 2001/10/26 02:29:10 steve Exp $" #endif # include "config.h" @@ -644,7 +644,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip) static int draw_scope(vpiHandle item) { int depth; - char *name; + const char *name; char *type; vpiHandle scope = vpi_handle(vpiScope, item); @@ -782,6 +782,9 @@ void sys_vcd_register() /* * $Log: sys_vcd.c,v $ + * Revision 1.26 2001/10/26 02:29:10 steve + * const/non-const warnings. (Stephan Boettcher) + * * Revision 1.25 2001/10/25 04:19:53 steve * VPI support for callback to return values. * diff --git a/vpip/vpi_memory.c b/vpip/vpi_memory.c index a85e81c2b..94ecc96b5 100644 --- a/vpip/vpi_memory.c +++ b/vpip/vpi_memory.c @@ -26,7 +26,7 @@ * Picture Elements, Inc., 777 Panoramic Way, Berkeley, CA 94704. */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_memory.c,v 1.1 2001/03/14 19:27:44 steve Exp $" +#ident "$Id: vpi_memory.c,v 1.2 2001/10/26 02:29:10 steve Exp $" #endif # include "vpi_priv.h" @@ -48,7 +48,7 @@ static int memory_get(int code, vpiHandle ref) } } -static char* memory_get_str(int code, vpiHandle ref) +static const char* memory_get_str(int code, vpiHandle ref) { struct __vpiMemory*rfp = (struct __vpiMemory*)ref; assert(ref->vpi_type->type_code==vpiMemory); @@ -201,6 +201,9 @@ vpiHandle vpip_make_memory(struct __vpiMemory*ref, const char*name, } /* * $Log: vpi_memory.c,v $ + * Revision 1.2 2001/10/26 02:29:10 steve + * const/non-const warnings. (Stephan Boettcher) + * * Revision 1.1 2001/03/14 19:27:44 steve * Rearrange VPI support libraries. * diff --git a/vpip/vpi_priv.c b/vpip/vpi_priv.c index e7944b68c..241782f08 100644 --- a/vpip/vpi_priv.c +++ b/vpip/vpi_priv.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_priv.c,v 1.3 2001/06/19 14:57:10 steve Exp $" +#ident "$Id: vpi_priv.c,v 1.4 2001/10/26 02:29:10 steve Exp $" #endif # include "vpi_priv.h" @@ -143,7 +143,7 @@ char* vpi_get_str(int property, vpiHandle ref) if (ref->vpi_type->vpi_get_str_ == 0) return 0; - return (ref->vpi_type->vpi_get_str_)(property, ref); + return (char*)(ref->vpi_type->vpi_get_str_)(property, ref); } void vpi_get_time(vpiHandle obj, s_vpi_time*t) @@ -241,6 +241,9 @@ void vpi_register_systf(const struct t_vpi_systf_data*systf) /* * $Log: vpi_priv.c,v $ + * Revision 1.4 2001/10/26 02:29:10 steve + * const/non-const warnings. (Stephan Boettcher) + * * Revision 1.3 2001/06/19 14:57:10 steve * Get va_start arguments in right order. * diff --git a/vpip/vpi_priv.h b/vpip/vpi_priv.h index 6e0f27c25..05e9fbbbb 100644 --- a/vpip/vpi_priv.h +++ b/vpip/vpi_priv.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_priv.h,v 1.1 2001/03/14 19:27:44 steve Exp $" +#ident "$Id: vpi_priv.h,v 1.2 2001/10/26 02:29:10 steve Exp $" #endif /* @@ -150,7 +150,7 @@ struct __vpirt { /* These methods extract information from the handle. */ int (*vpi_get_)(int, vpiHandle); - char* (*vpi_get_str_)(int, vpiHandle); + const char* (*vpi_get_str_)(int, vpiHandle); void (*vpi_get_value_)(vpiHandle, p_vpi_value); vpiHandle (*vpi_put_value_)(vpiHandle, p_vpi_value, p_vpi_time, int); @@ -412,6 +412,9 @@ extern int vpip_finished(); /* * $Log: vpi_priv.h,v $ + * Revision 1.2 2001/10/26 02:29:10 steve + * const/non-const warnings. (Stephan Boettcher) + * * Revision 1.1 2001/03/14 19:27:44 steve * Rearrange VPI support libraries. * diff --git a/vpip/vpi_signal.c b/vpip/vpi_signal.c index eff1d3133..a5281b61a 100644 --- a/vpip/vpi_signal.c +++ b/vpip/vpi_signal.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_signal.c,v 1.1 2001/03/14 19:27:44 steve Exp $" +#ident "$Id: vpi_signal.c,v 1.2 2001/10/26 02:29:10 steve Exp $" #endif # include "vpi_priv.h" @@ -43,7 +43,7 @@ static int signal_get(int code, vpiHandle ref) } } -static char* signal_get_str(int code, vpiHandle ref) +static const char* signal_get_str(int code, vpiHandle ref) { struct __vpiSignal*rfp = (struct __vpiSignal*)ref; @@ -127,6 +127,9 @@ vpiHandle vpip_make_reg(struct __vpiSignal*ref, const char*name, /* * $Log: vpi_signal.c,v $ + * Revision 1.2 2001/10/26 02:29:10 steve + * const/non-const warnings. (Stephan Boettcher) + * * Revision 1.1 2001/03/14 19:27:44 steve * Rearrange VPI support libraries. *