projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
output view: make items selectable and use system colours
[pspp]
/
src
/
output
/
driver.c
diff --git
a/src/output/driver.c
b/src/output/driver.c
index 82556c81d0c41d858f816eb41939be613bfc8f51..6204e335ca0185cc902955fd4a00db529e0de7c3 100644
(file)
--- a/
src/output/driver.c
+++ b/
src/output/driver.c
@@
-194,7
+194,11
@@
defer_text (struct output_engine *e, struct output_item *item)
if (!is_text_item (item))
return false;
if (!is_text_item (item))
return false;
- enum text_item_type type = text_item_get_type (to_text_item (item));
+ struct text_item *text_item = to_text_item (item);
+ if (text_item->markup) /* XXX */
+ return false;
+
+ enum text_item_type type = text_item_get_type (text_item);
if (type != TEXT_ITEM_SYNTAX && type != TEXT_ITEM_LOG)
return false;
if (type != TEXT_ITEM_SYNTAX && type != TEXT_ITEM_LOG)
return false;
@@
-206,7
+210,7
@@
defer_text (struct output_engine *e, struct output_item *item)
if (!ds_is_empty (&e->deferred_text))
ds_put_byte (&e->deferred_text, '\n');
if (!ds_is_empty (&e->deferred_text))
ds_put_byte (&e->deferred_text, '\n');
- const char *text = text_item_get_text (t
o_text_item (item)
);
+ const char *text = text_item_get_text (t
ext_item
);
ds_put_cstr (&e->deferred_text, text);
output_item_unref (item);
ds_put_cstr (&e->deferred_text, text);
output_item_unref (item);
@@
-285,7
+289,7
@@
output_get_command_name (void)
if (e == NULL)
return NULL;
if (e == NULL)
return NULL;
- for (size_t i = e->n_groups; i-- > 0;
)
+ for (size_t i = e->n_groups; i-- > 0;)
if (e->groups[i])
return utf8_to_upper (e->groups[i]);
if (e->groups[i])
return utf8_to_upper (e->groups[i]);
@@
-431,6
+435,7
@@
extern const struct output_driver_factory list_driver_factory;
extern const struct output_driver_factory html_driver_factory;
extern const struct output_driver_factory csv_driver_factory;
extern const struct output_driver_factory odt_driver_factory;
extern const struct output_driver_factory html_driver_factory;
extern const struct output_driver_factory csv_driver_factory;
extern const struct output_driver_factory odt_driver_factory;
+extern const struct output_driver_factory spv_driver_factory;
#ifdef HAVE_CAIRO
extern const struct output_driver_factory pdf_driver_factory;
extern const struct output_driver_factory ps_driver_factory;
#ifdef HAVE_CAIRO
extern const struct output_driver_factory pdf_driver_factory;
extern const struct output_driver_factory ps_driver_factory;
@@
-444,6
+449,7
@@
static const struct output_driver_factory *factories[] =
&html_driver_factory,
&csv_driver_factory,
&odt_driver_factory,
&html_driver_factory,
&csv_driver_factory,
&odt_driver_factory,
+ &spv_driver_factory,
#ifdef HAVE_CAIRO
&pdf_driver_factory,
&ps_driver_factory,
#ifdef HAVE_CAIRO
&pdf_driver_factory,
&ps_driver_factory,
@@
-590,7
+596,7
@@
output_driver_substitute_heading_vars (const char *src, int page_number)
struct output_engine *e = engine_stack_top ();
struct string dst = DS_EMPTY_INITIALIZER;
ds_extend (&dst, strlen (src));
struct output_engine *e = engine_stack_top ();
struct string dst = DS_EMPTY_INITIALIZER;
ds_extend (&dst, strlen (src));
- for (const char *p = src; *p;
)
+ for (const char *p = src; *p;)
{
if (!strncmp (p, "&[", 6))
{
{
if (!strncmp (p, "&[", 6))
{