Sindbad~EG File Manager
/* The calling program maintains a control data object, say polyData, of type
polyflags. In Mathpert, this is part of the document data.
When the document is activated,
it calls activate_polyvalDLL, passing &polyData. That function sets
the static global variables in polyval.c that control polyval. When
the document is deactivated, it calls exit_polyvalDLL, which makes sure
that polyData records the current values AND RESETS THE DEFAULTS which
are statically initialized. The values in polyData are
never accessed except by activate_polyvalDLL and deactivate_polyvalDLL; meantime
when the calling program wants to get or set those variables, it
has to ask the DLL through get_polyvalflags and set_polyvalflags. */
typedef struct
{ int factor; /* perform contentfactor? */
int function; /* evaluate trig and log functions to algebraic values? */
int dif; /* evaluate derivatives? */
int intlinear; /* know about the linearity of the integral? */
int gcd; /* cancel gcd of num and denom of fractions? */
int zeropower; /* set x^0 = 1 ? */
int fractexp; /* convert roots to exponents? */
int negexp; /* should polyval eliminate all negative exponents? */
/* if -1, eliminate negative exponents;
if 1, convert fractions to neg exponents;
if 0, eliminate negative exponents in fractions,
but not elsewhere */
int rootproduct; /* make assumptions that a \ge 0 and b \ge 0 and
apply (ab)^n = a^n b^n for fractional n? If the
flag is nonzero it does, if the flag is zero it uses
this law only if the condition can be inferred. */
int comdenom; /* do common denominators? */
int infraction; /* perform operations appropriate inside a fraction,
e.g. common denoms regardless of the .comdenom flag */
int complex; /* controls whether root(n,x)^n = x for even n or not; this
is true for the complex root(n,x), but not for real roots */
int domainflag; /* if nonzero, cancel will check the definedness of the
term to be cancelled, etc. */
int ringflag; /* see mpdoc.h for full documentation */
int orderflag; /* see mpdoc.h */
aflag arith; /* control 'value' */
} polyflags;
int polyval(term expr, term *ans);
int get_polyvalfactorflag(void);
void set_polyvalfactorflag(int);
int get_polyvalfactorflag2(void);
void set_polyvalfactorflag2(int);
int get_polyvallogflag(void);
void set_polyvallogflag(int);
int get_polyvaltrigsqflag(void);
void set_polyvaltrigsqflag(int);
int get_polyvalfunctionflag(void);
void set_polyvalfunctionflag(int);
int get_polyvaldifflag(void);
void set_polyvaldifflag(int);
int get_polyvalintflag(void);
void set_polyvalintflag(int);
int get_polyvalgcdflag(void);
void set_polyvalgcdflag(int);
int get_polyvalzeropowerflag(void);
void set_polyvalzeropowerflag(int);
int get_polyvalfractexpflag(void);
void set_polyvalfractexpflag(int);
int get_polyvalnegexpflag(void);
void set_polyvalnegexpflag(int);
int get_polyvalrootproductflag(void);
void set_polyvalrootproductflag(int);
int get_polyvalcomdenomflag(void);
void set_polyvalcomdenomflag(int);
int get_infractionflag(void);
void set_infractionflag(int);
int get_orderflag(void);
void set_orderflag(int);
void increment_infractionflag(void);
void decrement_infractionflag(void);
void set_arithflag(aflag);
aflag get_arithflag(void);
int get_complex(void);
void set_complex(int);
int get_ringflag(void);
void set_ringflag(int);
int get_polyvaldomainflag(void);
void set_polyvaldomainflag(int);
void copy_infinitesimal_markers(term, term *);
int degree_simp(term, term *);
int alg_numerical(term t);
int contains_trig(term t);
void set_polyvalsumflag(int);
int is_complex(term t);
int polyvalexp(term, term *); /* Not exported */
int polyval_collectlogb(term t, term *next); /* defined in plogs.c */
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists