Jspice3
Main Page
Data Structures
Files
File List
Globals
inppas1.c
Go to the documentation of this file.
1
/***************************************************************************
2
JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3
Copyright 1990 Regents of the University of California. All rights reserved.
4
Authors: 1987 Thomas L. Quarles
5
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
inpdefs.h
"
11
12
/*
13
* The first pass of the circuit parser just looks
14
* for '.model' and '.table' lines.
15
*/
16
17
void
18
INPpas1
(ckt,deck,
tab
)
19
20
GENERIC
*ckt;
21
card
*deck;
22
INPtables
*
tab
;
23
{
24
card
*current;
25
char
*
INPdomodel
();
26
char
*thisline;
27
28
for
(current = deck; current !=
NULL
; current = current->
nextcard
) {
29
/* SPICE-2 keys off of the first character of the line */
30
thisline = current->
line
;
31
32
while
(*thisline && ((*thisline ==
' '
) || (*thisline ==
'\t'
)))
33
thisline++;
34
35
if
(*thisline ==
'.'
) {
36
if
(!strncmp(thisline,
".table"
,6)) {
37
current->
error
=
INPerrCat
(current->
error
,
38
INPtablParse
(&thisline,ckt));
39
continue
;
40
}
41
if
(!strncmp(thisline,
".model"
,6)) {
42
current->
error
=
INPerrCat
(current->
error
,
43
INPdomodel(ckt,current,tab));
44
}
45
}
46
47
/* for now, we do nothing with the other cards - just
48
* keep them in the list for pass 2
49
*/
50
}
51
}
card::line
char * line
Definition:
inpdefs.h:64
card
Definition:
inpdefs.h:62
tab
Definition:
subckt.c:51
card::nextcard
struct card * nextcard
Definition:
inpdefs.h:66
NULL
#define NULL
Definition:
spdefs.h:121
inpdefs.h
spice.h
card::error
char * error
Definition:
inpdefs.h:65
INPtablParse
char * INPtablParse()
INPdomodel
char * INPdomodel()
INPpas1
void INPpas1(GENERIC *ckt, card *deck, INPtables *tab)
Definition:
inppas1.c:18
sINPtables
Definition:
inpdefs.h:30
GENERIC
char GENERIC
Definition:
ifsim.h:27
INPerrCat
char * INPerrCat()
src
lib
inp
inppas1.c
Generated by
1.8.11