Browse Source

patches by R. Larice

pre-master-46
h_vogt 16 years ago
parent
commit
2dc814f613
  1. 3
      ChangeLog
  2. 6
      src/frontend/measure.c
  3. 6
      src/frontend/resource.c
  4. 2
      src/spicelib/devices/mesa/mesaload.c

3
ChangeLog

@ -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

6
src/frontend/measure.c

@ -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);

6
src/frontend/resource.c

@ -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(): ");

2
src/spicelib/devices/mesa/mesaload.c

@ -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);
}
*/

Loading…
Cancel
Save