Browse Source

Remove an unused variable and a now-unused function.

migration/unlabaled-1.1.2
Wez Furlong 24 years ago
parent
commit
4c2a9c091b
  1. 35
      ext/standard/file.c
  2. 1
      ext/standard/file.h
  3. 2
      ext/standard/http_fopen_wrapper.c

35
ext/standard/file.c

@ -1114,41 +1114,6 @@ PHP_FUNCTION(socket_set_timeout)
#endif /* HAVE_SYS_TIME_H || defined(PHP_WIN32) */
/* }}} */
/* {{{ proto array socket_get_status(resource socket_descriptor)
Return an array describing socket status */
PHP_FUNCTION(socket_get_status)
{
zval **socket;
php_stream *stream;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), &socket) == FAILURE) {
WRONG_PARAM_COUNT;
}
php_stream_from_zval(stream, socket);
array_init(return_value);
if (php_stream_is(stream, PHP_STREAM_IS_SOCKET)) {
php_netstream_data_t *sock = PHP_NETSTREAM_DATA_FROM_STREAM(stream);
add_assoc_bool(return_value, "timed_out", sock->timeout_event);
add_assoc_bool(return_value, "blocked", sock->is_blocked);
add_assoc_bool(return_value, "eof", sock->eof);
add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos);
}
else {
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto string fgets(resource fp[, int length])
Get a line from file pointer */
PHPAPI PHP_FUNCTION(fgets)

1
ext/standard/file.h

@ -57,7 +57,6 @@ PHP_FUNCTION(file_get_contents);
PHP_FUNCTION(set_socket_blocking); /* deprecated */
PHP_FUNCTION(socket_set_blocking);
PHP_FUNCTION(socket_set_timeout);
PHP_FUNCTION(socket_get_status);
PHP_FUNCTION(set_file_buffer);
PHP_FUNCTION(get_meta_tags);
PHP_FUNCTION(flock);

2
ext/standard/http_fopen_wrapper.c

@ -283,7 +283,7 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, ch
while (!body && !php_stream_eof(stream)) {
if (php_stream_gets(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE-1) != NULL) {
char *p, *ws;
char *p;
int found_eol = 0;
int http_header_line_length;

Loading…
Cancel
Save