}
static void
-csv_format_footnotes (const struct footnote **f, size_t n, struct string *s)
+csv_format_footnotes (struct footnote **f, size_t n, struct string *s)
{
for (size_t i = 0; i < n; i++)
ds_put_format (s, "[%s]", f[i]->marker);
csv_output_table_item_text (csv, table_item_get_caption (table_item),
"Caption");
- const struct footnote **f;
+ struct footnote **f;
size_t n_footnotes = table_collect_footnotes (table_item, &f);
if (n_footnotes)
{
static void
html_put_footnote_markers (struct html_driver *html,
- const struct footnote **footnotes,
+ struct footnote **footnotes,
size_t n_footnotes)
{
if (n_footnotes > 0)
put_tfoot (html, t, &tfoot);
html_put_table_item_text (html, caption);
}
- const struct footnote **f;
+ struct footnote **f;
size_t n_footnotes = table_collect_footnotes (item, &f);
for (size_t i = 0; i < n_footnotes; i++)
static void
add_footnote_page (struct render_pager *p, const struct table_item *item)
{
- const struct footnote **f;
+ struct footnote **f;
size_t n_footnotes = table_collect_footnotes (item, &f);
if (!n_footnotes)
return;
struct table_item_text
{
char *content;
- const struct footnote **footnotes;
+ struct footnote **footnotes;
size_t n_footnotes;
struct table_area_style *style;
};
struct table_item_layer
{
char *content;
- const struct footnote **footnotes;
+ struct footnote **footnotes;
size_t n_footnotes;
};
char *text; /* A paragraph of text. */
char **subscripts;
size_t n_subscripts;
- const struct footnote **footnotes;
+ struct footnote **footnotes;
size_t n_footnotes;
- const struct table_area_style *style;
+ struct table_area_style *style;
};
+struct table_cell *table_cell_clone (const struct table_cell *);
+void table_cell_destroy (struct table_cell *);
+
void table_cell_format_footnote_markers (const struct table_cell *,
struct string *);
void table_get_cell (const struct table *, int x, int y, struct table_cell *);
int table_get_rule (const struct table *, enum table_axis, int x, int y,
struct cell_color *);
-size_t table_collect_footnotes (const struct table_item *,
- const struct footnote ***);
+size_t table_collect_footnotes (const struct table_item *, struct footnote ***);
#endif /* output/table-provider.h */
}
}
-static const struct footnote **
-add_footnotes (const struct footnote **refs, size_t n_refs,
- const struct footnote **footnotes, size_t *allocated, size_t *n)
+static struct footnote **
+add_footnotes (struct footnote **refs, size_t n_refs,
+ struct footnote **footnotes, size_t *allocated, size_t *n)
{
for (size_t i = 0; i < n_refs; i++)
{
- const struct footnote *f = refs[i];
+ struct footnote *f = refs[i];
if (f->idx >= *allocated)
{
size_t new_allocated = (f->idx + 1) * 2;
size_t
table_collect_footnotes (const struct table_item *item,
- const struct footnote ***footnotesp)
+ struct footnote ***footnotesp)
{
- const struct footnote **footnotes = NULL;
+ struct footnote **footnotes = NULL;
size_t allocated = 0;
size_t n = 0;
/* Attaches a reference to footnote F to the cell at column X, row Y in
TABLE. */
void
-table_add_footnote (struct table *table, int x, int y,
- const struct footnote *f)
+table_add_footnote (struct table *table, int x, int y, struct footnote *f)
{
assert (f->style);
TABLE->container or have a lifetime that will outlive TABLE. */
void
table_add_style (struct table *table, int x, int y,
- const struct table_area_style *style)
+ struct table_area_style *style)
{
get_joined_cell (table, x, y)->style = style;
}
unsigned short opt = t->ct[index];
const void *cc = t->cc[index];
- const struct table_area_style *style
+ struct table_area_style *style
= t->styles[(opt & TAB_STYLE_MASK) >> TAB_STYLE_SHIFT];
if (opt & TAB_JOIN)
{
const char *content,
const char *marker,
struct table_area_style *);
-void table_add_footnote (struct table *, int x, int y,
- const struct footnote *);
+void table_add_footnote (struct table *, int x, int y, struct footnote *);
-void table_add_style (struct table *, int x, int y,
- const struct table_area_style *);
+void table_add_style (struct table *, int x, int y, struct table_area_style *);
bool table_cell_is_empty (const struct table *, int c, int r);
static void
tex_put_footnote_markers (struct tex_driver *tex,
- const struct footnote **footnotes,
- size_t n_footnotes)
+ struct footnote **footnotes,
+ size_t n_footnotes)
{
if (n_footnotes > 0)
shipout (&tex->token_list, "$^{");
tex_escape_string (tex, caption->content, false);
shipout (&tex->token_list, "}\n\n");
}
- const struct footnote **f;
+ struct footnote **f;
size_t n_footnotes = table_collect_footnotes (item, &f);
const struct table_item_text *title = table_item_get_title (item);
{
table_joint_text (tab, c, r, c + cs - 1, r + rs - 1, 0,
content);
- table_add_style (tab, c, r, style);
+ table_add_style (tab, c, r,
+ CONST_CAST (struct table_area_style *,
+ style));
}
else
{