pdb_CopyRecord(3)

pdb_CopyRecord3

Short description

Usage

#include <pdb.h>

struct pdb_record *

pdb_CopyRecord(const struct pdb *db, const struct pdb_record *rec);

struct pdb_resource *

pdb_CopyResource(const struct pdb *db, const struct pdb_resource *rsrc);

Library

libpdb

Overview

pdb_CopyRecord allocates a new struct pdb_record, copies to it the record pointed to by rec in database db, and returns a pointer to the newly-allocated struct pdb_record. This pointer must later be freed with pdb_FreeRecord(), unless it is added to another database using a function such as pdb_AppendRecord().

pdb_CopyResource allocates a new struct pdb_resource, copies to it the resource pointed to by rsrc in database db, and returns a pointer to the newly-allocated struct pdb_resource. This pointer must later be freed with pdb_FreeResource(), unless it is added to another database using a function such as pdb_AppendResource().

Return value

pdb_CopyRecord and pdb_CopyResource return a pointer to the newly-allocated struct pdb_record or struct pdb_resource if successful, or NULL otherwise.

Releases

Unchanged in 3 releases since Debian 3.0 (Woody).

  1. 3.0–4.0

Authors

Andrew Arensburger ⟨[email protected]⟩

From coldsync 3.0+pre3-3 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.