diff --git a/cupsfilters/ghostscript.c b/cupsfilters/ghostscript.c index 9e8fa8fa4..72e1c2f12 100644 --- a/cupsfilters/ghostscript.c +++ b/cupsfilters/ghostscript.c @@ -207,22 +207,22 @@ header_to_gs_args(gs_page_header *h, } if (h->AdvanceDistance) { - snprintf(tmpstr, sizeof(tmpstr), "-dAdvanceDistance=%u", - (unsigned)(h->AdvanceDistance)); + snprintf(tmpstr, sizeof(tmpstr), "-dAdvanceDistance=%d", + (int)(h->AdvanceDistance)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->AdvanceMedia) { - snprintf(tmpstr, sizeof(tmpstr), "-dAdvanceMedia=%u", - (unsigned)(h->AdvanceMedia)); + snprintf(tmpstr, sizeof(tmpstr), "-dAdvanceMedia=%d", + (int)(h->AdvanceMedia)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->Collate) cupsArrayAdd(gs_args, strdup("-dCollate")); if (h->CutMedia) { - snprintf(tmpstr, sizeof(tmpstr), "-dCutMedia=%u", - (unsigned)(h->CutMedia)); + snprintf(tmpstr, sizeof(tmpstr), "-dCutMedia=%d", + (int)(h->CutMedia)); cupsArrayAdd(gs_args, strdup(tmpstr)); } } @@ -254,14 +254,14 @@ header_to_gs_args(gs_page_header *h, cupsArrayAdd(gs_args, strdup("-dInsertSheet")); if (h->Jog) { - snprintf(tmpstr, sizeof(tmpstr), "-dJog=%u", - (unsigned)(h->Jog)); + snprintf(tmpstr, sizeof(tmpstr), "-dJog=%d", + (int)(h->Jog)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->LeadingEdge) { - snprintf(tmpstr, sizeof(tmpstr), "-dLeadingEdge=%u", - (unsigned)(h->LeadingEdge)); + snprintf(tmpstr, sizeof(tmpstr), "-dLeadingEdge=%d", + (int)(h->LeadingEdge)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->ManualFeed) @@ -309,8 +309,8 @@ header_to_gs_args(gs_page_header *h, } else mediapos = h->MediaPosition; - snprintf(tmpstr, sizeof(tmpstr), "-dMediaPosition=%u", - (unsigned)(mediapos)); + snprintf(tmpstr, sizeof(tmpstr), "-dMediaPosition=%d", + (int)(mediapos)); cupsArrayAdd(gs_args, strdup(tmpstr)); } } @@ -320,8 +320,8 @@ header_to_gs_args(gs_page_header *h, { if (h->MediaWeight) { - snprintf(tmpstr, sizeof(tmpstr), "-dMediaWeight=%u", - (unsigned)(h->MediaWeight)); + snprintf(tmpstr, sizeof(tmpstr), "-dMediaWeight=%d", + (int)(h->MediaWeight)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->MirrorPrint) @@ -330,14 +330,14 @@ header_to_gs_args(gs_page_header *h, cupsArrayAdd(gs_args, strdup("-dNegativePrint")); if (h->NumCopies != 1) { - snprintf(tmpstr, sizeof(tmpstr), "-dNumCopies=%u", - (unsigned)(h->NumCopies)); + snprintf(tmpstr, sizeof(tmpstr), "-dNumCopies=%d", + (int)(h->NumCopies)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->Orientation) { - snprintf(tmpstr, sizeof(tmpstr), "-dOrientation=%u", - (unsigned)(h->Orientation)); + snprintf(tmpstr, sizeof(tmpstr), "-dOrientation=%d", + (int)(h->Orientation)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->OutputFaceUp) @@ -376,8 +376,8 @@ header_to_gs_args(gs_page_header *h, { if (h->cupsMediaType) { - snprintf(tmpstr, sizeof(tmpstr), "-dcupsMediaType=%u", - (unsigned)(h->cupsMediaType)); + snprintf(tmpstr, sizeof(tmpstr), "-dcupsMediaType=%d", + (int)(h->cupsMediaType)); cupsArrayAdd(gs_args, strdup(tmpstr)); } snprintf(tmpstr, sizeof(tmpstr), "-dcupsBitsPerColor=%d", @@ -412,26 +412,26 @@ header_to_gs_args(gs_page_header *h, { if (h->cupsCompression) { - snprintf(tmpstr, sizeof(tmpstr), "-dcupsCompression=%u", - (unsigned)(h->cupsCompression)); + snprintf(tmpstr, sizeof(tmpstr), "-dcupsCompression=%d", + (int)(h->cupsCompression)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->cupsRowCount) { - snprintf(tmpstr, sizeof(tmpstr), "-dcupsRowCount=%u", - (unsigned)(h->cupsRowCount)); + snprintf(tmpstr, sizeof(tmpstr), "-dcupsRowCount=%d", + (int)(h->cupsRowCount)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->cupsRowFeed) { - snprintf(tmpstr, sizeof(tmpstr), "-dcupsRowFeed=%u", - (unsigned)(h->cupsRowFeed)); + snprintf(tmpstr, sizeof(tmpstr), "-dcupsRowFeed=%d", + (int)(h->cupsRowFeed)); cupsArrayAdd(gs_args, strdup(tmpstr)); } if (h->cupsRowStep) { - snprintf(tmpstr, sizeof(tmpstr), "-dcupsRowStep=%u", - (unsigned)(h->cupsRowStep)); + snprintf(tmpstr, sizeof(tmpstr), "-dcupsRowStep=%d", + (int)(h->cupsRowStep)); cupsArrayAdd(gs_args, strdup(tmpstr)); } } @@ -449,8 +449,8 @@ header_to_gs_args(gs_page_header *h, for (i = 0; i <= 15; i ++) if (h->cupsInteger[i]) { - snprintf(tmpstr, sizeof(tmpstr), "-dcupsInteger%d=%u", - i, (unsigned)(h->cupsInteger[i])); + snprintf(tmpstr, sizeof(tmpstr), "-dcupsInteger%d=%d", + i, (int)(h->cupsInteger[i])); cupsArrayAdd(gs_args, strdup(tmpstr)); } for (i = 0; i <= 15; i ++)