projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Subcommand to export a model as a C function
[pspp-builds.git]
/
src
/
title.c
diff --git
a/src/title.c
b/src/title.c
index cb56f84db2db7e38a57b2b7d543b83ac93b3bca7..7edd2dade7339f7cb881f3e3770bbc0bf9b3bd93 100644
(file)
--- a/
src/title.c
+++ b/
src/title.c
@@
-14,15
+14,17
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include <config.h>
#include <ctype.h>
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
#include <config.h>
#include <ctype.h>
#include <stdlib.h>
#include "alloc.h"
#include "command.h"
+#include "dictionary.h"
#include "error.h"
#include "error.h"
+#include "glob.h"
#include "lexer.h"
#include "main.h"
#include "output.h"
#include "lexer.h"
#include "main.h"
#include "output.h"
@@
-30,6
+32,9
@@
#include "version.h"
#include "vfm.h"
#include "version.h"
#include "vfm.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
#include "debug-print.h"
static int get_title (const char *cmd, char **title);
#include "debug-print.h"
static int get_title (const char *cmd, char **title);
@@
-60,7
+65,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_
value
(&tokstr));
+ *title = xstrdup (ds_
c_str
(&tokstr));
lex_get ();
if (token != '.')
{
lex_get ();
if (token != '.')
{
@@
-116,7
+121,7
@@
add_document_line (const char *line, int indent)
memcpy (new_documents, old_documents, old_len);
memset (new_documents + old_len, ' ', indent);
memcpy (new_documents, old_documents, old_len);
memset (new_documents + old_len, ' ', indent);
-
st_bare_pad_copy (new_documents + old_len + indent, line, 80 - indent
);
+
buf_copy_str_rpad (new_documents + old_len + indent, 80 - indent, line
);
new_documents[old_len + 80] = '\0';
dict_set_documents (default_dict, new_documents);
new_documents[old_len + 80] = '\0';
dict_set_documents (default_dict, new_documents);
@@
-131,14
+136,11
@@
cmd_document (void)
/* Add a few header lines for reference. */
{
char buf[256];
/* Add a few header lines for reference. */
{
char buf[256];
- struct tm *tmp = localtime (&last_vfm_invocation);
if (dict_get_documents (default_dict) != NULL)
add_document_line ("", 0);
if (dict_get_documents (default_dict) != NULL)
add_document_line ("", 0);
- sprintf (buf, _("Document entered %s %02d:%02d:%02d by %s (%s):"),
- curdate, tmp->tm_hour, tmp->tm_min, tmp->tm_sec, version,
- host_system);
+ sprintf (buf, _("Document entered %s by %s:"), get_start_date (), version);
add_document_line (buf, 1);
}
add_document_line (buf, 1);
}