From: John Darrington Date: Sun, 27 Jul 2008 01:02:42 +0000 (+0800) Subject: Constness X-Git-Tag: v0.7.0~6 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2d859e5a4c8192257c04fd89b8336aa33b15363;p=pspp-builds.git Constness --- diff --git a/src/language/stats/glm.q b/src/language/stats/glm.q index c015afa7..fd48b735 100644 --- a/src/language/stats/glm.q +++ b/src/language/stats/glm.q @@ -257,7 +257,7 @@ run_glm (struct casereader *input, int n_indep = 0; struct ccase c; const struct variable **indep_vars; - struct variable **all_vars; + const struct variable **all_vars; struct design_matrix *X; struct moments_var **mom; struct casereader *reader; diff --git a/src/math/coefficient.c b/src/math/coefficient.c index 4f987612..5872b576 100644 --- a/src/math/coefficient.c +++ b/src/math/coefficient.c @@ -153,7 +153,7 @@ pspp_coeff_get_var (struct pspp_coeff *coef, int i) categorical, and has more than one coefficient, use the VAL to find its coefficient. */ -const struct pspp_coeff * +struct pspp_coeff * pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs, size_t n_coef, const union value *val) { diff --git a/src/math/coefficient.h b/src/math/coefficient.h index dda2ae30..705c1e0e 100644 --- a/src/math/coefficient.h +++ b/src/math/coefficient.h @@ -101,7 +101,7 @@ int pspp_coeff_get_n_vars (struct pspp_coeff *); coefficient found. Note that in this case, the result will depend on the order of COEFS. */ -const struct pspp_coeff * +struct pspp_coeff * pspp_coeff_var_to_coeff (const struct variable *, struct pspp_coeff **, size_t, const union value *); /* diff --git a/src/math/covariance-matrix.c b/src/math/covariance-matrix.c index 38ddf306..54143791 100644 --- a/src/math/covariance-matrix.c +++ b/src/math/covariance-matrix.c @@ -66,7 +66,7 @@ column_iterate (struct design_matrix *cov, const struct variable *v, size_t i; double y; double tmp; - union value *tmp_val; + const union value *tmp_val; col = design_matrix_var_to_column (cov, v); for (i = 0; i < cat_get_n_categories (v) - 1; i++) @@ -96,7 +96,7 @@ void covariance_pass_two (struct design_matrix *cov, double mean1, double mean2, size_t col; size_t i; double x; - union value *tmp_val; + const union value *tmp_val; if (var_is_alpha (v1)) { diff --git a/src/math/linreg.c b/src/math/linreg.c index 8ac19a6b..b3ab5875 100644 --- a/src/math/linreg.c +++ b/src/math/linreg.c @@ -554,7 +554,7 @@ pspp_linreg_residual (const struct variable **predictors, Which coefficient is associated with V? The VAL argument is relevant only to categorical variables. */ -const struct pspp_coeff * +struct pspp_coeff * pspp_linreg_get_coeff (const pspp_linreg_cache * c, const struct variable *v, const union value *val) { diff --git a/src/math/linreg.h b/src/math/linreg.h index ff37a84f..3a0b3694 100644 --- a/src/math/linreg.h +++ b/src/math/linreg.h @@ -200,7 +200,7 @@ pspp_linreg_residual (const struct variable **, const union value **, */ int pspp_linreg_get_vars (const void *, const struct variable **); -const struct pspp_coeff *pspp_linreg_get_coeff (const pspp_linreg_cache +struct pspp_coeff *pspp_linreg_get_coeff (const pspp_linreg_cache *, const struct variable *,