From 99edfe1f42462d18fd2e008e0ab26c5ca05522a0 Mon Sep 17 00:00:00 2001 From: Art Kay Date: Thu, 20 Feb 2025 22:42:32 -0500 Subject: [PATCH 1/3] Fix a number of typos in comments / docs --- ext/dom/lexbor/lexbor/css/syntax/state_res.h | 2 +- ext/gd/libgd/gd.h | 2 +- ext/gd/libgd/gdft.c | 2 +- ext/opcache/shared_alloc_win32.c | 2 +- ext/spl/php_spl.c | 4 ++-- ext/spl/spl_dllist.c | 2 +- ext/standard/crc32_x86.c | 4 ++-- ext/standard/filestat.c | 2 +- ext/standard/proc_open.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/dom/lexbor/lexbor/css/syntax/state_res.h b/ext/dom/lexbor/lexbor/css/syntax/state_res.h index 11f460a17dd7f..e0fe453c1bbbe 100644 --- a/ext/dom/lexbor/lexbor/css/syntax/state_res.h +++ b/ext/dom/lexbor/lexbor/css/syntax/state_res.h @@ -49,7 +49,7 @@ lxb_css_syntax_state_res_map[256] = lxb_css_syntax_state_hash, /* 0x23; '#'; Pound sign */ lxb_css_syntax_state_delim, /* 0x24; '$'; Dollar sign */ lxb_css_syntax_state_delim, /* 0x25; '%'; Percentage sign */ - lxb_css_syntax_state_delim, /* 0x26; '&'; Commericial and */ + lxb_css_syntax_state_delim, /* 0x26; '&'; Commercial and */ lxb_css_syntax_state_string, /* 0x27; '''; Apostrophe */ lxb_css_syntax_state_lparenthesis, /* 0x28; '('; Left bracket */ lxb_css_syntax_state_rparenthesis, /* 0x29; ')'; Right bracket */ diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index 5325a63709257..26c4196e85e1f 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -50,7 +50,7 @@ extern "C" { pixels are represented by integers, which must be 32 bits wide or more. - True colors are repsented as follows: + True colors are represented as follows: ARGB diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index 34a4064f5fcb1..3f9cf59d568c9 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -400,7 +400,7 @@ static void *fontFetch (char **error, void *key) fontlist = gdEstrdup(a->fontlist); /* - * Must use gd_strtok_r becasuse strtok() isn't thread safe + * Must use gd_strtok_r because strtok() isn't thread safe */ for (name = gd_strtok_r (fontlist, LISTSEPARATOR, &strtok_ptr); name; name = gd_strtok_r (0, LISTSEPARATOR, &strtok_ptr)) { char *strtok_ptr_path; diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index 3f0c71a7c6678..086ec4a36f8a6 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -284,7 +284,7 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_ } else { char *s = ZCG(accel_directives).mmap_base; - /* skip leading 0x, %p assumes hexdecimal format anyway */ + /* skip leading 0x, %p assumes hexadecimal format anyway */ if (*s == '0' && *(s + 1) == 'x') { s += 2; } diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 78315e9880b4f..1149be29bd46e 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -528,7 +528,7 @@ PHP_FUNCTION(spl_autoload_register) if (ZEND_FCI_INITIALIZED(fci)) { if (!fcc.function_handler) { /* Call trampoline has been cleared by zpp. Refetch it, because we want to deal - * with it outselves. It is important that it is not refetched on every call, + * with it ourselves. It is important that it is not refetched on every call, * because calls may occur from different scopes. */ zend_is_callable_ex(&fci.function_name, NULL, IS_CALLABLE_SUPPRESS_DEPRECATIONS, NULL, &fcc, NULL); } @@ -591,7 +591,7 @@ PHP_FUNCTION(spl_autoload_unregister) if (!fcc.function_handler) { /* Call trampoline has been cleared by zpp. Refetch it, because we want to deal - * with it outselves. It is important that it is not refetched on every call, + * with it ourselves. It is important that it is not refetched on every call, * because calls may occur from different scopes. */ zend_is_callable_ex(&fci.function_name, NULL, 0, NULL, &fcc, NULL); } diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 5a78db2921a81..0f525e627d305 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -764,7 +764,7 @@ PHP_METHOD(SplDoublyLinkedList, offsetUnset) element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); if (element != NULL) { - /* connect the neightbors */ + /* connect the neighbors */ if (element->prev) { element->prev->next = element->next; } diff --git a/ext/standard/crc32_x86.c b/ext/standard/crc32_x86.c index 211ff4da50c29..0b655fd6a4832 100644 --- a/ext/standard/crc32_x86.c +++ b/ext/standard/crc32_x86.c @@ -66,7 +66,7 @@ static uint8_t pclmul_shuf_mask_table[16] = { /* Folding of 128-bit data chunks */ #define CRC32_FOLDING_BLOCK_SIZE (16) -/* PCLMUL version of non-relfected crc32 */ +/* PCLMUL version of non-reflected crc32 */ ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_DECL(size_t crc32_pclmul_batch(uint32_t *crc, const unsigned char *p, size_t nr, const crc32_pclmul_consts *consts)); size_t crc32_pclmul_batch(uint32_t *crc, const unsigned char *p, size_t nr, const crc32_pclmul_consts *consts) { @@ -183,7 +183,7 @@ size_t crc32_pclmul_batch(uint32_t *crc, const unsigned char *p, size_t nr, cons return (nr_in - nr); /* the nr processed */ } -/* PCLMUL version of relfected crc32 */ +/* PCLMUL version of reflected crc32 */ ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_DECL(size_t crc32_pclmul_reflected_batch(uint32_t *crc, const unsigned char *p, size_t nr, const crc32_pclmul_consts *consts)); size_t crc32_pclmul_reflected_batch(uint32_t *crc, const unsigned char *p, size_t nr, const crc32_pclmul_consts *consts) { diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 0825fa058641b..fb2398dd40863 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -39,7 +39,7 @@ #if defined(__APPLE__) /* - Apple statvfs has an interger overflow in libc copying to statvfs. + Apple statvfs has an integer overflow in libc copying to statvfs. cvt_statfs_to_statvfs(struct statfs *from, struct statvfs *to) { to->f_blocks = (fsblkcnt_t)from->f_blocks; */ diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index be33b5d4043d2..84984188f2710 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -38,7 +38,7 @@ #ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP /* Only defined on glibc >= 2.29, FreeBSD CURRENT, musl >= 1.1.24, * MacOS Catalina or later.. - * It should be posible to modify this so it is also + * It should be possible to modify this so it is also * used in older systems when $cwd == NULL but care must be taken * as at least glibc < 2.24 has a legacy implementation known * to be really buggy. From 8c415796549ce00efff53bda0cd77e6aef81270a Mon Sep 17 00:00:00 2001 From: Art Kay Date: Fri, 21 Feb 2025 14:15:35 -0500 Subject: [PATCH 2/3] Update ext/dom/lexbor/lexbor/css/syntax/state_res.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michael Voříšek --- ext/dom/lexbor/lexbor/css/syntax/state_res.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/lexbor/lexbor/css/syntax/state_res.h b/ext/dom/lexbor/lexbor/css/syntax/state_res.h index e0fe453c1bbbe..aa7f0f70766c7 100644 --- a/ext/dom/lexbor/lexbor/css/syntax/state_res.h +++ b/ext/dom/lexbor/lexbor/css/syntax/state_res.h @@ -49,7 +49,7 @@ lxb_css_syntax_state_res_map[256] = lxb_css_syntax_state_hash, /* 0x23; '#'; Pound sign */ lxb_css_syntax_state_delim, /* 0x24; '$'; Dollar sign */ lxb_css_syntax_state_delim, /* 0x25; '%'; Percentage sign */ - lxb_css_syntax_state_delim, /* 0x26; '&'; Commercial and */ + lxb_css_syntax_state_delim, /* 0x26; '&'; Ampersand */ lxb_css_syntax_state_string, /* 0x27; '''; Apostrophe */ lxb_css_syntax_state_lparenthesis, /* 0x28; '('; Left bracket */ lxb_css_syntax_state_rparenthesis, /* 0x29; ')'; Right bracket */ From 8999cddc2d11ce6550068b193fa1e2c75d05d0fb Mon Sep 17 00:00:00 2001 From: Art Kay Date: Wed, 26 Feb 2025 12:23:03 -0500 Subject: [PATCH 3/3] Revert changes sent upstream --- ext/dom/lexbor/lexbor/css/syntax/state_res.h | 2 +- ext/gd/libgd/gdft.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/dom/lexbor/lexbor/css/syntax/state_res.h b/ext/dom/lexbor/lexbor/css/syntax/state_res.h index aa7f0f70766c7..11f460a17dd7f 100644 --- a/ext/dom/lexbor/lexbor/css/syntax/state_res.h +++ b/ext/dom/lexbor/lexbor/css/syntax/state_res.h @@ -49,7 +49,7 @@ lxb_css_syntax_state_res_map[256] = lxb_css_syntax_state_hash, /* 0x23; '#'; Pound sign */ lxb_css_syntax_state_delim, /* 0x24; '$'; Dollar sign */ lxb_css_syntax_state_delim, /* 0x25; '%'; Percentage sign */ - lxb_css_syntax_state_delim, /* 0x26; '&'; Ampersand */ + lxb_css_syntax_state_delim, /* 0x26; '&'; Commericial and */ lxb_css_syntax_state_string, /* 0x27; '''; Apostrophe */ lxb_css_syntax_state_lparenthesis, /* 0x28; '('; Left bracket */ lxb_css_syntax_state_rparenthesis, /* 0x29; ')'; Right bracket */ diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index 3f9cf59d568c9..68e52b0ee7284 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -28,7 +28,7 @@ #endif #endif -/* number of antialised colors for indexed bitmaps */ +/* number of antialiased colors for indexed bitmaps */ /* overwrite Windows GDI define in case of windows build */ #ifdef NUMCOLORS #undef NUMCOLORS @@ -400,7 +400,7 @@ static void *fontFetch (char **error, void *key) fontlist = gdEstrdup(a->fontlist); /* - * Must use gd_strtok_r because strtok() isn't thread safe + * Must use gd_strtok_r becasuse strtok() isn't thread safe */ for (name = gd_strtok_r (fontlist, LISTSEPARATOR, &strtok_ptr); name; name = gd_strtok_r (0, LISTSEPARATOR, &strtok_ptr)) { char *strtok_ptr_path; @@ -760,7 +760,7 @@ static char * gdft_draw_bitmap (gdCache_head_t *tc_cache, gdImage * im, int fg, */ *pixel = (fg < 0) ? -fg : fg; } else { - /* find antialised color */ + /* find antialiased color */ tc_key.bgcolor = *pixel; tc_elem = (tweencolor_t *) gdCacheGet(tc_cache, &tc_key); *pixel = tc_elem->tweencolor;