diff options
Diffstat (limited to 'cad/simian/patches/patch-ab')
-rw-r--r-- | cad/simian/patches/patch-ab | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/cad/simian/patches/patch-ab b/cad/simian/patches/patch-ab index b41b651f21c..dbfc4726f67 100644 --- a/cad/simian/patches/patch-ab +++ b/cad/simian/patches/patch-ab @@ -1,36 +1,63 @@ -$NetBSD: patch-ab,v 1.1.1.1 2001/04/28 02:36:35 dmcmahill Exp $ +$NetBSD: patch-ab,v 1.2 2005/03/21 17:35:53 dmcmahill Exp $ ---- main.cc.orig Thu Dec 10 05:56:19 1998 -+++ main.cc Fri Apr 27 16:47:38 2001 -@@ -74,5 +74,5 @@ +--- main.cc.orig 1998-12-10 10:56:19.000000000 +0000 ++++ main.cc +@@ -1,6 +1,7 @@ + /* Main program, prints out all the results */ + /* written and modified by Emre Tuncer and Sangwoo Kim */ +-#include <fstream.h> ++#include <iostream> ++#include <fstream> + #include <stdlib.h> + #include <math.h> + #include <stdio.h> +@@ -42,7 +43,7 @@ main(int argc,char** argv) + printf("\n"); + start=time(NULL); + if (argc!=3) { +- cerr << "Usage: " << argv[0] << ++ std::cerr << "Usage: " << argv[0] << + " <input file> <w/r>\n"; + exit(1); + } +@@ -73,7 +74,7 @@ main(int argc,char** argv) + Nf=nf[Nc+1]; LastFil(fils); //remove last empty entry. // Corr(fils); /* x1 < x2 */ - printf("Total %ld ribbons, %ld conductor\n",Nf,Nc); + printf("Total %d ribbons, %d conductor\n",Nf,Nc); L=allocator(Nf); -@@ -85,5 +85,5 @@ + if (argv[2][0]=='w') { +@@ -84,7 +85,7 @@ main(int argc,char** argv) + for (j=i;j<Nf;j++) { L[j][i]=L[i][j]=Lp(iF,jF); jF=jF->next; - fprintf(fo,"%ld %ld %le\n",i,j,L[i][j]*sis->unit); + fprintf(fo,"%d %d %e\n",i,j,L[i][j]*sis->unit); } iF=iF->next; -@@ -97,5 +97,5 @@ + } +@@ -96,7 +97,7 @@ main(int argc,char** argv) + fi=fopen("induc","r"); for (i=0;i<Nf;i++) { for (j=i;j<Nf;j++) { - fscanf(fi,"%ld %ld %le\n",&k,&k,&L[i][j]); + fscanf(fi,"%d %d %le\n",&k,&k,&L[i][j]); L[i][j]/=sis->unit; L[j][i]=L[i][j]; -@@ -115,5 +115,5 @@ + } +@@ -114,7 +115,7 @@ main(int argc,char** argv) + stop= time(NULL); printf("\n"); printf("*********** \n"); - printf("Total Elapsed time=%ld Seconds\n",(stop-start)); + printf("Total Elapsed time=%ld Seconds\n",(long int) (stop-start)); exit(1); } -@@ -144,9 +144,9 @@ + Z=matrix(Nf,Nf); +@@ -143,11 +144,11 @@ main(int argc,char** argv) + if ((sis->loop != 0) || (Nc==1)){ z=matrix(Nc,Nc); z=inverse(ymtrx,Nc); - fprintf(fzs,"\nImpedance %ld x %ld matrix (R,L) at f=%10.4le Hz\n", @@ -42,7 +69,9 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/04/28 02:36:35 dmcmahill Exp $ + fprintf(fzs,"(%11.4e,%11.4e) ",RE(z[i][j])*sis->unit,IM(z[i][j]) /w*sis->unit); } -@@ -182,10 +182,10 @@ + fprintf(fzs,"\n"); +@@ -181,12 +182,12 @@ main(int argc,char** argv) + Din=matrix(numsgn+1,numsgn+1); Din=Zequ(cons,numsgn,Nc); - fprintf(fzs,"\nImpedance %ld x %ld matrix (R,L) at f=%10.4le Hz\n", @@ -55,10 +84,13 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/04/28 02:36:35 dmcmahill Exp $ + fprintf(fzs,"(%11.4e,%11.4e) ",RE(Din[i][j])*sis->unit,IM(Din[i][j]) /w*sis->unit); } -@@ -200,5 +200,5 @@ + fprintf(fzs,"\n"); +@@ -199,7 +200,7 @@ main(int argc,char** argv) + stop= time(NULL); printf("\n"); printf("*********** \n"); - printf("Total Elapsed time=%ld Seconds\n",(stop-start)); + printf("Total Elapsed time=%ld Seconds\n",(long int) (stop-start)); exit(0); } + |