+ return (errors);
+}
+
+
+/*
+ * 'print_changes()' - Print differences in the page header.
+ */
+
+static void
+print_changes(
+ cups_page_header2_t *header, /* I - Actual page header */
+ cups_page_header2_t *expected) /* I - Expected page header */
+{
+ int i; /* Looping var */
+
+
+ if (strcmp(header->MediaClass, expected->MediaClass))
+ printf(" MediaClass (%s), expected (%s)\n", header->MediaClass,
+ expected->MediaClass);
+
+ if (strcmp(header->MediaColor, expected->MediaColor))
+ printf(" MediaColor (%s), expected (%s)\n", header->MediaColor,
+ expected->MediaColor);
+
+ if (strcmp(header->MediaType, expected->MediaType))
+ printf(" MediaType (%s), expected (%s)\n", header->MediaType,
+ expected->MediaType);
+
+ if (strcmp(header->OutputType, expected->OutputType))
+ printf(" OutputType (%s), expected (%s)\n", header->OutputType,
+ expected->OutputType);
+
+ if (header->AdvanceDistance != expected->AdvanceDistance)
+ printf(" AdvanceDistance %d, expected %d\n", header->AdvanceDistance,
+ expected->AdvanceDistance);
+
+ if (header->AdvanceMedia != expected->AdvanceMedia)
+ printf(" AdvanceMedia %d, expected %d\n", header->AdvanceMedia,
+ expected->AdvanceMedia);
+
+ if (header->Collate != expected->Collate)
+ printf(" Collate %d, expected %d\n", header->Collate,
+ expected->Collate);
+
+ if (header->CutMedia != expected->CutMedia)
+ printf(" CutMedia %d, expected %d\n", header->CutMedia,
+ expected->CutMedia);
+
+ if (header->Duplex != expected->Duplex)
+ printf(" Duplex %d, expected %d\n", header->Duplex,
+ expected->Duplex);
+
+ if (header->HWResolution[0] != expected->HWResolution[0] ||
+ header->HWResolution[1] != expected->HWResolution[1])
+ printf(" HWResolution [%d %d], expected [%d %d]\n",
+ header->HWResolution[0], header->HWResolution[1],
+ expected->HWResolution[0], expected->HWResolution[1]);
+
+ if (memcmp(header->ImagingBoundingBox, expected->ImagingBoundingBox,
+ sizeof(header->ImagingBoundingBox)))
+ printf(" ImagingBoundingBox [%d %d %d %d], expected [%d %d %d %d]\n",
+ header->ImagingBoundingBox[0],
+ header->ImagingBoundingBox[1],
+ header->ImagingBoundingBox[2],
+ header->ImagingBoundingBox[3],
+ expected->ImagingBoundingBox[0],
+ expected->ImagingBoundingBox[1],
+ expected->ImagingBoundingBox[2],
+ expected->ImagingBoundingBox[3]);
+
+ if (header->InsertSheet != expected->InsertSheet)
+ printf(" InsertSheet %d, expected %d\n", header->InsertSheet,
+ expected->InsertSheet);
+
+ if (header->Jog != expected->Jog)
+ printf(" Jog %d, expected %d\n", header->Jog,
+ expected->Jog);
+
+ if (header->LeadingEdge != expected->LeadingEdge)
+ printf(" LeadingEdge %d, expected %d\n", header->LeadingEdge,
+ expected->LeadingEdge);
+
+ if (header->Margins[0] != expected->Margins[0] ||
+ header->Margins[1] != expected->Margins[1])
+ printf(" Margins [%d %d], expected [%d %d]\n",
+ header->Margins[0], header->Margins[1],
+ expected->Margins[0], expected->Margins[1]);
+
+ if (header->ManualFeed != expected->ManualFeed)
+ printf(" ManualFeed %d, expected %d\n", header->ManualFeed,
+ expected->ManualFeed);
+
+ if (header->MediaPosition != expected->MediaPosition)
+ printf(" MediaPosition %d, expected %d\n", header->MediaPosition,
+ expected->MediaPosition);
+
+ if (header->MediaWeight != expected->MediaWeight)
+ printf(" MediaWeight %d, expected %d\n", header->MediaWeight,
+ expected->MediaWeight);
+
+ if (header->MirrorPrint != expected->MirrorPrint)
+ printf(" MirrorPrint %d, expected %d\n", header->MirrorPrint,
+ expected->MirrorPrint);
+
+ if (header->NegativePrint != expected->NegativePrint)
+ printf(" NegativePrint %d, expected %d\n", header->NegativePrint,
+ expected->NegativePrint);
+
+ if (header->NumCopies != expected->NumCopies)
+ printf(" NumCopies %d, expected %d\n", header->NumCopies,
+ expected->NumCopies);
+
+ if (header->Orientation != expected->Orientation)
+ printf(" Orientation %d, expected %d\n", header->Orientation,
+ expected->Orientation);
+
+ if (header->OutputFaceUp != expected->OutputFaceUp)
+ printf(" OutputFaceUp %d, expected %d\n", header->OutputFaceUp,
+ expected->OutputFaceUp);
+
+ if (header->PageSize[0] != expected->PageSize[0] ||
+ header->PageSize[1] != expected->PageSize[1])
+ printf(" PageSize [%d %d], expected [%d %d]\n",
+ header->PageSize[0], header->PageSize[1],
+ expected->PageSize[0], expected->PageSize[1]);
+
+ if (header->Separations != expected->Separations)
+ printf(" Separations %d, expected %d\n", header->Separations,
+ expected->Separations);
+
+ if (header->TraySwitch != expected->TraySwitch)
+ printf(" TraySwitch %d, expected %d\n", header->TraySwitch,
+ expected->TraySwitch);
+
+ if (header->Tumble != expected->Tumble)
+ printf(" Tumble %d, expected %d\n", header->Tumble,
+ expected->Tumble);
+
+ if (header->cupsWidth != expected->cupsWidth)
+ printf(" cupsWidth %d, expected %d\n", header->cupsWidth,
+ expected->cupsWidth);
+
+ if (header->cupsHeight != expected->cupsHeight)
+ printf(" cupsHeight %d, expected %d\n", header->cupsHeight,
+ expected->cupsHeight);
+
+ if (header->cupsMediaType != expected->cupsMediaType)
+ printf(" cupsMediaType %d, expected %d\n", header->cupsMediaType,
+ expected->cupsMediaType);
+
+ if (header->cupsBitsPerColor != expected->cupsBitsPerColor)
+ printf(" cupsBitsPerColor %d, expected %d\n", header->cupsBitsPerColor,
+ expected->cupsBitsPerColor);
+
+ if (header->cupsBitsPerPixel != expected->cupsBitsPerPixel)
+ printf(" cupsBitsPerPixel %d, expected %d\n", header->cupsBitsPerPixel,
+ expected->cupsBitsPerPixel);
+
+ if (header->cupsBytesPerLine != expected->cupsBytesPerLine)
+ printf(" cupsBytesPerLine %d, expected %d\n", header->cupsBytesPerLine,
+ expected->cupsBytesPerLine);
+
+ if (header->cupsColorOrder != expected->cupsColorOrder)
+ printf(" cupsColorOrder %d, expected %d\n", header->cupsColorOrder,
+ expected->cupsColorOrder);
+
+ if (header->cupsColorSpace != expected->cupsColorSpace)
+ printf(" cupsColorSpace %d, expected %d\n", header->cupsColorSpace,
+ expected->cupsColorSpace);
+
+ if (header->cupsCompression != expected->cupsCompression)
+ printf(" cupsCompression %d, expected %d\n", header->cupsCompression,
+ expected->cupsCompression);
+
+ if (header->cupsRowCount != expected->cupsRowCount)
+ printf(" cupsRowCount %d, expected %d\n", header->cupsRowCount,
+ expected->cupsRowCount);
+
+ if (header->cupsRowFeed != expected->cupsRowFeed)
+ printf(" cupsRowFeed %d, expected %d\n", header->cupsRowFeed,
+ expected->cupsRowFeed);
+
+ if (header->cupsRowStep != expected->cupsRowStep)
+ printf(" cupsRowStep %d, expected %d\n", header->cupsRowStep,
+ expected->cupsRowStep);
+
+ if (header->cupsNumColors != expected->cupsNumColors)
+ printf(" cupsNumColors %d, expected %d\n", header->cupsNumColors,
+ expected->cupsNumColors);
+
+ if (header->cupsBorderlessScalingFactor !=
+ expected->cupsBorderlessScalingFactor)
+ printf(" cupsBorderlessScalingFactor %g, expected %g\n",
+ header->cupsBorderlessScalingFactor,
+ expected->cupsBorderlessScalingFactor);
+
+ if (header->cupsPageSize[0] != expected->cupsPageSize[0] ||
+ header->cupsPageSize[1] != expected->cupsPageSize[1])
+ printf(" cupsPageSize [%g %g], expected [%g %g]\n",
+ header->cupsPageSize[0], header->cupsPageSize[1],
+ expected->cupsPageSize[0], expected->cupsPageSize[1]);
+
+ if (header->cupsImagingBBox[0] != expected->cupsImagingBBox[0] ||
+ header->cupsImagingBBox[1] != expected->cupsImagingBBox[1] ||
+ header->cupsImagingBBox[2] != expected->cupsImagingBBox[2] ||
+ header->cupsImagingBBox[3] != expected->cupsImagingBBox[3])
+ printf(" cupsImagingBBox [%g %g %g %g], expected [%g %g %g %g]\n",
+ header->cupsImagingBBox[0], header->cupsImagingBBox[1],
+ header->cupsImagingBBox[2], header->cupsImagingBBox[3],
+ expected->cupsImagingBBox[0], expected->cupsImagingBBox[1],
+ expected->cupsImagingBBox[2], expected->cupsImagingBBox[3]);
+
+ for (i = 0; i < 16; i ++)
+ if (header->cupsInteger[i] != expected->cupsInteger[i])
+ printf(" cupsInteger%d %d, expected %d\n", i, header->cupsInteger[i],
+ expected->cupsInteger[i]);
+
+ for (i = 0; i < 16; i ++)
+ if (header->cupsReal[i] != expected->cupsReal[i])
+ printf(" cupsReal%d %g, expected %g\n", i, header->cupsReal[i],
+ expected->cupsReal[i]);
+
+ for (i = 0; i < 16; i ++)
+ if (strcmp(header->cupsString[i], expected->cupsString[i]))
+ printf(" cupsString%d (%s), expected (%s)\n", i,
+ header->cupsString[i], expected->cupsString[i]);
+
+ if (strcmp(header->cupsMarkerType, expected->cupsMarkerType))
+ printf(" cupsMarkerType (%s), expected (%s)\n", header->cupsMarkerType,
+ expected->cupsMarkerType);
+
+ if (strcmp(header->cupsRenderingIntent, expected->cupsRenderingIntent))
+ printf(" cupsRenderingIntent (%s), expected (%s)\n",
+ header->cupsRenderingIntent,
+ expected->cupsRenderingIntent);
+
+ if (strcmp(header->cupsPageSizeName, expected->cupsPageSizeName))
+ printf(" cupsPageSizeName (%s), expected (%s)\n",
+ header->cupsPageSizeName,
+ expected->cupsPageSizeName);