Internationalisation.
[pspp] / src / libpspp / message.c
index 34ca65ce5598018dc1e10641c0e45eebb6091a9e..b88c1247411f5a1f93efcba2c5671db928b54187 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <libpspp/alloc.h>
 #include <libpspp/version.h>
@@ -68,6 +69,27 @@ msg_done (void)
 {
 }
 
+
+/* Duplicate a message */
+struct msg * 
+msg_dup(const struct msg *m)
+{
+  struct msg *new_msg = xmalloc (sizeof *m);
+
+  *new_msg = *m;
+  new_msg->text = strdup(m->text);
+
+  return new_msg;
+}
+
+void
+msg_destroy(struct msg *m)
+{
+  free(m->text);
+  free(m);
+}
+
+
 /* Emits M as an error message.
    Frees allocated data in M. */
 void
@@ -115,7 +137,6 @@ request_bug_report_and_abort(const char *msg )
          "build_system:        %s\n"
          "default_config_path: %s\n"
          "include_path:        %s\n"
-         "groff_font_path:     %s\n"
          "locale_dir:          %s\n"
          "compiler version:    %s\n"
          ,
@@ -127,7 +148,6 @@ request_bug_report_and_abort(const char *msg )
          build_system,
          default_config_path,
          include_path, 
-         groff_font_path,
          locale_dir,
 #ifdef __VERSION__
          __VERSION__