From d618da1a22fd02c1147cf2da5bfad1a1a4a0dc2c Mon Sep 17 00:00:00 2001 From: h_vogt Date: Tue, 23 Dec 2008 18:00:10 +0000 Subject: [PATCH] fprintf(... replaced by fprintf(stdout,.. --- src/frontend/outitf.c | 4 ++-- src/frontend/resource.c | 6 +++--- src/spicelib/analysis/cktdojob.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 9ecc0da30..3efb0815f 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -886,7 +886,7 @@ fileEnd(runDesc *run) place = ftell(run->fp); fseek(run->fp, run->pointPos, 0); fprintf(run->fp, "%d", run->pointCount); - printf("\nNo. of Data Rows : %d\n", run->pointCount); + fprintf(stdout, "\nNo. of Data Rows : %d\n", run->pointCount); fseek(run->fp, place, 0); } else { /* Yet another hack-around */ @@ -1009,7 +1009,7 @@ static void plotEnd(runDesc *run) { fprintf(stderr,"\n"); - printf("\nNo. of Data Rows : %d\n", run->pointCount); + fprintf(stdout, "\nNo. of Data Rows : %d\n", run->pointCount); return; } diff --git a/src/frontend/resource.c b/src/frontend/resource.c index e6bd80a0c..a88dad012 100644 --- a/src/frontend/resource.c +++ b/src/frontend/resource.c @@ -463,7 +463,7 @@ fprintmem(FILE* stream, unsigned long int memory) { # if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) static size_t get_procm(struct proc_mem *memall) { -#ifdef HAS_WINDOWS +#if defined (_MSC_VER)|| defined(__MINGW32__) #if ( _WIN32_WINNT >= 0x0500) /* Use Windows Api function to obtain size of memory */ HANDLE hProcess; @@ -503,7 +503,7 @@ static size_t get_procm(struct proc_mem *memall) { (void) sprintf(fibuf, "/proc/%d/statm", getpid()); if((fp = fopen(fibuf, "r")) == NULL) { - perror("fopen()"); + perror("fopen(\"/proc/%d/statm\")"); return 0; } bytes_read = fread (buffer, 1, sizeof (buffer), fp); @@ -544,7 +544,7 @@ static size_t get_sysmem(struct sys_mem *memall) { long mem_got; if((fp = fopen("/proc/meminfo", "r")) == NULL) { - perror("fopen()"); + perror("fopen(\"/proc/meminfo\")"); return 0; } diff --git a/src/spicelib/analysis/cktdojob.c b/src/spicelib/analysis/cktdojob.c index c150bdab7..a853ace1a 100644 --- a/src/spicelib/analysis/cktdojob.c +++ b/src/spicelib/analysis/cktdojob.c @@ -93,7 +93,7 @@ CKTdoJob(void *inCkt, int reset, void *inTask) ckt->CKTlteAbstol = task->TSKlteAbstol; #endif /* NEWTRUNC */ -printf("Doing analysis at TEMP = %f and TNOM = %f\n\n", +fprintf(stdout, "Doing analysis at TEMP = %f and TNOM = %f\n\n", ckt->CKTtemp - CONSTCtoK, ckt->CKTnomTemp - CONSTCtoK); error = 0;