|
YAZ 5.35.1
|
Implements reading of MARC in line format. More...
#include <assert.h>#include <stdio.h>#include <string.h>#include <yaz/marcdisp.h>#include <yaz/wrbuf.h>#include <yaz/yaz-util.h>Go to the source code of this file.
Functions | |
| static int | yaz_gets (int(*getbyte)(void *client_data), void(*ungetbyte)(int b, void *client_data), void *client_data, WRBUF w) |
| static int | yaz_marc_line_gets (int(*getbyte)(void *client_data), void(*ungetbyte)(int b, void *client_data), void *client_data, WRBUF w) |
| int | yaz_marc_read_line (yaz_marc_t mt, int(*getbyte)(void *client_data), void(*ungetbyte)(int b, void *client_data), void *client_data) |
| read MARC lineformat from stream | |
Implements reading of MARC in line format.
Definition in file marc_read_line.c.
|
static |
Definition at line 27 of file marc_read_line.c.
References wrbuf_putc.
Referenced by yaz_marc_line_gets().
|
static |
Definition at line 60 of file marc_read_line.c.
References wrbuf_buf, wrbuf_cut_right(), wrbuf_len, wrbuf_puts(), wrbuf_rewind(), and yaz_gets().
Referenced by yaz_marc_read_line().
| int yaz_marc_read_line | ( | yaz_marc_t | mt, |
| int(*)(void *client_data) | getbyte, | ||
| void(*)(int b, void *client_data) | ungetbyte, | ||
| void * | client_data | ||
| ) |
read MARC lineformat from stream
| mt | handle |
| getbyte | get one byte handler |
| ungetbyte | unget one byte handler |
| client_data | opaque data for handers |
| -1 | ERROR |
| >0 | OK (length) |
Parses MARC line record from stream Returns > 0 for OK (same as length), -1=ERROR
Definition at line 95 of file marc_read_line.c.
References atoi_n_check(), wrbuf_alloc(), wrbuf_cstr(), wrbuf_destroy(), yaz_marc_add_controlfield(), yaz_marc_add_datafield(), yaz_marc_add_subfield(), yaz_marc_cprintf(), yaz_marc_line_gets(), yaz_marc_reset(), and yaz_marc_set_leader().