1.0e-10, 1.0e-11, 1.0e-12, 1.0e-13, 1.0e-14,
1.0e-15, 1.0e-16, 1.0e-17, 1.0e-18, 1.0e-19 };
+static void compute_i(double *target);
+
void
-do_accuracy() /* Set display accuracy. */
+do_accuracy(void) /* Set display accuracy. */
{
int i ;
void
-do_ascii() /* Convert ASCII value. */
+do_ascii(void) /* Convert ASCII value. */
{
show_ascii_frame() ;
}
void
-do_base() /* Change the current base setting. */
+do_base(void) /* Change the current base setting. */
{
if (v->current == BASE_BIN) v->base = BIN ;
else if (v->current == BASE_OCT) v->base = OCT ;
}
void
-set_base(base)
-enum base_type base ;
+set_base(enum base_type base)
{
grey_buttons(v->base) ;
show_display(v->MPdisp_val) ;
}
void
-do_business() /* Perform special business mode calculations. */
+do_business(void) /* Perform special business mode calculations. */
{
Boolean need_show = TRUE;
char *display_number = NULL;
void
-do_calc() /* Perform arithmetic calculation and display result. */
+do_calc(void) /* Perform arithmetic calculation and display result. */
{
double dval, dres ;
int MP1[MP_SIZE] ;
void
-do_clear() /* Clear the calculator display and re-initialise. */
+do_clear(void) /* Clear the calculator display and re-initialise. */
{
clear_display() ;
if (v->error) set_item(DISPLAYITEM, "") ;
void
-do_constant()
+do_constant(void)
{
if (v->current >= '0' && v->current <= '9')
{
void
-do_delete() /* Remove the last numeric character typed. */
+do_delete(void) /* Remove the last numeric character typed. */
{
if (strlen(v->display))
v->display[strlen(v->display)-1] = '\0' ;
void
-do_exchange() /* Exchange display with memory register. */
+do_exchange(void) /* Exchange display with memory register. */
{
int i, MPtemp[MP_SIZE] ;
void
-do_expno() /* Get exponential number. */
+do_expno(void) /* Get exponential number. */
{
/* the financial state is false - last key was not a fin. key */
v->funstate = 0;
void
-do_factorial(MPval, MPres) /* Calculate the factorial of MPval. */
-int *MPval, *MPres ;
+do_factorial(int *MPval, int *MPres) /* Calculate the factorial of MPval. */
{
double val ;
int i, MPa[MP_SIZE], MP1[MP_SIZE], MP2[MP_SIZE] ;
void
-do_frame() /* Exit dtcalc. */
+do_frame(void) /* Exit dtcalc. */
{
exit(0) ;
}
void
-do_function() /* Perform a user defined function. */
+do_function(void) /* Perform a user defined function. */
{
enum fcp_type scurwin ;
int fno, scolumn, srow ;
void
-do_immed()
+do_immed(void)
{
double dval, dval2 ;
int i, MP1[MP_SIZE], MP2[MP_SIZE] ;
void
-do_keys() /* Display/undisplay the dtcalc key values. */
+do_keys(void) /* Display/undisplay the dtcalc key values. */
{
v->tstate = !v->tstate ;
redraw_buttons() ;
}
void
-do_mode() /* Set special calculator mode. */
+do_mode(void) /* Set special calculator mode. */
{
if (v->current == MODE_FIN) v->modetype = FINANCIAL ;
else if (v->current == MODE_LOG) v->modetype = LOGICAL ;
void
-do_none() /* Null routine for empty buttons. */
+do_none(void) /* Null routine for empty buttons. */
{
}
void
-do_number()
+do_number(void)
{
char nextchar ;
int len, n ;
void
-do_numtype() /* Set number type (engineering, fixed or scientific). */
+do_numtype(void) /* Set number type (engineering, fixed or scientific). */
{
if (v->current == DISP_ENG) v->dtype = ENG ;
else if (v->current == DISP_FIX) v->dtype = FIX ;
set_numtype(v->dtype);
}
-set_numtype( dtype )
-enum num_type dtype ;
+set_numtype(enum num_type dtype)
{
v->pending = 0 ;
show_display(v->MPdisp_val) ;
}
void
-do_paren()
+do_paren(void)
{
char *ptr ;
double tmpdb;
}
void
-do_pending()
+do_pending(void)
{
/* the financial state is false - last key was not a fin. key */
void
-do_point() /* Handle numeric point. */
+do_point(void) /* Handle numeric point. */
{
/* the financial state is false - last key was not a fin. key */
v->funstate = 0;
void
-do_portion()
+do_portion(void)
{
int MP1[MP_SIZE] ;
void
-do_shift() /* Perform bitwise shift on display value. */
+do_shift(void) /* Perform bitwise shift on display value. */
{
int MPtemp[MP_SIZE], shift ;
BOOLEAN temp ;
void
-do_sto_rcl() /* Save/restore value to/from memory register. */
+do_sto_rcl(void) /* Save/restore value to/from memory register. */
{
int i, MPn[MP_SIZE], n ;
void
-do_trig() /* Perform all trigonometric functions. */
+do_trig(void) /* Perform all trigonometric functions. */
{
int i, MPtemp[MP_SIZE], MP1[MP_SIZE], MP2[MP_SIZE] ;
double cval ;
void
-do_trigtype() /* Change the current trigonometric type. */
+do_trigtype(void) /* Change the current trigonometric type. */
{
if (v->current == TRIG_DEG) v->ttype = DEG ;
else if (v->current == TRIG_GRA) v->ttype = GRAD ;
BOOLEAN
-ibool(x)
-double x ;
+ibool(double x)
{
BOOLEAN p ;
}
BOOLEAN
-ibool2(x)
-double x ;
+ibool2(double x)
{
BOOLEAN p ;
*/
void
-mpacos(MPx, MPretval)
-int *MPx, *MPretval ;
+mpacos(int *MPx, int *MPretval)
{
int MP0[MP_SIZE], MP1[MP_SIZE], MP2[MP_SIZE] ;
int MPn1[MP_SIZE], MPpi[MP_SIZE], MPy[MP_SIZE], val ;
*/
void
-mpacosh(MPx, MPretval)
-int *MPx, *MPretval ;
+mpacosh(int *MPx, int *MPretval)
{
int MP1[MP_SIZE], val ;
*/
void
-mpasinh(MPx, MPretval)
-int *MPx, *MPretval ;
+mpasinh(int *MPx, int *MPretval)
{
int MP1[MP_SIZE], val ;
*/
void
-mpatanh(MPx, MPretval)
-int *MPx, *MPretval ;
+mpatanh(int *MPx, int *MPretval)
{
int MP0[MP_SIZE], MP1[MP_SIZE], MP2[MP_SIZE] ;
int MP3[MP_SIZE], MPn1[MP_SIZE], val ;
*/
void
-mplog10(MPx, MPretval)
-int *MPx, *MPretval ;
+mplog10(int *MPx, int *MPretval)
{
int MP1[MP_SIZE], MP2[MP_SIZE], n ;
void
-process_parens(current)
-char current ;
+process_parens(char current)
{
int i ;
int last_lpar ; /* Position in stack of last left paren. */
void
-push_num(MPval) /* Try to push value onto the numeric stack. */
-int *MPval ;
+push_num(int *MPval) /* Try to push value onto the numeric stack. */
{
if (v->numsptr < 0) return ;
if (v->numsptr >= MAXSTACK)
void
-push_op(val) /* Try to push value onto the operand stack. */
-int val ;
+push_op(int val) /* Try to push value onto the operand stack. */
{
if (v->opsptr < 0) return ;
if (v->opsptr >= MAXSTACK)
void
-save_pending_values(val)
-int val ;
+save_pending_values(int val)
{
int n ;
double
-setbool(p)
-BOOLEAN p ;
+setbool(BOOLEAN p)
{
BOOLEAN q ;
double val ;
}
double
-do_round(result, ndigits)
-double result;
-int ndigits;
+do_round(double result, int ndigits)
{
char buf2[40], buffer[100];
int temp;
}
BOOLEAN
-try_compute_i(guess, result, method)
-double guess;
-double *result;
-int method;
+try_compute_i(double guess, double *result, int method)
{
double sum_pos, sum_pos_prime, sum_neg, sum_neg_prime, w = guess;
double new_w;
return TRUE;
}
-compute_i(target)
-double *target;
+static void
+compute_i(double *target)
{
double p[3];
double first_period, last_period;
}
int
-count_sign_changes(cf, count)
-double *cf;
-int count;
+count_sign_changes(double *cf, int count)
{
int i, curr_sign = 0, result = 0;