YAZ  5.34.0
Functions
marc_read_iso2709.c File Reference

Implements reading of MARC as ISO2709. More...

#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

int yaz_marc_read_iso2709 (yaz_marc_t mt, const char *buf, int bsize)
 read ISO2709/MARC record from buffer More...
 

Detailed Description

Implements reading of MARC as ISO2709.

Definition in file marc_read_iso2709.c.

Function Documentation

◆ yaz_marc_read_iso2709()

int yaz_marc_read_iso2709 ( yaz_marc_t  mt,
const char *  buf,
int  bsize 
)

read ISO2709/MARC record from buffer

Parameters
mthandle
bufISO2709 buffer of size bsize
bsizesize of buffer (-1 for unlimited size)

Parses ISO2709 record from supplied buffer

Return values
-1ERROR
>0OK (length)

Definition at line 25 of file marc_read_iso2709.c.

References atoi_n(), atoi_n_check(), ISO2709_FS, ISO2709_IDFS, ISO2709_RS, wrbuf_alloc(), wrbuf_cstr(), wrbuf_destroy(), wrbuf_puts(), wrbuf_write_escaped(), yaz_isdigit, yaz_marc_add_controlfield(), yaz_marc_add_datafield(), yaz_marc_add_subfield(), yaz_marc_cprintf(), yaz_marc_get_debug(), yaz_marc_reset(), yaz_marc_set_leader(), and yaz_marc_sizeof_char().

Referenced by convert_marc(), and yaz_marc_decode_wrbuf().