53 changes: 22 additions & 31 deletions src/tcl/statistics_correlation_tcl.c
Expand Up @@ -99,10 +99,9 @@ int correlation_print_parameters(double_correlation* self, Tcl_Interp* interp) {
}

int correlation_print_parameters_all(Tcl_Interp* interp) {
int i;
char buffer[TCL_DOUBLE_SPACE + TCL_INTEGER_SPACE + 4];
Tcl_AppendResult(interp, " { ", (char *)NULL);
for (i=0; i< n_correlations; i++) {
for (unsigned i=0; i< n_correlations; i++) {
sprintf(buffer, " %d ", i);
Tcl_AppendResult(interp, "\n{ correlation ", buffer, (char *)NULL);
if ( correlations+i == NULL ) {
Expand All @@ -116,22 +115,21 @@ int correlation_print_parameters_all(Tcl_Interp* interp) {
}

int correlation_print_average1(double_correlation* self, Tcl_Interp* interp, int argc, char** argv) {
int i;
char buffer[TCL_DOUBLE_SPACE];
int err;
if (self->n_data < 1) {
Tcl_AppendResult(interp, buffer, "Error in print average: No input data available", (char *)NULL);
return TCL_ERROR;
}
if (argc == 0) {
for (i=0; i< self->dim_A; i++) {
for (unsigned i=0; i< self->dim_A; i++) {
Tcl_PrintDouble(interp, self->A_accumulated_average[i]/self->n_data, buffer);
Tcl_AppendResult(interp, buffer, " ", (char *)NULL);
}
return TCL_OK;
} else if (ARG0_IS_S("formatted")) {
double* values = (double*) malloc(self->dim_A*sizeof(double));
for (i=0; i< self->dim_A; i++) {
for (unsigned i=0; i< self->dim_A; i++) {
values[i]=self->A_accumulated_average[i]/self->n_data;
}
int change=0;
Expand All @@ -145,13 +143,12 @@ int correlation_print_average1(double_correlation* self, Tcl_Interp* interp, int
}

int correlation_print_variance1(double_correlation* self, Tcl_Interp* interp) {
int i;
char buffer[TCL_DOUBLE_SPACE];
if (self->n_data < 1) {
Tcl_AppendResult(interp, buffer, "Error in print variance: No input data available", (char *)NULL);
return TCL_ERROR;
}
for (i=0; i< self->dim_A; i++) {
for (unsigned i=0; i< self->dim_A; i++) {
Tcl_PrintDouble(interp,
self->A_accumulated_variance[i]/self->n_data
- (self->A_accumulated_average[i]/self->n_data)*(self->A_accumulated_average[i]/self->n_data), buffer);
Expand All @@ -163,7 +160,6 @@ int correlation_print_variance1(double_correlation* self, Tcl_Interp* interp) {
int tclcommand_print_correlation_time(double_correlation* self, Tcl_Interp* interp) {
char buffer[TCL_DOUBLE_SPACE];
double* correlation_time;
int j;
if (self->dim_A != self->dim_corr) {
Tcl_AppendResult(interp, buffer, "Error in print correlation_time: Only makes sense when the dimensions of \
the observables and correlation match (Isn't it?) ", (char *)NULL);
Expand All @@ -176,7 +172,7 @@ int tclcommand_print_correlation_time(double_correlation* self, Tcl_Interp* inte
correlation_time = (double*) malloc(self->dim_corr*sizeof(double));
correlation_get_correlation_time(self, correlation_time);

for (j=0; j<self->dim_corr; j++) {
for (unsigned j=0; j<self->dim_corr; j++) {
Tcl_PrintDouble(interp, correlation_time[j], buffer);
Tcl_AppendResult(interp, buffer, " ",(char *)NULL);
}
Expand All @@ -190,7 +186,6 @@ int tclcommand_print_average_errorbars(double_correlation* self, Tcl_Interp* int
double* correlation_time;
double variance;
double errorbar;
int j;
if (self->dim_A != self->dim_corr) {
Tcl_AppendResult(interp, buffer, "Error in print average_errorbars: Only makes sense when the dimensions of \
the observables and correlation match (Isn't it?) ", (char *)NULL);
Expand All @@ -203,7 +198,7 @@ int tclcommand_print_average_errorbars(double_correlation* self, Tcl_Interp* int
correlation_time = (double*) malloc(self->dim_corr*sizeof(double));
correlation_get_correlation_time(self, correlation_time);

for (j=0; j<self->dim_corr; j++) {
for (unsigned j=0; j<self->dim_corr; j++) {
variance=(self->A_accumulated_variance[j]/self->n_data - self->A_accumulated_average[j]*self->A_accumulated_average[j]/self->n_data/self->n_data);
errorbar=sqrt(variance*(correlation_time[j]/self->dt / self->n_data));
Tcl_PrintDouble(interp, errorbar, buffer);
Expand All @@ -219,7 +214,6 @@ int tclcommand_print_average_errorbars(double_correlation* self, Tcl_Interp* int
* identified by their ids.
*/
int tclcommand_correlation(ClientData data, Tcl_Interp* interp, int argc, char** argv) {
int i;
int no;
char buffer[TCL_INTEGER_SPACE];
argc-=1;
Expand All @@ -232,6 +226,7 @@ int tclcommand_correlation(ClientData data, Tcl_Interp* interp, int argc, char**
return TCL_OK;
}
if (ARG0_IS_S("new")) {
unsigned i;
for (i=0;i<n_correlations;i++)
if ( correlations+i == 0 ) break;
argc-=1;
Expand All @@ -253,7 +248,6 @@ int tclcommand_correlation(ClientData data, Tcl_Interp* interp, int argc, char**
}

int tclcommand_correlation_parse_autoupdate(Tcl_Interp* interp, int no, int argc, char** argv) {
int i;
if (argc > 0 ) {
if (ARG0_IS_S("start")) {
// if(correlations[no].A_fun==&tcl_input || correlations[no].is_from_file) {
Expand All @@ -272,7 +266,7 @@ int tclcommand_correlation_parse_autoupdate(Tcl_Interp* interp, int no, int argc
} else if (ARG0_IS_S("stop")) {
correlations_autoupdate=0;
correlations[no].autoupdate=0;
for (i=0; i<n_correlations; i++) {
for (unsigned i=0; i<n_correlations; i++) {
if (correlations[i].autoupdate)
correlations_autoupdate=1;
}
Expand Down Expand Up @@ -312,7 +306,7 @@ int tclcommand_correlation_parse_print(Tcl_Interp* interp, int no, int argc, cha
int tclcommand_correlation_parse_corr(Tcl_Interp* interp, int no, int argc, char** argv) {
// int(*compressA) ( double* A1, double*A2, double* A_compressed, unsigned int dim_A ) = 0;
// int(*compressB) ( double* B1, double*B2, double* B_compressed, unsigned int dim_B ) = 0;
void **args = malloc(sizeof(void*)); // arguments to be passed to the correlation
void **args = (void**)malloc(sizeof(void*)); // arguments to be passed to the correlation
char *compressA_name=NULL;
char *compressB_name=NULL;
char *corr_operation_name=NULL;
Expand All @@ -339,7 +333,7 @@ int tclcommand_correlation_parse_corr(Tcl_Interp* interp, int no, int argc, char
Tcl_AppendResult(interp, "Correlation IDs must be positive", (char *)NULL);
return TCL_ERROR;
}
if ( no < n_correlations && correlations+no != 0 ) {
if ( (unsigned)no < n_correlations && correlations+no != 0 ) {
if (argc > 0) {
if (ARG0_IS_S("print")) {
return tclcommand_correlation_parse_print(interp, no, argc-1, argv+1);
Expand Down Expand Up @@ -427,7 +421,7 @@ int tclcommand_correlation_parse_corr(Tcl_Interp* interp, int no, int argc, char
return TCL_ERROR;
}

} else if ( no == n_correlations || correlations+no == 0) {
} else if ( (unsigned)no == n_correlations || correlations+no == 0) {

//Tcl_AppendResult(interp, "Setting up a new correlation\n", (char *)NULL);
// Else we must parse the other arguments and see if we can construct a fully
Expand Down Expand Up @@ -560,7 +554,7 @@ int tclcommand_correlation_parse_corr(Tcl_Interp* interp, int no, int argc, char
error_msg = (char *)init_errors[error];
if ( error == 0 ) {
//printf("Set up correlation %d, autoupdate: %d\n",n_correlations,correlations[n_correlations].autoupdate);
if ( no == n_correlations ) n_correlations++;
if ( (unsigned)no == n_correlations ) n_correlations++;
sprintf(buffer,"%d",no);
Tcl_AppendResult(interp,buffer,(char *)NULL);
return TCL_OK;
Expand Down Expand Up @@ -614,18 +608,17 @@ int parse_corr_operation(Tcl_Interp* interp, int argc, char** argv, int* change,


int double_correlation_print_correlation( double_correlation* self, Tcl_Interp* interp) {
int j, k;
double dt=self->dt;
char buffer[TCL_DOUBLE_SPACE];
// char ibuffer[TCL_INTEGER_SPACE+2];

for (j=0; j<self->n_result; j++) {
for (unsigned j=0; j<self->n_result; j++) {
Tcl_AppendResult(interp, " { ", (char *)NULL);
Tcl_PrintDouble(interp, self->tau[j]*dt, buffer);
Tcl_AppendResult(interp, buffer, " ",(char *)NULL);
sprintf(buffer, "%d ", self->n_sweeps[j]);
Tcl_AppendResult(interp, buffer, " ",(char *)NULL);
for (k=0; k< self->dim_corr; k++) {
for (unsigned k=0; k< self->dim_corr; k++) {
if (self->n_sweeps[j] == 0 ) {
Tcl_PrintDouble(interp, 0., buffer);
Tcl_AppendResult(interp, buffer, " ", (char *)NULL);
Expand All @@ -643,7 +636,6 @@ int double_correlation_print_correlation( double_correlation* self, Tcl_Interp*

int double_correlation_print_spherically_averaged_sf(double_correlation* self, Tcl_Interp* interp) {

int j,k;
int qi,qj,qk,qn, dim_sf, order2;
double dt=self->dt;
observable_sf_params* params=(observable_sf_params*)self->A_obs->args;
Expand All @@ -662,26 +654,26 @@ int double_correlation_print_spherically_averaged_sf(double_correlation* self, T
av_sf_Im=(double*)malloc(order2*sizeof(double));

// compute spherically averaged sf
for (j=0; j<self->n_result; j++) {
for (unsigned j=0; j<self->n_result; j++) {
// compute the spherically averaged sf for current dt
for(k=0;k<order2;k++) av_sf_Re[k]=av_sf_Im[k]=0.0;
for(k=0;k<dim_sf;k++) {
for (int k=0;k<order2;k++) av_sf_Re[k]=av_sf_Im[k]=0.0;
for (int k=0;k<dim_sf;k++) {
qi=q_vals[3*k ];
qj=q_vals[3*k+1];
qk=q_vals[3*k+2];
qn= qi*qi + qj*qj + qk*qk;
av_sf_Re[qn-1]+=self->result[j][2*k ];
av_sf_Im[qn-1]+=self->result[j][2*k+1];
}
for(k=0;k<order2;k++) {
if(q_density[k]>0.0) {
for (int k=0;k<order2;k++) {
if (q_density[k]>0.0) {
av_sf_Re[k]/=q_density[k];
av_sf_Im[k]/=q_density[k];
}
// note: if q_density[k]==0, we did not add anything to av_sf_Xx[k], so it is 0.0
}
// now print what we obtained
for(k=0;k<order2;k++) {
for (int k=0;k<order2;k++) {
Tcl_AppendResult(interp, " { ", (char *)NULL);
Tcl_PrintDouble(interp, self->tau[j]*dt, buffer);
Tcl_AppendResult(interp, buffer, " } { ",(char *)NULL);
Expand Down Expand Up @@ -709,15 +701,14 @@ int double_correlation_print_spherically_averaged_sf(double_correlation* self, T

int double_correlation_write_to_file( double_correlation* self, char* filename) {
FILE* file=0;
int j, k;
double dt=self->dt;
file=fopen(filename, "w");
if (!file) {
return 1;
}
for (j=0; j<self->n_result; j++) {
for (unsigned j=0; j<self->n_result; j++) {
fprintf(file, "%.6g %d ", self->tau[j]*dt, self->n_sweeps[j]);
for (k=0; k< self->dim_corr; k++) {
for (unsigned k=0; k< self->dim_corr; k++) {
if (self->n_sweeps[j] == 0 )
fprintf(file, "%.6g ", 0.);
else
Expand Down
4 changes: 2 additions & 2 deletions src/tcl/statistics_fluid_tcl.c
Expand Up @@ -122,7 +122,7 @@ static int tclcommand_analyze_fluid_parse_densprof(Tcl_Interp *interp, int argc,
return TCL_ERROR;
}

profile = malloc(lblattice.grid[pdir]*node_grid[pdir]*sizeof(double));
profile = (double*) malloc(lblattice.grid[pdir]*node_grid[pdir]*sizeof(double));

lb_master_calc_densprof(profile, pdir, x1, x2);

Expand Down Expand Up @@ -171,7 +171,7 @@ static int tclcommand_analyze_fluid_parse_velprof(Tcl_Interp *interp, int argc,
return TCL_ERROR;
}

velprof = malloc(box_l[pdir]/lblattice.agrid*sizeof(double));
velprof = (double*) malloc(box_l[pdir]/lblattice.agrid*sizeof(double));

lb_master_calc_velprof(velprof, vcomp, pdir, x1, x2);

Expand Down
15 changes: 8 additions & 7 deletions src/tcl/statistics_observable_tcl.c
Expand Up @@ -30,13 +30,14 @@ int tclcommand_observable_print_formatted(Tcl_Interp* interp, int argc, char** a
int tclcommand_observable_print(Tcl_Interp* interp, int argc, char** argv, int* change, observable* obs);

static int convert_types_to_ids(IntList * type_list, IntList * id_list);
static int observable_tclcommand(void* _container, double* A, unsigned int n_A);

int parse_id_list(Tcl_Interp* interp, int argc, char** argv, int* change, IntList** ids ) {
int i,ret;
// char** temp_argv; int temp_argc;
// int temp;
IntList* input=malloc(sizeof(IntList));
IntList* output=malloc(sizeof(IntList));
IntList* input=(IntList*)malloc(sizeof(IntList));
IntList* output=(IntList*)malloc(sizeof(IntList));
init_intlist(input);
alloc_intlist(input,1);
init_intlist(output);
Expand Down Expand Up @@ -766,7 +767,7 @@ int tclcommand_observable_interacts_with(Tcl_Interp* interp, int argc, char** ar

#define REGISTER_OBSERVABLE(name,parser,id) \
if (ARG_IS_S(2,#name)) { \
observables[id]=malloc(sizeof(observable)); \
observables[id]=(observable*)malloc(sizeof(observable)); \
if (parser(interp, argc-2, argv+2, &temp, observables[n_observables]) ==TCL_OK) { \
n_observables++; \
argc-=1+temp; \
Expand Down Expand Up @@ -1250,7 +1251,7 @@ int tclcommand_parse_radial_profile(Tcl_Interp* interp, int argc, char** argv, i

int tclcommand_observable_print(Tcl_Interp* interp, int argc, char** argv, int* change, observable* obs) {
char buffer[TCL_DOUBLE_SPACE];
double* values=malloc(obs->n*sizeof(double));
double* values=(double*)malloc(obs->n*sizeof(double));
if ( (*obs->fun)(obs->args, values, obs->n) ) {
Tcl_AppendResult(interp, "\nFailed to compute observable tclcommand\n", (char *)NULL );
return TCL_ERROR;
Expand Down Expand Up @@ -1301,7 +1302,7 @@ int sf_print_usage(Tcl_Interp* interp) {
return TCL_ERROR;
}

int observable_tclcommand(void* _container, double* A, unsigned int n_A) {
static int observable_tclcommand(void* _container, double* A, unsigned int n_A) {
Observable_Tclcommand_Arg_Container* container = (Observable_Tclcommand_Arg_Container*) _container;
Tcl_Interp* interp = (Tcl_Interp*) container->interp;
int error = Tcl_Eval(interp, container->command);
Expand All @@ -1310,9 +1311,9 @@ int observable_tclcommand(void* _container, double* A, unsigned int n_A) {
}
char* result = Tcl_GetStringResult(interp);
char* token;
int counter=0;
unsigned counter=0;
token = strtok(result, " ");
while ( token != NULL && counter < n_A ) {
while (token != NULL && counter < n_A) {
A[counter] = atof(token);
token = strtok(NULL, " ");
counter++;
Expand Down
1 change: 0 additions & 1 deletion src/tcl/statistics_observable_tcl.h
Expand Up @@ -27,7 +27,6 @@ int tclcommand_observable(ClientData data, Tcl_Interp *interp, int argc, char **
int tclcommand_observable_print_formatted(Tcl_Interp* interp, int argc, char** argv, int* change, observable* obs, double* values);
int parse_id_list(Tcl_Interp* interp, int argc, char** argv, int* change, IntList** ids );

int observable_tclcommand(void* _container, double* A, unsigned int n_A);

typedef struct {
Tcl_Interp* interp;
Expand Down
22 changes: 11 additions & 11 deletions src/tcl/statistics_tcl.c
Expand Up @@ -229,7 +229,7 @@ static int tclcommand_analyze_parse_get_folded_positions(Tcl_Interp *interp, int
ERROR_SPRINTF(errtxt, "{058 could not sort partCfg, particles have to start at 0 and have consecutive identities} ");
return TCL_ERROR;
}
coord = malloc(n_total_particles*3*sizeof(float));
coord = (float*)malloc(n_total_particles*3*sizeof(float));
/* Construct the array coord*/
for (i = 0; i < n_total_particles; i++) {
int dummy[3] = {0,0,0};
Expand Down Expand Up @@ -322,8 +322,8 @@ static int tclcommand_analyze_parse_modes2d(Tcl_Interp *interp, int argc, char *
return (TCL_OK);
}

result_ht = malloc((mode_grid_3d[ydir]/2+1)*(mode_grid_3d[xdir])*sizeof(fftw_complex));
result_th = malloc((mode_grid_3d[ydir]/2+1)*(mode_grid_3d[xdir])*sizeof(fftw_complex));
result_ht = (fftw_complex*) malloc((mode_grid_3d[ydir]/2+1)*(mode_grid_3d[xdir])*sizeof(fftw_complex));
result_th = (fftw_complex*) malloc((mode_grid_3d[ydir]/2+1)*(mode_grid_3d[xdir])*sizeof(fftw_complex));

if (!modes2d(result_th, 0) || !modes2d(result_ht,1)) {
fprintf(stderr,"%d,mode analysis failed \n",this_node);
Expand Down Expand Up @@ -478,7 +478,7 @@ static int tclcommand_analyze_parse_radial_density_map(Tcl_Interp *interp, int a

/* allocate memory for the profile if necessary */
if (thetabins > 0 ) {
density_profile = malloc(beadtypes.max*sizeof(DoubleList));
density_profile = (DoubleList*) malloc(beadtypes.max*sizeof(DoubleList));
if (density_profile) {
for ( i = 0 ; i < beadtypes.max ; i++ ) {
init_doublelist(&density_profile[i]);
Expand All @@ -494,7 +494,7 @@ static int tclcommand_analyze_parse_radial_density_map(Tcl_Interp *interp, int a
}
/* Allocate a doublelist of bins for each beadtype so that we
can keep track of beads separately */
density_map = malloc(beadtypes.max*sizeof(DoubleList));
density_map = (DoubleList*) malloc(beadtypes.max*sizeof(DoubleList));
if ( density_map ) {
/* Initialize all the subprofiles in density profile */
for ( i = 0 ; i < beadtypes.max ; i++ ) {
Expand Down Expand Up @@ -715,7 +715,7 @@ static int tclcommand_analyze_parse_lipid_orient_order(Tcl_Interp *interp, int a
return (TCL_OK);
}

stored_dirs = malloc(sizeof(double)*n_molecules*3);
stored_dirs = (double*) malloc(sizeof(double)*n_molecules*3);
/* Do the calculation */
if ( orient_order(&result,stored_dirs) != TCL_OK ) {
Tcl_AppendResult(interp, "Error calculating orientational order ", (char *)NULL);
Expand Down Expand Up @@ -1401,7 +1401,7 @@ static int tclcommand_analyze_parse_distribution(Tcl_Interp *interp, int argc, c
if(r_max <= r_min) return TCL_ERROR;
if(r_bins < 1) return TCL_ERROR;
/* calculate distribution */
distribution = malloc(r_bins*sizeof(double));
distribution = (double*)malloc(r_bins*sizeof(double));
updatePartCfg(WITHOUT_BONDS);
calc_part_distribution(p1.e, p1.max, p2.e, p2.max, r_min, r_max, r_bins, log_flag,&low,distribution);
if(int_flag==1) {
Expand Down Expand Up @@ -1563,7 +1563,7 @@ static int tclcommand_analyze_parse_rdf(Tcl_Interp *interp, int average, int arg
}
else
Tcl_AppendResult(interp, " }", (char *)NULL);
rdf = malloc(r_bins*sizeof(double));
rdf = (double*)malloc(r_bins*sizeof(double));

if (!sortPartCfg()) { Tcl_AppendResult(interp, "for analyze, store particles consecutively starting with 0.",(char *) NULL); return (TCL_ERROR); }

Expand Down Expand Up @@ -1676,7 +1676,7 @@ static int tclcommand_analyze_parse_density_profile_av(Tcl_Interp *interp, int a
return (TCL_ERROR);
}

rho_ave = malloc(n_bin*sizeof(double));
rho_ave = (double*)malloc(n_bin*sizeof(double));
for(i=0;i<n_bin;i++)
rho_ave[i]=0.0;

Expand Down Expand Up @@ -1738,7 +1738,7 @@ static int tclcommand_analyze_parse_diffusion_profile(Tcl_Interp *interp, int ar

if (!sortPartCfg()) { Tcl_AppendResult(interp, "for analyze, store particles consecutively starting with 0.",(char *) NULL); return (TCL_ERROR); }

bins = malloc(nbins*sizeof(double));
bins = (double*)malloc(nbins*sizeof(double));
for (i =0; i<nbins;i++) { bins[i]=0; }

calc_diffusion_profile(dir, xmin, xmax, nbins, n_part, n_conf, time, type, bins);
Expand Down Expand Up @@ -2025,7 +2025,7 @@ static int tclcommand_analyze_parse_configs(Tcl_Interp *interp, int argc, char *
else if (argc != 3*n_part_conf) {
sprintf(buffer,"Wrong # of args(%d)! Usage: analyze configs [x0 y0 z0 ... x%d y%d z%d]",argc,n_part_conf,n_part_conf,n_part_conf);
Tcl_AppendResult(interp,buffer,(char *)NULL); return TCL_ERROR; }
tmp_config = malloc(3*n_part_conf*sizeof(double));
tmp_config = (double*)malloc(3*n_part_conf*sizeof(double));
for(j=0; j < argc; j++)
if (!ARG_IS_D(j, tmp_config[j])) return (TCL_ERROR);
analyze_configs(tmp_config, n_part_conf); free(tmp_config);
Expand Down
4 changes: 2 additions & 2 deletions src/tcl/uwerr_tcl.c
Expand Up @@ -563,8 +563,8 @@ int UWerr(Tcl_Interp * interp,
double s_tau, int plot)
{
Tcl_CmdInfo cmdInfo;
char * argv[2];
char * name = "UWerrInternalFunction";
char* argv[2];
char* name = "UWerrInternalFunction";
int res;

argv[0] = name;
Expand Down
2 changes: 1 addition & 1 deletion src/topology.c
Expand Up @@ -46,7 +46,7 @@ void realloc_topology(int size)
realloc_intlist(&topology[m].part, 0);
}

topology = realloc(topology, size*sizeof(Molecule));
topology = (Molecule*)realloc(topology, size*sizeof(Molecule));

if (n_molecules < 0)
n_molecules = 0;
Expand Down
5 changes: 2 additions & 3 deletions src/utils.h
Expand Up @@ -113,8 +113,7 @@ typedef struct {

/** used instead of realloc.
Makes sure that resizing to zero FREEs pointer */
MDINLINE void *prealloc(void *old, int size)
{
MDINLINE void *prealloc(void *old, int size) {
void *p;
if (size <= 0) {
free(old);
Expand Down Expand Up @@ -906,7 +905,7 @@ MDINLINE double unfolded_distance(double pos1[3], int image_box1[3],

/** extend a string with another one. Like strcat, just automatically
increases the string space */
MDINLINE char *strcat_alloc(char *left, char *right)
MDINLINE char *strcat_alloc(char *left, const char *right)
{
if (!left) {
char *res = (char *)malloc(strlen(right) + 1);
Expand Down
6 changes: 3 additions & 3 deletions src/uwerr.c
Expand Up @@ -61,7 +61,7 @@ char * UWerr_err_to_str(struct UWerr_t s) {
*/


double gammaln(double a)
static double gammaln(double a)
{
int j;
double x, y, tmp, ser;
Expand All @@ -82,7 +82,7 @@ double gammaln(double a)
return -tmp+log(2.5066282746310005*ser/x);
}

void gammaser(double * gser, double a, double x)
static void gammaser(double * gser, double a, double x)
{
int n, ITMAX = 100;
double sum, del, ap, gln, eps = DBL_EPSILON;
Expand Down Expand Up @@ -111,7 +111,7 @@ void gammaser(double * gser, double a, double x)
}


void gammacf(double * gcf, double a, double x)
static void gammacf(double * gcf, double a, double x)
{
int i, ITMAX = 100;
double an, b, c, d, del, h, gln, eps = DBL_EPSILON, FPMIN = DBL_MIN;
Expand Down
1 change: 0 additions & 1 deletion src/uwerr.h
Expand Up @@ -22,7 +22,6 @@
#define _UWERR_H
/** \file uwerr.h
*
* PLEASE INSERT DOCUMENTATION
*/
double UWerr_dsum_double(double * v, double * w, int len);
double UWerr_dsum_int(int * v, double * w, int len);
Expand Down