]> granicus.if.org Git - php/commitdiff
- Fix whitespace (guys, please try to stick with the php4 tree style as far
authorZeev Suraski <zeev@php.net>
Tue, 19 Mar 2002 19:15:40 +0000 (19:15 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 19 Mar 2002 19:15:40 +0000 (19:15 +0000)
  as indentation/newlines go, and also as far as using {} even on if's
  that have single statements)
- Fix Windows build

main/memory_streams.c
sapi/isapi/php4isapi.c
win32/php4dllts.dsp

index 0ea76898b619ac20f0dc1085878440b51a6298f7..d27db784ca8676676aa8907bb41cfa571842e97c 100644 (file)
@@ -40,7 +40,10 @@ typedef struct {
        int                     mode;
 } php_stream_memory_data;
 
-static size_t php_stream_memory_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+static size_t php_stream_memory_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
+{
        php_stream_memory_data *ms;
 
        assert(stream != NULL);
@@ -73,9 +76,13 @@ static size_t php_stream_memory_write(php_stream *stream, const char *buf, size_
                ms->fpos += count;
        }
        return count;
-} /* }}} */
+}
+/* }}} */
+
 
-static size_t php_stream_memory_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static size_t php_stream_memory_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
+{      
        php_stream_memory_data *ms;
 
        assert(stream != NULL);
@@ -100,10 +107,13 @@ static size_t php_stream_memory_read(php_stream *stream, char *buf, size_t count
                ms->fpos += count;
        }
        return count;
-} /* }}} */
+}
+/* }}} */
 
 
-static int php_stream_memory_close(php_stream *stream, int close_handle TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static int php_stream_memory_close(php_stream *stream, int close_handle TSRMLS_DC)
+{      
        php_stream_memory_data *ms;
 
        assert(stream != NULL);
@@ -117,16 +127,21 @@ static int php_stream_memory_close(php_stream *stream, int close_handle TSRMLS_D
        ms->fsize = 0;
        ms->fpos = 0;
        return 0;
-} /* }}} */
+}
+/* }}} */
 
 
-static int php_stream_memory_flush(php_stream *stream TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static int php_stream_memory_flush(php_stream *stream TSRMLS_DC) { 
        /* nothing to do here */
        return 0;
-} /* }}} */
+}
+/* }}} */
 
 
-static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC)
+{
        php_stream_memory_data *ms;
 
        assert(stream != NULL);
@@ -176,9 +191,13 @@ static int php_stream_memory_seek(php_stream *stream, off_t offset, int whence T
                        return 0;
                        /*return EINVAL;*/
        }
-} /* }}} */
+}
+/* }}} */
 
-static char *php_stream_memory_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+static char *php_stream_memory_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_DC)
+{
        size_t n = 1;
        char *c = buf;
 
@@ -200,11 +219,17 @@ static char *php_stream_memory_gets(php_stream *stream, char *buf, size_t maxlen
        }
        *c = 0;
        return buf;
-} /* }}} */
+}
+/* }}} */
 
-static int php_stream_memory_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+static int php_stream_memory_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
+{ 
        return FAILURE;
-} /* }}} */
+}
+/* }}} */
+
 
 php_stream_ops php_stream_memory_ops = {
        php_stream_memory_write, php_stream_memory_read,
@@ -215,7 +240,10 @@ php_stream_ops     php_stream_memory_ops = {
        "MEMORY"
 };
 
-PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC)
+{
        php_stream_memory_data *self;
 
        self = emalloc(sizeof(*self));
@@ -226,10 +254,13 @@ PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC) { /*
        self->smax = -1;
        self->mode = mode;
        return php_stream_alloc(&php_stream_memory_ops, self, 0, "rwb");
-} /* }}} */
+}
+/* }}} */
 
-PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC TSRMLS_DC) { /* {{{ */
-       php_stream *stream;
+
+/* {{{ */
+PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC TSRMLS_DC)
+{      php_stream *stream;
        php_stream_memory_data *ms;
 
        if ((stream = php_stream_memory_create_rel(TEMP_STREAM_DEFAULT)) != NULL) {
@@ -240,9 +271,13 @@ PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length ST
                ms->mode = mode;
        }
        return stream;
-} /* }}} */
+}
+/* }}} */
+
 
-PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC TSRMLS_DC) { /* {{{ */
+/* {{{ */
+PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC TSRMLS_DC)
+{ 
        php_stream_memory_data *ms;
 
        assert(stream != NULL);
@@ -252,10 +287,10 @@ PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length ST
 
        *length = ms->fsize;
        return ms->data;
-} /* }}} */
-
+}
 /* }}} */
 
+
 /* {{{ ------- TEMP stream implementation -------*/
 
 typedef struct {
@@ -264,7 +299,10 @@ typedef struct {
        int                     mode;
 } php_stream_temp_data;
 
-static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
+{ 
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -283,9 +321,13 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t
                }
        }
        return php_stream_write(ts->innerstream, buf, count);
-} /* }}} */
+}
+/* }}} */
+
 
-static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
+{ 
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -293,10 +335,13 @@ static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count T
        assert(ts != NULL);
 
        return php_stream_read(ts->innerstream, buf, count);
-} /* }}} */
+}
+/* }}} */
 
 
-static int php_stream_temp_close(php_stream *stream, int close_handle TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static int php_stream_temp_close(php_stream *stream, int close_handle TSRMLS_DC)
+{
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -304,10 +349,13 @@ static int php_stream_temp_close(php_stream *stream, int close_handle TSRMLS_DC)
        assert(ts != NULL);
 
        return php_stream_close(ts->innerstream);
-} /* }}} */
+}
+/* }}} */
 
 
-static int php_stream_temp_flush(php_stream *stream TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static int php_stream_temp_flush(php_stream *stream TSRMLS_DC)
+{ 
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -315,10 +363,13 @@ static int php_stream_temp_flush(php_stream *stream TSRMLS_DC) { /* {{{ */
        assert(ts != NULL);
 
        return php_stream_flush(ts->innerstream);
-} /* }}} */
+}
+/* }}} */
 
 
-static int php_stream_temp_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC) { /* {{{ */
+/* {{{ */
+static int php_stream_temp_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC)
+{ 
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -326,9 +377,13 @@ static int php_stream_temp_seek(php_stream *stream, off_t offset, int whence TSR
        assert(ts != NULL);
 
        return php_stream_seek(ts->innerstream, offset, whence);
-} /* }}} */
+}
+/* }}} */
 
-char *php_stream_temp_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+char *php_stream_temp_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_DC)
+{ 
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -336,9 +391,13 @@ char *php_stream_temp_gets(php_stream *stream, char *buf, size_t maxlen TSRMLS_D
        assert(ts != NULL);
 
        return php_stream_gets(ts->innerstream, buf, maxlen);
-} /* }}} */
+}
+/* }}} */
 
-static int php_stream_temp_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+static int php_stream_temp_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
+{ 
        php_stream_temp_data *ts;
 
        assert(stream != NULL);
@@ -346,7 +405,8 @@ static int php_stream_temp_cast(php_stream *stream, int castas, void **ret TSRML
        assert(ts != NULL);
 
        return php_stream_cast(ts->innerstream, castas, ret, 0);
-} /* }}} */
+}
+/* }}} */
 
 php_stream_ops php_stream_temp_ops = {
        php_stream_temp_write, php_stream_temp_read,
@@ -357,7 +417,10 @@ php_stream_ops     php_stream_temp_ops = {
        "TEMP"
 };
 
-PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC)
+{ 
        php_stream_temp_data *self;
        php_stream *stream;
 
@@ -369,9 +432,13 @@ PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STR
        self->innerstream = php_stream_memory_create(mode);
        php_stream_temp_write(stream, NULL, 0 TSRMLS_CC);
        return stream;
-} /* }}} */
+}
+/* }}} */
 
-PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC) { /* {{{ */
+
+/* {{{ */
+PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC)
+{ 
        php_stream *stream;
        php_stream_temp_data *ms;
 
@@ -385,7 +452,8 @@ PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char
                ms->mode = mode;
        }
        return stream;
-} /* }}} */
+}
+/* }}} */
 
 /*
  * Local variables:
index 2d55d13c4e7a81439c7bb456ad126d8ae589af1e..9f3019534550e5672616967bd646d9bc50c427db 100644 (file)
@@ -207,7 +207,7 @@ static int sapi_isapi_ub_write(const char *str, uint str_length TSRMLS_DC)
        LPEXTENSION_CONTROL_BLOCK ecb;
        
        ecb = (LPEXTENSION_CONTROL_BLOCK) SG(server_context);
-       if (ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes, HSE_IO_SYNC ) == FALSE) {
+       if (ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes, HSE_IO_SYNC) == FALSE) {
                php_handle_aborted_connection();
        }
        return num_bytes;
index 94adcf90bbbb67ada121e2c54e8cbd9864c65bf4..15f684f8fe31f51158ed57f3aa799b60c38a9212 100644 (file)
@@ -174,6 +174,10 @@ SOURCE=..\main\main.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\main\memory_streams.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\main\mergesort.c\r
 # End Source File\r
 # Begin Source File\r
@@ -234,15 +238,15 @@ SOURCE=..\main\streams.c
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\user_streams.c\r
+SOURCE=..\main\strlcat.c\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\strlcat.c\r
+SOURCE=..\main\strlcpy.c\r
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\main\strlcpy.c\r
+SOURCE=..\main\user_streams.c\r
 # End Source File\r
 # End Group\r
 # Begin Group "Header Files"\r