}
-/* Test if the given c_ptr is associated or not. This function is
- called if the user only supplied one c_ptr parameter to the
- c_associated function. The second argument is optional, and the
- Fortran compiler will resolve the function to this version if only
- one arg was given. Associated here simply means whether or not the
- c_ptr is NULL or not. */
-
-GFC_LOGICAL_4
-ISO_C_BINDING_PREFIX (c_associated_1) (void *c_ptr_in_1)
-{
- if (c_ptr_in_1 != NULL)
- return 1;
- else
- return 0;
-}
-
-
-/* Test if the two c_ptr arguments are associated with one another.
- This version of the c_associated function is called if the user
- supplied two c_ptr args in the Fortran source. According to the
- draft standard (J3/04-007), if c_ptr_in_1 is NULL, the two pointers
- are NOT associated. If c_ptr_in_1 is non-NULL and it is not equal
- to c_ptr_in_2, then either c_ptr_in_2 is NULL or is associated with
- another address; either way, the two pointers are not associated
- with each other then. */
-
-GFC_LOGICAL_4
-ISO_C_BINDING_PREFIX (c_associated_2) (void *c_ptr_in_1, void *c_ptr_in_2)
-{
- /* Since we have the second arg, if it doesn't equal the first,
- return false; true otherwise. However, if the first one is null,
- then return false; otherwise compare the two ptrs for equality. */
- if (c_ptr_in_1 == NULL)
- return 0;
- else if (c_ptr_in_1 != c_ptr_in_2)
- return 0;
- else
- return 1;
-}