1 /********** 2 Copyright 1990 Regents of the University of California. All rights reserved. 3 Author: 1985 Thomas L. Quarles 4 **********/ 5 6 /* look up the 'type' in the device description struct and return the 7 * appropriate strchr for the device found, or -1 for not found 8 */ 9 10 #include "ngspice/ngspice.h" 11 #include "ngspice/cktdefs.h" 12 #include "ngspice/devdefs.h" 13 14 15 int CKTtypelook(char * type)16CKTtypelook(char *type) 17 { 18 19 int i; 20 for(i=0;i<DEVmaxnum;i++) { 21 if(DEVices[i] && !strcmp(type, DEVices[i]->DEVpublic.name)) { 22 /*found the device - return it */ 23 return(i); 24 } 25 } 26 return(-1); 27 } 28 29