jani                                     Tue, 29 Dec 2009 19:25:09 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292777

Log:
- Sync with HEAD

Changed paths:
    U   php/php-src/branches/PHP_5_2/main/rfc1867.c
    U   php/php-src/branches/PHP_5_3/main/rfc1867.c

Modified: php/php-src/branches/PHP_5_2/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_2/main/rfc1867.c 2009-12-29 19:23:41 UTC (rev 
292776)
+++ php/php-src/branches/PHP_5_2/main/rfc1867.c 2009-12-29 19:25:09 UTC (rev 
292777)
@@ -263,7 +263,7 @@
 }
 /* }}} */

-static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
+static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
 {
        VCWD_UNLINK(*filename);
        return 0;
@@ -304,7 +304,7 @@

 /*
  * Fill up the buffer with client data.
- * returns number of bytes added to buffer.
+ * Returns number of bytes added to buffer.
  */
 static int fill_buffer(multipart_buffer *self TSRMLS_DC)
 {
@@ -417,7 +417,7 @@
        return line;
 }

-/* returns the next CRLF terminated line from the client */
+/* Returns the next CRLF terminated line from the client */
 static char *get_line(multipart_buffer *self TSRMLS_DC)
 {
        char* ptr = next_line(self);
@@ -665,7 +665,7 @@
  * Search for a string in a fixed-length byte string.
  * If partial is true, partial matches are allowed at the end of the buffer.
  * Returns NULL if not found, or a pointer to the start of the first match.
-*/
+ */
 static void *php_ap_memstr(char *haystack, int haystacklen, char *needle, int 
needlen, int partial)
 {
        int len = haystacklen;
@@ -747,12 +747,14 @@
                total_bytes += read_bytes;
        }

-       if (out) out[total_bytes] = '\0';
+       if (out) {
+               out[total_bytes] = '\0';
+       }
        *len = total_bytes;

        return out;
 }
-/* }}} */
+/* }}} */

 /*
  * The combined READER/HANDLER
@@ -773,7 +775,7 @@
 #endif
        multipart_buffer *mbuff;
        zval *array_ptr = (zval *) arg;
-       int fd=-1;
+       int fd = -1;
        zend_llist header;
        void *event_extra_data = NULL;
        int llen = 0;
@@ -860,7 +862,7 @@
        while (!multipart_buffer_eof(mbuff TSRMLS_CC))
        {
                char buff[FILLUNIT];
-               char *cd = NULL,*param = NULL, *filename = NULL, *tmp = NULL;
+               char *cd = NULL, *param = NULL, *filename = NULL, *tmp = NULL;
                size_t blen = 0, wlen = 0;
                off_t offset;

@@ -1084,7 +1086,6 @@
 #endif
                                        cancel_upload = UPLOAD_ERROR_B;
                                } else if (blen > 0) {
-
                                        wlen = write(fd, buff, blen);

                                        if (wlen == -1) {
@@ -1119,7 +1120,6 @@
                                cancel_upload = 5;
                        }
 #endif
-
                        if (php_rfc1867_callback != NULL) {
                                multipart_event_file_end event_file_end;

@@ -1153,7 +1153,7 @@
                                if (array_index) {
                                        efree(array_index);
                                }
-                               array_index = estrndup(start_arr+1, 
array_len-2);
+                               array_index = estrndup(start_arr + 1, array_len 
- 2);
                        }

                        /* Add $foo_name */
@@ -1339,6 +1339,7 @@
                        efree(param);
                }
        }
+
 fileupload_done:
        if (php_rfc1867_callback != NULL) {
                multipart_event_end event_end;
@@ -1349,6 +1350,7 @@

        SAFE_RETURN;
 }
+/* }}} */

 /*
  * Local variables:

Modified: php/php-src/branches/PHP_5_3/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/rfc1867.c 2009-12-29 19:23:41 UTC (rev 
292776)
+++ php/php-src/branches/PHP_5_3/main/rfc1867.c 2009-12-29 19:25:09 UTC (rev 
292777)
@@ -262,7 +262,7 @@
 }
 /* }}} */

-static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
+static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
 {
        VCWD_UNLINK(*filename);
        return 0;
@@ -303,7 +303,7 @@

 /*
  * Fill up the buffer with client data.
- * returns number of bytes added to buffer.
+ * Returns number of bytes added to buffer.
  */
 static int fill_buffer(multipart_buffer *self TSRMLS_DC)
 {
@@ -416,7 +416,7 @@
        return line;
 }

-/* returns the next CRLF terminated line from the client */
+/* Returns the next CRLF terminated line from the client */
 static char *get_line(multipart_buffer *self TSRMLS_DC)
 {
        char* ptr = next_line(self);
@@ -664,7 +664,7 @@
  * Search for a string in a fixed-length byte string.
  * If partial is true, partial matches are allowed at the end of the buffer.
  * Returns NULL if not found, or a pointer to the start of the first match.
-*/
+ */
 static void *php_ap_memstr(char *haystack, int haystacklen, char *needle, int 
needlen, int partial)
 {
        int len = haystacklen;
@@ -746,12 +746,14 @@
                total_bytes += read_bytes;
        }

-       if (out) out[total_bytes] = '\0';
+       if (out) {
+               out[total_bytes] = '\0';
+       }
        *len = total_bytes;

        return out;
 }
-/* }}} */
+/* }}} */

 /*
  * The combined READER/HANDLER
@@ -772,7 +774,7 @@
 #endif
        multipart_buffer *mbuff;
        zval *array_ptr = (zval *) arg;
-       int fd=-1;
+       int fd = -1;
        zend_llist header;
        void *event_extra_data = NULL;
        int llen = 0;
@@ -859,7 +861,7 @@
        while (!multipart_buffer_eof(mbuff TSRMLS_CC))
        {
                char buff[FILLUNIT];
-               char *cd = NULL,*param = NULL, *filename = NULL, *tmp = NULL;
+               char *cd = NULL, *param = NULL, *filename = NULL, *tmp = NULL;
                size_t blen = 0, wlen = 0;
                off_t offset;

@@ -1083,7 +1085,6 @@
 #endif
                                        cancel_upload = UPLOAD_ERROR_B;
                                } else if (blen > 0) {
-
                                        wlen = write(fd, buff, blen);

                                        if (wlen == -1) {
@@ -1118,7 +1119,6 @@
                                cancel_upload = 5;
                        }
 #endif
-
                        if (php_rfc1867_callback != NULL) {
                                multipart_event_file_end event_file_end;

@@ -1152,7 +1152,7 @@
                                if (array_index) {
                                        efree(array_index);
                                }
-                               array_index = estrndup(start_arr+1, 
array_len-2);
+                               array_index = estrndup(start_arr + 1, array_len 
- 2);
                        }

                        /* Add $foo_name */
@@ -1338,6 +1338,7 @@
                        efree(param);
                }
        }
+
 fileupload_done:
        if (php_rfc1867_callback != NULL) {
                multipart_event_end event_end;
@@ -1348,6 +1349,7 @@

        SAFE_RETURN;
 }
+/* }}} */

 /*
  * Local variables:

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

Reply via email to