+ struct marc_info *p = xmalloc(sizeof(*p));
+ strcpy(p->type, "");
+ return p;
+}
+
+static void config_marc(void *clientData, Res res, const char *args)
+{
+ struct marc_info *p = (struct marc_info*) clientData;
+ if (strlen(args) < sizeof(p->type))
+ strcpy(p->type, args);
+}
+
+static void destroy_marc(void *clientData)
+{
+ struct marc_info *p = (struct marc_info*) clientData;
+ xfree (p);
+}
+
+
+static int extract_marc(void *clientData, struct recExtractCtrl *ctrl)
+{
+ return zebra_grs_extract(clientData, ctrl, grs_read_marc);
+}
+
+static int retrieve_marc(void *clientData, struct recRetrieveCtrl *ctrl)
+{
+ return zebra_grs_retrieve(clientData, ctrl, grs_read_marc);
+}
+
+static struct recType marc_type = {
+ 0,
+ "grs.marc",
+ init_marc,
+ config_marc,
+ destroy_marc,
+ extract_marc,
+ retrieve_marc,
+};
+
+static int extract_marcxml(void *clientData, struct recExtractCtrl *ctrl)
+{
+ return zebra_grs_extract(clientData, ctrl, grs_read_marcxml);