62 if (
h->var != NULL) i++;
79 for (; p != NULL; p = p->
next) i++;
86 if (
h->package != NULL)
return h->package;
93 char *
n,
char *
type) {
100 if (!strcmp (type,
"MAGANGLE")) {
101 for (
int i = 0; i < vec->
getSize (); i++) {
107 else if (!strcmp (type,
"DBANGLE")) {
108 for (
int i = 0; i < vec->
getSize (); i++) {
124 if (deps.length () <= 0)
127 for (
int i = 0;
i < deps.length();
i++) {
129 if (v != NULL) n *= v->
getSize ();
138 if (rlength != dlength) {
140 "(%d != %d) in package `%s'\n", v->
getName (), rlength, dlength,
154 for (h = p->
head; h != NULL; h = hn) {
163 for (v = p->
data; v != NULL; v = vn) {
189 char *
package = citi_get_package (p);
198 "no. of variables (%d) in package `%s'\n", cvec, cvar,
209 sprintf (opack,
"%s.",
package);
213 for (h = p->
head; h != NULL; h = h->
next) {
215 if (h->
var != NULL) {
220 sprintf (txt,
"%s%s[%d,%d]", opack, h->
var, h->
i1, h->
i2);
227 sprintf (txt,
"%s%s[%d]", opack, h->
var, h->
i1);
234 }
else if (h->
n >= 0) {
236 sprintf (txt,
"%s%s", opack, h->
var);
247 "does not equal defined length (%d) in package `%s'\n",
253 sprintf (txt,
"%s%s", opack, h->
var);
266 return errors ? -1 : 0;
void addDependency(qucs::vector *)
static int citi_vector_length(strlist deps)
std::complex< nr_double_t > nr_complex_t
matrix real(matrix a)
Real part matrix.
nr_complex_t pow(const nr_complex_t z, const nr_double_t d)
Compute power function with real exponent.
static int citi_count_variables(struct citi_package_t *p)
Global physical constants header file.
struct citi_package_t * next
static qucs::vector * citi_create_vector(struct citi_package_t *p, int i, char *n, char *type)
void setDependencies(strlist *)
matrix imag(matrix a)
Imaginary part matrix.
void setName(const char *)
static int citi_count_packages(struct citi_package_t *p)
void set(nr_double_t, int)
Dense matrix class header file.
struct citi_package_t * citi_root
void addVariable(qucs::vector *)
#define rad(x)
Convert degree to radian.
static int citi_check_dep_length(qucs::vector *v, strlist deps, char *package)
int citi_lex_destroy(void)
qucs::dataset * citi_result
struct citi_header_t * head
qucs::vector * findDependency(const char *)
nr_complex_t polar(const nr_double_t mag, const nr_double_t ang)
Construct a complex number using polar notation.
static qucs::vector * citi_get_vector(struct citi_package_t *p, int n)
void logprint(int level, const char *format,...)
static char * citi_get_package(struct citi_package_t *p)
static int citi_count_vectors(struct citi_package_t *p)