From 9ca8b579de593d1df5b6ff45db222aac050ae700 Mon Sep 17 00:00:00 2001 From: Jason Stover Date: Sun, 18 Dec 2005 18:48:30 +0000 Subject: [PATCH] Added preamble --- src/reg_export_comments.h | 3 +++ src/regression.q | 1 + 2 files changed, 4 insertions(+) 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); -- 2.30.2