[cairo-commit] cairo/src cairo_pattern.c, 1.2, 1.3 cairo_traps.c, 1.15, 1.16 cairoint.h, 1.55, 1.56

David Reveman commit at pdx.freedesktop.org
Tue Apr 20 12:35:47 PDT 2004


Committed by: davidr

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv12090/src

Modified Files:
	cairo_pattern.c cairo_traps.c cairoint.h 
Log Message:
Fixed missing limits.h includes

Index: cairo_pattern.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_pattern.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/cairo_pattern.c	9 Apr 2004 21:19:47 -0000	1.2
--- b/cairo_pattern.c	20 Apr 2004 19:35:44 -0000	1.3
***************
*** 574,578 ****
      length = sqrt ((point1.x - point0.x) * (point1.x - point0.x) +
  		   (point1.y - point0.y) * (point1.y - point0.y));
!     length = (length) ? 1.0 / length : INT_MAX;
  
      a = -atan2 (point1.y - point0.y, point1.x - point0.x);
--- 574,578 ----
      length = sqrt ((point1.x - point0.x) * (point1.x - point0.x) +
  		   (point1.y - point0.y) * (point1.y - point0.y));
!     length = (length) ? 1.0 / length : CAIRO_MAXSHORT;
  
      a = -atan2 (point1.y - point0.y, point1.x - point0.x);

Index: cairo_traps.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_traps.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** a/cairo_traps.c	6 Apr 2004 16:36:12 -0000	1.15
--- b/cairo_traps.c	20 Apr 2004 19:35:44 -0000	1.16
***************
*** 640,645 ****
      int i;
    
!     extents->p1.x = extents->p1.y = SHRT_MAX << 16;
!     extents->p2.x = extents->p2.y = SHRT_MIN << 16;
      
      for (i = 0; i < traps->num_traps; i++)
--- 640,645 ----
      int i;
    
!     extents->p1.x = extents->p1.y = CAIRO_MAXSHORT << 16;
!     extents->p2.x = extents->p2.y = CAIRO_MINSHORT << 16;
      
      for (i = 0; i < traps->num_traps; i++)

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** a/cairoint.h	6 Apr 2004 16:36:12 -0000	1.55
--- b/cairoint.h	20 Apr 2004 19:35:44 -0000	1.56
***************
*** 41,44 ****
--- 41,45 ----
  #include <string.h>
  #include <math.h>
+ #include <limits.h>
  
  #include "cairo.h"
***************
*** 120,123 ****
--- 121,127 ----
  typedef cairo_fixed_16_16_t cairo_fixed_t;
  
+ #define CAIRO_MAXSHORT SHRT_MAX
+ #define CAIRO_MINSHORT SHRT_MIN
+ 
  typedef struct cairo_point {
      cairo_fixed_t x;





More information about the cairo-commit mailing list