# HG changeset patch # User vitor # Date 1216334369 0 # Node ID bf3952d5e76c77a7e9497c58b74274800c66cada # Parent dddc7406c5b6d7786d4db97e7ca00cc965853061 Declare function parameters as const diff -r dddc7406c5b6 -r bf3952d5e76c ra288.c --- a/ra288.c Thu Jul 17 17:42:44 2008 +0000 +++ b/ra288.c Thu Jul 17 22:39:29 2008 +0000 @@ -37,7 +37,8 @@ float lhist[10]; } Real288_internal; -static inline float scalar_product_float(float * v1, float * v2, int size) +static inline float scalar_product_float(const float * v1, const float * v2, + int size) { float res = 0.; @@ -90,7 +91,7 @@ } /* column multiply */ -static void colmult(float *tgt, float *m1, const float *m2, int n) +static void colmult(float *tgt, const float *m1, const float *m2, int n) { while (n--) *(tgt++) = (*(m1++)) * (*(m2++)); @@ -133,19 +134,19 @@ } /* product sum (lsf) */ -static void prodsum(float *tgt, float *src, int len, int n) +static void prodsum(float *tgt, const float *src, int len, int n) { for (; n >= 0; n--) tgt[n] = scalar_product_float(src, src - n, len); } -static void co(int n, int i, int j, float *in, float *out, float *st1, +static void co(int n, int i, int j, const float *in, float *out, float *st1, float *st2, const float *table) { int a, b, c; unsigned int x; - float *fp; + const float *fp; float buffer1[37]; float buffer2[37]; float work[111];