new_Record(3)

NAME
new_Record - short description

LIBRARY
libpdb

SYNOPSIS
#include <pdb.h>
struct pdb *
new_Record(const ubyte flags, const ubyte category, const udword id, const uword len, const ubyte *data);
void
pdb_FreeRecord(struct pdb_record *rec);
struct pdb_resource *
new_Resource(const udword type, const uword id, const uword len, const ubyte *data);
void
pdb_FreeResource(struct pdb_resource *rsrc);

DESCRIPTION
new_Record allocates space for a new struct pdb_record and initializes it from the given variables. flags is the bitwise-or of zero or more of the PDB_REC_* flags from <pdb.h>. category is an index into the database's category table, if it has one. id is the record's ID. len is the length of the data pointed to by data. The record's data will be initialized from this. The data is copied.

new_Resource is similar to new_Record, but allocates a new struct pdb_resource.

pdb_FreeRecord frees a struct pdb_record allocated by new_Record.

pdb_FreeResource frees a struct pdb_resource allocated by new_Resource.

RETURN VALUE
new_Record and new_Resource return a pointer to the new struct pdb_record or struct pdb_resource if successful, or NULL in case of error.

SEE ALSO
libpdb(3).