NAME
          irFreeResource - free previously reserved resource(s)

     SYNOPSIS
          #include <irapi.h>

          int irFreeResource (channel_id cid, ir_reserve_t
          *presources, int *failure);

     DESCRIPTION
          The irFreeResource function deallocates one or more
          resources, previously reserved with irReserveResource, on
          the channel identified by cid.  presources is an array of
          capabilities/implementation pairs terminated by the IRC_NULL
          capability.  Each capability/implementation pair in the
          array indicates a resource to be freed.  If implementation
          is set to IRD_INVALID for any capability, all implementa-
          tions of the indicated capability are freed.  Once freed,
          the resource is available for use by other channels.

          If presources is a NULL pointer, then all resources
          currently allocated by the cid are freed.

     EVENT
          No event results from the call to irFreeResource.

     RETURN VALUE
          IRR_OK is returned if irFreeResource is successful.

          IRR_FAIL is returned if an error occurs.

     ERROR
          irError is set as follows if an error occurs:

          IRER_INVALID if the cid is invalid

          IRER_RESOURCEBUSY if some resource in the resource list is
          currently in use failure is the index of the offending
          resource in presources.  All resources prior to the offend-
          ing element are freed.  All resources past the offending
          element, including the offending element, remain allocated.
          When presources is NULL, and some resource previously allo-
          cated is in use, failure is not set.  Also, no previously
          allocated resources are freed.

          irFreeResource ignores the request to free non-allocated
          resources, and ignores any invalid capability/implementation
          pairs in the list.

     SEE ALSO
          irReserveRes(3IRAPI) and IrRESOURCES(4IRAPI).

     VERSION
          This is version 8/31/00 of this man page.