1 /**********
2 Copyright 1990 Regents of the University of California.  All rights reserved.
3 Author: 1985 Thomas L. Quarles
4 **********/
5 /*
6  */
7 
8     /* CKTfndAnal
9      *  find the given Analysis given its name and return the Analysis pointer
10      */
11 
12 #include "ngspice/ngspice.h"
13 #include "ngspice/ifsim.h"
14 #include "ngspice/jobdefs.h"
15 #include "ngspice/tskdefs.h"
16 #include "ngspice/sperror.h"
17 #include "ngspice/cktdefs.h"
18 
19 
20 
21 /* ARGSUSED */
22 int
CKTfndAnal(CKTcircuit * ckt,int * analIndex,JOB ** anal,IFuid name,TSKtask * task,IFuid taskName)23 CKTfndAnal(CKTcircuit *ckt, int *analIndex, JOB **anal, IFuid name, TSKtask *task, IFuid taskName)
24 {
25     JOB *here;
26 
27     NG_IGNORE(ckt);
28     NG_IGNORE(analIndex);
29     NG_IGNORE(taskName);
30 
31     for (here = task->jobs; here; here = here->JOBnextJob) {
32         if(strcmp(here->JOBname,name)==0) {
33             if(anal) *anal = here;
34             return(OK);
35         }
36     }
37     return(E_NOTFOUND);
38 }
39