Sync final newlines

This patch adds some missing newlines and trims multiple newlines into
one.

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-01 23:36:51 +02:00
parent 5d425c4438
commit 9c2a3e006c
18 changed files with 17 additions and 18 deletions

2
.gitignore vendored
View File

@ -5,4 +5,4 @@ shared
sqlite
svn
www/images
www/robots.txt
www/robots.txt

View File

@ -45,4 +45,4 @@ Requirements:
```
## TODO
- add more cowbell
- add more cowbell

View File

@ -3,4 +3,4 @@
define('SVN_DIR', '@SVNDIR@');
define('DOC_DIR', '@DOCDIR@');
define('SQLITE_DIR', '@SQLITEDIR@');
define('SQLITE_DIR', '@SQLITEDIR@');

View File

@ -12,4 +12,3 @@ The actual crontab for docweb should look something like this:
0 0 * * * /path/to/docweb/cron/cron daily
0 0 * * 1 /path/to/docweb/cron/cron weekly
0 0 1 * * /path/to/docweb/cron/cron monthly

View File

@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -30,4 +30,4 @@ define('CACHE_BUGS_COUNT', 300); // 300 = 5mins
require_once('lib_proj_lang.inc.php');
// general support library
require_once('lib_general.inc.php');
require_once('lib_general.inc.php');

View File

@ -80,4 +80,4 @@ function nav_tools($lang)
$out .= '<li><a href="revcheck.php?p=graph&amp;lang='.$lang.'">Graph</a></li>';
$out .= '</ul></div></div>';
return $out;
}
}

View File

@ -282,4 +282,4 @@ function gen_date($file)
{
$unix = filemtime($file);
return '<time class="gen-date" datetime="'.date(DATE_W3C, $unix).'">Generated: '.date('d M Y H:i:s', $unix).'</time>';
}
}

View File

@ -91,4 +91,4 @@ function generate_image($lang, $idx) {
$graph->Add($p1);
$graph->Stroke("../www/images/revcheck/info_revcheck_php_$lang.png");
}
}

View File

@ -72,4 +72,4 @@ function generate_image() {
// Display the graph
$graph->Stroke('../www/images/revcheck/info_revcheck_php_all_lang.png');
}
}

View File

@ -17,4 +17,4 @@ echo "... done"
echo "Generating global graphs"
${PHP} -q ./gen_picture_info_all_lang.php
echo "... done"
echo "... done"

View File

@ -40,4 +40,4 @@ else
fi
echo -n "Reverting directory:"
popd
popd

View File

@ -28,4 +28,4 @@ This guide uses some terminology that you have to know. Don't worry, it's easy:
## Feedback
Feedback is most certainly welcome on this document. Without your submissions and input, this document wouldn't exist.
Please send your additions, comments and criticisms to the following email address: phpdoc@lists.php.net.
Please send your additions, comments and criticisms to the following email address: phpdoc@lists.php.net.

View File

@ -61,4 +61,4 @@ the [Foo Page][example] | [click here][example], go [here][example]
Unix | UNIX (it's a registered trademark)
Windows | windows (when referring to Microsoft Windows)
[example]: http://example.com
[example]: http://example.com

View File

@ -11,4 +11,4 @@ else {
echo '<p>An error occured</p>';
}
site_footer();
site_footer();

View File

@ -36,4 +36,4 @@ mailing list.</p>
<?php
$sidebar = nav_languages();
echo site_footer($sidebar);
echo site_footer($sidebar);

View File

@ -1,3 +1,3 @@
<?php
header('location: ../phd.php');
die;
die;

View File

@ -376,4 +376,4 @@ END_OF_MULTILINE;
if ($lang != 'en') {
$sidebar = nav_tools($lang);
site_footer($sidebar);
}
}