[cairo-commit] cairo/src cairo-atsui.h, 1.3, 1.4 cairo-cache.c, 1.9, 1.10 cairo-features.h.in, 1.17, 1.18 cairo-ft-private.h, 1.2, 1.3 cairo-ft.h, 1.3, 1.4 cairo-glitz.h, 1.4, 1.5 cairo-pdf.h, 1.6, 1.7 cairo-ps.h, 1.4, 1.5 cairo-quartz.h, 1.5, 1.6 cairo-win32.h, 1.9, 1.10 cairo-xcb.h, 1.5, 1.6 cairo-xlib.h, 1.12, 1.13 cairo.c, 1.90, 1.91 cairo.h, 1.114, 1.115 cairoint.h, 1.136, 1.137

Carl Worth commit at pdx.freedesktop.org
Fri May 6 21:33:25 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv9297/src

Modified Files:
	cairo-atsui.h cairo-cache.c cairo-features.h.in 
	cairo-ft-private.h cairo-ft.h cairo-glitz.h cairo-pdf.h 
	cairo-ps.h cairo-quartz.h cairo-win32.h cairo-xcb.h 
	cairo-xlib.h cairo.c cairo.h cairoint.h 
Log Message:

        * configure.in:

        * src/cairo-features.h.in: Change definitions of everything in
        cairo-features.h to prefer #if over #ifdef.

        * src/cairo-atsui.h:
        * src/cairo-cache.c:
        * src/cairo-ft-private.h:
        * src/cairo-ft.h:
        * src/cairo-glitz.h:
        * src/cairo-pdf.h:
        * src/cairo-ps.h:
        * src/cairo-quartz.h:
        * src/cairo-win32.h:
        * src/cairo-xcb.h:
        * src/cairo-xlib.h:
        * src/cairo.c:
        * src/cairo.h:
        * src/cairoint.h:
        * test/cairo-test.c: Track #ifdef -> #if changes.

        * util/cairo-api-update: Add support to automatically change all
        #ifdef CAIRO_HAS to #if CAIRO_HAS.


Index: cairo-atsui.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-atsui.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cairo-atsui.h	22 Feb 2005 19:32:02 -0000	1.3
+++ cairo-atsui.h	7 May 2005 04:33:22 -0000	1.4
@@ -38,7 +38,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_ATSUI_FONT
+#if CAIRO_HAS_ATSUI_FONT
 
 /* ATSUI platform-specific font interface */
 

Index: cairo-cache.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-cache.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairo-cache.c	6 Apr 2005 19:20:02 -0000	1.9
+++ cairo-cache.c	7 May 2005 04:33:22 -0000	1.10
@@ -113,7 +113,9 @@
 #define LIVE_ENTRY_P(cache, i) \
  (!((NULL_ENTRY_P((cache),(i))) || (DEAD_ENTRY_P((cache),(i)))))
 
-#ifdef CAIRO_DO_SANITY_CHECKING
+#ifdef NDEBUG
+#define _cache_sane_state(c) 
+#else
 static void 
 _cache_sane_state (cairo_cache_t *cache)
 {
@@ -125,8 +127,6 @@
     /* assert (cache->used_memory <= cache->max_memory); */
     assert (cache->live_entries <= cache->arrangement->size);   
 }
-#else
-#define _cache_sane_state(c) 
 #endif
 
 static void

Index: cairo-features.h.in
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-features.h.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cairo-features.h.in	28 Mar 2005 21:58:26 -0000	1.17
+++ cairo-features.h.in	7 May 2005 04:33:22 -0000	1.18
@@ -37,28 +37,26 @@
 #ifndef CAIRO_FEATURES_H
 #define CAIRO_FEATURES_H
 
-#define @PS_SURFACE_FEATURE@
-
-#define @PDF_SURFACE_FEATURE@
+#define CAIRO_HAS_PS_SURFACE @PS_SURFACE_FEATURE@
 
-#define @XLIB_SURFACE_FEATURE@
+#define CAIRO_HAS_PDF_SURFACE @PDF_SURFACE_FEATURE@
 
-#define @QUARTZ_SURFACE_FEATURE@
+#define CAIRO_HAS_XLIB_SURFACE @XLIB_SURFACE_FEATURE@
 
-#define @XCB_SURFACE_FEATURE@
+#define CAIRO_HAS_QUARTZ_SURFACE @QUARTZ_SURFACE_FEATURE@
 
-#define @WIN32_SURFACE_FEATURE@
+#define CAIRO_HAS_XCB_SURFACE @XCB_SURFACE_FEATURE@
 
-#define @GLITZ_SURFACE_FEATURE@
+#define CAIRO_HAS_WIN32_SURFACE @WIN32_SURFACE_FEATURE@
 
-#define @FT_FONT_FEATURE@
+#define CAIRO_HAS_GLITZ_SURFACE @GLITZ_SURFACE_FEATURE@
 
-#define @WIN32_FONT_FEATURE@
+#define CAIRO_HAS_FT_FONT @FT_FONT_FEATURE@
 
-#define @ATSUI_FONT_FEATURE@
+#define CAIRO_HAS_WIN32_FONT @WIN32_FONT_FEATURE@
 
-#define @PNG_FUNCTIONS_FEATURE@
+#define CAIRO_HAS_ATSUI_FONT @ATSUI_FONT_FEATURE@
 
-#define @SANITY_CHECKING_FEATURE@
+#define CAIRO_HAS_PNG_FUNCTIONS	@PNG_FUNCTIONS_FEATURE@
 
 #endif

Index: cairo-ft-private.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ft-private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cairo-ft-private.h	7 Apr 2005 18:04:00 -0000	1.2
+++ cairo-ft-private.h	7 May 2005 04:33:22 -0000	1.3
@@ -40,7 +40,7 @@
 #include <cairo-ft.h>
 #include <cairoint.h>
 
-#ifdef CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FT_FONT
 
 CAIRO_BEGIN_DECLS
 

Index: cairo-ft.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ft.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cairo-ft.h	7 Apr 2005 18:04:00 -0000	1.3
+++ cairo-ft.h	7 May 2005 04:33:22 -0000	1.4
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FT_FONT
 
 /* Fontconfig/Freetype platform-specific font interface */
 

Index: cairo-glitz.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-glitz.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cairo-glitz.h	6 May 2005 20:23:41 -0000	1.4
+++ cairo-glitz.h	7 May 2005 04:33:22 -0000	1.5
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_GLITZ_SURFACE
+#if CAIRO_HAS_GLITZ_SURFACE
 
 #include <glitz.h>
 

Index: cairo-pdf.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-pdf.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cairo-pdf.h	6 May 2005 20:23:41 -0000	1.6
+++ cairo-pdf.h	7 May 2005 04:33:22 -0000	1.7
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_PDF_SURFACE
+#if CAIRO_HAS_PDF_SURFACE
 
 #include <stdio.h>
 

Index: cairo-ps.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ps.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cairo-ps.h	6 May 2005 20:23:41 -0000	1.4
+++ cairo-ps.h	7 May 2005 04:33:22 -0000	1.5
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_PS_SURFACE
+#if CAIRO_HAS_PS_SURFACE
 
 #include <stdio.h>
 

Index: cairo-quartz.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-quartz.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairo-quartz.h	6 May 2005 20:23:41 -0000	1.5
+++ cairo-quartz.h	7 May 2005 04:33:22 -0000	1.6
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_QUARTZ_SURFACE
+#if CAIRO_HAS_QUARTZ_SURFACE
 
 #include <Carbon/Carbon.h>
 

Index: cairo-win32.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairo-win32.h	6 May 2005 20:23:41 -0000	1.9
+++ cairo-win32.h	7 May 2005 04:33:22 -0000	1.10
@@ -38,7 +38,7 @@
 
 #include <cairo.h>
 
-#ifdef CAIRO_HAS_WIN32_SURFACE
+#if CAIRO_HAS_WIN32_SURFACE
 
 #include <windows.h>
 

Index: cairo-xcb.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xcb.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairo-xcb.h	6 May 2005 20:23:41 -0000	1.5
+++ cairo-xcb.h	7 May 2005 04:33:22 -0000	1.6
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_XCB_SURFACE
+#if CAIRO_HAS_XCB_SURFACE
 
 #include <X11/XCB/xcb.h>
 #include <X11/XCB/render.h>

Index: cairo-xlib.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cairo-xlib.h	6 May 2005 20:23:41 -0000	1.12
+++ cairo-xlib.h	7 May 2005 04:33:22 -0000	1.13
@@ -39,7 +39,7 @@
 
 #include <cairo.h>
 
-#ifdef  CAIRO_HAS_XLIB_SURFACE
+#if CAIRO_HAS_XLIB_SURFACE
 
 #include <X11/Xlib.h>
 #include <X11/extensions/Xrender.h>

Index: cairo.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- cairo.c	7 May 2005 04:25:56 -0000	1.90
+++ cairo.c	7 May 2005 04:33:22 -0000	1.91
@@ -43,8 +43,10 @@
 
 #define CAIRO_TOLERANCE_MINIMUM	0.0002 /* We're limited by 16 bits of sub-pixel precision */
 
-#ifdef CAIRO_DO_SANITY_CHECKING
 #include <assert.h>
+#ifdef NDEBUG
+#define CAIRO_CHECK_SANITY(cr) 
+#else
 static int 
 cairo_sane_state (cairo_t *cr)
 {    
@@ -69,11 +71,8 @@
     return 1;
 }
 #define CAIRO_CHECK_SANITY(cr) assert(cairo_sane_state ((cr)))
-#else
-#define CAIRO_CHECK_SANITY(cr) 
 #endif
 
-
 /*
  * cairo_create:
  * @target: target surface for the context

Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- cairo.h	7 May 2005 04:25:56 -0000	1.114
+++ cairo.h	7 May 2005 04:33:22 -0000	1.115
@@ -934,7 +934,7 @@
 cairo_status_t
 cairo_surface_finish (cairo_surface_t *surface);
 
-#ifdef CAIRO_HAS_PNG_FUNCTIONS
+#if CAIRO_HAS_PNG_FUNCTIONS
 
 cairo_status_t
 cairo_surface_write_to_png (cairo_surface_t	*surface,
@@ -982,7 +982,7 @@
 int
 cairo_image_surface_get_height (cairo_surface_t *surface);
 
-#ifdef CAIRO_HAS_PNG_FUNCTIONS
+#if CAIRO_HAS_PNG_FUNCTIONS
 
 cairo_surface_t *
 cairo_image_surface_create_from_png (const char	*filename);

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- cairoint.h	7 May 2005 04:25:56 -0000	1.136
+++ cairoint.h	7 May 2005 04:33:22 -0000	1.137
@@ -545,19 +545,19 @@
 };
 
 /* concrete font backends */
-#ifdef CAIRO_HAS_FT_FONT
+#if CAIRO_HAS_FT_FONT
 
 extern const cairo_private struct _cairo_scaled_font_backend cairo_ft_scaled_font_backend;
 
 #endif
 
-#ifdef CAIRO_HAS_WIN32_FONT
+#if CAIRO_HAS_WIN32_FONT
 
 extern const cairo_private struct _cairo_scaled_font_backend cairo_win32_scaled_font_backend;
 
 #endif
 
-#ifdef CAIRO_HAS_ATSUI_FONT
+#if CAIRO_HAS_ATSUI_FONT
 
 extern const cairo_private struct _cairo_scaled_font_backend cairo_atsui_scaled_font_backend;
 
@@ -853,17 +853,17 @@
 #define CAIRO_FONT_SLANT_DEFAULT   CAIRO_FONT_SLANT_NORMAL
 #define CAIRO_FONT_WEIGHT_DEFAULT  CAIRO_FONT_WEIGHT_NORMAL
 
-#if defined (CAIRO_HAS_WIN32_FONT)
+#if   CAIRO_HAS_WIN32_FONT
 
 #define CAIRO_FONT_FAMILY_DEFAULT "Arial"
 #define CAIRO_FONT_BACKEND_DEFAULT &cairo_win32_scaled_font_backend
 
-#elif defined (CAIRO_HAS_ATSUI_FONT)
+#elif CAIRO_HAS_ATSUI_FONT
 
 #define CAIRO_FONT_FAMILY_DEFAULT  "Monaco"
 #define CAIRO_FONT_BACKEND_DEFAULT &cairo_atsui_scaled_font_backend
 
-#elif defined (CAIRO_HAS_FT_FONT)
+#elif CAIRO_HAS_FT_FONT
 
 #define CAIRO_FONT_FAMILY_DEFAULT  "serif"
 #define CAIRO_FONT_BACKEND_DEFAULT &cairo_ft_scaled_font_backend




More information about the cairo-commit mailing list