1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Sync final and leading newlines

This patch adds some missing newlines, trims some multiple redundant
final newlines into a single one, and trims few 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-17 12:37:26 +02:00
parent d26b9a7148
commit dd8d8bf863
92 changed files with 38 additions and 100 deletions

View File

@@ -14,4 +14,3 @@ if (strncmp($_SERVER["DOCUMENT_ROOT"], $afilename, $len) == 0) {
}
}
include_once "error.php";

View File

@@ -15901,4 +15901,3 @@ contents). (Zeev)</li>
<!-- }}} --></section>
<?php site_footer(); ?>

View File

@@ -92,4 +92,3 @@ site_header("News Archive - 1998", array("cache" => true));
</p>
<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -118,4 +118,3 @@ site_header("News Archive - 1999", array("cache" => true));
</p>
<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -166,4 +166,3 @@ site_header("News Archive - 2000", array("cache" => true));
</p>
<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -966,4 +966,3 @@ site_header("News Archive - 2009", array("cache" => true));
<?php site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -1486,4 +1486,3 @@ site_header("News Archive - 2013", array("cache" => true));
<?php
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -2095,4 +2095,3 @@ The list of changes is recorded in the <a href="http://www.php.net/ChangeLog-5.p
/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -22,4 +22,3 @@ print_news($NEWS_ENTRIES, array("conferences", "cfp", "frontpage", "nofrontpage"
/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -22,4 +22,3 @@ print_news($NEWS_ENTRIES, array("conferences", "cfp", "frontpage", "nofrontpage"
/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -22,4 +22,3 @@ print_news($NEWS_ENTRIES, null, 500, 2017);
/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -22,4 +22,3 @@ print_news($NEWS_ENTRIES, null, 500, 2018);
/* %s/<a href="\(.*\)"><img src="\/images\/news\/\(.*\)" alt="\(.*\)" width.*><\/a>/<?php news_image("\1", "\2", "\3"); ?>/g */
site_footer(array('elephpants' => true, 'sidebar' => $SIDEBAR_DATA));

View File

@@ -33,4 +33,3 @@
</div>
</content>
</entry>

View File

@@ -11,4 +11,3 @@ do {
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/errors.inc';
error_noservice();

View File

@@ -5,4 +5,3 @@
* up and running on your localhost without needing to generate all this
* yourself from master.
*/

View File

@@ -42,4 +42,3 @@ file_put_contents("include/releases.inc", [
]);
echo "This was fun \o/\nI hope you remembered to run this script *before* updating include/version.inc... :)\n";

View File

@@ -207,4 +207,3 @@ $arch->save("archive/archive.xml");
fwrite(STDOUT, "File saved.\nPlease git diff $archivefile sanity-check the changes before committing\n");
fwrite(STDOUT, "NOTE: Remeber to git add $file && git commit $file && git push!!\n");

View File

@@ -50,5 +50,3 @@ if (substr($abs, -3) == ".js" || substr($abs, -5) == ".json") {
}
readfile($abs);

View File

@@ -55,4 +55,3 @@ site_footer(
"sidebar" => $panels,
)
);

View File

@@ -63,4 +63,3 @@
font-weight: 700;
font-style: normal;
}

View File

@@ -8,5 +8,3 @@ Font license info
Author: Dave Gandy
License: SIL ()
Homepage: http://fortawesome.github.com/Font-Awesome/

View File

@@ -1,2 +1 @@
.icon-twitter:before { content: '\e800'; } /* '' */

View File

@@ -1,2 +1 @@
.icon-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }

View File

@@ -82,4 +82,3 @@ $SIDEBAR_DATA ='
site_footer(array('sidebar'=>$SIDEBAR_DATA));
/* vim: set et ts=4 sw=4 ft=php: : */

View File

@@ -84,4 +84,3 @@ foreach ($photos as $photo) {
}
print json_encode($elephpants);

View File

@@ -92,5 +92,3 @@ header('Last-Modified: ' . $tsstring);
header('Expires: ' . date(DATE_RSS, $future));
imgheader($logo);
serve_compressed_if_available($logo);

View File

@@ -233,4 +233,3 @@ $COUNTRIES = array(
'ZMB' => 'Zambia',
'ZWE' => 'Zimbabwe',
);

View File

@@ -40,4 +40,3 @@ function download_file($mirror, $file)
echo " ";
flush();
}

View File

@@ -96,4 +96,3 @@
</body>
</html>

View File

@@ -74,4 +74,3 @@ if ($size) {
<?php site_footer();

View File

@@ -25,4 +25,3 @@
$LAST_UPDATED=time();

View File

@@ -706,4 +706,3 @@ function doc_toc_title($lang, $index, $file, $elm = "dt") {
}
/* vim: set et ts=4 sw=4 ft=php: : */

View File

@@ -222,4 +222,3 @@ function find_manual_page($lang, $keyword)
// all of the slow and unnecessary checks.
return find_manual_page_slow($langs[0], $kw);
}

View File

@@ -527,4 +527,3 @@ function relTime(DateTime $date) {
}
/* vim: set et ts=4 sw=4: */

View File

@@ -575,4 +575,3 @@ if (isset($_SERVER['MIRROR_STATS'])) {
if (isset($_SERVER['BASE_PAGE'])) {
$_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE'];
} else { unset($_SERVER['BASE_HREF']); }

View File

@@ -173,4 +173,3 @@ $PHP_5_RC_DATE = $PHP_5_6_RC_DATE; // Used by master
$PHP_7_VERSION = $PHP_7_2_VERSION; // Some scripts require this set
$PHP_7_DATE = $PHP_7_2_DATE; // Used by bumpRelease script
$PHP_7_RC_DATE = $PHP_7_2_RC_DATE; // Used by master

View File

@@ -198,4 +198,3 @@ site_footer(
'sidebar' => $SIDEBAR
)
);

View File

@@ -69,4 +69,3 @@ foreach($js as $k => $item) {
echo json_encode($index);

View File

@@ -42,4 +42,3 @@ site_header("License Information", array("current" => "help"));
</ul>
<?php site_footer();

View File

@@ -63,5 +63,3 @@ site_header("License Information", array("current" => "help"));
</ul>
<?php site_footer();

View File

@@ -154,4 +154,3 @@ For related projects, please refer to licensing information on the Project websi
</ul>
<?php site_footer(array('sidebar' => $SIDEBAR_DATA));

View File

@@ -116,4 +116,3 @@ function run_self_tests() {
);
}

View File

@@ -135,4 +135,3 @@ site_header("The PHP mirrors problem and troubleshooting guide", array("current"
<?php
site_footer();

View File

@@ -42,4 +42,3 @@ site_header("Mirror Sites", $header_config);
<?php
site_footer();

View File

@@ -37,4 +37,3 @@ site_header("Privacy Policy", array("current" => "footer"));
<?php
site_footer();

View File

@@ -138,4 +138,3 @@ $config = array(
site_footer($config);
}

View File

@@ -46,5 +46,3 @@ am&eacute;liorations et ajouts :
</p>
<?php site_footer(); ?>

View File

@@ -229,4 +229,3 @@ PHP NEWS
- Fixed PDO objects binary incompatibility. (Dmitry)
- Fixed bug #52211 (iconv() returns part of string on error). (Felipe)

View File

@@ -237,4 +237,3 @@ foreach($OLDRELEASES as $major => $a) {
}
site_footer(array("sidebar" => $SIDEBAR_DATA));

View File

@@ -30,4 +30,3 @@ echo '<h1>Search results</h1>';
google_cse($query, $lang);
site_footer();

View File

@@ -11,4 +11,3 @@ Disallow: /manual/vote-note.php
Disallow: /harming/humans
Disallow: /ignoring/human/orders
Disallow: /harm/to/self

View File

@@ -64,4 +64,3 @@ announcement</a> for more information.
<?php
site_footer();

View File

@@ -145,4 +145,3 @@ EOT;
}
site_footer();

View File

@@ -272,4 +272,3 @@ site_footer(
'sidebar' => $SIDEBAR
)
);

View File

@@ -100,5 +100,3 @@ div#usernotes a.usernotes-voted:hover {
position: absolute;
right: 0px;
}

1
ug.php
View File

@@ -127,4 +127,3 @@ site_footer(
"sidebar" => $SIDEBAR_DATA,
)
);