sniper          Thu Sep 12 17:42:34 2002 EDT

  Modified files:              
    /php4/ext/gd        gd.c 
  Log:
  ws fix
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.211 php4/ext/gd/gd.c:1.212
--- php4/ext/gd/gd.c:1.211      Wed Sep  4 20:22:40 2002
+++ php4/ext/gd/gd.c    Thu Sep 12 17:42:33 2002
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.211 2002/09/05 00:22:40 sniper Exp $ */
+/* $Id: gd.c,v 1.212 2002/09/12 21:42:33 sniper Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
    Cold Spring Harbor Labs. */
@@ -385,7 +385,7 @@
 
 #ifdef HAVE_LIBT1
        php_info_print_table_row(2, "T1Lib Support", "enabled");
-#endif         
+#endif
 
 /* this next part is stupid ... if I knew better, I'd put them all on one row (cmv) */
 
@@ -430,8 +430,7 @@
 /*                                                                  */
 /* in a single function                                             */
 
-int
-gdImageColorResolve(gdImagePtr im, int r, int g, int b)
+int gdImageColorResolve(gdImagePtr im, int r, int g, int b)
 {
        int c;
        int ct = -1;
@@ -651,7 +650,7 @@
 
 #if HAVE_GD_BUNDLED
 /* {{{ proto void imagecolormatch(resource im1, resource im2)
-       Makes the colors of the palette version of an image more closely match the 
true color version */
+   Makes the colors of the palette version of an image more closely match the true 
+color version */
 PHP_FUNCTION(imagecolormatch)
 {
        zval **IM1, **IM2;
@@ -1053,13 +1052,13 @@
 {
        gdImagePtr im;
        gdIOCtx *io_ctx;
-        
+
        io_ctx = gdNewDynamicCtx (Z_STRLEN_PP(data), Z_STRVAL_PP(data));
-        
-       if(!io_ctx) {
+
+       if (!io_ctx) {
                return NULL;
        }
-        
+
        im = (*ioctx_func_p)(io_ctx);
        if (!im) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Passed data is not in 
'%s' format", tn);
@@ -1136,9 +1135,9 @@
 
                default:
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Data is not in a 
recognized format.");
-            RETURN_FALSE;
-
+                       RETURN_FALSE;
        }
+
        if (!im) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't create GD Image 
Stream out of Data");
                RETURN_FALSE;
@@ -1443,10 +1442,10 @@
                        php_write(buf, b TSRMLS_CC);
                }
 
-        fclose(tmp);
-        /* the temporary file is automatically deleted */
+               fclose(tmp);
+               /* the temporary file is automatically deleted */
        }
-    RETURN_TRUE;
+       RETURN_TRUE;
 }
 /* }}} */
 
@@ -2263,22 +2262,22 @@
        TSRMLS_FETCH();
        
        switch (size) {
-       case 1:
+               case 1:
                         font = gdFontTiny;
                         break;
-       case 2:
+               case 2:
                         font = gdFontSmall;
                         break;
-       case 3:
+               case 3:
                         font = gdFontMediumBold;
                         break;
-       case 4:
+               case 4:
                         font = gdFontLarge;
                         break;
-       case 5:
+               case 5:
                         font = gdFontGiant;
                         break;
-           default:
+               default:
                        font = zend_list_find(size - 5, &ind_type);
                         if (!font || ind_type != le_gd_font) {
                                  if (size < 1) {
@@ -2396,20 +2395,20 @@
        font = php_find_gd_font(size);
 
        switch(mode) {
-       case 0:
+               case 0:
                        gdImageChar(im, font, x, y, ch, col);
                        break;
-       case 1:
+               case 1:
                        php_gdimagecharup(im, font, x, y, ch, col);
                        break;
-       case 2:
+               case 2:
                        for (i = 0; (i < l); i++) {
                                gdImageChar(im, font, x, y, (int)((unsigned 
char)str[i]),
                                                        col);
                                x += font->w;
                        }
                        break;
-       case 3: {
+               case 3: {
                        for (i = 0; (i < l); i++) {
                                /* php_gdimagecharup(im, font, x, y, (int)str[i], 
col); */
                                gdImageCharUp(im, font, x, y, (int)str[i], col);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to