Crossfire Server, Branch 1.12  R12190
Functions
links.c File Reference

Utility functions for links between objects. More...

#include <global.h>
Include dependency graph for links.c:

Go to the source code of this file.

Functions

void free_objectlink (objectlink *ol)
 Recursively frees all objectlinks.
void free_objectlinkpt (oblinkpt *obp)
 Recursively frees all linked list of objectlink pointers.
objectlink * get_objectlink (void)
 Allocates a new objectlink structure, initialises it, and returns a pointer to it.
oblinkpt * get_objectlinkpt (void)
 Allocates a new oblinkpt structure, initialises it, and returns a pointer to it.

Detailed Description

Utility functions for links between objects.

Definition in file links.c.


Function Documentation

void free_objectlink ( objectlink *  ol)

Recursively frees all objectlinks.

Parameters:
olobject link to free.

Definition at line 83 of file links.c.

References free_objectlink().

Referenced by add_button_link(), free_objectlink(), and free_objectlinkpt().

Here is the call graph for this function:

Here is the caller graph for this function:

void free_objectlinkpt ( oblinkpt *  obp)

Recursively frees all linked list of objectlink pointers.

Parameters:
obppointer to free.

Definition at line 95 of file links.c.

References free_objectlink(), and free_objectlinkpt().

Referenced by free_map(), and free_objectlinkpt().

Here is the call graph for this function:

Here is the caller graph for this function:

objectlink* get_objectlink ( void  )

Allocates a new objectlink structure, initialises it, and returns a pointer to it.

Note:
will call fatal() if memory allocation failure, thus never return NULL.
Returns:
new link object, cleared.

Definition at line 45 of file links.c.

References CALLOC, fatal(), and OUT_OF_MEMORY.

Referenced by add_button_link(), add_friendly_object(), add_to_racelist(), and get_racelist().

Here is the call graph for this function:

Here is the caller graph for this function:

oblinkpt* get_objectlinkpt ( void  )

Allocates a new oblinkpt structure, initialises it, and returns a pointer to it.

Note:
will call fatal() if memory allocation failure, thus never return NULL.
Returns:
new link pointer.

Definition at line 65 of file links.c.

References fatal(), and OUT_OF_MEMORY.

Referenced by add_button_link().

Here is the call graph for this function:

Here is the caller graph for this function: