1 /********** 2 Copyright 1990 Regents of the University of California. All rights reserved. 3 Author: 1985 Thomas L. Quarles 4 **********/ 5 /* 6 */ 7 8 /* CKTfndBranch(ckt,name) 9 * this is a driver program to iterate through all the various 10 * findBranch functions provided for the circuit elements in the 11 * given circuit 12 */ 13 14 #include "ngspice/ngspice.h" 15 #include "ngspice/cktdefs.h" 16 #include "ngspice/devdefs.h" 17 18 19 20 int CKTfndBranch(CKTcircuit * ckt,IFuid name)21CKTfndBranch(CKTcircuit *ckt, IFuid name) 22 { 23 int i; 24 int j; 25 26 for (i=0;i<DEVmaxnum;i++) { 27 if ( DEVices[i] && DEVices[i]->DEVfindBranch && ckt->CKThead[i] ) { 28 j = DEVices[i]->DEVfindBranch (ckt, ckt->CKThead[i], name); 29 if(j != 0) return(j); 30 } 31 } 32 return(0); 33 } 34