MCPcopy Create free account
hub / github.com/OpenPrinting/cups / ippAddRange

Function ippAddRange

cups/ipp.c:617–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615 */
616
617ipp_attribute_t * /* O - New attribute */
618ippAddRange(ipp_t *ipp, /* I - IPP message */
619 ipp_tag_t group, /* I - IPP group */
620 const char *name, /* I - Name of attribute */
621 int lower, /* I - Lower value */
622 int upper) /* I - Upper value */
623{
624 ipp_attribute_t *attr; /* New attribute */
625
626
627 DEBUG_printf(("ippAddRange(ipp=%p, group=%02x(%s), name=\"%s\", lower=%d, upper=%d)", (void *)ipp, group, ippTagString(group), name, lower, upper));
628
629 /*
630 * Range check input...
631 */
632
633 if (!ipp || !name || group < IPP_TAG_ZERO ||
634 group == IPP_TAG_END || group >= IPP_TAG_UNSUPPORTED_VALUE)
635 return (NULL);
636
637 /*
638 * Create the attribute...
639 */
640
641 if ((attr = ipp_add_attr(ipp, name, group, IPP_TAG_RANGE, 1)) == NULL)
642 return (NULL);
643
644 attr->values[0].range.lower = lower;
645 attr->values[0].range.upper = upper;
646
647 return (attr);
648}
649
650
651/*

Callers 7

create_printerFunction · 0.85
load_legacy_attributesFunction · 0.85
load_ppd_attributesFunction · 0.85
cupsdCreateCommonDataFunction · 0.85
load_ppdFunction · 0.85
_cupsConvertOptionsFunction · 0.85
mainFunction · 0.85

Calls 2

ippTagStringFunction · 0.85
ipp_add_attrFunction · 0.85

Tested by

no test coverage detected