void
gnumeric_destroy (struct spreadsheet *s)
{
- struct gnumeric_reader *r = s;
+ struct gnumeric_reader *r = (struct gnumeric_reader *) s;
if (0 == --r->ref_cnt)
{
caseproto_unref (r->proto);
- gnumeric_destroy (r);
+ gnumeric_destroy (&r->spreadsheet);
}
void
ods_destroy (struct spreadsheet *s)
{
- struct ods_reader *r = s;
+ struct ods_reader *r = (struct ods_reader *) s;
if (--r->ref_cnt == 0)
{
xmlFree (r->current_sheet_name);
xmlFree (r->target_sheet_name);
- ods_destroy (r);
+ ods_destroy (&r->spreadsheet);
}
opts.sheet_index = -1;
opts.cell_range = spreadsheet_get_sheet_range (stuff->sp, x);
- opts.sheet_name = spreadsheet_get_sheet_name (stuff->sp, x);
+ opts.sheet_name = CONST_CAST (char *,
+ spreadsheet_get_sheet_name (stuff->sp, x));
opts.read_names = TRUE;
opts.asw = -1;
else
{
char *ss = xzalloc (width + 1);
- strncpy (ss, value_str (val, width), width);
+ memcpy (ss, value_str (val, width), width);
printf ("%s ", ss);
free (ss);