diff options
Diffstat (limited to 'cups/testipp.c')
-rw-r--r-- | cups/testipp.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/cups/testipp.c b/cups/testipp.c index aa119ace9..972c6474d 100644 --- a/cups/testipp.c +++ b/cups/testipp.c @@ -3,7 +3,7 @@ * * IPP test program for the Common UNIX Printing System (CUPS). * - * Copyright 2007 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2005 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -488,7 +488,7 @@ print_attributes(ipp_t *ipp, /* I - IPP request */ for (group = IPP_TAG_ZERO, attr = ipp->attrs; attr; attr = attr->next) { - if ((attr->group_tag == IPP_TAG_ZERO && indent <= 8) || !attr->name) + if (!attr->name && indent == 4) { group = IPP_TAG_ZERO; putchar('\n'); @@ -499,17 +499,10 @@ print_attributes(ipp_t *ipp, /* I - IPP request */ { group = attr->group_tag; - putchar('\n'); - for (i = 4; i < indent; i ++) - putchar(' '); - - printf("%s:\n\n", tags[group]); + printf("\n%*s%s:\n\n", indent - 4, "", tags[group]); } - for (i = 0; i < indent; i ++) - putchar(' '); - - printf("%s (", attr->name); + printf("%*s%s (", indent, "", attr->name ? attr->name : "(null)"); if (attr->num_values > 1) printf("1setOf "); printf("%s):", tags[attr->value_tag]); |