projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
spv-writer: Consistently use label from output_item.
[pspp]
/
src
/
data
/
sys-file-reader.c
diff --git
a/src/data/sys-file-reader.c
b/src/data/sys-file-reader.c
index 0e8a9bfc68c988a17fb4ece5a6ea1e9509b59382..ec8ae3b32fd654c9f9ee0fcbbca007c0049fc075 100644
(file)
--- a/
src/data/sys-file-reader.c
+++ b/
src/data/sys-file-reader.c
@@
-640,6
+640,13
@@
add_id (struct get_strings_aux *aux, const char *id, const char *title, ...)
va_end (args);
}
va_end (args);
}
+static const char *
+skip_prefix (const char *s, const char *prefix)
+{
+ size_t prefix_len = strlen (prefix);
+ return !strncmp (s, prefix, prefix_len) ? s + prefix_len : s;
+}
+
/* Retrieves significant string data from R in its raw format, to allow the
caller to try to detect the encoding in use.
/* Retrieves significant string data from R in its raw format, to allow the
caller to try to detect the encoding in use.
@@
-689,7
+696,7
@@
sfm_get_strings (const struct any_reader *r_, struct pool *pool,
add_string (&aux, r->header.creation_date, _("Creation Date"));
add_string (&aux, r->header.creation_time, _("Creation Time"));
add_string (&aux, r->header.creation_date, _("Creation Date"));
add_string (&aux, r->header.creation_time, _("Creation Time"));
- add_string (&aux,
r->header.eye_catcher
, _("Product"));
+ add_string (&aux,
skip_prefix (r->header.eye_catcher, "@(#) ")
, _("Product"));
add_string (&aux, r->header.file_label, _("File Label"));
if (r->extensions[EXT_PRODUCT_INFO])
add_string (&aux, r->header.file_label, _("File Label"));
if (r->extensions[EXT_PRODUCT_INFO])