summaryrefslogtreecommitdiff
path: root/www/mozilla/patches/patch-co
blob: a449c1cade83c5673d61d1dc266a374faded60d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
$NetBSD: patch-co,v 1.1 2006/06/06 18:28:45 ghen Exp $

--- gfx/src/ps/nsType1.cpp.orig	2006-06-06 19:05:42.000000000 +0200
+++ gfx/src/ps/nsType1.cpp
@@ -67,6 +67,12 @@
 
 #include "nsType1.h"
 
+#if FREETYPE_MAJOR > 2 || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR > 1)
+#define constFT_Vector const FT_Vector
+#else
+#define constFT_Vector FT_Vector
+#endif
+
 static const PRUint16 type1_encryption_c1 = TYPE1_ENCRYPTION_C1;
 static const PRUint16 type1_encryption_c2 = TYPE1_ENCRYPTION_C2;
 
@@ -81,8 +87,8 @@ typedef struct {
   int            wmode;
 } FT2PT1_info;
 
-static int cubicto(FT_Vector *aControlPt1, FT_Vector *aControlPt2, 
-                   FT_Vector *aEndPt, void *aClosure);
+static int cubicto(constFT_Vector *aControlPt1, constFT_Vector *aControlPt2, 
+                   constFT_Vector *aEndPt, void *aClosure);
 static int Type1CharStringCommand(unsigned char **aBufPtrPtr, int aCmd);
 static int Type1EncodeCharStringInt(unsigned char **aBufPtrPtr, int aValue);
 
@@ -173,7 +179,7 @@ Type1EncryptString(unsigned char *aInBuf
 }
 
 static PRBool
-sideWidthAndBearing(FT_Vector *aEndPt, FT2PT1_info *aFti)
+sideWidthAndBearing(constFT_Vector *aEndPt, FT2PT1_info *aFti)
 {
   int aw = 0;
   int ah = 0;
@@ -216,7 +222,7 @@ sideWidthAndBearing(FT_Vector *aEndPt, F
 }
 
 static int
-moveto(FT_Vector *aEndPt, void *aClosure)
+moveto(constFT_Vector *aEndPt, void *aClosure)
 {
   FT2PT1_info *fti = (FT2PT1_info *)aClosure;
   FT_UShort upm = fti->face->units_per_EM;
@@ -253,7 +259,7 @@ moveto(FT_Vector *aEndPt, void *aClosure
 }
 
 static int
-lineto(FT_Vector *aEndPt, void *aClosure)
+lineto(constFT_Vector *aEndPt, void *aClosure)
 {
   FT2PT1_info *fti = (FT2PT1_info *)aClosure;
   FT_UShort upm = fti->face->units_per_EM;
@@ -279,7 +285,7 @@ lineto(FT_Vector *aEndPt, void *aClosure
 }
 
 static int
-conicto(FT_Vector *aControlPt, FT_Vector *aEndPt, void *aClosure)
+conicto(constFT_Vector *aControlPt, constFT_Vector *aEndPt, void *aClosure)
 {
   FT2PT1_info *ftinfo = (FT2PT1_info *)aClosure;
   FT_UShort upm = ftinfo->face->units_per_EM;
@@ -311,7 +317,7 @@ conicto(FT_Vector *aControlPt, FT_Vector
 }
 
 static int
-cubicto(FT_Vector *aControlPt1, FT_Vector *aControlPt2, FT_Vector *aEndPt,
+cubicto(constFT_Vector *aControlPt1, constFT_Vector *aControlPt2, constFT_Vector *aEndPt,
         void *aClosure)
 {
   FT2PT1_info *ftinfo = (FT2PT1_info *)aClosure;