double *new_varb_value;
int trial_choice;
int
trial_init()
{
int i,n_varb;
char *calloc();
n_varb = *((int *) pm(GET, Traj_Ds_Object, Varb_Dim, NULL));
/* free up previous storage, if any */
if (trial_varb_value != NULL) cfree((char *) trial_varb_value);
/* create storage for operations, and set initial values */
trial_varb_value = (double *) calloc(n_varb,sizeof(double));
if (trial_varb_value == NULL)
{
system_mess_proc(1,"trial_init: Memory Allocation failed.");
return(-1);
}
/* initialize the values for the text fields */
for (i=0; i<n_varb; i++)
{
trial_varb_value[i] = 0.0;
}
/* reset the setting to choice 0 */
trial_choice = 0;
return(0);
}