--- sourceforge.net/trunk/rdesktop/cache.c 2001/06/20 13:54:48 28 +++ sourceforge.net/trunk/rdesktop/cache.c 2002/07/30 07:18:48 82 @@ -1,7 +1,7 @@ /* rdesktop: A Remote Desktop Protocol client. Cache routines - Copyright (C) Matthew Chapman 1999-2000 + Copyright (C) Matthew Chapman 1999-2001 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,15 +32,14 @@ { HBITMAP bitmap; - if ((cache_id < NUM_ELEMENTS(bmpcache)) - && (cache_idx < NUM_ELEMENTS(bmpcache[0]))) + if ((cache_id < NUM_ELEMENTS(bmpcache)) && (cache_idx < NUM_ELEMENTS(bmpcache[0]))) { bitmap = bmpcache[cache_id][cache_idx]; if (bitmap != NULL) return bitmap; } - ERROR("get bitmap %d:%d\n", cache_id, cache_idx); + error("get bitmap %d:%d\n", cache_id, cache_idx); return NULL; } @@ -50,8 +49,7 @@ { HBITMAP old; - if ((cache_id < NUM_ELEMENTS(bmpcache)) - && (cache_idx < NUM_ELEMENTS(bmpcache[0]))) + if ((cache_id < NUM_ELEMENTS(bmpcache)) && (cache_idx < NUM_ELEMENTS(bmpcache[0]))) { old = bmpcache[cache_id][cache_idx]; if (old != NULL) @@ -61,7 +59,7 @@ } else { - ERROR("put bitmap %d:%d\n", cache_id, cache_idx); + error("put bitmap %d:%d\n", cache_id, cache_idx); } } @@ -75,15 +73,14 @@ { FONTGLYPH *glyph; - if ((font < NUM_ELEMENTS(fontcache)) - && (character < NUM_ELEMENTS(fontcache[0]))) + if ((font < NUM_ELEMENTS(fontcache)) && (character < NUM_ELEMENTS(fontcache[0]))) { glyph = &fontcache[font][character]; if (glyph->pixmap != NULL) return glyph; } - ERROR("get font %d:%d\n", font, character); + error("get font %d:%d\n", font, character); return NULL; } @@ -94,8 +91,7 @@ { FONTGLYPH *glyph; - if ((font < NUM_ELEMENTS(fontcache)) - && (character < NUM_ELEMENTS(fontcache[0]))) + if ((font < NUM_ELEMENTS(fontcache)) && (character < NUM_ELEMENTS(fontcache[0]))) { glyph = &fontcache[font][character]; if (glyph->pixmap != NULL) @@ -109,7 +105,7 @@ } else { - ERROR("put font %d:%d\n", font, character); + error("put font %d:%d\n", font, character); } } @@ -130,7 +126,7 @@ return text; } - ERROR("get text %d\n", cache_id); + error("get text %d\n", cache_id); return NULL; } @@ -152,7 +148,7 @@ } else { - ERROR("put text %d\n", cache_id); + error("put text %d\n", cache_id); } } @@ -171,14 +167,13 @@ return &deskcache[offset]; } - ERROR("get desktop %d:%d\n", offset, length); + error("get desktop %d:%d\n", offset, length); return NULL; } /* Store desktop data in the cache */ void -cache_put_desktop(uint32 offset, int cx, int cy, int scanline, - int bytes_per_pixel, uint8 *data) +cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 * data) { int length = cx * cy * bytes_per_pixel; @@ -194,7 +189,7 @@ } else { - ERROR("put desktop %d:%d\n", offset, length); + error("put desktop %d:%d\n", offset, length); } } @@ -203,7 +198,8 @@ static HCURSOR cursorcache[0x20]; /* Retrieve cursor from cache */ -HCURSOR cache_get_cursor(uint16 cache_idx) +HCURSOR +cache_get_cursor(uint16 cache_idx) { HCURSOR cursor; @@ -214,7 +210,7 @@ return cursor; } - ERROR("get cursor %d\n", cache_idx); + error("get cursor %d\n", cache_idx); return NULL; } @@ -234,6 +230,6 @@ } else { - ERROR("put cursor %d\n", cache_idx); + error("put cursor %d\n", cache_idx); } }