projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d98237
)
journal.c: Made journal_file_name a member of the journal struct
author
John Darrington
<john@darrington.wattle.id.au>
Tue, 29 Oct 2013 16:59:07 +0000
(17:59 +0100)
committer
John Darrington
<john@darrington.wattle.id.au>
Thu, 31 Oct 2013 19:28:58 +0000
(20:28 +0100)
src/output/journal.c
patch
|
blob
|
history
diff --git
a/src/output/journal.c
b/src/output/journal.c
index 5c84a5f84ee5b1fffa5e37d67a8667d6199076f5..c1d246360f3b9b7b036c812c7c28de5b989386d8 100644
(file)
--- a/
src/output/journal.c
+++ b/
src/output/journal.c
@@
-41,6
+41,9
@@
struct journal_driver
struct output_driver driver;
FILE *file;
char *command_name;
struct output_driver driver;
FILE *file;
char *command_name;
+
+ /* Name of journal file. */
+ char *file_name;
};
static const struct output_driver_class journal_class;
};
static const struct output_driver_class journal_class;
@@
-48,8
+51,6
@@
static const struct output_driver_class journal_class;
/* Journal driver, if journaling is enabled. */
static struct journal_driver *journal;
/* Journal driver, if journaling is enabled. */
static struct journal_driver *journal;
-/* Name of journal file. */
-static char *journal_file_name;
static struct journal_driver *
journal_driver_cast (struct output_driver *driver)
static struct journal_driver *
journal_driver_cast (struct output_driver *driver)
@@
-65,7
+66,7
@@
journal_close (void)
{
if (fwriteerror (journal->file))
msg_error (errno, _("error writing output file `%s'"),
{
if (fwriteerror (journal->file))
msg_error (errno, _("error writing output file `%s'"),
- journal
_
file_name);
+ journal
->
file_name);
journal->file = NULL;
}
}
journal->file = NULL;
}
}
@@
-176,8
+177,8
@@
void
journal_set_file_name (const char *file_name)
{
journal_close ();
journal_set_file_name (const char *file_name)
{
journal_close ();
- free (journal
_
file_name);
- journal
_
file_name = xstrdup (file_name);
+ free (journal
->
file_name);
+ journal
->
file_name = xstrdup (file_name);
}
/* Returns the name of the journal file. The caller must not modify or free
}
/* Returns the name of the journal file. The caller must not modify or free
@@
-185,10
+186,10
@@
journal_set_file_name (const char *file_name)
const char *
journal_get_file_name (void)
{
const char *
journal_get_file_name (void)
{
- if (journal
_
file_name == NULL)
+ if (journal
->
file_name == NULL)
{
const char *output_path = default_output_path ();
{
const char *output_path = default_output_path ();
- journal
_
file_name = xasprintf ("%s%s", output_path, "pspp.jnl");
+ journal
->
file_name = xasprintf ("%s%s", output_path, "pspp.jnl");
}
}
- return journal
_
file_name;
+ return journal
->
file_name;
}
}