/*
   Copyright © 1998 Norlinvest Ltd. All rights reserved.
   Visual Code Model Generator, EDSpice, EDWin, EE Designer, CompCAD,
   CAD 1000, CAD ABC and Visionics are trade marks of Norlinvest Ltd.
   Copyright © 1983 - 1998.
*/

#ifndef CMPROTO_DEFINED

   #define CMPROTO_DEFINED

   #include "CMtypes.h"

   double     _cm_analog_ramp_factor(void);
   void      *_cm_analog_alloc(int tag, int bytes);
   void      *_cm_analog_get_ptr(int tag, int timepoint);
   int        _cm_analog_integrate(double integrand, double *integral,
                 double *partial);
   int        _cm_analog_converge(double *state);
   int        _cm_analog_set_temp_bkpt(double time);
   int        _cm_analog_set_perm_bkpt(double time);
   void       _cm_analog_not_converged(void);
   void       _cm_analog_auto_partial(void);
   void       _cm_climit_fcn(double in, double in_offset, double cntl_upper,
                 double cntl_lower, double lower_delta, double upper_delta,
                 double limit_range, double gain, int percent,
                 double *out_final, double *pout_pin_final,
                 double *pout_pcntl_lower_final,
                 double *pout_pcntl_upper_final);
   Complex_t  _cm_complex_set(double real, double imag);
   Complex_t  _cm_complex_add(Complex_t x, Complex_t y);
   Complex_t  _cm_complex_subtract(Complex_t x, Complex_t y);
   Complex_t  _cm_complex_multiply(Complex_t x, Complex_t y);
   Complex_t  _cm_complex_divide(Complex_t x, Complex_t y);
   void      *_cm_event_alloc(int tag, int bytes);
   void      *_cm_event_get_ptr(int tag, int timepoint);
   int        _cm_event_queue(double time);
   char      *_cm_message_get_errmsg(void);
   int        _cm_message_send(char *msg);
   double     _cm_netlist_get_c(void);
   double     _cm_netlist_get_l(void);
   void       _cm_smooth_corner(double x_input, double x_center,
                 double y_center, double domain, double lower_slope,
                 double upper_slope, double *y_output, double *dy_dx);
   void       _cm_smooth_discontinuity(double x_input, double x_lower,
                 double y_lower, double x_upper, double y_upper,
                 double *y_output, double *dy_dx);
   double     _cm_smooth_pwl(double x_input, double *x, double *y, int size,
                 double input_domain, double *dout_din);

   typedef unsigned int size_t;

   void *_cm_calloc(size_t num_elems,size_t elem_size);
   void  _cm_free(void *mem_address);
   void *_cm_malloc(size_t num_elems);
   void *_cm_realloc(void *mem_address,size_t new_size);
   
   #include "dllprot.h"

#endif