warning: array subscript -65 is below array bounds of ‘const char[26]‘
[-Warray-bounds]
Errors like these sometimes only appear with optimizations when inlining/loop
unrolling.
Closes GH-10788
* Don't do toupper() redundantly in encoding the data for metaphone
All inputs for ENCODE() are already uppercase, so there's no need to
spend time uppercasing them again.
* Don't compute uppercase letter redundantly in checks
If it's a zero-terminator check, or an isalpha() check, there's no need
to convert it to uppercase first.
* Clean-up LookAhead helper
* Add some letter caching to metaphone to increase performance
We don't have to re-read letters, and re-uppercase them if we already
did it once. By caching these results, we gain performance.
Furthermore, we can avoid fetching and uppercasing in some conditions by
first checking what we already had: e.g. if a condition depends on both
Prev_Letter and After_Next_Letter, but we already have Prev_Letter
cached, we can place that first to avoid a fetch+toupper of the
"after next letter".
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.