diff --git a/vpi/sys_display.c b/vpi/sys_display.c index e728eb84d..06f71d1db 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -413,7 +413,7 @@ static unsigned int get_format_char(char **rtn, int ljust, int plus, info->filename, info->lineno, info->name, fmtb); } else { unsigned pad = 0; - unsigned swidth = strlen(value.value.str) + + unsigned swidth = strlen(value.value.str) + (value.value.str[0] == '-' ? 0 : (unsigned)plus); char *tbuf, *cpb, *cp = value.value.str; @@ -585,7 +585,7 @@ static unsigned int get_format_char(char **rtn, int ljust, int plus, type = vpi_get(vpiType, info->items[*idx]); if (((type == vpiConstant || type == vpiParameter) && vpi_get(vpiConstType, info->items[*idx]) == vpiRealConst) || - type == vpiRealVar || (type == vpiSysFuncCall && + type == vpiRealVar || (type == vpiSysFuncCall && vpi_get(vpiFuncType, info->items[*idx]) == vpiRealFunc)) { value.format = vpiRealVal; } else { @@ -1661,7 +1661,7 @@ static PLI_INT32 sys_timeformat_compiletf(PLI_BYTE8*name) if (! arg) { vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh), (int)vpi_get(vpiLineNo, callh)); - vpi_printf("%s requires zero or four arguments.\n", name); + vpi_printf("%s requires zero or four arguments.\n", name); vpi_control(vpiFinish, 1); return 0; } @@ -1679,7 +1679,7 @@ static PLI_INT32 sys_timeformat_compiletf(PLI_BYTE8*name) if (! arg) { vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh), (int)vpi_get(vpiLineNo, callh)); - vpi_printf("%s requires zero or four arguments.\n", name); + vpi_printf("%s requires zero or four arguments.\n", name); vpi_control(vpiFinish, 1); return 0; } @@ -1696,7 +1696,7 @@ static PLI_INT32 sys_timeformat_compiletf(PLI_BYTE8*name) if (! arg) { vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh), (int)vpi_get(vpiLineNo, callh)); - vpi_printf("%s requires zero or four arguments.\n", name); + vpi_printf("%s requires zero or four arguments.\n", name); vpi_control(vpiFinish, 1); return 0; } diff --git a/vpi/sys_fileio.c b/vpi/sys_fileio.c index 24df435cf..eaf688663 100644 --- a/vpi/sys_fileio.c +++ b/vpi/sys_fileio.c @@ -462,7 +462,7 @@ static PLI_INT32 sys_fread_compiletf(PLI_BYTE8*name) return 0; } - /* Check that the first required argument is a register or memory. */ + /* Check that the first required argument is a register or memory. */ type = vpi_get(vpiType, vpi_scan(argv)); if (type != vpiReg && type != vpiMemory) { vpi_printf("ERROR: %s:%d: ", vpi_get_str(vpiFile, callh), diff --git a/vpi/sys_fst.c b/vpi/sys_fst.c index ad5f6c074..e85949e22 100644 --- a/vpi/sys_fst.c +++ b/vpi/sys_fst.c @@ -209,7 +209,7 @@ static PLI_INT32 dumpvars_cb(p_cb_data cause) /* nothing to do for $enddefinitions $end */ if (!dump_is_off) { - fstWriterEmitTimeChange(dump_file, dumpvars_time); + fstWriterEmitTimeChange(dump_file, dumpvars_time); /* nothing to do for $dumpvars... */ vcd_checkpoint(); /* ...nothing to do for $end */ @@ -617,7 +617,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip) new_ident = fstWriterCreateVar(dump_file, type, FST_VD_IMPLICIT, size, buf, (fstHandle)(long)ident); - free(buf); + free(buf); } else { new_ident = fstWriterCreateVar(dump_file, type, FST_VD_IMPLICIT, size, name, @@ -781,7 +781,7 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name) scname = strdup(vpi_get_str(vpiFullName, vpi_handle(vpiScope, item))); fullname = vpi_get_str(vpiFullName, item); - if (((item_type != vpiMemoryWord) && + if (((item_type != vpiMemoryWord) && vcd_names_search(&fst_tab, scname)) || vcd_names_search(&fst_var, fullname)) { vpi_printf("FST warning: skipping signal %s, " diff --git a/vpi/sys_priv.c b/vpi/sys_priv.c index a120b17a0..5f1e2c634 100644 --- a/vpi/sys_priv.c +++ b/vpi/sys_priv.c @@ -64,7 +64,7 @@ char *get_filename(vpiHandle callh, char *name, vpiHandle file) { s_vpi_value val; unsigned len, idx; - + /* Get the filename. */ val.format = vpiStringVal; vpi_get_value(file, &val); diff --git a/vpi/sys_readmem.c b/vpi/sys_readmem.c index fc95d2cd7..0038ab3ee 100644 --- a/vpi/sys_readmem.c +++ b/vpi/sys_readmem.c @@ -76,7 +76,7 @@ static void get_mem_params(vpiHandle argv, vpiHandle callh, char *name, vpi_free_object(argv); } } else { - *stop_item = 0; + *stop_item = 0; } } diff --git a/vpi/sys_scanf.c b/vpi/sys_scanf.c index e89901d2a..30c227385 100644 --- a/vpi/sys_scanf.c +++ b/vpi/sys_scanf.c @@ -546,7 +546,7 @@ static int is_assignable_obj(vpiHandle obj) case vpiMemoryWord: if (vpi_get(vpiType, vpi_handle(vpiParent, obj)) == vpiMemory) { rtn = 1; - } + } break; case vpiPartSelect: if (! is_assignable_obj(vpi_handle(vpiParent, obj))) break; diff --git a/vpi/sys_sdf.c b/vpi/sys_sdf.c index de5db92c7..5990b9000 100644 --- a/vpi/sys_sdf.c +++ b/vpi/sys_sdf.c @@ -197,7 +197,6 @@ void sdf_iopath_delays(int vpi_edge, const char*src, const char*dst, delay_vals[idx].real = 0.0; } } - } vpi_put_delays(path, &delays); diff --git a/vpi/sys_time.c b/vpi/sys_time.c index eca5325cb..d3d69db0f 100644 --- a/vpi/sys_time.c +++ b/vpi/sys_time.c @@ -93,7 +93,7 @@ static PLI_INT32 sys_realtime_calltf(PLI_BYTE8*name) now.type = vpiScaledRealTime; vpi_get_time(mod, &now); - /* For $abstime() we return the time in second. */ + /* For $abstime() we return the time in second. */ if (strcmp(name, "$abstime") == 0) { now.real *= pow(10.0, vpi_get(vpiTimeUnit, mod)); } diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index 0717d4858..c85206f6a 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -803,7 +803,7 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name) scname = strdup(vpi_get_str(vpiFullName, vpi_handle(vpiScope, item))); fullname = vpi_get_str(vpiFullName, item); - if (((item_type != vpiMemoryWord) && + if (((item_type != vpiMemoryWord) && vcd_names_search(&vcd_tab, scname)) || vcd_names_search(&vcd_var, fullname)) { vpi_printf("VCD warning: skipping signal %s, "