summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src/str2num.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-12-161-2/+2
|\ | | | | | | | | | | | | | | | | | | * PHP-7.3: Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte Fix #78943: mail() may release string with refcount==1 twice
| * Fix #78878: Buffer underflow in bc_shift_addsubChristoph M. Becker2019-12-161-2/+2
| | | | | | | | | | We must not rely on `isdigit()` to detect digits, since we only support decimal ASCII digits in the following processing.
| * Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | Warn about non well-formed arguments in bcmathvladyslavstartsev2019-05-141-2/+4
| | | | | | | | | | Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com> Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
* | [ci skip] Rename libbcmath license file to LICENSEPeter Kokot2019-05-071-1/+1
| | | | | | | | | | | | - More common filename accross the PHP repository - Additionally, this patch replaces some legacy form feed (FF or ^L) characters (for printers) to LF (\n) newline character.
* | Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | 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
* Fixed bug #46781 (BC math handles minus zero incorrectly)Christoph M. Becker2017-09-111-0/+3
| | | | | | | Actually, there is no negative zero at all. We obey Postel's law, and still accept negative zeroes, but we store them as positive zeroes after the conversion from string, i.e. we normalize before further processing.
* trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-1/+1
|
* Made bcmath extension thread safe.Sander Roobol2002-11-221-5/+2
| | | | | @Made bcmath extension thread safe. (Sander)
* - Revert previous patchAndi Gutmans2002-11-201-1/+1
|
* - Intermediate commit which works on making bcmath thread-safe.Andi Gutmans2002-11-201-1/+1
|
* At long last, import the bcmath library, by Phil NelsonZeev Suraski2000-11-221-0/+112