dtpad: Use XtArgVal for int conversion

Avoid overwrite of local variables when using
short (int, etc.) types with XtVaGetValues().

Cast XtPointer using (XtArgVal) without
the need to use C99 <stdint.h> and friends.
This commit is contained in:
Marcin Cieslak
2012-09-24 03:15:20 +02:00
committed by Jon Trulson
parent d089ff7599
commit e077181a46
4 changed files with 23 additions and 12 deletions

View File

@@ -953,14 +953,17 @@ _pjPrintOnePageCB(
if (pJob->pOutput == NULL)
{
Dimension width, height;
XtArgVal width0, height0;
Dimension width, height;
width = 0; height=0;
XtVaGetValues(
pJob->pShell,
XmNwidth, &width,
XmNheight, &height,
XmNwidth, &width0,
XmNheight, &height0,
NULL);
width = (Dimension)width0;
height = (Dimension)height0;
#if defined(PRINT_TO_VIDEO)
printf("PrintShell in _pjPrintOnePageCB: <W %d - H %d>\n",width,height);