From 03b846e41cb02d7821a2e9965af682366da723c3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 27 Apr 2023 20:44:36 +0200 Subject: [PATCH] Fix various typos and grammar issues --- ext/calendar/calendar.c | 2 +- ext/gd/libgd/gd_bmp.c | 10 +++++----- ext/hash/hash_fnv.c | 4 ++-- ext/hash/hash_md.c | 2 +- ext/intl/collator/collator_convert.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_base64.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_big5.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_cp936.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_gb18030.c | 2 +- .../libmbfl/filters/mbfilter_iso2022jp_mobile.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_qprint.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_sjis.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_ucs4.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf16.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf32.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf7.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_language.c | 2 +- ext/mbstring/libmbfl/mbfl/mbfl_string.c | 2 +- ext/mbstring/mbstring.c | 6 +++--- ext/mysqlnd/mysqlnd_ps_codec.c | 2 +- ext/mysqlnd/mysqlnd_result.c | 2 +- ext/openssl/xp_ssl.c | 2 +- ext/pdo_dblib/dblib_stmt.c | 2 +- ext/sockets/sockets.c | 2 +- ext/standard/file.c | 2 +- ext/standard/filters.c | 2 +- ext/standard/html.c | 4 ++-- ext/standard/http_fopen_wrapper.c | 2 +- main/fopen_wrappers.c | 6 +++--- main/main.c | 4 ++-- main/network.c | 2 +- main/output.c | 4 ++-- main/php_network.h | 2 +- main/php_streams.h | 8 ++++---- main/php_variables.c | 2 +- main/snprintf.c | 2 +- main/streams/plain_wrapper.c | 4 ++-- main/streams/streams.c | 6 +++--- main/streams/transports.c | 2 +- 46 files changed, 64 insertions(+), 64 deletions(-) diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index aab1501fd38e4..756ce0e90dc98 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -354,7 +354,7 @@ PHP_FUNCTION(juliantojd) /* {{{ heb_number_to_chars*/ /* -caution: the Hebrew format produces non unique result. +caution: the Hebrew format produces non-unique result. for example both: year '5' and year '5000' produce 'ה'. use the numeric one for calculations. */ diff --git a/ext/gd/libgd/gd_bmp.c b/ext/gd/libgd/gd_bmp.c index 00903d5ff8dcc..a80904a62914d 100644 --- a/ext/gd/libgd/gd_bmp.c +++ b/ext/gd/libgd/gd_bmp.c @@ -152,7 +152,7 @@ void gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) gdBMPPutInt(out, im->colorsTotal); /* colours used */ gdBMPPutInt(out, 0); /* important colours */ - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = ((int)(im->trueColor ? 3 : 1) * im->sx) % 4; if (padding) { padding = 4 - padding; @@ -646,7 +646,7 @@ static int bmp_read_os2_v2_info(gdIOCtxPtr infile, bmp_info_t *info) return 1; } - /* Lets seek the next 24 pointless bytes, we don't care too much about it */ + /* Let's seek the next 24 pointless bytes, we don't care too much about it */ if (!gdGetBuf(useless_bytes, 24, infile)) { return 1; } @@ -716,7 +716,7 @@ static int bmp_read_direct(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, b } } - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = ((int)(info->depth / 8) * info->width) % 4; if (padding) { padding = 4 - padding; @@ -883,7 +883,7 @@ static int bmp_read_4bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp } } - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = ((int)ceil(0.5 * info->width)) % 4; if (padding) { padding = 4 - padding; @@ -970,7 +970,7 @@ static int bmp_read_8bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp } } - /* The line must be divisible by 4, else its padded with NULLs */ + /* The line must be divisible by 4, else it's padded with NULLs */ padding = (1 * info->width) % 4; if (padding) { padding = 4 - padding; diff --git a/ext/hash/hash_fnv.c b/ext/hash/hash_fnv.c index 37dc1f22dc7c3..92d4922bd810e 100644 --- a/ext/hash/hash_fnv.c +++ b/ext/hash/hash_fnv.c @@ -161,7 +161,7 @@ PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * cont * alternate - if > 0 use the alternate version * * returns: - * 32 bit hash as a static hash type + * 32-bit hash as a static hash type */ static uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate) @@ -204,7 +204,7 @@ fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate) * alternate - if > 0 use the alternate version * * returns: - * 64 bit hash as a static hash type + * 64-bit hash as a static hash type */ static uint64_t fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate) diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c index a065f417e5395..eef2af3526608 100644 --- a/ext/hash/hash_md.c +++ b/ext/hash/hash_md.c @@ -238,7 +238,7 @@ PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX * context, const unsigned char *inpu /* }}} */ /* {{{ PHP_MD4Final - MD4 finalization. Ends an MD4 message-digest operation, writing the + MD4 finalization. Ends an MD4 message-digest operation, writing the message digest and zeroizing the context. */ PHP_HASH_API void PHP_MD4Final(unsigned char digest[16], PHP_MD4_CTX * context) diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index 3c29910698d99..acf2b2f7d41fe 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -370,7 +370,7 @@ zval* collator_normalize_sort_argument( zval* arg, zval *rv ) if( Z_TYPE_P( arg ) != IS_STRING ) { - /* If its not a string then nothing to do. + /* If it's not a string then nothing to do. * Return original arg. */ COLLATOR_CONVERT_RETURN_FAILED( arg ); diff --git a/ext/mbstring/libmbfl/filters/mbfilter_base64.c b/ext/mbstring/libmbfl/filters/mbfilter_base64.c index 0f93670fa1257..b5a732224f003 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_base64.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_base64.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 4 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/filters/mbfilter_big5.c b/ext/mbstring/libmbfl/filters/mbfilter_big5.c index faf77524af075..ab10c6a5df3e4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_big5.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_big5.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_tw.c + * The source code included in this file was separated from mbfilter_tw.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c index 9b0f02766b8a0..ba3e6c6436708 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp936.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp936.c @@ -22,7 +22,7 @@ * */ /* - * the source code included in this files was separated from mbfilter_cn.c + * the source code included in this file was separated from mbfilter_cn.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c index cec5f5d41d5e6..d8181d7f7c30d 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_cn.c + * The source code included in this file was separated from mbfilter_cn.c * by Moriyoshi Koizumi on 4 Dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c index aa5f323db6f0a..d9b1362d15f93 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_ja.c + * The source code included in this file was separated from mbfilter_ja.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c index d35cec9541093..96b9546dde105 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_ja.c + * The source code included in this file was separated from mbfilter_ja.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c index 6a0d1ab6653ba..6485e735ed4ba 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_gb18030.c @@ -22,7 +22,7 @@ * */ /* - * the source code included in this files was separated from mbfilter_cp936.c + * the source code included in this file was separated from mbfilter_cp936.c * by rui hirokawa on 11 Aug 2011. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c index 63d7c7b7f298c..79b7a4714af23 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_iso2022_jp_ms.c + * The source code included in this file was separated from mbfilter_iso2022_jp_ms.c * by Rui Hirokawa on 25 July 2011. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c index 0bbef0fcb1b84..c743942d0c5c4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_qprint.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_qprint.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c index 6966c8425cb59..fd0efb2987994 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter_ja.c + * The source code included in this file was separated from mbfilter_ja.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c index 410be0ace74f5..1585cb82e3ff9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_ucs4.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c index ab8789fab35f4..9e584cb354c2c 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf16.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf16.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c index 58551c8b3932d..b49f5df5369e4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf32.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf32.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 20 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index c3a2aaae0cf10..af84602ae1880 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c index 77b65bbeee8a4..d8af71686a1f3 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by moriyoshi koizumi on 4 dec 2002. * */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c index 59e2676208b90..7d5fdc3e0a469 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by rui hrokawa on 8 aug 2011. * */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c index 2bd9cca7b5b2a..93a8d91e7a552 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c index aab0a17daa96e..41572faa568e8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_language.c b/ext/mbstring/libmbfl/mbfl/mbfl_language.c index ba1855aed109e..05be288ab77f8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_language.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_language.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_string.c b/ext/mbstring/libmbfl/mbfl/mbfl_string.c index 760634e65d06d..6485ceac74db8 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_string.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_string.c @@ -22,7 +22,7 @@ * */ /* - * The source code included in this files was separated from mbfilter.c + * The source code included in this file was separated from mbfilter.c * by Moriyoshi Koizumi on 20 Dec 2002. The file * mbfilter.c is included in this package . * diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 7172656d736d8..73dea4e5c6b81 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1348,7 +1348,7 @@ PHP_FUNCTION(mb_http_output) } /* }}} */ -/* {{{ Sets the current detect_order or Return the current detect_order as a array */ +/* {{{ Sets the current detect_order or Return the current detect_order as an array */ PHP_FUNCTION(mb_detect_order) { zend_string *order_str = NULL; @@ -4828,7 +4828,7 @@ static bool mb_fast_check_utf8_default(zend_string *str) switch (ab) { case 1: /* 2-byte character. No further bytes to check for 0x80. Check first byte - * for for xx00 000x (overlong sequence). */ + * for xx00 000x (overlong sequence). */ if ((c & 0x3e) == 0) { return false; } @@ -4844,7 +4844,7 @@ static bool mb_fast_check_utf8_default(zend_string *str) case 3: /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2 - * bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a + * bytes for 1111 0000, xx00 xxxx (overlong sequence), then check for a * character greater than 0x0010ffff (f4 8f bf bf) */ if ((*(++p) & 0xc0) != 0x80 || (*(++p) & 0xc0) != 0x80 || (c == 0xf0 && (d & 0x30) == 0) || (c > 0xf4 || (c == 0xf4 && d > 0x8f))) { return false; diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 89d90cc78c2a1..ca6c2112cffa5 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -691,7 +691,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval /* User hasn't sent anything, we will send empty string. Empty string has length of 0, encoded in 1 byte. No real - data will follows after it. + data will follow after it. */ (*data_size)++; } diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 9cad5247a7d39..d3314b366fecb 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -328,7 +328,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) /* If SERVER_MORE_RESULTS_EXISTS is set then this is either MULTI_QUERY or a CALL() The first packet after sending the query/com_execute has the bit set only - in this cases. Not sure why it's a needed but it marks that the whole stream + in these cases. Not sure why it's a needed but it marks that the whole stream will include many result sets. What actually matters are the bits set at the end of every result set (the EOF packet). */ diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 166fa2a91f186..7b604be043a5c 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -1636,7 +1636,7 @@ zend_result php_openssl_setup_crypto(php_stream *stream, ERR_clear_error(); /* We need to do slightly different things based on client/server method - * so lets remember which method was selected */ + * so let's remember which method was selected */ sslsock->is_client = cparam->inputs.method & STREAM_CRYPTO_IS_CLIENT; method_flags = cparam->inputs.method & ~STREAM_CRYPTO_IS_CLIENT; diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index acdbf7306d409..c16eb07c59604 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -41,7 +41,7 @@ static char *pdo_dblib_get_field_name(int type) * (example: varchar is reported as char by dbprtype) * * FIX ME: Cache datatypes from server systypes table in pdo_dblib_handle_factory() - * to make this future proof. + * to make this future-proof. */ switch (type) { diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index b73166f75a8c5..77e6a2c4c2b01 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2297,7 +2297,7 @@ PHP_FUNCTION(socket_export_stream) getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen); if (protoid == SOCK_STREAM) { - /* SO_PROTOCOL is not (yet?) supported on OS X, so lets assume it's TCP there */ + /* SO_PROTOCOL is not (yet?) supported on OS X, so let's assume it's TCP there */ #ifdef SO_PROTOCOL protoidlen = sizeof(protoid); getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen); diff --git a/ext/standard/file.c b/ext/standard/file.c index 37f2a6a2b982b..919d21b9a8d7e 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -675,7 +675,7 @@ PHP_FUNCTION(file) } while ((p = memchr(p, eol_marker, (e-p)))); } - /* handle any left overs of files without new lines */ + /* handle any leftovers of files without new lines */ if (s != e) { p = e; goto parse_eol; diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 69336aeefab27..d72c09b7d22b6 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -939,7 +939,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins ps++, icnt--; break; } else if (!inst->lbchars && lb_cnt == 0 && *ps == '\n') { - /* auto-detect line endings, looks like unix-lineendings, not to spec, but it is seem in the wild, a lot */ + /* auto-detect line endings, looks like unix-lineendings, not to spec, but it is seen in the wild, a lot */ lb_cnt = lb_ptr = 0; scan_stat = 0; ps++, icnt--; diff --git a/ext/standard/html.c b/ext/standard/html.c index e6c7798925523..f736ef33d9c76 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -712,9 +712,9 @@ static inline int process_named_entity_html(const char **buf, const char **start *start = *buf; /* "&" is represented by a 0x26 in all supported encodings. That means - * the byte after represents a character or is the leading byte of an + * the byte after represents a character or is the leading byte of a * sequence of 8-bit code units. If in the ranges below, it represents - * necessarily a alpha character because none of the supported encodings + * necessarily an alpha character because none of the supported encodings * has an overlap with ASCII in the leading byte (only on the second one) */ while ((**buf >= 'a' && **buf <= 'z') || (**buf >= 'A' && **buf <= 'Z') || diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 9ae725f7b0d75..89ea1220177f4 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -567,7 +567,7 @@ static php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, * interprets the RFC literally and establishes a keep-alive connection, * unless the user specifically requests something else by specifying a * Connection header in the context options. Send that header even for - * HTTP/1.0 to avoid issues when the server respond with a HTTP/1.1 + * HTTP/1.0 to avoid issues when the server respond with an HTTP/1.1 * keep-alive response, which is the preferred response type. */ if ((have_header & HTTP_HEADER_CONNECTION) == 0) { smart_str_appends(&req_buf, "Connection: close\r\n"); diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 848e204a0f43a..ead11a958b32a 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -590,7 +590,7 @@ PHPAPI zend_string *php_resolve_path(const char *filename, size_t filename_lengt } } /* end provided path */ - /* check in calling scripts' current working directory as a fall back case + /* check in calling scripts' current working directory as a fallback case */ if (zend_is_executing() && (exec_filename = zend_get_executed_filename_ex()) != NULL) { @@ -670,7 +670,7 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c /* check in provided path */ /* append the calling scripts' current working directory - * as a fall back case + * as a fallback case */ if (zend_is_executing() && (exec_filename = zend_get_executed_filename_ex()) != NULL) { @@ -806,7 +806,7 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co fdtest = VCWD_OPEN(filepath, O_RDONLY); if (fdtest != -1) { /* return a relative file path if for any reason - * we cannot cannot getcwd() and the requested, + * we cannot getcwd() and the requested, * relatively referenced file is accessible */ copy_len = path_len > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : path_len; if (real_path) { diff --git a/main/main.c b/main/main.c index bf3d30795040d..2e0802d3b3b00 100644 --- a/main/main.c +++ b/main/main.c @@ -407,7 +407,7 @@ static PHP_INI_MH(OnUpdateTimeout) /* * If we're restoring INI values, we shouldn't reset the timer. * Otherwise, the timer is active when PHP is idle, such as the - * the CLI web server or CGI. Running a script will re-activate + * CLI web server or CGI. Running a script will re-activate * the timeout, so it's not needed to do so at script end. */ zend_set_timeout(EG(timeout_seconds), 0); @@ -1022,7 +1022,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ origin = ZSTR_VAL(replace_origin); } - /* origin and buffer available, so lets come up with the error message */ + /* origin and buffer available, so let's come up with the error message */ if (docref && docref[0] == '#') { docref_target = strchr(docref, '#'); docref = NULL; diff --git a/main/network.c b/main/network.c index a189714aafbf9..ea3d17614f565 100644 --- a/main/network.c +++ b/main/network.c @@ -969,7 +969,7 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short /* }}} */ /* {{{ php_any_addr - * Fills the any (wildcard) address into php_sockaddr_storage + * Fills any (wildcard) address into php_sockaddr_storage */ PHPAPI void php_any_addr(int family, php_sockaddr_storage *addr, unsigned short port) { diff --git a/main/output.c b/main/output.c index 0567ca97570c5..57a61e4b93651 100644 --- a/main/output.c +++ b/main/output.c @@ -156,7 +156,7 @@ PHPAPI void php_output_shutdown(void) /* }}} */ /* {{{ SUCCESS|FAILURE php_output_activate(void) - * Reset output globals and setup the output handler stack */ + * Reset output globals and set up the output handler stack */ PHPAPI int php_output_activate(void) { #ifdef ZTS @@ -348,7 +348,7 @@ PHPAPI void php_output_discard_all(void) /* }}} */ /* {{{ int php_output_get_level(void) - * Get output buffering level, ie. how many output handlers the stack contains */ + * Get output buffering level, i.e. how many output handlers the stack contains */ PHPAPI int php_output_get_level(void) { return OG(active) ? zend_stack_count(&OG(handlers)) : 0; diff --git a/main/php_network.h b/main/php_network.h index a3b7ba7ab3180..7cc3609c44089 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -49,7 +49,7 @@ # define EWOULDBLOCK EAGAIN #endif -/* This is a work around for GCC bug 69602: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 */ +/* This is a workaround for GCC bug 69602: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 */ #if EAGAIN != EWOULDBLOCK # define PHP_IS_TRANSIENT_ERROR(err) (err == EAGAIN || err == EWOULDBLOCK) #else diff --git a/main/php_streams.h b/main/php_streams.h index 1058c2b54ad45..13f8fe827b08a 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -90,7 +90,7 @@ END_EXTERN_C() * The only exceptions to this rule are that stream implementations can use * the php_stream->abstract pointer to hold their context, and streams * opened via stream_open_wrappers can use the zval ptr in - * php_stream->wrapperdata to hold meta data for php scripts to + * php_stream->wrapperdata to hold metadata for php scripts to * retrieve using file_get_wrapper_data(). */ typedef struct _php_stream php_stream; @@ -199,7 +199,7 @@ struct _php_stream { php_stream_filter_chain readfilters, writefilters; php_stream_wrapper *wrapper; /* which wrapper was used to open the stream */ - void *wrapperthis; /* convenience pointer for a instance of a wrapper */ + void *wrapperthis; /* convenience pointer for an instance of a wrapper */ zval wrapperdata; /* fgetwrapperdata retrieves this */ uint8_t is_persistent:1; @@ -290,7 +290,7 @@ PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream * #define PHP_STREAM_FREE_CALL_DTOR 1 /* call ops->close */ #define PHP_STREAM_FREE_RELEASE_STREAM 2 /* pefree(stream) */ -#define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close it's underlying handle */ +#define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close its underlying handle */ #define PHP_STREAM_FREE_RSRC_DTOR 8 /* called from the resource list dtor */ #define PHP_STREAM_FREE_PERSISTENT 16 /* manually freeing a persistent connection */ #define PHP_STREAM_FREE_IGNORE_ENCLOSING 32 /* don't close the enclosing stream instead */ @@ -441,7 +441,7 @@ PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize); #define php_stream_truncate_set_size(stream, size) _php_stream_truncate_set_size((stream), (size)) END_EXTERN_C() -#define PHP_STREAM_OPTION_META_DATA_API 11 /* ptrparam is a zval* to which to add meta data information */ +#define PHP_STREAM_OPTION_META_DATA_API 11 /* ptrparam is a zval* to which to add metadata information */ #define php_stream_populate_meta_data(stream, zv) (_php_stream_set_option((stream), PHP_STREAM_OPTION_META_DATA_API, 0, zv) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0) /* Check if the stream is still "live"; for sockets/pipes this means the socket diff --git a/main/php_variables.c b/main/php_variables.c index 3d7d904a47d7f..15314869180aa 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -207,7 +207,7 @@ PHPAPI void php_register_variable_ex(const char *var_name, zval *val, zval *trac zval_ptr_dtor_nogc(val); /* do not output the error message to the screen, - this helps us to to avoid "information disclosure" */ + this helps us to avoid "information disclosure" */ if (!PG(display_errors)) { php_error_docref(NULL, E_WARNING, "Input variable nesting level exceeded " ZEND_LONG_FMT ". To increase the limit change max_input_nesting_level in php.ini.", PG(max_input_nesting_level)); } diff --git a/main/snprintf.c b/main/snprintf.c index 9acd4efe6d772..de69200304a43 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -421,7 +421,7 @@ typedef struct buf_area buffy; * bep points to the end-of-buffer+1 * While using this macro, note that the nextb pointer is NOT updated. * - * NOTE: Evaluation of the c argument should not have any side-effects + * NOTE: Evaluation of the c argument should not have any side effects */ #define INS_CHAR(c, sp, bep, cc) \ { \ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 3a6b2ccf28dcc..128c3410aa835 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -539,7 +539,7 @@ static int php_stdiop_flush(php_stream *stream) /* * stdio buffers data in user land. By calling fflush(3), this - * data is send to the kernel using write(2). fsync'ing is + * data is sent to the kernel using write(2). fsync'ing is * something completely different. */ if (data->file) { @@ -1671,7 +1671,7 @@ PHPAPI php_stream *_php_stream_fopen_with_path(const char *filename, const char /* check in provided path */ /* append the calling scripts' current working directory - * as a fall back case + * as a fallback case */ if (zend_is_executing() && (exec_filename = zend_get_executed_filename_ex()) != NULL) { diff --git a/main/streams/streams.c b/main/streams/streams.c index 9663f792bc393..f655faef10cbf 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -469,7 +469,7 @@ fprintf(stderr, "stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remov the cookie_closer unsets the fclose_stdiocast flags, so we can be sure that we only reach here when PHP code calls php_stream_free. - Lets let the cookie code clean it all up. + Let's let the cookie code clean it all up. */ stream->in_free = 0; return fclose(stream->stdiocast); @@ -839,7 +839,7 @@ PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb) } /* if the stream doesn't directly support stat-ing, return with failure. - * We could try and emulate this by casting to a FD and fstat-ing it, + * We could try and emulate this by casting to an FD and fstat-ing it, * but since the fd might not represent the actual underlying content * this would give bogus results. */ if (stream->ops->stat == NULL) { @@ -1503,7 +1503,7 @@ PHPAPI zend_string *_php_stream_copy_to_mem(php_stream *src, size_t maxlen, int return result; } - /* avoid many reallocs by allocating a good sized chunk to begin with, if + /* avoid many reallocs by allocating a good-sized chunk to begin with, if * we can. Note that the stream may be filtered, in which case the stat * result may be inaccurate, as the filter may inflate or deflate the * number of bytes that we can read. In order to avoid an upsize followed diff --git a/main/streams/transports.c b/main/streams/transports.c index 6fc2848be6e67..1c9a83be2c882 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -76,7 +76,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in if (persistent_id) { switch(php_stream_from_persistent_id(persistent_id, &stream)) { case PHP_STREAM_PERSISTENT_SUCCESS: - /* use a 0 second timeout when checking if the socket + /* use a 0-second timeout when checking if the socket * has already died */ if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL)) { return stream;