Skip to content

[skip ci] Fix various typos and grammar issues #11143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/calendar/calendar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
10 changes: 5 additions & 5 deletions ext/gd/libgd/gd_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions ext/hash/hash_fnv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ext/hash/hash_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/collator/collator_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 Dec 2002. The file
* mbfilter.c is included in this package .
*
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_big5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_cp936.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_euc_cn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 Dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_euc_jp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_gb18030.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <hirokawa@php.net> on 11 Aug 2011.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <hirokawa@php.net> on 25 July 2011.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_qprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_sjis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_ucs4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_utf16.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_utf32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 20 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_utf7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 4 dec 2002.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <hirokawa@php.net> on 8 aug 2011.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/mbfl/mbfilter_wchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package .
*
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package .
*
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/mbfl/mbfl_language.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package .
*
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/mbfl/mbfl_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <moriyoshi@php.net> on 20 Dec 2002. The file
* mbfilter.c is included in this package .
*
Expand Down
6 changes: 3 additions & 3 deletions ext/mbstring/mbstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_ps_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)++;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_result.c
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*/
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/xp_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion ext/pdo_dblib/dblib_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ext/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/filters.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -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') ||
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/http_fopen_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading