helly Thu Nov 28 20:44:19 2002 EDT
Modified files:
/php4/ext/gd/libgd gd.c gd_jpeg.c gdft.c
Log:
Conversion fixes
Index: php4/ext/gd/libgd/gd.c
diff -u php4/ext/gd/libgd/gd.c:1.29 php4/ext/gd/libgd/gd.c:1.30
--- php4/ext/gd/libgd/gd.c:1.29 Thu Nov 28 17:48:19 2002
+++ php4/ext/gd/libgd/gd.c Thu Nov 28 20:44:19 2002
@@ -1092,7 +1092,7 @@
else
{
/* More-or-less vertical. use wid for horizontal stroke */
- wid = thick * sin (atan2 (dy, dx));
+ wid = (int)(thick * sin (atan2 (dy, dx)));
vert = 0;
d = 2 * dx - dy;
Index: php4/ext/gd/libgd/gd_jpeg.c
diff -u php4/ext/gd/libgd/gd_jpeg.c:1.7 php4/ext/gd/libgd/gd_jpeg.c:1.8
--- php4/ext/gd/libgd/gd_jpeg.c:1.7 Thu Nov 28 17:48:19 2002
+++ php4/ext/gd/libgd/gd_jpeg.c Thu Nov 28 20:44:19 2002
@@ -812,7 +812,7 @@
/* Write any data remaining in the buffer */
if (datacount > 0)
{
- if (gdPutBuf (dest->buffer, datacount, dest->outfile) != datacount)
+ if ((size_t)gdPutBuf (dest->buffer, datacount, dest->outfile) != datacount)
ERREXIT (cinfo, JERR_FILE_WRITE);
}
}
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.16 php4/ext/gd/libgd/gdft.c:1.17
--- php4/ext/gd/libgd/gdft.c:1.16 Sun Nov 24 20:51:53 2002
+++ php4/ext/gd/libgd/gdft.c Thu Nov 28 20:44:19 2002
@@ -26,6 +26,10 @@
#endif
/* number of antialised colors for indexed bitmaps */
+/* overwrite Windows GDI define in case of windows build */
+#ifdef NUMCOLORS
+#undef NUMCOLORS
+#endif
#define NUMCOLORS 8
char *
@@ -880,8 +884,8 @@
if (ch == '\r')
{
penf.x = 0;
- x1 = (penf.x * cos_a - penf.y * sin_a + 32) / 64;
- y1 = (penf.x * sin_a + penf.y * cos_a + 32) / 64;
+ x1 = (int)(penf.x * cos_a - penf.y * sin_a + 32) / 64;
+ y1 = (int)(penf.x * sin_a + penf.y * cos_a + 32) / 64;
pen.x = pen.y = 0;
previous = 0; /* clear kerning flag */
next++;
@@ -890,10 +894,10 @@
/* newlines */
if (ch == '\n')
{
- penf.y -= face->size->metrics.height * linespace;
+ penf.y -= (long)(face->size->metrics.height * linespace);
penf.y = (penf.y - 32) & -64; /* round to next pixel row */
- x1 = (penf.x * cos_a - penf.y * sin_a + 32) / 64;
- y1 = (penf.x * sin_a + penf.y * cos_a + 32) / 64;
+ x1 = (int)(penf.x * cos_a - penf.y * sin_a + 32) / 64;
+ y1 = (int)(penf.x * sin_a + penf.y * cos_a + 32) / 64;
pen.x = pen.y = 0;
previous = 0; /* clear kerning flag */
next++;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php