Mercurial > MadButterfly
changeset 375:44b8223f307c
Rename MIN/MAX to MB_MIN/MB_MAX.
- MIN and MAX are conflicted with system's macros.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 01 Apr 2009 02:16:10 +0800 |
parents | e1ff44aa3b6f |
children | 06b40e01cac4 3d40e74d5a9d |
files | include/mb_tools.h src/Makefile.am src/redraw_man.c |
diffstat | 3 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/include/mb_tools.h Wed Apr 01 02:00:49 2009 +0800 +++ b/include/mb_tools.h Wed Apr 01 02:16:10 2009 +0800 @@ -138,7 +138,7 @@ #define MEM2OBJ(var, type, mem) ((type *)((void *)var - OFFSET(type, mem))) #define OFF2TYPE(obj, off, type) (*(type *)((void *)(obj) + (off))) -#define MAX(a, b) ((a) > (b)? (a): (b)) -#define MIN(a, b) ((a) < (b)? (a): (b)) +#define MB_MAX(a, b) ((a) > (b)? (a): (b)) +#define MB_MIN(a, b) ((a) < (b)? (a): (b)) #endif /* __TOOLS_H_ */
--- a/src/Makefile.am Wed Apr 01 02:00:49 2009 +0800 +++ b/src/Makefile.am Wed Apr 01 02:16:10 2009 +0800 @@ -10,8 +10,8 @@ timertool.c tools.c visibility.c X_supp.c prop.c sprite.c \ mouse.c shape_image.c img_ldr.c $(MBAF_SOURCES) -libmbfly_la_CPPFLAGS = @cairo_CFLAGS@ `pkg-config --cflags pangocairo` -libmbfly_la_LDFLAGS = @cairo_LIBS@ `pkg-config --libs pangocairo` +libmbfly_la_CPPFLAGS = @cairo_CFLAGS@ @pangocairo_CFLAGS@ +libmbfly_la_LDFLAGS = @cairo_LIBS@ @pangocairo_LIBS@ X_main_SOURCES = X_main.c X_main_LDADD = $(top_builddir)/src/libmbfly.la
--- a/src/redraw_man.c Wed Apr 01 02:00:49 2009 +0800 +++ b/src/redraw_man.c Wed Apr 01 02:16:10 2009 +0800 @@ -1614,28 +1614,28 @@ /* Even areas */ area = areas[i++]; if(area->w != 0 || area->h != 0) { - poses0[0][0] = MIN(poses0[0][0], area->x); - poses0[0][1] = MIN(poses0[0][1], area->y); - poses0[1][0] = MAX(poses0[1][0], area->x + area->w); - poses0[1][1] = MAX(poses0[1][1], area->y + area->h); + poses0[0][0] = MB_MIN(poses0[0][0], area->x); + poses0[0][1] = MB_MIN(poses0[0][1], area->y); + poses0[1][0] = MB_MAX(poses0[1][0], area->x + area->w); + poses0[1][1] = MB_MAX(poses0[1][1], area->y + area->h); } /* Odd areas */ area = areas[i++]; if(area->w != 0 || area->h != 0) { - poses1[0][0] = MIN(poses1[0][0], area->x); - poses1[0][1] = MIN(poses1[0][1], area->y); - poses1[1][0] = MAX(poses1[1][0], area->x + area->w); - poses1[1][1] = MAX(poses1[1][1], area->y + area->h); + poses1[0][0] = MB_MIN(poses1[0][0], area->x); + poses1[0][1] = MB_MIN(poses1[0][1], area->y); + poses1[1][0] = MB_MAX(poses1[1][0], area->x + area->w); + poses1[1][1] = MB_MAX(poses1[1][1], area->y + area->h); } } if(i < n_areas) { area = areas[i]; if(area->w != 0 || area->h != 0) { - poses0[0][0] = MIN(poses0[0][0], area->x); - poses0[0][1] = MIN(poses0[0][1], area->y); - poses0[1][0] = MAX(poses0[1][0], area->x + area->w); - poses0[1][1] = MAX(poses0[1][1], area->y + area->h); + poses0[0][0] = MB_MIN(poses0[0][0], area->x); + poses0[0][1] = MB_MIN(poses0[0][1], area->y); + poses0[1][0] = MB_MAX(poses0[1][0], area->x + area->w); + poses0[1][1] = MB_MAX(poses0[1][1], area->y + area->h); } }