/[rdesktop]/sourceforge.net/trunk/rdesktop/cache.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/cache.c

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

revision 64 by astrand, Thu Jul 18 16:38:31 2002 UTC revision 82 by astrand, Tue Jul 30 07:18:48 2002 UTC
# Line 32  cache_get_bitmap(uint8 cache_id, uint16 Line 32  cache_get_bitmap(uint8 cache_id, uint16
32  {  {
33          HBITMAP bitmap;          HBITMAP bitmap;
34    
35          if ((cache_id < NUM_ELEMENTS(bmpcache))          if ((cache_id < NUM_ELEMENTS(bmpcache)) && (cache_idx < NUM_ELEMENTS(bmpcache[0])))
             && (cache_idx < NUM_ELEMENTS(bmpcache[0])))  
36          {          {
37                  bitmap = bmpcache[cache_id][cache_idx];                  bitmap = bmpcache[cache_id][cache_idx];
38                  if (bitmap != NULL)                  if (bitmap != NULL)
# Line 50  cache_put_bitmap(uint8 cache_id, uint16 Line 49  cache_put_bitmap(uint8 cache_id, uint16
49  {  {
50          HBITMAP old;          HBITMAP old;
51    
52          if ((cache_id < NUM_ELEMENTS(bmpcache))          if ((cache_id < NUM_ELEMENTS(bmpcache)) && (cache_idx < NUM_ELEMENTS(bmpcache[0])))
             && (cache_idx < NUM_ELEMENTS(bmpcache[0])))  
53          {          {
54                  old = bmpcache[cache_id][cache_idx];                  old = bmpcache[cache_id][cache_idx];
55                  if (old != NULL)                  if (old != NULL)
# Line 75  cache_get_font(uint8 font, uint16 charac Line 73  cache_get_font(uint8 font, uint16 charac
73  {  {
74          FONTGLYPH *glyph;          FONTGLYPH *glyph;
75    
76          if ((font < NUM_ELEMENTS(fontcache))          if ((font < NUM_ELEMENTS(fontcache)) && (character < NUM_ELEMENTS(fontcache[0])))
             && (character < NUM_ELEMENTS(fontcache[0])))  
77          {          {
78                  glyph = &fontcache[font][character];                  glyph = &fontcache[font][character];
79                  if (glyph->pixmap != NULL)                  if (glyph->pixmap != NULL)
# Line 94  cache_put_font(uint8 font, uint16 charac Line 91  cache_put_font(uint8 font, uint16 charac
91  {  {
92          FONTGLYPH *glyph;          FONTGLYPH *glyph;
93    
94          if ((font < NUM_ELEMENTS(fontcache))          if ((font < NUM_ELEMENTS(fontcache)) && (character < NUM_ELEMENTS(fontcache[0])))
             && (character < NUM_ELEMENTS(fontcache[0])))  
95          {          {
96                  glyph = &fontcache[font][character];                  glyph = &fontcache[font][character];
97                  if (glyph->pixmap != NULL)                  if (glyph->pixmap != NULL)
# Line 177  cache_get_desktop(uint32 offset, int cx, Line 173  cache_get_desktop(uint32 offset, int cx,
173    
174  /* Store desktop data in the cache */  /* Store desktop data in the cache */
175  void  void
176  cache_put_desktop(uint32 offset, int cx, int cy, int scanline,  cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 * data)
                   int bytes_per_pixel, uint8 * data)  
177  {  {
178          int length = cx * cy * bytes_per_pixel;          int length = cx * cy * bytes_per_pixel;
179    

Legend:
Removed from v.64  
changed lines
  Added in v.82

  ViewVC Help
Powered by ViewVC 1.1.26