#include "spreadsheet-reader.h"
-#if !GNM_SUPPORT
+#if !GNM_READ_SUPPORT
struct casereader *
gnumeric_open_reader (const struct spreadsheet_read_options *opts, struct dictionary **dict)
struct gnumeric_reader
{
struct spreadsheet spreadsheet;
- int ref_cnt;
struct state_data rsd;
struct state_data msd;
void
-gnumeric_destroy (struct spreadsheet *s)
+gnumeric_unref (struct spreadsheet *s)
{
struct gnumeric_reader *r = (struct gnumeric_reader *) s;
- if (0 == --r->ref_cnt)
+ if (0 == --s->ref_cnt)
{
int i;
if (r->proto)
caseproto_unref (r->proto);
- gnumeric_destroy (&r->spreadsheet);
+ gnumeric_unref (&r->spreadsheet);
}
sd->row = sd->col = -1;
sd->state = STATE_PRE_INIT;
sd->xtr = xtr;
- r->ref_cnt++;
+ r->spreadsheet.ref_cnt++;
+
/* Advance to the start of the workbook.
This gives us some confidence that we are actually dealing with a gnumeric
gnumeric_make_reader (struct spreadsheet *spreadsheet,
const struct spreadsheet_read_options *opts)
{
+ int type = 0;
int x = 0;
struct gnumeric_reader *r = NULL;
unsigned long int vstart = 0;
n_cases --;
}
- int type = 0;
+
/* Read in the first row of cells,
including the headers if read_names was set */
while (
}
-#endif /* GNM_SUPPORT */
+#endif /* GNM_READ_SUPPORT */