Compile cleanup of C code.
This commit is contained in:
parent
98ba641e67
commit
5e627c9adc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: putlongp.c,v 1.3 2003/03/15 05:42:39 steve Exp $"
|
||||
#ident "$Id: putlongp.c,v 1.4 2004/09/10 23:13:05 steve Exp $"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -58,13 +58,16 @@ void tf_putlongp(int n, int lowvalue, int highvalue)
|
|||
sprintf(str, "%x%08x", highvalue, lowvalue);
|
||||
val.format = vpiHexStrVal;
|
||||
val.value.str = str;
|
||||
(void)vpi_put_value(arg_h, &val, 0, vpiNoDelay);
|
||||
vpi_put_value(arg_h, &val, 0, vpiNoDelay);
|
||||
|
||||
vpi_free_object(sys_i);
|
||||
}
|
||||
|
||||
/*
|
||||
* $Log: putlongp.c,v $
|
||||
* Revision 1.4 2004/09/10 23:13:05 steve
|
||||
* Compile cleanup of C code.
|
||||
*
|
||||
* Revision 1.3 2003/03/15 05:42:39 steve
|
||||
* free argument iterators.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: putp.c,v 1.6 2003/06/26 03:20:24 steve Exp $"
|
||||
#ident "$Id: putp.c,v 1.7 2004/09/10 23:13:05 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <assert.h>
|
||||
|
|
@ -74,7 +74,7 @@ PLI_INT32 tf_iputp(PLI_INT32 n, PLI_INT32 value, void *obj)
|
|||
/* fill in vpi_value */
|
||||
val.format = vpiIntVal;
|
||||
val.value.integer = value;
|
||||
(void)vpi_put_value(arg_h, &val, 0, vpiNoDelay);
|
||||
vpi_put_value(arg_h, &val, 0, vpiNoDelay);
|
||||
|
||||
if (arg_h)
|
||||
vpi_free_object(sys_i);
|
||||
|
|
@ -123,7 +123,7 @@ PLI_INT32 tf_iputrealp(PLI_INT32 n, double value, void *obj)
|
|||
/* fill in vpi_value */
|
||||
val.format = vpiRealVal;
|
||||
val.value.real = value;
|
||||
(void)vpi_put_value(arg_h, &val, 0, vpiNoDelay);
|
||||
vpi_put_value(arg_h, &val, 0, vpiNoDelay);
|
||||
|
||||
free:
|
||||
vpi_free_object(sys_i);
|
||||
|
|
@ -145,6 +145,9 @@ PLI_INT32 tf_putrealp(PLI_INT32 n, double value)
|
|||
}
|
||||
/*
|
||||
* $Log: putp.c,v $
|
||||
* Revision 1.7 2004/09/10 23:13:05 steve
|
||||
* Compile cleanup of C code.
|
||||
*
|
||||
* Revision 1.6 2003/06/26 03:20:24 steve
|
||||
* Correct handle of put to function return value.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: veriusertfs.c,v 1.14 2003/06/25 04:04:19 steve Exp $"
|
||||
#ident "$Id: veriusertfs.c,v 1.15 2004/09/10 23:13:05 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -84,7 +84,7 @@ void veriusertfs_register_table(p_tfcell vtable)
|
|||
}
|
||||
|
||||
/* squirrel away veriusertfs in persistent user_data */
|
||||
data = (p_pli_data) calloc(1, sizeof(s_pli_data));
|
||||
data = calloc(1, sizeof(s_pli_data));
|
||||
assert(data != NULL);
|
||||
data->tf = tf;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ void veriusertfs_register_table(p_tfcell vtable)
|
|||
it to the pli_data that represents this
|
||||
function. Supply wrapper functions for the system
|
||||
task actions. */
|
||||
(void) memset(&tf_data, 0, sizeof(s_vpi_systf_data));
|
||||
memset(&tf_data, 0, sizeof(s_vpi_systf_data));
|
||||
switch (tf->type) {
|
||||
case usertask:
|
||||
tf_data.type = vpiSysTask;
|
||||
|
|
@ -164,7 +164,7 @@ static int compiletf(char *data)
|
|||
vpi_put_userdata(call_h, pli);
|
||||
|
||||
/* default cb_data */
|
||||
(void) memset(&cb_data, 0, sizeof(s_cb_data));
|
||||
memset(&cb_data, 0, sizeof(s_cb_data));
|
||||
cb_data.cb_rtn = callback;
|
||||
cb_data.user_data = data;
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ static int compiletf(char *data)
|
|||
cb_data.reason = cbValueChange;
|
||||
while ((arg_h = vpi_scan(arg_i)) != NULL) {
|
||||
/* replicate user_data for each instance */
|
||||
dp = (p_pli_data)calloc(1, sizeof(s_pli_data));
|
||||
dp = calloc(1, sizeof(s_pli_data));
|
||||
assert(dp != NULL);
|
||||
memcpy(dp, cb_data.user_data, sizeof(s_pli_data));
|
||||
dp->paramvc = paramvc++;
|
||||
|
|
@ -389,6 +389,9 @@ PLI_INT32 tf_setrealdelay(double dly)
|
|||
}
|
||||
/*
|
||||
* $Log: veriusertfs.c,v $
|
||||
* Revision 1.15 2004/09/10 23:13:05 steve
|
||||
* Compile cleanup of C code.
|
||||
*
|
||||
* Revision 1.14 2003/06/25 04:04:19 steve
|
||||
* Fix mingw portability problems.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: vvp_scope.c,v 1.100 2004/06/30 02:16:27 steve Exp $"
|
||||
#ident "$Id: vvp_scope.c,v 1.101 2004/09/10 23:13:05 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvp_priv.h"
|
||||
|
|
@ -57,7 +57,7 @@ const char *vvp_mangle_id(const char *id)
|
|||
int n = se - inp;
|
||||
unsigned int nlen = strlen(id) + 4*(++nesc) + 1;
|
||||
if (out_len < nlen) {
|
||||
out = (char *) realloc(out, nlen);
|
||||
out = realloc(out, nlen);
|
||||
assert(out);
|
||||
out_len = nlen;
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ const char *vvp_mangle_name(const char *id)
|
|||
int n = se - inp;
|
||||
unsigned int nlen = strlen(id) + 2*(++nesc) + 1;
|
||||
if (out_len < nlen) {
|
||||
out = (char *) realloc(out, nlen);
|
||||
out = realloc(out, nlen);
|
||||
assert(out);
|
||||
out_len = nlen;
|
||||
}
|
||||
|
|
@ -462,8 +462,7 @@ const char* draw_net_input(ivl_nexus_t nex)
|
|||
/* Save this driver. */
|
||||
if (ndrivers >= adrivers) {
|
||||
adrivers += 4;
|
||||
drivers = (ivl_nexus_ptr_t*)
|
||||
realloc(drivers, adrivers*sizeof(ivl_nexus_ptr_t));
|
||||
drivers = realloc(drivers, adrivers*sizeof(ivl_nexus_ptr_t));
|
||||
assert(drivers);
|
||||
}
|
||||
drivers[ndrivers] = nptr;
|
||||
|
|
@ -679,7 +678,7 @@ static void draw_udp_in_scope(ivl_net_logic_t lptr)
|
|||
|
||||
if (i >= nudps)
|
||||
{
|
||||
udps = (ivl_udp_t*)realloc(udps, (nudps+1)*sizeof(ivl_udp_t));
|
||||
udps = realloc(udps, (nudps+1)*sizeof(ivl_udp_t));
|
||||
assert(udps);
|
||||
udps[nudps++] = udp;
|
||||
draw_udp_def(udp);
|
||||
|
|
@ -1589,6 +1588,9 @@ int draw_scope(ivl_scope_t net, ivl_scope_t parent)
|
|||
|
||||
/*
|
||||
* $Log: vvp_scope.c,v $
|
||||
* Revision 1.101 2004/09/10 23:13:05 steve
|
||||
* Compile cleanup of C code.
|
||||
*
|
||||
* Revision 1.100 2004/06/30 02:16:27 steve
|
||||
* Implement signed divide and signed right shift in nets.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue