ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/x11image.c
(Generate patch)

Comparing ray/src/px/x11image.c (file contents):
Revision 2.27 by greg, Fri Jun 18 10:22:26 1993 UTC vs.
Revision 2.28 by greg, Mon Jul 19 15:18:05 1993 UTC

# Line 32 | Line 32 | static char SCCSid[] = "$SunId$ LBL";
32   #include  "random.h"
33   #include  "resolu.h"
34  
35 + #ifdef  __alpha
36 + #define  int4           int
37 + #endif
38 + #ifndef  int4
39 + #define  int4           long
40 + #endif
41 +
42   #define  FONTNAME       "8x13"          /* text font we'll use */
43  
44   #define  CTRL(c)        ((c)-'@')
# Line 466 | Line 473 | getras()                               /* get raster file */
473                          goto fail;
474                  getmono();
475          } else if (ourvis.class == TrueColor | ourvis.class == DirectColor) {
476 <                ourdata = (unsigned char *)malloc(4*xmax*ymax);
476 >                ourdata = (unsigned char *)malloc(sizeof(int4)*xmax*ymax);
477                  if (ourdata == NULL)
478                          goto fail;
479 <                ourras = make_raster(thedisplay, &ourvis, 32,
479 >                ourras = make_raster(thedisplay, &ourvis, sizeof(int4)*8,
480                                  ourdata, xmax, ymax, 32);
481                  if (ourras == NULL)
482                          goto fail;
# Line 876 | Line 883 | COLR  *scan;
883   getfull()                       /* get full (24-bit) data */
884   {
885          int     y;
886 <        register unsigned long  *dp;
886 >        register unsigned int4  *dp;
887          register int    x;
888                                          /* set gamma correction */
889          setcolrgam(gamcor);
890                                          /* read and convert file */
891 <        dp = (unsigned long *)ourdata;
891 >        dp = (unsigned int4 *)ourdata;
892          for (y = 0; y < ymax; y++) {
893                  getscan(y);
894                  add2icon(y, scanline);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines