#include <cups/ipp.h>
#include <stdio.h>
void print_ipp_attr(ipp_attribute_t* attr) {
char buf[16];
ippAttributeString(attr, buf, 16);
printf("%s\n", buf);
}
int main() {
int numbers[6] = {1, 2, 3, 4, 5, 6};
ipp_t* ipp = ippNew();
ipp_attribute_t* attr = ippAddIntegers(ipp, IPP_TAG_JOB, IPP_TAG_ENUM, "numbers", 6, numbers);
print_ipp_attr(attr); // prints "1,2,3,4,5,6"
ippDeleteValues(ipp, &attr, 5, 1);
print_ipp_attr(attr); // prints "1,2,3,4,5,6", expected "1,2,3,4,5"
ippDelete(ipp);
return 0;
}