--- ray/src/px/ra_t16.c 1989/07/23 11:35:48 1.3 +++ ray/src/px/ra_t16.c 1989/10/20 16:42:28 1.5 @@ -15,6 +15,8 @@ static char SCCSid[] = "$SunId$ LBL"; #include "color.h" +#include "random.h" + #include "targa.h" #define goodpic(h) (((h)->dataType==IM_RGB || (h)->dataType==IM_CRGB) \ @@ -93,12 +95,12 @@ char *argv[]; /* put header */ printargs(argc, argv, stdout); putchar('\n'); - printf("-Y %d +X %d\n", head.y, head.x); + fputresolu(YMAJOR|YDECR, head.x, head.y, stdout); /* convert file */ tg2ra(&head); } else { getheader(stdin, NULL); - if (scanf("-Y %d +X %d\n", &head.y, &head.x) != 2) + if (fgetresolu(&head.x, &head.y, stdin) != (YMAJOR|YDECR)) quiterr("bad picture file"); /* assign header */ head.textSize = 0;