projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pivot-table: Don't allow data cells for nonexistent categories.
[pspp]
/
src
/
output
/
journal.c
diff --git
a/src/output/journal.c
b/src/output/journal.c
index 84d0cd922266c0dbe1d745af84a8005fc6b7de42..9cab78805177592a00b0ca92041ab6cf0fc99f92 100644
(file)
--- a/
src/output/journal.c
+++ b/
src/output/journal.c
@@
-41,7
+41,6
@@
struct journal_driver
{
struct output_driver driver;
FILE *file;
{
struct output_driver driver;
FILE *file;
- char *command_name;
/* Name of journal file. */
char *file_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);
{
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;
}
j->destroyed = true;
}
@@
-91,7
+87,7
@@
journal_destroy (struct output_driver *driver)
static void
journal_output (struct journal_driver *j, const char *s)
{
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);
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);
{
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);
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);
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);
}
journal_output (j, s);
free (s);
}
@@
-145,8
+138,7
@@
journal_init (void)
output_driver_init (&journal.driver, &journal_class, "journal",
SETTINGS_DEVICE_UNFILTERED);
journal.file = NULL;
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);
/* Register journal driver. */
output_driver_register (&journal.driver);