/[rdesktop]/sourceforge.net/trunk/rdesktop/xwin.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/xwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 33 by matty, Sat Sep 15 12:34:34 2001 UTC revision 35 by matty, Sat Sep 15 14:01:45 2001 UTC
# Line 149  translate_image(int width, int height, u Line 149  translate_image(int width, int height, u
149          return out;          return out;
150  }  }
151    
152  #define BSWAP16(x) x = (((x & 0xff) << 8) | (x >> 8));  #define BSWAP16(x) { x = (((x & 0xff) << 8) | (x >> 8)); }
153  #define BSWAP24(x) x = (((x & 0xff) << 16) | (x >> 16) | ((x >> 8) & 0xff00));  #define BSWAP24(x) { x = (((x & 0xff) << 16) | (x >> 16) | ((x >> 8) & 0xff00)); }
154  #define BSWAP32(x) x = (((x & 0xff00ff) << 8) | ((x >> 8) & 0xff00ff)); \  #define BSWAP32(x) { x = (((x & 0xff00ff) << 8) | ((x >> 8) & 0xff00ff)); \
155                     x = (x << 16) | (x >> 16);                          x = (x << 16) | (x >> 16); }
156    
157  static uint32  static uint32
158  translate_colour(uint32 colour)  translate_colour(uint32 colour)
# Line 714  ui_create_colourmap(COLOURMAP *colours) Line 714  ui_create_colourmap(COLOURMAP *colours)
714                          MAKE_XCOLOR(&xentry, entry);                          MAKE_XCOLOR(&xentry, entry);
715    
716                          if (XAllocColor(display, xcolmap, &xentry) != 0)                          if (XAllocColor(display, xcolmap, &xentry) != 0)
717                                  colour = translate_colour(xentry.pixel);                                  colour = xentry.pixel;
718                          else                          else
719                                  colour = translate_colour(white);                                  colour = white;
720    
721                          /* byte swap here to make translate_image faster */                          /* byte swap here to make translate_image faster */
722                          map[i] = translate_colour(colour);                          map[i] = translate_colour(colour);

Legend:
Removed from v.33  
changed lines
  Added in v.35

  ViewVC Help
Powered by ViewVC 1.1.26