File: datadef.h

package info (click to toggle)
ngspice 24-1
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 46,840 kB
  • sloc: ansic: 456,450; xml: 13,667; sh: 10,075; makefile: 3,407; perl: 1,590; yacc: 1,486; tcl: 823; pascal: 702; lex: 319
file content (87 lines) | stat: -rw-r--r-- 1,733 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
 * MW. Include for spice 
 */

#ifndef DATADEF_INC
#define DATADEF_INC

	/*
	 * Program defaults
	 * 
	 * *Directory for input file and input libraries 
	 */
#define DECKPATH "./"
#define LIBPATH "/usr/local/lib/"

	/*
	 * Name for output library file 
	 */
#define TMPLIBNAME ".lib"		/*
								 * * * * actual name is "deck.TMPLIBNAME" 
								 */

	/*
	 * Command for libraries, subckts and models declaration 
	 */
#define LIBINVL "*LIB"
#define SUBINVL "*SUB"
#define MODINVL "*MOD"

	/*
	 * Keywords for subckt start, end and model 
	 */
#define SUBLINE ".SUBCKT"
#define SUBEND ".ENDS"
#define MODLINE ".MODEL"
#define MODEND

#define LIBMESSAGE "*      MW Library include for Spice"

#define BSIZE 255
#define MODDLINE 1
#define SUBDLINE 4
#define LIBDLINE 8
#define SUBLLINE 16
#define MODLLINE 32
#define ENDSLLINE 64
#define CONTLLINE 128
#define NORMLINE 0
#define WRITESUB 0xffff
#define WRITEMOD 0x1111
#define NOWRITE 0x0
#define FAILED 0xffffff
#define SUCCESS 0

#define IS_LIB 0x1
#define LIB_OPEN 0x2

#define IS_MOD 0x10
#define IS_SUB 0x100
#define FINDED 0x400
#define DUPLICATE 0x800

#define DECK_OPEN 0x20000
#define TLIB_OPEN 0x100000

#define NAMEVALID 0xfff
#define NAMENOTV 0x0

struct LSData
  {
	char name[BSIZE];
	FILE *filedes;
	int flag;
	struct LSData *prevLS;
	struct LSData *nextLS;
  };

struct LSData *LSinsert(struct LSData *LS, struct LSData *where);
struct LSData *LSclear(struct LSData *LS);
struct LSData *Backfree(struct LSData *LS);
int readdeck(FILE * tdeck, struct LSData *lib, \
			 struct LSData *sub, struct LSData *mod);
int readlib(struct LSData *lib, FILE * tlib, \
			struct LSData *firstSUB, struct LSData *firstMOD);
int checkname(struct LSData *smp, char *name);

#endif