ippSetInteger(ipp_t           *ipp,	/* I  - IPP message */
              ipp_attribute_t **attr,	/* IO - IPP attribute */
              int             element,	/* I  - Value number (0-based) */
              int             intvalue)	/* I  - Integer/enum value */
{
  _ipp_value_t	*value;			/* Current value */


 /*
  * Range check input...
  */

  if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_INTEGER && (*attr)->value_tag != IPP_TAG_ENUM && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values)
    return (0);

 /*
  * Set the value and return...
  */

  if ((value = ipp_set_value(ipp, attr, element)) != NULL)
  {
    if ((*attr)->value_tag != IPP_TAG_ENUM)
      (*attr)->value_tag = IPP_TAG_INTEGER;

    value->integer = intvalue;
  }

  return (value != NULL);
}
ippSetInteger(ipp_t           *ipp,	 
              ipp_attribute_t **attr,	 
              int             element,	 
              int             intvalue)	 
{
  _ipp_value_t	*value;			 


  

  if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_INTEGER && (*attr)->value_tag != IPP_TAG_ENUM && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values)
    return (0);

  

  if ((value = ipp_set_value(ipp, attr, element)) != NULL)
  {
    if ((*attr)->value_tag != IPP_TAG_ENUM)
      (*attr)->value_tag = IPP_TAG_INTEGER;

    value->integer = intvalue;
  }

  return (value != NULL);
}