summaryrefslogtreecommitdiff
path: root/ext/standard/strnatcmp.c
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] Remove text editor modelinesPeter Kokot2019-03-231-1/+1
| | | | | | These were already removed 92ac598aabd336593a47ed3959f1031674b763e6 and this fixes some leftovers. These files don't really need these settings.
* Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
|
* Remove HAVE_ASSERT_HPeter Kokot2018-09-091-1/+0
| | | | | | | | | | | | | | | | The `<assert.h>` header file is part of the standard C89 headers [1] and on older systems there needed to be also a manual check if header is present. Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H` symbol defined by Autoconf in configure.ac can be both removed [2]. This patch also removes unused <assert.h> includes where c files don't use the `assert()` macro. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
* Fix out-of bounds accessZenju2018-07-061-0/+4
| | | | | Test case: strnatcmp_ex(L"333", 3, L"333 ", 4, true) The reason this bug didn't come up earlier is probably because most input strings are null-terminated.
* Drop some pieces of commented-out codeNikita Popov2016-09-041-10/+0
|
* trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
|
* Fix undefined behaviour in strnatcmpAndrea Faulds2014-12-131-2/+2
|
* correct fix to the natcmp_exAnatol Belski2014-09-151-17/+1
| | | | | | | Till now the actualy length diff between the strings was under circumstances returned. Whereby for a compare function only return values of (1, 0, -1) make sense. Thus the old behavior isn't present anymore, natcmp_ex now behaves as a standard compare function.
* fix int overflow preserving the old behaviorAnatol Belski2014-09-141-2/+19
|
* Fix for bug #49698Rasmus Lerdorf2009-09-281-3/+3
|
* Restore intra-string whitespace collapsing broken in the previous change.Rasmus Lerdorf2009-08-081-3/+12
|
* Oops, true/false are not defined on Linux. They are on OSX.Rasmus Lerdorf2009-08-071-2/+3
|
* Only skip leading 0's - fixes a test I broke a while agoRasmus Lerdorf2009-08-071-3/+7
|
* Fix bug #49003 by tweaking the fix to bug #44929 slightly. Rasmus Lerdorf2009-07-211-2/+2
| | | | | | A 0 followed by any punctuation is now significant instead of just 0's in front of a period.
* - Fixed bug #47481 (natcasesort() does not sort extended ASCII characters ↵Jani Taskinen2009-07-171-1/+1
| | | | correctly)
* Don't strip a leading 0 in a floating point numberRasmus Lerdorf2009-04-091-2/+2
|
* Fixed bug #44929 - Better handling of leading zerosRasmus Lerdorf2009-04-081-2/+2
|
* Fixed Bug #29075 (strnatcmp() incorrectly handles whitespace).Ilia Alshanetsky2004-07-151-3/+3
| | | | | # Original Patch by: curt@php.net
* Fixed bug #19795Moriyoshi Koizumi2003-04-161-13/+13
| | | | | # to*() and is*() expect for their arguments an integer in range of 0 - 255
* don't emit code for versionSascha Schumann2002-05-041-0/+2
|
* - Don't wrap lines... this is annoying while coding.Derick Rethans2001-09-091-2/+2
|
* Fix folding and clean up some extensionsRasmus Lerdorf2001-06-061-4/+11
|
* vim-6 does folding - clean up a bunch of missing folding tags plusRasmus Lerdorf2001-06-051-0/+8
| | | | | some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
* @ Updated natural comparison/sorting algorithm by Martin PoolAndrei Zmievski2000-04-291-51/+83
| | | | | | | | @ <mbp@humbug.org.au>. (Andrei) Martin Pool updated the natural comparison/sort algorithm so that fractions compare more "naturally", e.g. 1.002 < 1.1.
* - Make Windows builds build againZeev Suraski2000-04-131-0/+2
| | | | | - Make non-gcc based platforms compile again
* the asset call caused an undefined __eprintf here!Thies C. Arntzen2000-04-131-0/+3
|
* Added natural comparison/sorting routines using code from Martin Pool.Andrei Zmievski2000-04-121-0/+121
@- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(), @ natsort(), and natcasesort(). These are useful for comparing and sorting @ strings that contain numbers. Based on the code from Martin Pool @ <mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/ @ for more info on natural sorting. (Andrei)