This is gck.h in view mode; [Download] [Up]
#ifdef Macintosh
#define GCK_VERSION_RELEASE "2.0.1,(Mac) May 28, 1992"
#else
#define GCK_VERSION_RELEASE "2.0.1,(UNIX) May 28, 1992"
#endif
/* changes to 2.0.1 ... fixed number of stages computation for FFT */
/* RdH May 8, 1992 */
#ifndef TRUE
#define TRUE (boolean) 1
#endif
#ifndef FALSE
#define FALSE (boolean) 0
#endif
/* NeXT / BSD --ism */
#ifndef CLOCKS_PER_SEC
#define CLOCKS_PER_SEC CLK_TCK
#endif
/* gck.h */
#define PI 3.141592653589793239
#define TWOPI (2.0 * 3.141592653589793239)
/* error types, used for errorReport */
#define ERR_VOID 0
#define ERR_NODE 1
#define DYNAMIC_INITIAL_SIZE 100
#define DYNAMIC_INCREMENTAL_SIZE 100
#define NAME_LEN 16
#define NAME_HAF 8
#define WORD_LEN 64
#define BINARY_LEN 15
#define NULL_CHAR '\0'
#define SPACE_CHAR ' '
#define TAB_CHAR '\t'
#define boolean unsigned char
#define unsigned_char_8 unsigned char
#define unsigned_int_16 unsigned int
#define unsigned_int_32 unsigned long
typedef char card[128];
typedef char aWord[WORD_LEN];
#include "gck_card.h"
typedef long iArray[100];
typedef double rArray[100];
typedef char cArray[256];
typedef struct {
boolean is_symbol;
long delay; /* used just for delay symbols */
char sName[WORD_LEN];
} symbol_value;
typedef struct flex {
long dim;
symbol_value *sv;
union {
char *c;
long *n;
double *x;
char *w;
} UU;
} flex;
typedef char nameString[NAME_LEN];
typedef enum {
resistor, capacitor, inductor, switch_, vs, cs, coupledInductor, vcsw, vcvs,
vccs, ccvs, cccs, opamp, comparator, quantizer, subckt, delay, adder,
multiplier, l_general
} componentType;
typedef flex valuePtr;
typedef flex IDPtr;
typedef struct branchRec {
struct branchRec *next;
nameString name, cname;
componentType element;
flex ID;
/*1st = branch id
2nd = + node
3rd = - node
The rest is controlling nodes or branches */
flex value; /*Interpreted for each element*/
long depth; /* RdH */
char cktname[32]; /* RdH */
} branchRec;
/*to be used as a LIFO stack during reading*/
typedef struct statusRec {
struct statusRec *next;
long NVar;
long *n_index; /* new ... RdH */
long indexRecLength;
branchRec *base;
} statusRec;
typedef struct subcktRec {
struct subcktRec *next;
nameString name;
long NVar; /*number of variables in the subcircuit*/
long NConn; /*number of external connection nodes*/
/*external connection nodes by convention numbered 1, 2,... NConn*/
branchRec *base; /*internal branches*/
} subcktRec;
typedef struct nodeRec {
struct nodeRec *next;
double *me;
long ID; /*node number*/
boolean flo, fhi, fsr;
double lo, hi, sr, oldme; /*saturation levels and slew rate*/
} nodeRec;
/* Added fromFile below for v0.2.0 RdH */
typedef enum {
sinusoid, dc, rndm, pulse, impulse, comb, fromStdin, fromFile
} wave;
typedef struct sourceRec {
struct sourceRec *next;
double *value;
branchRec *branch;
wave signal;
union {
double A;
double L;
struct {
double amp, freq, dly;
} U0;
struct {
double amp0, freq0, deltaF;
long noFreq;
} U5;
struct {
double pls, unpls, mr, mf, td, tr, tp, tf, T;
} U3;
struct {
FILE *FilePtr;
} U7;
} VV;
} sourceRec;
typedef struct nonlinRec {
struct nonlinRec *next;
double *src, *in1, *in2, *out1, *out2, xdata1, xdata2;
/*to be used in slewrate etc calculations*/
branchRec *branch;
} nonlinRec;
typedef struct digitalRec {
struct digitalRec *next;
double *src, *in1, *in2, *out1, *out2;
long ndata1, ndata2;
double xdata1, xdata2; /*to be used in slewrate etc calculations*/
branchRec *branch;
} digitalRec;
typedef struct tableRec {
struct tableRec *next;
nameString name;
flex data;
} tableRec;
typedef struct logicRec {
struct logicRec *next;
double *out; /*output*/
boolean default_out;
flex truthTable;
branchRec *branch;
} logicRec;
typedef struct modelRec {
struct modelRec *next;
nameString name;
flex value;
} modelRec;
typedef struct clockRec {
struct clockRec *next;
nameString name; /*serves as the clock name*/
flex value; /*clock value at each tick, 1 or 0*/
} clockRec;
typedef enum {
branchVoltage, branchCurrent
} printVar;
typedef struct fftClist {
struct fftClist *next;
long depth;
gck_complex x[FFT_ARRAY_SIZE];
} fftClist;
typedef struct fftMRec {
struct fftMRec *next;
double *vo1;
double *vo2;
long fft_length;
gck_complex *result;
fftClist *base;
fftClist *current;
} fftMRec;
typedef struct fftRec {
struct fftRec *next;
printVar outType;
nameString name;
long n1;
long n2;
double *vo1;
double *vo2;
unsigned char fptype;
fftMRec *data;
} fftRec;
typedef struct printRec {
struct printRec *next;
printVar outType;
nameString name;
long n1, n2;
double *vo1, *vo2;
} printRec;
typedef struct systemRec {
struct systemRec *next;
double **N; /* former system matrix sysMatrix */
double **B; /* same here ... RdH 1 Mar 92 */
} systemRec; /*x[k] = Nx[k-1]+Bs[k]*/
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.