Commit Graph

204 Commits

Author SHA1 Message Date
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

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
2018-10-15 04:31:31 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
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
2018-10-14 12:54:08 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Christoph M. Becker
33eb30274f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #52974: jewish.c: compile error under Windows with GBK charset
2018-07-22 17:59:38 +02:00
Christoph M. Becker
99fdf5916e Fix #52974: jewish.c: compile error under Windows with GBK charset
jewish.c includes ISO-8859-8 encoded Hebrew Hebrew month names, which
may cause compile errors, and is generally confusing.  We replace the
literal month names with appropriate escape sequences.
2018-07-22 17:42:10 +02:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Edgar R. Sandi
ebdbebee29
pull-request/2456:
increase test coverage in calendar extension
    consistent warnings in calendar extension
2017-04-08 11:37:10 +01:00
Sammy Kaye Powers
1f620efe3c Update copyright header to 2017 in calendar.c 2017-01-04 11:24:25 -06:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Anatol Belski
8bc2155bf9 bring the year back 2017-01-04 13:01:55 +01:00
Anatol Belski
0439ffa2ea revert change in the broken file 2017-01-04 13:01:23 +01:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
ca27efd7b8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip 64-bit specific tests on 32-bit systems
2016-11-17 11:45:14 +03:00
Dmitry Stogov
5e001c34ec Skip 64-bit specific tests on 32-bit systems 2016-11-17 11:44:28 +03:00
Joe Watkins
2d865dfd35 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  news entry for calendar overflow fix
  Fix integer overflow in calender.
2016-11-12 17:35:24 +00:00
Joshua Rogers
1b8cfaf23d Fix integer overflow in calender.
Fix int overflows in conversation functions for calendar.
Add tests for the overflows.
2016-11-12 17:33:51 +00:00
Christoph M. Becker
09b5a453c1 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-29 01:27:51 +02:00
Christoph M. Becker
293dd3d701 Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
#	ext/calendar/calendar.c
2016-07-29 01:26:15 +02:00
Christoph M. Becker
f67ccd4a7b Fix #71894: AddressSanitizer: global-buffer-overflow in zif_cal_from_jd
Julian days < 347998 denote invalid Jewish calendar dates, so
cal_from_jd($jd, CAL_JEWISH) and jdmonthname($jd, CAL_MONTH_JEWISH) should
actually fail. For BC we don't yet let them though, but we fix the OOB read
that happens in this case, and we also adjust cal_from_jd()'s return value
to have empty strings for "abbrevdayname" and "dayname" instead of "Sun"/
"Sunday" and NULL for "dow" instead of 0, which doesn't make any sense.
2016-07-29 01:04:21 +02:00
Christoph M. Becker
834919f0a5 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-28 20:09:50 +02:00
Christoph M. Becker
a952aac6a7 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-28 20:00:37 +02:00
Christoph M. Becker
5c458c9b02 Implement FR #65462: Please add tests for gregorian and jewish overflow fixes 2016-07-28 19:59:14 +02:00
Christoph M. Becker
28ade0e102 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-28 19:25:22 +02:00
Christoph M. Becker
7c412688f4 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-28 19:22:40 +02:00
Christoph M. Becker
7ab39e2fae Fix #67976: cal_days_month() fails for final month of the French calendar
The French calendar ends on 0014-13-05, so trying to calculate the Julian
day of 0015-01-01 fails. We cater to that by returning the hard-coded value.
2016-07-28 19:13:58 +02:00
Anatol Belski
a35adb8b22 fix missing header and conflicting symbol 2016-07-26 14:00:24 +02:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Kalle Sommer Nielsen
169ed3257b Drop VC6 support in ext/calendar 2015-03-29 06:35:23 +02:00
Anatol Belski
ec89c85054 cleaning up the version macros 2015-03-23 20:13:59 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Ferenc Kovacs
c3b44b1175 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixes #67960 - Long/short day names reversed in jddayofweek()

Conflicts:
	ext/calendar/calendar.c
2015-01-02 10:16:37 +01:00
Ferenc Kovacs
fe46966678 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixes #67960 - Long/short day names reversed in jddayofweek()
2015-01-02 10:15:01 +01:00
Greg Roach
244fc1e053 Fixes #67960 - Long/short day names reversed in jddayofweek() 2015-01-02 10:14:12 +01:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski
7b6ed8db2f almost all the replacements of TSRMLS_* are done
Some places have to be yet touched as they use different/custom
macros namings for the same. Also some places in the code became
redundant now, this is the next task. To name some: ext/mysqlnd,
sapi/embed, ext/curl and some smaller places here and there.
2014-12-14 14:22:42 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Veres Lajos
06fdf359e3 typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-23 14:52:47 -08:00
Veres Lajos
4dc994571d typo fixes - https://github.com/vlajos/misspell_fixer
Conflicts:
	ext/ftp/ftp.h
	ext/pcre/pcrelib/pcre_printint.c
	ext/pcre/pcrelib/sljit/sljitLir.c
	ext/pcre/pcrelib/sljit/sljitLir.h
	ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
	ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
	ext/pgsql/pgsql.c
	ext/phar/func_interceptors.c
	ext/soap/soap.c
	ext/standard/image.c
2014-11-23 14:33:43 -08:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
c6a35115bc fix func argument type 2014-08-25 23:52:40 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
96a570cb03 fix zpp 2014-08-21 20:32:39 +02:00
Anatol Belski
fd279836cf ported ext/calendar 2014-08-19 10:42:01 +02:00