This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, generate has been updated via ecca5686f36c35b12f2bd72dd5ef16165da1ec8c (commit) from 7d798834242fb298acd49b2c444843eaad852a93 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/ecca5686f36c35b12f2bd72dd5ef16165da1e...
commit ecca5686f36c35b12f2bd72dd5ef16165da1ec8c Author: Cyril Hrubis metan@ucw.cz Date: Wed Jul 13 21:40:12 2011 +0200
Fix some typos and warnings.
diff --git a/include/core/GP_GetPutPixel.h b/include/core/GP_GetPutPixel.h index 7151a36..4f7a146 100644 --- a/include/core/GP_GetPutPixel.h +++ b/include/core/GP_GetPutPixel.h @@ -17,6 +17,7 @@ * Boston, MA 02110-1301 USA * * * * Copyright (C) 2011 Tomas Gavenciak gavento@ucw.cz * + * Copyright (C) 2011 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -41,10 +42,12 @@ GP_Pixel GP_GetPixel(const GP_Context *context, int x, int y); /* * Version of GetPixel without transformations nor border checking. */ -static inline GP_Pixel GP_GetPixel_Raw(GP_Context *context, int x, int y) +static inline GP_Pixel GP_GetPixel_Raw(const GP_Context *context, int x, int y) { GP_FN_RET_PER_BPP(GP_GetPixel_Raw, context->bpp, context->bit_endian, context, x, y); + + GP_ABORT("Invalid context pixel type"); }
/* @@ -56,7 +59,8 @@ void GP_PutPixel(GP_Context *context, int x, int y, GP_Pixel p); /* * Version of PutPixel without transformations nor border checking. */ -static inline void GP_PutPixel_Raw(GP_Context *context, int x, int y, GP_Pixel p) +static inline void GP_PutPixel_Raw(GP_Context *context, int x, int y, + GP_Pixel p) { GP_FN_PER_BPP(GP_PutPixel_Raw, context->bpp, context->bit_endian, context, x, y, p); diff --git a/libs/core/GP_Blit.c b/libs/core/GP_Blit.c index 251272d..a43c16f 100644 --- a/libs/core/GP_Blit.c +++ b/libs/core/GP_Blit.c @@ -57,8 +57,6 @@ void GP_Blit_Naive(const GP_Context *c1, GP_Coord x1, GP_Coord y1, GP_Size w, GP { GP_CHECK(x1 >= 0); GP_CHECK(y1 >= 0); - GP_CHECK(w >= 0); - GP_CHECK(h >= 0); GP_CHECK(x1 + w <= GP_ContextW(c1)); GP_CHECK(y1 + h <= GP_ContextH(c1)); GP_CHECK(x2 >= 0); @@ -66,8 +64,8 @@ void GP_Blit_Naive(const GP_Context *c1, GP_Coord x1, GP_Coord y1, GP_Size w, GP GP_CHECK(x2 + w <= GP_ContextW(c2)); GP_CHECK(y2 + h <= GP_ContextH(c2));
- for (int i = 0; i < w; i++) - for (int j = 0; j < h; j++) { + for (GP_Size i = 0; i < w; i++) + for (GP_Size j = 0; j < h; j++) { GP_Pixel p = GP_GetPixel(c1, x1 + i, y1 + j); if (c1->pixel_type != c2->pixel_type) p = GP_ConvertContextPixel(p, c1, c2); diff --git a/libs/core/GP_WritePixel.c b/libs/core/GP_WritePixel.c index 534094e..182a42e 100644 --- a/libs/core/GP_WritePixel.c +++ b/libs/core/GP_WritePixel.c @@ -23,6 +23,8 @@ * * *****************************************************************************/
+#include <string.h> + #include "GP_Core.h" #include "GP_WritePixel.h"
diff --git a/pylib/gfxprim/generators/core/gen_getputpixel.py b/pylib/gfxprim/generators/core/gen_getputpixel.py index 6b96fc3..f360ec0 100644 --- a/pylib/gfxprim/generators/core/gen_getputpixel.py +++ b/pylib/gfxprim/generators/core/gen_getputpixel.py @@ -1,5 +1,6 @@ # Module generating C source and headers for get/putpixel # 2011 - Tomas Gavenciak gavento@ucw.cz +# 2011 - Cyril Hrubis metan@ucw.cz
from gfxprim.generators.utils import *
@@ -32,9 +33,9 @@ def gen_getpixel_bpp(size, size_suffix, header): "of form 8BPP, 2BPP_LE and the like." header.rbody( "n/*** GP_GetPixel for {{ size_suffix }} ***/n" - "static inline GP_Pixel GP_GetPixel_Raw_{{ size_suffix }}(GP_Context *c, int x, int y)n" + "static inline GP_Pixel GP_GetPixel_Raw_{{ size_suffix }}(const GP_Context *c, int x, int y)n" "{n" - " return GP_GET_BITS(GP_PIXEL_ADDR_OFFSET_{{ size_suffix }}(x) , {{ size }},n" + " return GP_GET_BITS(GP_PIXEL_ADDR_OFFSET_{{ size_suffix }}(x), {{ size }},n" " *(GP_PIXEL_ADDR_{{ size_suffix}}(c, x, y)));n" "}nn", size=size, size_suffix=size_suffix)
-----------------------------------------------------------------------
Summary of changes: include/core/GP_GetPutPixel.h | 8 ++++++-- libs/core/GP_Blit.c | 6 ++---- libs/core/GP_WritePixel.c | 2 ++ pylib/gfxprim/generators/core/gen_getputpixel.py | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.