Author: bugman Date: Tue Aug 26 18:48:30 2014 New Revision: 25309 URL: http://svn.gna.org/viewcvs/relax?rev=25309&view=rev Log: Clean up of the header and includes of the target_functions/c_chi2.c file. The square() function macro has been shifted to the header file and the stdio.h and math.h standard library headers are no longer included as they are not used. Modified: trunk/target_functions/c_chi2.c trunk/target_functions/c_chi2.h Modified: trunk/target_functions/c_chi2.c URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/c_chi2.c?rev=25309&r1=25308&r2=25309&view=diff ============================================================================== --- trunk/target_functions/c_chi2.c (original) +++ trunk/target_functions/c_chi2.c Tue Aug 26 18:48:30 2014 @@ -17,12 +17,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdio.h> -#include <math.h> +/* Include the c_chi2 header file to access the square() function. */ #include "c_chi2.h" - -/* Define the function for calculating the square of a number. */ -#define square(x) ((x)*(x)) double chi2(double values[MAX_DATA], double sd[MAX_DATA], double back_calc[MAX_DATA], int num_times) { Modified: trunk/target_functions/c_chi2.h URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/c_chi2.h?rev=25309&r1=25308&r2=25309&view=diff ============================================================================== --- trunk/target_functions/c_chi2.h (original) +++ trunk/target_functions/c_chi2.h Tue Aug 26 18:48:30 2014 @@ -30,4 +30,7 @@ void dchi2(double dchi2[MAX_PARAMS], double data[MAX_DATA], double back_calc_vals[MAX_DATA], double back_calc_grad[MAX_PARAMS][MAX_DATA], double errors[MAX_DATA], int num_times, int M); void d2chi2(double d2chi2[MAX_PARAMS][MAX_PARAMS], double data[MAX_DATA], double back_calc_vals[MAX_DATA], double back_calc_grad[MAX_PARAMS][MAX_DATA], double back_calc_hess[MAX_PARAMS][MAX_PARAMS][MAX_DATA], double errors[MAX_DATA], int num_times, int M); +/* Define the function for calculating the square of a number. */ +#define square(x) ((x)*(x)) + #endif