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
This commit is contained in:
Peter Kokot 2018-10-14 12:56:38 +02:00
parent f87f7bb8c7
commit 1ad08256f3
431 changed files with 91 additions and 575 deletions

View File

@ -1,4 +1,3 @@
version: "{branch}.build.{build}"
image: Visual Studio 2017
@ -50,4 +49,3 @@ build_script:
test_script:
- appveyor\test.bat

View File

@ -1,4 +1,3 @@
#
# Zend
#

View File

@ -1,4 +1,3 @@
#
# LCOV
#

View File

@ -41,4 +41,3 @@ SOURCE AND HEADER FILE NAME
OTHER OPTIONS
Run php ext_skel.php --help to see the available options.

View File

@ -373,4 +373,3 @@ New Release Manager Checklist
5. Request moderation access to announce@php.net and primary-qa-tester@lists.php.net lists, to
be able to moderate your release announcements. All the announcements should be sent from
the @php.net alias.

View File

@ -164,4 +164,3 @@ PECL SITE CONFORMITY
This macros has to be used within your foo_module_entry to indicate the
extension version.

View File

@ -3,4 +3,3 @@ The Win32 Build System.
See https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
vim:tw=78:sw=1:ts=1:et

View File

@ -37,4 +37,3 @@ Guidelines for contributors
- [README.GIT-RULES](/README.GIT-RULES)
- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES)
- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS)

View File

@ -2,4 +2,3 @@
ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_win32.c");
ADD_FLAG("CFLAGS_BD_TSRM", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");

View File

@ -53,4 +53,3 @@ depend:
zend_execute.lo: $(srcdir)/zend_execute.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c

View File

@ -30,4 +30,3 @@ if cmp configure.old configure > /dev/null 2>&1; then
else
echo "buildconf: created or modified ${1}configure"
fi

View File

@ -7,4 +7,4 @@ function func5() { }
function func6() { }
function func7() { }
print ("ok\n");
?>
?>

View File

@ -8,4 +8,3 @@ class d { public function __construct() { $this->d = 4; } };
$d = new d;
?>

View File

@ -2,4 +2,3 @@
class A {}
class B extends A {}

View File

@ -238,4 +238,3 @@ ZEND_API void zend_strip(void)
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/

View File

@ -120,4 +120,3 @@ ZEND_API int zend_vm_kind(void)
{
return ZEND_VM_KIND;
}

View File

@ -3235,4 +3235,3 @@ m4_include([build/ax_check_compile_flag.m4])
m4_include([build/ax_gcc_func_attribute.m4])
m4_include([build/php_cxx_compile_stdcxx.m4])

View File

@ -42,4 +42,3 @@ cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\build_task.bat
if %errorlevel% neq 0 exit /b 3
exit /b 0

View File

@ -69,4 +69,3 @@ nmake /NOLOGO
if %errorlevel% neq 0 exit /b 3
exit /b 0

View File

@ -10,4 +10,3 @@ cmd /c %SDK_RUNNER% -t %APPVEYOR_BUILD_FOLDER%\appveyor\test_task.bat
if %errorlevel% neq 0 exit /b 3
exit /b 0

View File

@ -98,4 +98,3 @@ set EXIT_CODE=%errorlevel%
powershell -Command "$wc = New-Object 'System.Net.WebClient'; $wc.UploadFile('https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%', 'c:\junit.out.xml')"
exit /b %EXIT_CODE%

View File

@ -49,4 +49,3 @@ configure: aclocal.m4 configure.ac $(config_m4_files)
@echo rebuilding $@
@rm -f $@
$(PHP_AUTOCONF) -f $(SUPPRESS_WARNINGS)

View File

@ -37,5 +37,3 @@ cat $infile | \
-e "s'@EXT_MODULE_PTRS@'$module_ptrs'" \
-e 's/@NEWLINE@/\
/g'

View File

@ -4,4 +4,4 @@ SET PHP_BUILDCONF_PATH=%~dp0
copy %PHP_BUILDCONF_PATH%\win32\build\configure.bat %PHP_BUILDCONF_PATH% > nul
SET PHP_SDK_SCRIPT_PATH=
IF NOT EXIST %PHP_BUILDCONF_PATH% (echo Error generating configure script, configure script was not copied) ELSE (echo Now run 'configure --help')
IF NOT EXIST %PHP_BUILDCONF_PATH% (echo Error generating configure script, configure script was not copied) ELSE (echo Now run 'configure --help')

View File

@ -1,3 +1 @@
Phil Nelson <philnelson@acm.org> wrote bcmath library.

View File

@ -1,4 +1,3 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
@ -511,5 +510,3 @@ Random Hacker.
Ty Coon, President of Vice
That's all there is to it!

View File

@ -7,4 +7,3 @@ Wed Jun 7 09:39:02 2000 Phil Nelson <phil@cs.wwu.edu>
2000-05-21 Phil Nelson <phil@cs.wwu.edu>
* Initial setup of bcmath library., calling it version 0.1.

View File

@ -18,4 +18,3 @@ calculate an exact number of digits after the decimal point regardless
of the number of digits in the integer part. GMP floats have a
"fixed, but arbitrary" mantissa and so multiplying two floats will end
up dropping digits BC must calculate.

View File

@ -84,4 +84,3 @@ bc_add (n1, n2, result, scale_min)
bc_free_num (result);
*result = sum;
}

View File

@ -157,4 +157,3 @@ bc_compare (n1, n2)
{
return _bc_do_compare (n1, n2, TRUE, FALSE);
}

View File

@ -267,4 +267,3 @@ bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale)
return 0; /* Everything is OK. */
}

View File

@ -83,4 +83,3 @@ bc_modulo (bc_num num1, bc_num num2, bc_num *result, int scale)
{
return bc_divmod (num1, num2, NULL, result, scale);
}

View File

@ -228,4 +228,3 @@ _bc_do_sub (n1, n2, scale_min)
_bc_rm_leading_zeros (diff);
return diff;
}

View File

@ -80,4 +80,3 @@ bc_int2num (num, val)
while (ix-- > 0)
*vptr++ = *--bptr;
}

View File

@ -65,4 +65,3 @@ bc_is_near_zero (num, scale)
else
return TRUE;
}

View File

@ -45,4 +45,3 @@ bc_is_neg (num)
{
return num->n_sign == MINUS;
}

View File

@ -66,4 +66,3 @@ bc_num2long (num)
else
return (-val);
}

View File

@ -120,4 +120,3 @@ bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale)
}
bc_free_num (&power);
}

View File

@ -51,4 +51,3 @@ _bc_rm_leading_zeros (num)
num->n_len--;
}
}

View File

@ -125,4 +125,3 @@ bc_sqrt (bc_num *num, int scale)
bc_free_num (&diff);
return 1;
}

View File

@ -108,4 +108,3 @@ bc_str2num (bc_num *num, char *str, int scale)
if (bc_is_zero (*num))
(*num)->n_sign = PLUS;
}

View File

@ -86,4 +86,3 @@ bc_sub (n1, n2, result, scale_min)
bc_free_num (result);
*result = diff;
}

View File

@ -60,4 +60,3 @@ bc_is_zero (bc_num num)
else
return TRUE;
}

View File

@ -1,4 +1,3 @@
/* $selId: dow.c,v 2.0 1995/10/24 01:13:06 lees Exp $
* Copyright 1993-1995, Scott E. Lee, all rights reserved.
* Permission granted to use, copy, modify, distribute and sell so long as

View File

@ -242,4 +242,3 @@ fail:
}
return NULL;
}

View File

@ -562,4 +562,3 @@ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *objec
return &I->iter;
}

View File

@ -601,5 +601,3 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri
return ret;
}

View File

@ -1121,4 +1121,3 @@ PHP_FUNCTION(variant_cast)
VariantClear(&vres);
}
/* }}} */

View File

@ -643,5 +643,3 @@ PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export(zval *val)
return (IDispatch*)disp;
}

View File

@ -83,4 +83,3 @@ function curl_cli_server_start() {
return PHP_CURL_SERVER_ADDRESS;
}

View File

@ -1,2 +1,2 @@
DBA
Sascha Schumann, Marcus Boerger
Sascha Schumann, Marcus Boerger

View File

@ -51,4 +51,4 @@ This shows whether your combination of handlers works. Most problematic
are dbm and ndbm which conflict with many installations. The reason for
this is that on several systems these libraries are part of more than one
other library. The configuration test only prevents you from configuring
malfaunctioning single handlers but not combinations.
malfaunctioning single handlers but not combinations.

View File

@ -95,4 +95,4 @@ do {
}
} while(1);
?>
?>

View File

@ -3,4 +3,3 @@
<!ELEMENT a EMPTY>
]>
<a></a>

View File

@ -4,4 +4,3 @@
<!ELEMENT b EMPTY>
]>
<a></a>

View File

@ -2,4 +2,3 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<a></a>

View File

@ -5,4 +5,4 @@
]>
<root>
<foo bar="" />
</root>
</root>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<root xmlns="http://ns" xmlns:ns2="http://ns2">
<ns2:child />
</root>
</root>

View File

@ -1 +1 @@
<?php if (!extension_loaded('dom')) die('skip dom extension not available');?>
<?php if (!extension_loaded('dom')) die('skip dom extension not available');?>

View File

@ -77,4 +77,3 @@ PHP_FUNCTION(enchant_dict_quick_check);
* indent-tabs-mode: t
* End:
*/

View File

@ -10,4 +10,4 @@ if(PHP_EXIF != 'no')
EXTENSION('exif', 'exif.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
}
}
}

View File

@ -1,2 +1 @@
$(builddir)/libmagic/apprentice.lo: $(srcdir)/data_file.c

View File

@ -58,4 +58,3 @@ int overflow2(int a, int b)
}
return 0;
}

View File

@ -1505,4 +1505,3 @@ ZEND_GET_MODULE(hash)
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/

View File

@ -24,4 +24,3 @@ if (PHP_ICONV != "no") {
PHP_ICONV = "no";
}
}

View File

@ -4,4 +4,4 @@
// $dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
// @dl("iconv$dlext");
//}
?>
?>

View File

@ -1,4 +1,3 @@
Many of the tests in this directory require a mail server to be running, if there is no mail server the test will skip and warn, see skipif.inc for details.
To make the tests run parameters in the skipif.inc and imap_include.inc file will need to be changed to match the local mailserver configuration.
@ -39,7 +38,3 @@ auth default {
user = root
}

View File

@ -22,4 +22,4 @@ foreach($mailboxes as $value) {
}
imap_close($imap_stream, CL_EXPUNGE);
?>
?>

View File

@ -237,4 +237,3 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
return rv;
}

View File

@ -39,4 +39,3 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func);
#endif /* COMMON_DATE_H */

View File

@ -245,4 +245,3 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
RETURN_TRUE;
}
/* }}} */

View File

@ -30,4 +30,3 @@ PHP_FUNCTION(datefmt_set_calendar);
PHP_FUNCTION(datefmt_get_calendar_object);
#endif /* DATEFORMAT_ATTRCPP_H */

View File

@ -188,4 +188,3 @@ PHP_FUNCTION(datefmt_format)
}
/* }}} */

View File

@ -41,4 +41,3 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
bool& calendar_owned);
#endif /* DATEFORMAT_HELPERS_H */

View File

@ -210,4 +210,3 @@ PHP_FUNCTION(datefmt_localtime)
}
}
/* }}} */

View File

@ -909,4 +909,3 @@ PHP_FUNCTION(grapheme_extract)
* vim600: fdm=marker
* vim: noet sw=4 ts=4
*/

View File

@ -406,4 +406,3 @@ UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *stat
* vim600: fdm=marker
* vim: noet sw=4 ts=4
*/

View File

@ -30,4 +30,4 @@ file_put_contents("$here/_files/res_index.txt", $res_index);
passthru( ICU_DIR."genrb -s $here/_files/ -d $here/_files/resourcebundle res_index.txt");
// passthru(ICU_DIR."icupkg -tl -a $here/rb.txt -s $here/_files -d $here/_files new $here/_files/resourcebundle.dat");
// passthru(ICU_DIR."icupkg -tl -a $here/rb.txt -s $here/_files -d $here/_files new $here/_files/resourcebundle.dat");

View File

@ -10,4 +10,3 @@ function debug( $res ) {
}
return $ret . sprintf( "%5d: %s\n", intl_get_error_code(), intl_get_error_message() );
}

View File

@ -777,4 +777,3 @@ int php_uchar_minit(INIT_FUNC_ARGS) {
return SUCCESS;
}

View File

@ -1,4 +1,3 @@
ext\json\json_scanner.c: ext\json\json_scanner.re
$(RE2C) $(RE2C_FLAGS) -t ext/json/php_json_scanner_defs.h --no-generation-date -bci -o ext/json/json_scanner.c ext/json/json_scanner.re

View File

@ -20,4 +20,3 @@ if (PHP_JSON != "no") {
PHP_INSTALL_HEADERS("ext/json/", "php_json.h php_json_parser.h php_json_scanner.h");
}

View File

@ -393,4 +393,3 @@ std:
*/
}

View File

@ -84,4 +84,3 @@ PHP_JSON_API int php_json_parse(php_json_parser *parser);
int php_json_yyparse(php_json_parser *parser);
#endif /* PHP_JSON_PARSER_H */

View File

@ -46,4 +46,3 @@ void php_json_scanner_init(php_json_scanner *scanner, char *str, size_t str_len,
int php_json_scan(php_json_scanner *s);
#endif /* PHP_JSON_SCANNER_H */

View File

@ -31,4 +31,3 @@ if (PHP_LDAP != "no") {
WARNING("ldap not enabled; libraries and headers not found");
}
}

View File

@ -66,4 +66,3 @@
1999/4/26 sgk 入力フィルタを実装。漢字コードを推定しながらフィルタを追加。
1999/6/?? Unicodeサポート。
1999/6/22 sgk ライセンスをLGPLに変更。

View File

@ -1,4 +1,3 @@
version 1.3.2 August 20, 2011
- added JISX-0213:2004 based encoding : Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004 (rui).

View File

@ -1224,4 +1224,3 @@ static const unsigned short mb_tbl_uni_sb2code5_val[] = { // 0xfe4c5 - 0xfee7d
0x285F, 0x2860, 0x2861, };
static const unsigned short mb_tbl_uni_sb2code5_len = sizeof(mb_tbl_uni_sb2code5_key)/sizeof(unsigned short);

View File

@ -38,4 +38,3 @@ typedef struct _mbfl_html_entity_entry {
extern const mbfl_html_entity_entry mbfl_html_entity_list[];
#endif /* MBFL_HTML_ENTITIES_H */

View File

@ -80,5 +80,3 @@ int mbfl_filt_conv_any_7bit(int c, mbfl_convert_filter *filter)
}
return c;
}

View File

@ -42,5 +42,3 @@ int mbfl_filt_conv_ascii_wchar(int c, mbfl_convert_filter *filter);
int mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter);
#endif /* MBFL_MBFILTER_ASCII_H */

View File

@ -212,5 +212,3 @@ int mbfl_filt_conv_base64dec_flush(mbfl_convert_filter *filter)
}
return 0;
}

View File

@ -351,5 +351,3 @@ static int mbfl_filt_ident_big5(int c, mbfl_identify_filter *filter)
return c;
}

View File

@ -137,5 +137,3 @@ int mbfl_filt_conv_wchar_byte2le(int c, mbfl_convert_filter *filter)
CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
return c;
}

View File

@ -159,5 +159,3 @@ int mbfl_filt_conv_wchar_byte4le(int c, mbfl_convert_filter *filter)
CK((*filter->output_function)((c >> 24) & 0xff, filter->data));
return c;
}

View File

@ -150,5 +150,3 @@ static int mbfl_filt_ident_cp1251(int c, mbfl_identify_filter *filter)
filter->flag = 1; /* not it */
return c;
}

View File

@ -41,4 +41,3 @@ int mbfl_filt_conv_wchar_cp1251(int c, mbfl_convert_filter *filter);
int mbfl_filt_conv_cp1251_wchar(int c, mbfl_convert_filter *filter);
#endif /* MBFL_MBFILTER_CP1251_H */

View File

@ -145,5 +145,3 @@ static int mbfl_filt_ident_cp1252(int c, mbfl_identify_filter *filter)
filter->flag = 1; /* not it */
return c;
}

View File

@ -155,5 +155,3 @@ static int mbfl_filt_ident_cp1254(int c, mbfl_identify_filter *filter)
filter->flag = 1; /* not it */
return c;
}

Some files were not shown because too many files have changed in this diff Show More