Jspice3
spice.h
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 ****************************************************************************/
5 
6 /*
7  * Operating System
8  */
9 
10 #if __MSDOS__ || __msdos__ || defined (MSDOS)
11 #ifndef MSDOS
12 #define MSDOS
13 #endif
14 #endif
15 
16 #include "config.h"
17 
18 #ifdef WANT_X11
19 #ifdef AVAIL_X11
20 #define HAVE_X11
21 #endif
22 #endif
23 
24 #ifdef WANT_MFB
25 #ifdef AVAIL_MFB
26 #define HAVE_MFB
27 #endif
28 #endif
29 
30 #ifdef HAVE_LIMITS_H
31 #include <limits.h>
32 #endif
33 
34 #include <math.h>
35 
36 #ifdef HAVE_FLOAT_H
37 #include <float.h>
38 #endif
39 
40 #ifndef HAVE_ERFC
41 #ifdef __STDC__
42 extern double erfc(double);
43 #else
44 extern double erfc();
45 #endif
46 #endif
47 
48 
49 #ifdef vax
50 /*
51  * VAX Floating Point
52  */
53 
54 #define HAVE_VAX_FPERRORS
55 #define MAX_EXP_ARG 87.0 /* Approximate largest arg to exp() */
56 
57 #ifndef DBL_EPSILON
58 #define DBL_EPSILON 6.93889e-18
59 #endif
60 
61 #ifndef DBL_MAX
62 #define DBL_MAX 1.70141e+38
63 #endif
64 
65 #ifndef DBL_MIN
66 #define DBL_MIN 2.938743e-39
67 #endif
68 
69 #ifndef SHRT_MAX
70 #define SHRT_MAX 32766
71 #endif
72 
73 #ifndef INT_MAX
74 #define INT_MAX 2147483646
75 #endif
76 
77 #ifndef LONG_MAX
78 #define LONG_MAX 2147483646
79 #endif
80 
81 #define MAXPOSINT INT_MAX
82 
83 #ifndef HUGE_VAL
84 #define HUGE_VAL 1.701411834604692293e+38
85 #endif
86 
87 #else /* !vax */
88 /*
89  * IEEE Floating point
90  */
91 
92 #define MAX_EXP_ARG 709.0
93 
94 #ifndef DBL_EPSILON
95 #define DBL_EPSILON 8.9e-15
96 #endif
97 
98 #ifndef DBL_MAX
99 #define DBL_MAX 1.79769313486231e+308
100 #endif
101 
102 #ifndef DBL_MIN
103 #define DBL_MIN 2.22507385850721e-308
104 #endif
105 
106 #ifndef SHRT_MAX
107 #define SHRT_MAX 32766
108 #endif
109 
110 #ifndef INT_MAX
111 #define INT_MAX 2147483646
112 #endif
113 
114 #ifndef LONG_MAX
115 #define LONG_MAX 2147483646
116 #endif
117 
118 #define MAXPOSINT INT_MAX
119 
120 #ifndef HUGE_VAL
121 #define HUGE_VAL 1.8e+308
122 #endif
123 
124 #endif /* vax? */
125 
126 
127 #ifndef HUGE
128 #define HUGE HUGE_VAL
129 #endif
130 
131 #ifndef M_PI
132 #define M_PI 3.14159265358979323846
133 #endif
134 
135 #ifndef M_E
136 #define M_E 2.7182818284590452354
137 #endif
138 
139 #ifndef M_LOG10E
140 #define M_LOG10E 0.43429448190325182765
141 #endif
142 
143 
144 /*
145  * #define-s that are always on
146  */
147 
148 #define NEWBYPASS
149 #define CAPZEROBYPASS
150 #define NEWCONV
151 /* #define CAPBYPASS Internal use only */
152 #ifdef HAVE_NOVM
153 #define NOBYPASS
154 #endif
155 
156 
157 #define NUMELEMS(ARRAY) (sizeof(ARRAY)/sizeof(*ARRAY))
158 
159 extern char *Spice_Exec_Dir;
160 extern char *Spice_Lib_Dir;
161 extern char Spice_OptChar;
162 extern char *Def_Editor;
163 extern char *Bug_Addr;
164 extern int AsciiRawFile;
165 extern char *Spice_Host;
166 extern char *Spiced_Log;
167 
168 extern char Spice_Notice[ ];
169 extern char Spice_Version[ ];
170 extern char Spice_Build_Date[ ];
171 
172 extern char *News_File;
173 extern char *Default_MFB_Cap;
174 extern char *Spice_Path;
175 extern char *Help_Path;
176 extern char *Lib_Path;
177 extern char *Sced_Path;
char * Default_MFB_Cap
Definition: ivars.c:13
char * Spice_Exec_Dir
char * Spice_Lib_Dir
char * Lib_Path
Definition: ivars.c:15
char * Def_Editor
int AsciiRawFile
char * News_File
Definition: ivars.c:12
char * Bug_Addr
char Spice_Version[]
double erfc()
char * Help_Path
Definition: help.c:104
char * Spice_Path
Definition: ivars.c:11
char Spice_Notice[]
char * Sced_Path
Definition: ivars.c:16
char Spice_Build_Date[]
char * Spice_Host
char * Spiced_Log
char Spice_OptChar