spv-file-format: Revise .spv light member documentation.
[pspp] / src / output / journal.c
index d4ad5a75fbefcb3480cf208982208efe417b6591..9cab78805177592a00b0ca92041ab6cf0fc99f92 100644 (file)
@@ -41,7 +41,6 @@ struct journal_driver
   {
     struct output_driver driver;
     FILE *file;
-    char *command_name;
 
     /* Name of journal file. */
     char *file_name;
@@ -79,11 +78,8 @@ journal_destroy (struct output_driver *driver)
 {
   struct journal_driver *j = journal_driver_cast (driver);
 
-  if ( !j->destroyed)
-    {
-      journal_close ();
-      free (j->command_name);
-    }
+  if (!j->destroyed)
+    journal_close ();
 
   j->destroyed = true;
 }
@@ -91,7 +87,7 @@ journal_destroy (struct output_driver *driver)
 static void
 journal_output (struct journal_driver *j, const char *s)
 {
-  if ( j->file == NULL)
+  if (j->file == NULL)
     return;
 
   fprintf (j->file, "%s\n", s);
@@ -107,8 +103,6 @@ journal_submit (struct output_driver *driver, const struct output_item *item)
 {
   struct journal_driver *j = journal_driver_cast (driver);
 
-  output_driver_track_current_command (item, &j->command_name);
-
   if (is_text_item (item))
     {
       const struct text_item *text_item = to_text_item (item);
@@ -120,8 +114,7 @@ journal_submit (struct output_driver *driver, const struct output_item *item)
   else if (is_message_item (item))
     {
       const struct message_item *message_item = to_message_item (item);
-      const struct msg *msg = message_item_get_msg (message_item);
-      char *s = msg_to_string (msg, j->command_name);
+      char *s = msg_to_string (message_item_get_msg (message_item));
       journal_output (j, s);
       free (s);
     }
@@ -145,7 +138,6 @@ journal_init (void)
   output_driver_init (&journal.driver, &journal_class, "journal",
                      SETTINGS_DEVICE_UNFILTERED);
   journal.file = NULL;
-  journal.command_name = NULL;
 
   /* Register journal driver. */
   output_driver_register (&journal.driver);