patches by R. Larice

This commit is contained in:
h_vogt 2009-12-31 15:37:08 +00:00
parent 46e6df66ce
commit 2dc814f613
4 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,6 @@
2009-12-31 Holger Vogt
* measure.c, resource.c, mesaload.c: small updates by R. Larice
2009-12-30 Holger Vogt
* gnuplot.c: some additions

View File

@ -76,7 +76,7 @@ com_meas(wordlist *wl) {
d = vec_get(vec_found);
if (d) {
/* get its value */
sprintf(newval, "%e\0", d->v_realdata[0]);
sprintf(newval, "%e", d->v_realdata[0]);
tfree(vec_found);
wl_index->wl_word = copy(newval);
}
@ -92,7 +92,7 @@ com_meas(wordlist *wl) {
d = vec_get(vec_found);
if (d) {
*equal_ptr = '\0';
sprintf(newval, "%s=%e\0", token, d->v_realdata[0]);
sprintf(newval, "%s=%e", token, d->v_realdata[0]);
// memory leak with first part of vec_found ?
tfree(token);
wl_index->wl_word = copy(newval);
@ -118,7 +118,7 @@ com_meas(wordlist *wl) {
return;
}
sprintf(newvec, "%s = %e\0", outvar, result);
sprintf(newvec, "%s = %e", outvar, result);
wl_let = alloc(struct wordlist);
wl_let->wl_next = NULL;
wl_let->wl_word = copy(newvec);

View File

@ -219,7 +219,8 @@ printres(char *name)
# ifdef HAVE_GETRUSAGE
int ret;
struct rusage ruse = {{NULL, NULL}};
struct rusage ruse;
memset(&ruse, 0, sizeof(ruse));
ret = getrusage(RUSAGE_SELF, &ruse);
if(ret == -1) {
perror("getrusage(): ");
@ -386,7 +387,8 @@ printres(char *name)
if (!name || eq(name, "faults")) {
#ifdef HAVE_GETRUSAGE
int ret;
struct rusage ruse = {{NULL, NULL}};
struct rusage ruse;
memset(&ruse, 0, sizeof(ruse));
ret = getrusage(RUSAGE_SELF, &ruse);
if(ret == -1) {
perror("getrusage(): ");

View File

@ -953,7 +953,7 @@ static void mesa3(MESAmodel *model, MESAinstance *here, double vgs,
{
char buf[256];
void far pascal OutputDebugString(char*);
sprintf(buf,"\n%f\t%e\0",vgs,cgc);
sprintf(buf,"\n%f\t%e",vgs,cgc);
OutputDebugString(buf);
}
*/