mirror of
https://github.com/php/pecl-file_formats-yaml.git
synced 2026-03-23 23:02:08 +01:00
Tidy whitespace
- trim trailing whitespace - sync EOL(s) - space before tabs in some files This patch adds some missing newlines and trims some multiple redundant final newlines into a single 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:
2
README
2
README
@@ -24,7 +24,7 @@ To compile your new extension, you will have to execute the following steps:
|
||||
BUILDING ON WINDOWS
|
||||
===================
|
||||
|
||||
The extension provides the VisualStudio V6 project file
|
||||
The extension provides the VisualStudio V6 project file
|
||||
|
||||
yaml.dsp
|
||||
To compile the extension you open this file using VisualStudio,
|
||||
|
||||
1
TODO
1
TODO
@@ -11,4 +11,3 @@ tests for parse callbacks
|
||||
|
||||
Add php ini setting to turn y/n boolean treatment on/off.
|
||||
see http://www.kuwata-lab.com/materials/php_yaml-0.3.0.patch
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
|
||||
PHP_ARG_WITH(yaml, [whether to enable LibYAML suppot],
|
||||
[ --with-yaml[[=DIR]] Enable LibYAML support.
|
||||
DIR is the path to LibYAML install prefix])
|
||||
|
||||
|
||||
if test "$PHP_YAML" != "no"; then
|
||||
|
||||
AC_MSG_CHECKING([for yaml headers])
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="intro.yaml" class="preface">
|
||||
<h1 class="title">Introduction</h1>
|
||||
<p class="para">
|
||||
@@ -44,9 +44,9 @@
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -59,18 +59,18 @@
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="yaml.requirements" class="section">
|
||||
<h2 class="title">Requirements</h2>
|
||||
<p class="para">
|
||||
This extension requires the <a href="http://pyyaml.org/wiki/LibYAML" class="link external">» LibYAML C
|
||||
library</a> version 0.1.0 or higher to be installed.
|
||||
library</a> version 0.1.0 or higher to be installed.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="yaml.installation" class="section">
|
||||
<h2 class="title">Installation</h2>
|
||||
<p class="para">
|
||||
@@ -82,7 +82,7 @@ is not bundled with PHP.
|
||||
found in the manual chapter titled <a href="#install.pecl" class="link">Installation
|
||||
of PECL extensions</a>. Additional information such as new releases,
|
||||
downloads, source files, maintainer information, and a CHANGELOG, can be
|
||||
located here:
|
||||
located here:
|
||||
<a href="http://code.google.com/p/php-yaml/" class="link external">» http://code.google.com/p/php-yaml/</a>.
|
||||
</p>
|
||||
<p class="para">
|
||||
@@ -95,8 +95,8 @@ section.
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ The behaviour of these functions is affected by settings in <var class="filename
|
||||
<p class="para">
|
||||
<table class="doctable table">
|
||||
<caption><b>Yaml Configure Options</b></caption>
|
||||
|
||||
|
||||
<thead valign="middle">
|
||||
<tr valign="middle">
|
||||
<th>Name</th>
|
||||
@@ -156,7 +156,7 @@ The behaviour of these functions is affected by settings in <var class="filename
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</p>
|
||||
@@ -171,7 +171,7 @@ the configuration directives.</p>
|
||||
<span class="term">
|
||||
<i><tt class="parameter">yaml.decode_binary</tt></i>
|
||||
|
||||
<span class="type">boolean</span>
|
||||
<span class="type">boolean</span>
|
||||
</span>
|
||||
|
||||
<dd>
|
||||
@@ -187,7 +187,7 @@ the configuration directives.</p>
|
||||
<span class="term">
|
||||
<i><tt class="parameter">yaml.decode_timestamp</tt></i>
|
||||
|
||||
<span class="type">integer</span>
|
||||
<span class="type">integer</span>
|
||||
</span>
|
||||
|
||||
<dd>
|
||||
@@ -203,7 +203,7 @@ the configuration directives.</p>
|
||||
<span class="term">
|
||||
<i><tt class="parameter">yaml.output_canonical</tt></i>
|
||||
|
||||
<span class="type">boolean</span>
|
||||
<span class="type">boolean</span>
|
||||
</span>
|
||||
|
||||
<dd>
|
||||
@@ -219,7 +219,7 @@ the configuration directives.</p>
|
||||
<span class="term">
|
||||
<i><tt class="parameter">yaml.output_indent</tt></i>
|
||||
|
||||
<span class="type">integer</span>
|
||||
<span class="type">integer</span>
|
||||
</span>
|
||||
|
||||
<dd>
|
||||
@@ -236,7 +236,7 @@ the configuration directives.</p>
|
||||
<span class="term">
|
||||
<i><tt class="parameter">yaml.output_width</tt></i>
|
||||
|
||||
<span class="type">integer</span>
|
||||
<span class="type">integer</span>
|
||||
</span>
|
||||
|
||||
<dd>
|
||||
@@ -255,9 +255,9 @@ the configuration directives.</p>
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="yaml.resources" class="section">
|
||||
<h2 class="title">Resource Types</h2>
|
||||
<p class="para">
|
||||
@@ -274,7 +274,7 @@ the configuration directives.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@ been compiled into PHP or dynamically loaded at runtime.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -750,14 +750,14 @@ bool(true)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ref.yaml" class="reference">
|
||||
<h1 class="title">Yaml Functions</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1545,4 +1545,4 @@ array(8) {
|
||||
</div>
|
||||
<hr />
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -46,4 +46,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
@@ -294,4 +294,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
@@ -121,4 +121,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
@@ -28,4 +28,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
&reftitle.required;
|
||||
<para>
|
||||
This extension requires the <link xlink:href="&url.yaml.libyaml;">LibYAML C
|
||||
library</link> version 0.1.0 or higher to be installed.
|
||||
library</link> version 0.1.0 or higher to be installed.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</para>
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;yaml">&url.pecl.package;yaml</link>.
|
||||
<link xlink:href="&url.pecl.package;yaml">&url.pecl.package;yaml</link>.
|
||||
</para>
|
||||
<para>
|
||||
&pecl.windows.download;
|
||||
@@ -59,4 +59,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ ul.simple li {
|
||||
|
||||
/* 3px IE bug hack hidden from IE5-mac \*/
|
||||
* html #content { height: 1%; }
|
||||
/* End hide from IE5-mac */
|
||||
/* End hide from IE5-mac */
|
||||
|
||||
/* Layout styling and helpers --------------------------------------------- */
|
||||
#layout_2, #layout_3 {
|
||||
@@ -501,7 +501,7 @@ table.mirrors th {
|
||||
color: inherit;
|
||||
}
|
||||
table.mirrors th.ch {
|
||||
text-align: left;
|
||||
text-align: left;
|
||||
}
|
||||
table.mirrors th img {
|
||||
border: 1px solid #000000;
|
||||
@@ -592,14 +592,14 @@ table#logos td ul {
|
||||
}
|
||||
|
||||
/* PHP Manual table ------------------------------------------------------- */
|
||||
table.doctable, table.informaltable {
|
||||
border: 0px;
|
||||
table.doctable, table.informaltable {
|
||||
border: 0px;
|
||||
}
|
||||
table.doctable td, table.doctable th, table.doctable caption,
|
||||
table.informaltable td, table.informaltable th, table.informaltable caption {
|
||||
table.informaltable td, table.informaltable th, table.informaltable caption {
|
||||
padding: 5px;
|
||||
}
|
||||
table.doctable thead th, table.informaltable thead th {
|
||||
table.doctable thead th, table.informaltable thead th {
|
||||
background-color: #9999CC;
|
||||
}
|
||||
table.doctable tbody td, table.informaltable tbody td {
|
||||
@@ -785,7 +785,7 @@ h4.eventmonth {
|
||||
padding: 5px;
|
||||
}
|
||||
#content.security .record .id,
|
||||
#content.security .record .date,
|
||||
#content.security .record .date,
|
||||
#content.security .record .range {
|
||||
float: left;
|
||||
}
|
||||
@@ -897,7 +897,7 @@ div.example div.example-contents:after {
|
||||
|
||||
div.example-contents br:before {
|
||||
content: counter(phpexample);
|
||||
counter-increment: phpexample;
|
||||
counter-increment: phpexample;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -1017,4 +1017,3 @@ div.reportbug {
|
||||
/*
|
||||
* vim: noet
|
||||
*/
|
||||
|
||||
|
||||
4
emit.c
4
emit.c
@@ -221,8 +221,8 @@ static void y_scan_recursion(const y_emit_state_t *state, zval *data TSRMLS_DC)
|
||||
static zend_long y_search_recursive(
|
||||
const y_emit_state_t *state, const zend_ulong addr TSRMLS_DC)
|
||||
{
|
||||
zval *entry;
|
||||
zend_ulong num_key;
|
||||
zval *entry;
|
||||
zend_ulong num_key;
|
||||
zend_ulong found;
|
||||
|
||||
ZEND_HASH_FOREACH_NUM_KEY_VAL(state->recursive, num_key, entry) {
|
||||
|
||||
@@ -45,4 +45,3 @@ array(2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,4 +30,3 @@ array(1) {
|
||||
int(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,4 +19,3 @@ Warning: yaml_parse_file(): Filename cannot be empty in %s on line %d
|
||||
Warning: yaml_parse_file(invalid): failed to open stream: No such file or directory in %s on line %d
|
||||
|
||||
Warning: yaml_parse_file() expects at least 1 parameter, 0 given in %s on line %d
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ Yaml YtsBasicTests - Simple Sequence
|
||||
You can specify a list in YAML by placing each
|
||||
member of the list on a new line with an opening
|
||||
dash. These lists are called sequences.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -4,7 +4,6 @@ Yaml YtsBasicTests - Nested Sequences
|
||||
You can include a sequence within another
|
||||
sequence by giving the sequence an empty
|
||||
dash, followed by an indented list.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -3,7 +3,6 @@ Yaml YtsBasicTests - Mixed Sequences
|
||||
--DESCRIPTION--
|
||||
Sequences can contain any YAML data,
|
||||
including strings and other sequences.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -4,7 +4,6 @@ Yaml YtsBasicTests - Deeply Nested Sequences
|
||||
Sequences can be nested even deeper, with each
|
||||
level of indentation representing a level of
|
||||
depth.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -6,7 +6,6 @@ hash" to your document by placing each member of the
|
||||
list on a new line, with a colon seperating the key
|
||||
from its value. In YAML, this type of list is called
|
||||
a mapping.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsBasicTests - Sequence in a Mapping
|
||||
--DESCRIPTION--
|
||||
A value in a mapping can be a sequence.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsBasicTests - Nested Mappings
|
||||
--DESCRIPTION--
|
||||
A value in a mapping can be another mapping.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -3,7 +3,6 @@ Yaml YtsBasicTests - Mixed Mapping
|
||||
--DESCRIPTION--
|
||||
A mapping can contain any assortment
|
||||
of mappings and sequences as values.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -4,7 +4,6 @@ Yaml YtsBasicTests - Sequence-Mapping Shortcut
|
||||
If you are adding a mapping to a sequence, you
|
||||
can place the mapping on the same line as the
|
||||
dash as a shortcut.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsBlockMapping - One Element Mapping
|
||||
--DESCRIPTION--
|
||||
A mapping with one key/value pair
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsBlockMapping - Multi Element Mapping
|
||||
--DESCRIPTION--
|
||||
More than one key/value pair
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -3,7 +3,6 @@ Yaml YtsBlockMapping - Values aligned
|
||||
--DESCRIPTION--
|
||||
Often times human editors of documents will align the values even
|
||||
though YAML emitters generally don't.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsBlockMapping - Colons aligned
|
||||
--DESCRIPTION--
|
||||
Spaces can come before the ': ' key/value separator.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsMapInSeq - Single key
|
||||
--DESCRIPTION--
|
||||
Test maps with just one key.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsMapInSeq - Multiple keys
|
||||
--DESCRIPTION--
|
||||
Test a map with multiple keys.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsMapInSeq - Strange keys
|
||||
--DESCRIPTION--
|
||||
Test a map with "line noise" keys.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Yaml YtsStrangeKeys - Quoted line noise key
|
||||
--DESCRIPTION--
|
||||
Check that quoted line noise parses as key.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
@@ -4,7 +4,6 @@ Yaml YtsStrangeKeys - Unquoted line noise key
|
||||
Check that unquoted line noise parses as key.
|
||||
This requires the line noise be tame enough
|
||||
to pass as an implicit plain key.
|
||||
|
||||
--CREDITS--
|
||||
Bryan Davis bd808@bd808.com
|
||||
# yaml.kwiki.org import/conversion
|
||||
|
||||
Reference in New Issue
Block a user