projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Constness and global namespace patrol.
[pspp]
/
src
/
language
/
utilities
/
title.c
diff --git
a/src/language/utilities/title.c
b/src/language/utilities/title.c
index 9fa1309d3fe64e796f1d5487514a4e5f68448fe8..ffb2a48ee939e3389d9f2499dc8312a9e6a6e97c 100644
(file)
--- a/
src/language/utilities/title.c
+++ b/
src/language/utilities/title.c
@@
-63,7
+63,7
@@
get_title (const char *cmd, char **title)
return CMD_FAILURE;
if (*title)
free (*title);
return CMD_FAILURE;
if (*title)
free (*title);
- *title =
xstrdup (ds_c_str (&tokstr)
);
+ *title =
ds_xstrdup (&tokstr
);
lex_get ();
if (token != '.')
{
lex_get ();
if (token != '.')
{
@@
-97,13
+97,13
@@
cmd_file_label (void)
while (isspace ((unsigned char) *label))
label++;
while (isspace ((unsigned char) *label))
label++;
- dict_set_label (d
efault_dict
, label);
+ dict_set_label (d
ataset_dict (current_dataset)
, label);
token = '.';
return CMD_SUCCESS;
}
token = '.';
return CMD_SUCCESS;
}
-/* Add LINE as a line of document information to d
efault_dict
,
+/* Add LINE as a line of document information to d
ataset_dict (current_dataset)
,
indented by INDENT spaces. */
static void
add_document_line (const char *line, int indent)
indented by INDENT spaces. */
static void
add_document_line (const char *line, int indent)
@@
-112,7
+112,7
@@
add_document_line (const char *line, int indent)
size_t old_len;
char *new_documents;
size_t old_len;
char *new_documents;
- old_documents = dict_get_documents (d
efault_dict
);
+ old_documents = dict_get_documents (d
ataset_dict (current_dataset)
);
old_len = old_documents != NULL ? strlen (old_documents) : 0;
new_documents = xmalloc (old_len + 81);
old_len = old_documents != NULL ? strlen (old_documents) : 0;
new_documents = xmalloc (old_len + 81);
@@
-121,7
+121,7
@@
add_document_line (const char *line, int indent)
buf_copy_str_rpad (new_documents + old_len + indent, 80 - indent, line);
new_documents[old_len + 80] = '\0';
buf_copy_str_rpad (new_documents + old_len + indent, 80 - indent, line);
new_documents[old_len + 80] = '\0';
- dict_set_documents (d
efault_dict
, new_documents);
+ dict_set_documents (d
ataset_dict (current_dataset)
, new_documents);
free (new_documents);
}
free (new_documents);
}
@@
-134,7
+134,7
@@
cmd_document (void)
{
char buf[256];
{
char buf[256];
- if (dict_get_documents (d
efault_dict
) != NULL)
+ if (dict_get_documents (d
ataset_dict (current_dataset)
) != NULL)
add_document_line ("", 0);
sprintf (buf, _("Document entered %s by %s:"), get_start_date (), version);
add_document_line ("", 0);
sprintf (buf, _("Document entered %s by %s:"), get_start_date (), version);
@@
-173,7
+173,7
@@
cmd_document (void)
int
cmd_drop_documents (void)
{
int
cmd_drop_documents (void)
{
- dict_set_documents (d
efault_dict
, NULL);
+ dict_set_documents (d
ataset_dict (current_dataset)
, NULL);
return lex_end_of_command ();
}
return lex_end_of_command ();
}