|
|
#include <ldfcn.h>LDFILE * allocldptr ()
int freeldptr (ldptr) LDFILE *ldptr;
int vldldptr (ldptr) LDFILE *ldptr;
freeldptr- free allocated ldptr structure from linked list
vldldptr- verify ldptr structure on linked list
The allocldptr routine allocates an LDFILE structure in memory and attaches it to the end of a linked list of such structures. allocldptr returns a pointer to the newly allocated LDFILE structure.
freeldptr takes an instance of the LDFILE structure pointed to by ldptr and deletes it from the linked list.
vldldptr determines if the LDFILE structure pointed to by ldptr is in the linked list and returns SUCCESS if the structure is in the linked list.
freeldptr and vldldptr both return SUCCESS on success; otherwise, they return FAILURE.