From: Jason Stover Date: Sun, 18 Dec 2005 18:48:30 +0000 (+0000) Subject: Added preamble X-Git-Tag: v0.6.0~1113 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ca8b579de593d1df5b6ff45db222aac050ae700;p=pspp-builds.git Added preamble --- diff --git a/src/reg_export_comments.h b/src/reg_export_comments.h index 00d4d84b..212de4d1 100644 --- a/src/reg_export_comments.h +++ b/src/reg_export_comments.h @@ -19,6 +19,9 @@ #ifndef REG_EXPORT_COMMENTS_H #define REG_EXPORT_COMMENTS_H +const char reg_preamble[] = "/*\n This program contains functions which return estimates\n" +" and confidence intervals for a linear model. The EXPORT subcommand\n" +" of the REGRESSION procedure of GNU PSPP generated this program.\n*/\n\n"; const char reg_mean_cmt[] = "/*\n Estimate the mean of Y, the dependent variable for\n" " the linear model of the form \n\n" " Y = b0 + b1 * X1 + b2 * X2 + ... + bk * Xk + error\n\n" diff --git a/src/regression.q b/src/regression.q index 660c15d8..44ce2528 100644 --- a/src/regression.q +++ b/src/regression.q @@ -485,6 +485,7 @@ subcommand_export (int export, pspp_linreg_cache *c) assert (model_file != NULL); assert (fp != NULL); fp = fopen (handle_get_filename (model_file), "w"); + fprintf (fp, "%s", reg_preamble); fprintf (fp, "#include \n\n"); fprintf (fp, "%s", reg_mean_cmt); fprintf (fp, "double\npspp_reg_estimate (const double *var_vals, const char *var_names[])\n{\n\tchar *model_depvars[%d] = {", c->n_indeps);