bool ok = true;
if (reader != NULL)
{
-- reader->class->destroy (reader, reader->aux);
-- ok = taint_destroy (reader->taint);
-- caseproto_unref (reader->proto);
-- free (reader);
++ // reader->class->destroy (reader, reader->aux);
++ // ok = taint_destroy (reader->taint);
++ // caseproto_unref (reader->proto);
++ // free (reader);
}
return ok;
}
casereader_count_cases__ (const struct casereader *reader,
casenumber max_cases)
{
- struct casereader *clone;
- casenumber n_cases;
-
- clone = casereader_clone (reader);
- n_cases = casereader_advance (clone, max_cases);
- casereader_destroy (clone);
-
+ struct casereader *clone = casereader_clone (reader);
+ casenumber n_cases = casereader_advance (clone, max_cases);
+#if (__GNUC__ == 4 ) && (__GNUC_MINOR__ == 4)
- volatile int x = 1;
++ // volatile int x = 1;
+#endif
- casereader_destroy (clone);
++ // casereader_destroy (clone);
return n_cases;
}
int current_sheet;
xmlChar *current_sheet_name;
- xmlChar *target_sheet_name;
- int target_sheet_index;
+ int col_span;
+};
- struct ods_reader
++struct ods_reader /* */
+{
+ struct spreadsheet spreadsheet;
+ struct zip_reader *zreader;
+ int ref_cnt;
+ int target_sheet_index;
+ xmlChar *target_sheet_name;
+
+ struct state_data foo;
+ struct state_data rsd;
int start_row;
int start_col;
void
ods_destroy (struct spreadsheet *s)
{
++ printf ("%s:%d\n", __FILE__, __LINE__);
+#if 0
struct ods_reader *r = (struct ods_reader *) s;
if (--r->ref_cnt == 0)
static void
ods_file_casereader_destroy (struct casereader *reader UNUSED, void *r_)
{
++ printf ("%s:%d %p\n", __FILE__, __LINE__, r_);
+#if 0
struct ods_reader *r = r_;
if ( r == NULL)
return ;
CHAR_CAST (const char *, xmv->value) : CHAR_CAST (const char *, xmv->text);
-- free (data_in (ss_cstr (text), "UTF-8",
++ data_in (ss_cstr (text), "UTF-8",
fmt->type,
v,
var_get_width (var),
-- "UTF-8"));
++ "UTF-8");
}
}
}
zip_member_ref (content);
xtr = xmlReaderForIO ((xmlInputReadCallback) zip_member_read,
-- (xmlInputCloseCallback) zip_member_finish,
++ (xmlInputCloseCallback) NULL,
content, NULL, NULL,
report_errors ? 0 : (XML_PARSE_NOERROR | XML_PARSE_NOWARNING) );
ods_file_casereader_read (struct casereader *reader UNUSED, void *r_)
{
struct ccase *c = NULL;
-- xmlChar *val_string = NULL;
-- xmlChar *type = NULL;
struct ods_reader *r = r_;
if (!r->used_first_case)
{
++ printf ("%s:%d\n", __FILE__, __LINE__);
r->used_first_case = true;
return r->first_case;
}
}
- if ( ! reading_target_sheet (r)
- || r->state < STATE_TABLE
- || (r->stop_row != -1 && r->row > r->stop_row + 1)
+ if ( ! reading_target_sheet (r, &r->rsd)
+ || r->rsd.state < STATE_TABLE
+ || (r->stop_row != -1 && r->rsd.row > r->stop_row + 1)
)
{
++ printf ("%s:%d\n", __FILE__, __LINE__);
return NULL;
}
++ printf ("%s:%d\n", __FILE__, __LINE__);
c = case_create (r->proto);
case_set_missing (c);
- while (1 == xmlTextReaderRead (r->xtr))
++#if 1
++ xmlChar *val_string = NULL;
++ xmlChar *type = NULL;
++
+ while (1 == xmlTextReaderRead (r->rsd.xtr))
{
- process_node (r);
+ process_node (r, &r->rsd);
- if ( r->stop_row != -1 && r->row > r->stop_row + 1)
+ if ( r->stop_row != -1 && r->rsd.row > r->stop_row + 1)
break;
- if (r->state == STATE_CELL &&
- r->node_type == XML_READER_TYPE_ELEMENT)
+ if (r->rsd.state == STATE_CELL &&
+ r->rsd.node_type == XML_READER_TYPE_ELEMENT)
{
- type = xmlTextReaderGetAttribute (r->xtr, _xml ("office:value-type"));
- val_string = xmlTextReaderGetAttribute (r->xtr, _xml ("office:value"));
+ type = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("office:value-type"));
+ val_string = xmlTextReaderGetAttribute (r->rsd.xtr, _xml ("office:value"));
}
- if (r->state == STATE_CELL_CONTENT &&
- r->node_type == XML_READER_TYPE_TEXT)
+ if (r->rsd.state == STATE_CELL_CONTENT &&
+ r->rsd.node_type == XML_READER_TYPE_TEXT)
{
int col;
struct xml_value *xmv = xzalloc (sizeof *xmv);
convert_xml_to_value (c, var, xmv);
}
-- xmlFree (xmv->text);
-- xmlFree (xmv->value);
-- xmlFree (xmv->type);
-- free (xmv);
++ // xmlFree (xmv->text);
++ // xmlFree (xmv->value);
++ // xmlFree (xmv->type);
++ // free (xmv);
}
- if ( r->state <= STATE_TABLE)
+ if ( r->rsd.state <= STATE_TABLE)
break;
}
++#endif
return c;
}