struct casewriter *exclude; /* Writer that gets filtered cases, or NULL. */
};
-static struct casereader_class casereader_filter_class;
+static const struct casereader_class casereader_filter_class;
/* Creates and returns a casereader whose content is a filtered
version of the data in SUBREADER. Only the cases for which
}
/* Filtering casereader class. */
-static struct casereader_class casereader_filter_class =
+static const struct casereader_class casereader_filter_class =
{
casereader_filter_read,
casereader_filter_destroy,
size_t value_cnt, casenumber case_cnt,
const struct casereader_class *, void *);
-void *casereader_dynamic_cast (struct casereader *, struct casereader_class *);
+void *casereader_dynamic_cast (struct casereader *, const struct casereader_class *);
\f
/* Casereader class for random-access data sources. */
struct casereader_random_class
void *aux;
};
-static struct casereader_class casereader_translator_class;
+static const struct casereader_class casereader_translator_class;
/* Creates and returns a new casereader whose cases are produced
by reading from SUBREADER and passing through TRANSLATE, which
}
/* Casereader class for translating casereader. */
-static struct casereader_class casereader_translator_class =
+static const struct casereader_class casereader_translator_class =
{
casereader_translator_read,
casereader_translator_destroy,
casereader to be replaced by a shim caseader). */
void *
casereader_dynamic_cast (struct casereader *reader,
- struct casereader_class *class)
+ const struct casereader_class *class)
{
return reader->class == class ? reader->aux : NULL;
}
void *aux;
};
-static struct casereader_class random_reader_casereader_class;
+static const struct casereader_class random_reader_casereader_class;
/* Creates and returns a new random_reader with the given SHARED
data and OFFSET. Inserts the new random reader into the
}
/* Casereader class for random reader. */
-static struct casereader_class random_reader_casereader_class =
+static const struct casereader_class random_reader_casereader_class =
{
random_reader_read,
random_reader_destroy,
struct casereader *subreader; /* Subordinate casereader. */
};
-static struct casereader_random_class shim_class;
+static const struct casereader_random_class shim_class;
/* Interposes a buffering shim atop READER. */
static void
}
/* Class for the buffered reader. */
-static struct casereader_random_class shim_class =
+static const struct casereader_random_class shim_class =
{
shim_read,
shim_destroy,
void *aux;
};
-static struct casewriter_class casewriter_translator_class;
+static const struct casewriter_class casewriter_translator_class;
/* Creates and returns a new casewriter whose cases are passed
through TRANSLATE, which must create case OUTPUT, with
return reader;
}
-static struct casewriter_class casewriter_translator_class =
+static const struct casewriter_class casewriter_translator_class =
{
casewriter_translator_write,
casewriter_translator_destroy,
static bool gnm_file_casereader_read (struct casereader *, void *,
struct ccase *);
-static struct casereader_class gnm_file_casereader_class =
+static const struct casereader_class gnm_file_casereader_class =
{
gnm_file_casereader_read,
gnm_file_casereader_destroy,
void *aux;
};
-static struct casereader_class lazy_casereader_class;
+static const struct casereader_class lazy_casereader_class;
/* Creates and returns a new lazy casereader that will
instantiate its underlying casereader, if necessary, by
return casereader_peek (reader, idx, c);
}
-static struct casereader_class lazy_casereader_class =
+static const struct casereader_class lazy_casereader_class =
{
lazy_casereader_read,
lazy_casereader_do_destroy,
bool ok; /* Set false on I/O error. */
};
-static struct casereader_class por_file_casereader_class;
+static const struct casereader_class por_file_casereader_class;
static void
error (struct pfm_reader *r, const char *msg,...)
return true;
}
-static struct casereader_class por_file_casereader_class =
+static const struct casereader_class por_file_casereader_class =
{
por_file_casereader_read,
por_file_casereader_destroy,
int fv; /* Starting case index. */
};
-static struct casewriter_class por_file_casewriter_class;
+static const struct casewriter_class por_file_casewriter_class;
static bool close_writer (struct pfm_writer *);
static void buf_write (struct pfm_writer *, const void *, size_t);
return;
}
\f
-static struct casewriter_class por_file_casewriter_class =
+static const struct casewriter_class por_file_casewriter_class =
{
por_file_casewriter_write,
por_file_casewriter_destroy,
return proc_commit (ds) && ok;
}
-static struct casereader_class proc_casereader_class;
+static const struct casereader_class proc_casereader_class;
/* Opens dataset DS for reading cases with proc_read.
proc_commit must be called when done. */
}
/* Casereader class for procedure execution. */
-static struct casereader_class proc_casereader_class =
+static const struct casereader_class proc_casereader_class =
{
proc_casereader_read,
proc_casereader_destroy,
struct casewriter *subwriter; /* Data output. */
};
-static struct casewriter_class scratch_writer_casewriter_class;
+static const struct casewriter_class scratch_writer_casewriter_class;
/* Opens FH, which must have referent type FH_REF_SCRATCH, and
returns a scratch_writer for it, or a null pointer on
free (writer);
}
-static struct casewriter_class scratch_writer_casewriter_class =
+static const struct casewriter_class scratch_writer_casewriter_class =
{
scratch_writer_casewriter_write,
scratch_writer_casewriter_destroy,
size_t opcode_idx; /* Next opcode to interpret, 8 if none left. */
};
-static struct casereader_class sys_file_casereader_class;
+static const struct casereader_class sys_file_casereader_class;
static bool close_reader (struct sfm_reader *);
}
}
\f
-static struct casereader_class sys_file_casereader_class =
+static const struct casereader_class sys_file_casereader_class =
{
sys_file_casereader_read,
sys_file_casereader_destroy,
for long string variables. */
};
-static struct casewriter_class sys_file_casewriter_class;
+static const struct casewriter_class sys_file_casewriter_class;
static void write_header (struct sfm_writer *, const struct dictionary *);
static void write_variable (struct sfm_writer *, const struct variable *);
}
/* System file writer casewriter class. */
-static struct casewriter_class sys_file_casewriter_class =
+static const struct casewriter_class sys_file_casewriter_class =
{
sys_file_casewriter_write,
sys_file_casewriter_destroy,