YAZ
5.34.0
|
Little toy-thing to read MARC records from a fixed array. More...
#include <yaz/wrbuf.h>
#include <yaz/marcdisp.h>
#include <yaz/odr.h>
#include <yaz/log.h>
#include "ztest.h"
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | NO_MARC_RECORDS 23 |
#define | PZ_CBEGIN "<pz:cluster xmlns:pz=\"http://www.indexdata.com/pazpar2/1.0\">\n" |
#define | PZ_CEND "</pz:cluster>\n" |
#define | PZ_BEGIN "<record xmlns=\"http://www.indexdata.com/pazpar2/1.0\">\n" |
#define | PZ_END "</record>\n" |
#define | PZ_METADATA(x, y) " <metadata type=\"" #x "\">" y "</metadata>\n" |
Functions | |
char * | dummy_marc_record (int num, ODR odr) |
static char * | dummy_pz2_record (int num, ODR odr) |
char * | dummy_xml_record (int num, ODR odr, const char *esn) |
char * | dummy_json_record (int num, ODR odr, const char *esn) |
Variables | |
char * | marc_records [NO_MARC_RECORDS] |
static char * | marc_record0 |
Little toy-thing to read MARC records from a fixed array.
Definition in file read-marc.c.
#define NO_MARC_RECORDS 23 |
Definition at line 34 of file read-marc.c.
#define PZ_BEGIN "<record xmlns=\"http://www.indexdata.com/pazpar2/1.0\">\n" |
Definition at line 1553 of file read-marc.c.
#define PZ_CBEGIN "<pz:cluster xmlns:pz=\"http://www.indexdata.com/pazpar2/1.0\">\n" |
Definition at line 1551 of file read-marc.c.
#define PZ_CEND "</pz:cluster>\n" |
Definition at line 1552 of file read-marc.c.
#define PZ_END "</record>\n" |
Definition at line 1554 of file read-marc.c.
Definition at line 1555 of file read-marc.c.
char* dummy_json_record | ( | int | num, |
ODR | odr, | ||
const char * | esn | ||
) |
Definition at line 1677 of file read-marc.c.
References dummy_marc_record(), odr_strdup(), wrbuf_alloc(), wrbuf_cstr(), wrbuf_destroy(), yaz_marc_create(), yaz_marc_decode_wrbuf(), yaz_marc_destroy(), YAZ_MARC_JSON, and yaz_marc_xml().
Referenced by ztest_fetch().
char* dummy_marc_record | ( | int | num, |
ODR | odr | ||
) |
Definition at line 1536 of file read-marc.c.
References marc_record0, marc_records, NO_MARC_RECORDS, and odr_strdup().
Referenced by dummy_json_record(), dummy_xml_record(), and ztest_fetch().
|
static |
Definition at line 1557 of file read-marc.c.
References odr_strdup(), PZ_BEGIN, PZ_CBEGIN, PZ_CEND, PZ_END, and PZ_METADATA.
Referenced by dummy_xml_record().
char* dummy_xml_record | ( | int | num, |
ODR | odr, | ||
const char * | esn | ||
) |
Definition at line 1619 of file read-marc.c.
References dummy_marc_record(), dummy_opac(), dummy_pz2_record(), odr_malloc(), odr_strdup(), wrbuf_alloc(), wrbuf_cstr(), wrbuf_destroy(), wrbuf_printf(), yaz_marc_create(), yaz_marc_decode_wrbuf(), yaz_marc_destroy(), YAZ_MARC_MARCXML, yaz_marc_xml(), and yaz_opac_decode_wrbuf().
Referenced by ztest_fetch().
|
static |
Definition at line 1509 of file read-marc.c.
Referenced by dummy_marc_record().
char* marc_records[NO_MARC_RECORDS] |
Definition at line 36 of file read-marc.c.
Referenced by dummy_marc_record().