YAZ  5.23.1
Functions
odr_mem.c File Reference

Implements ODR memory management. More...

#include <limits.h>
#include <stdlib.h>
#include "odr-priv.h"
#include <yaz/xmalloc.h>

Go to the source code of this file.

Functions

NMEM odr_extract_mem (ODR o)
 
void * odr_malloc (ODR o, size_t size)
 
char * odr_strdup (ODR o, const char *str)
 
char * odr_strdup_null (ODR o, const char *str)
 
char * odr_strdupn (ODR o, const char *str, size_t n)
 
Odr_intodr_intdup (ODR o, Odr_int v)
 
Odr_boolodr_booldup (ODR o, Odr_bool v)
 
size_t odr_total (ODR o)
 
Odr_octodr_create_Odr_oct (ODR o, const char *buf, int sz)
 
int odr_grow_block (ODR b, int min_bytes)
 
int odr_write (ODR o, const char *buf, int bytes)
 
int odr_seek (ODR o, int whence, int offset)
 
Odr_int odr_strtol (const char *nptr, char **endptr, int base)
 
Odr_int odr_atoi (const char *s)
 

Detailed Description

Implements ODR memory management.

Definition in file odr_mem.c.

Function Documentation

Odr_int odr_atoi ( const char *  s)
Odr_bool* odr_booldup ( ODR  o,
Odr_bool  v 
)
Odr_oct* odr_create_Odr_oct ( ODR  o,
const char *  buf,
int  sz 
)
NMEM odr_extract_mem ( ODR  o)
int odr_grow_block ( ODR  b,
int  min_bytes 
)

Definition at line 77 of file odr_mem.c.

References Odr_private::buf, Odr_private::can_grow, odr::op, Odr_private::size, xmalloc, and xrealloc.

Referenced by odr_seek(), and odr_write().

Odr_int* odr_intdup ( ODR  o,
Odr_int  v 
)
void* odr_malloc ( ODR  o,
size_t  size 
)

Definition at line 31 of file odr_mem.c.

References odr::mem, and nmem_malloc().

Referenced by addterms(), append_extra_arg(), assoc_init_reset(), bend_init(), ber_any(), build_facet_response(), create_admin_package(), create_update_package(), create_xmlupdate_package(), decode_headers_content(), diagrec(), dummy_opac(), dummy_xml_record(), encode_ill_request(), encode_item_order(), facet_field_create(), facet_list_create(), facet_term_create_cstr(), generate(), get_attributeList(), get_zoom_facet_field(), handle_srw_response(), ill_Answer(), ill_Cancel(), ill_Cancel_Reply(), ill_Checked_In(), ill_Conditional_Reply(), ill_Damaged(), ill_Expired(), ill_Forward_Notification(), ill_get_APDU(), ill_get_bool(), ill_get_Cancel(), ill_get_Client_Id(), ill_get_Delivery_Address(), ill_get_ILL_String_x(), ill_get_ILLRequest(), ill_get_Item_Id(), ill_get_ItemRequest(), ill_get_Name_Of_Person_Or_Institution(), ill_get_Person_Or_Insitution_Symbol(), ill_get_Postal_Address(), ill_get_Requester_Optional_Messages_Type(), ill_get_Search_Type(), ill_get_Service_Date_original(), ill_get_Service_Date_this(), ill_get_Service_Date_Time(), ill_get_System_Address(), ill_get_System_Id(), ill_get_Transaction_Id(), ill_Lost(), ill_Message(), ill_Overdue(), ill_Recall(), ill_Received(), ill_Renew(), ill_Renew_Answer(), ill_Request(), ill_Returned(), ill_Shipped(), ill_Status_Or_Error_Report(), ill_Status_Query(), my_init(), odr_any(), odr_bitstring(), odr_bool(), odr_constructed_begin(), odr_create_Odr_oct(), odr_cstring(), odr_enum(), odr_get_element_path(), odr_iconv_string(), odr_initmember(), odr_integer(), odr_octetstring(), odr_oid(), odr_prepend(), odr_sequence_begin(), odr_sequence_x(), odr_set_begin(), p_query_parse_attr(), p_query_rpn_mk(), pack_records(), parse_facet(), process_deleteRequest(), process_initRequest(), process_presentRequest(), process_scanRequest(), process_sortRequest(), process_z_response(), read_file(), read_grs1(), record_cache_add(), replace_node(), response_searchRequest(), retrieve_fetch(), rpn_complex(), rpn_proximity(), rpn_simple(), rpn_structure(), rpn_term_attributes(), send_Z3950_sort(), srw_bend_explain_default(), srw_bend_fetch(), srw_bend_init(), srw_bend_scan(), srw_bend_search(), yaz_add_name_value_int(), yaz_add_srw_diagnostic_uri(), yaz_array_to_uri(), yaz_check_location(), yaz_cookies_request(), yaz_decode_http_request(), yaz_decode_http_response(), yaz_encode_sru_dbpath_odr(), yaz_mk_sru_surrogate(), yaz_oi_set_facetlist(), yaz_oi_update(), yaz_pqf_parse_facet_list(), yaz_query_charset_convert_buf(), yaz_set_proposal_charneg(), yaz_set_response_charneg(), yaz_solr_decode_result_docs(), yaz_solr_decode_scan_result(), yaz_solr_encode_request(), yaz_sort_spec(), yaz_sru_decode(), yaz_sru_facet_response(), yaz_sru_get_encode(), yaz_sru_soap_encode(), yaz_srw_codec(), yaz_srw_decode_diagnostics(), yaz_srw_get_core_ver(), yaz_srw_get_extra_record(), yaz_srw_get_pdu(), yaz_srw_get_record_versions(), yaz_srw_get_records(), yaz_srw_record(), yaz_srw_records(), yaz_srw_terms(), yaz_srw_versions(), yaz_ucp_codec(), yaz_uri_to_array(), yaz_xml2query_(), yaz_xml2query_apt(), yaz_xml2query_attribute_element(), yaz_xml2query_operator(), yaz_xml2query_rpn(), yaz_xml2query_rpnstructure(), yaz_xml2query_term(), Z3950_send_present(), Z3950_send_search(), z_ext_record2(), z_ext_record_oid_any(), z_GDU(), z_get_CharSetandLanguageNegotiation(), z_get_HTTP_Request(), z_get_HTTP_Request_uri(), z_get_HTTP_Response_server(), z_get_OriginProposal(), z_get_OriginProposal_0(), z_get_TargetResponse(), z_HTTP_header_add(), z_HTTP_header_add_basic_auth(), z_HTTP_header_add_content_type(), z_HTTP_header_set(), z_soap_codec_enc_xsl(), z_soap_error(), z_Term_create(), zget_AccessControlRequest(), zget_AccessControlResponse(), zget_APDU(), zget_Close(), zget_DefaultDiagFormat(), zget_DeleteResultSetRequest(), zget_DeleteResultSetResponse(), zget_DiagRec(), zget_DiagRecs(), zget_DuplicateDetectionRequest(), zget_DuplicateDetectionResponse(), zget_ExtendedServicesRequest(), zget_ExtendedServicesResponse(), zget_init_diagnostics(), zget_init_diagnostics_octet(), zget_InitRequest(), zget_InitResponse(), zget_PresentRequest(), zget_PresentResponse(), zget_ResourceControlRequest(), zget_ResourceControlResponse(), zget_ResourceReportRequest(), zget_ResourceReportResponse(), zget_ScanRequest(), zget_ScanResponse(), zget_SearchRequest(), zget_SearchResponse(), zget_Segment(), zget_SortRequest(), zget_SortResponse(), zget_surrogateDiagRec(), zget_TriggerResourceControlRequest(), ZOOM_connection_Z3950_send_init(), ZOOM_handle_facet_list(), ZOOM_handle_sru(), ZOOM_memcached_hitcount(), ZOOM_package_send(), ZOOM_srw_get_pdu(), ztest_esrequest(), and ztest_fetch().

int odr_seek ( ODR  o,
int  whence,
int  offset 
)
char* odr_strdup ( ODR  o,
const char *  str 
)
char* odr_strdup_null ( ODR  o,
const char *  str 
)
char* odr_strdupn ( ODR  o,
const char *  str,
size_t  n 
)
Odr_int odr_strtol ( const char *  nptr,
char **  endptr,
int  base 
)

Definition at line 132 of file odr_mem.c.

Referenced by odr_atoi().

size_t odr_total ( ODR  o)

Definition at line 61 of file odr_mem.c.

References odr::mem, and nmem_total().

Referenced by pack_records().

int odr_write ( ODR  o,
const char *  buf,
int  bytes 
)