compare-pointer.h File Reference

Comparison functions for generic (void) pointers. More...


Functions

int pointer_equal (void *location1, void *location2)
 Compare two pointers to determine if they are equal.
int pointer_compare (void *location1, void *location2)
 Compare two pointers.


Detailed Description

Comparison functions for generic (void) pointers.

To find the difference between two pointers, use pointer_compare.

To find if two pointers are equal, use pointer_equal.


Function Documentation

int pointer_compare ( void *  location1,
void *  location2 
)

Compare two pointers.

Parameters:
location1 The first pointer.
location2 The second pointer.
Returns:
A negative value if the first pointer is in a lower memory address than the second, a positive value if the first pointer is in a higher memory address than the second, zero if they point to the same location.

int pointer_equal ( void *  location1,
void *  location2 
)

Compare two pointers to determine if they are equal.

Parameters:
location1 The first pointer.
location2 The second pointer.
Returns:
Non-zero if the pointers are equal, zero if they are not equal.


Generated on Sun Sep 14 03:08:02 2008 for C Algorithms by  doxygen 1.5.5