Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-/* This #if encloses the rest of the file. */
-#if !NO_HTML
-
#include <config.h>
#include "chart.h"
#include "htmlP.h"
-#include "message.h"
+#include <libpspp/message.h>
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
-
-#if HAVE_UNISTD_H
#include <unistd.h>
-#endif
-#include "alloc.h"
-#include "compiler.h"
-#include "message.h"
-#include "filename.h"
+#include <libpspp/alloc.h>
+#include <libpspp/compiler.h>
+#include <libpspp/message.h>
+#include <data/filename.h>
#include "getline.h"
#include "getlogin_r.h"
#include "output.h"
#include "manager.h"
#include "table.h"
-#include "version.h"
-#include "make-file.h"
+#include <libpspp/version.h>
+#include <data/make-file.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
html_var_tab = dict;
while (-1 != getline (&buf, &buf_size, prologue_file))
{
- char *buf2;
+
int len;
if (strstr (buf, "!!!"))
}
/* PORTME: Line terminator. */
- buf2 = fn_interp_vars (buf, html_get_var);
- len = strlen (buf2);
- fwrite (buf2, len, 1, f->file);
- if (buf2[len - 1] != '\n')
+ struct string line;
+ ds_create(&line, buf);
+ fn_interp_vars(&line, html_get_var);
+ len = ds_length(&line);
+ fwrite (ds_c_str(&line), len, 1, f->file);
+ if (ds_c_str(&line)[len - 1] != '\n')
putc ('\n', f->file);
- free (buf2);
+ ds_destroy(&line);
}
if (ferror (f->file))
msg (IE, _("Reading `%s': %s."), prologue_fn, strerror (errno));
html_finalise_chart
};
-
-#endif /* !NO_HTML */
-