Skip to content

Commit 5173b09

Browse files
committed
pthreads: fix XML to remove useless wrapping para tags via script
1 parent 503a5f5 commit 5173b09

29 files changed

+441
-553
lines changed

reference/pthreads/constants.xml

Lines changed: 103 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,112 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 86e6094e86b84a51d00ab217ac50ce8dde33d82a Maintainer: yuanyuqiang Status: ready -->
3+
<!-- EN-Revision: 1f3517218031b663f773061056a873cf2a03f32d Maintainer: yuanyuqiang Status: ready -->
44
<!-- CREDITS: mowangjuanzi -->
5-
<appendix xml:id="pthreads.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<appendix xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="pthreads.constants">
66
&reftitle.constants;
77
&extension.constants;
8-
<para>
9-
<variablelist>
10-
<varlistentry xml:id="constant.pthreads-inherit-all">
11-
<term>
12-
<constant>PTHREADS_INHERIT_ALL</constant>
13-
(<type>int</type>)
14-
</term>
15-
<listitem>
16-
<simpara>
17-
线程的默认选项。线程开始的时候,pthreads 扩展会将环境复制到线程上下文中。
18-
</simpara>
19-
</listitem>
20-
</varlistentry>
21-
<varlistentry xml:id="constant.pthreads-inherit-none">
22-
<term>
23-
<constant>PTHREADS_INHERIT_NONE</constant>
24-
(<type>int</type>)
25-
</term>
26-
<listitem>
27-
<simpara>
28-
新线程开始时,不继承任何内容。
29-
</simpara>
30-
</listitem>
31-
</varlistentry>
32-
<varlistentry xml:id="constant.pthreads-inherit-ini">
33-
<term>
34-
<constant>PTHREADS_INHERIT_INI</constant>
35-
(<type>int</type>)
36-
</term>
37-
<listitem>
38-
<simpara>
39-
新线程开始时,仅继承 INI 配置。
40-
</simpara>
41-
</listitem>
42-
</varlistentry>
43-
<varlistentry xml:id="constant.pthreads-inherit-constants">
44-
<term>
45-
<constant>PTHREADS_INHERIT_CONSTANTS</constant>
46-
(<type>int</type>)
47-
</term>
48-
<listitem>
49-
<simpara>
50-
新线程开始时,继承用户定义的常量。
51-
</simpara>
52-
</listitem>
53-
</varlistentry>
54-
<varlistentry xml:id="constant.pthreads-inherit-classes">
55-
<term>
56-
<constant>PTHREADS_INHERIT_CLASSES</constant>
57-
(<type>int</type>)
58-
</term>
59-
<listitem>
60-
<simpara>
61-
新线程开始时,继承用户定义的类。
62-
</simpara>
63-
</listitem>
64-
</varlistentry>
65-
<varlistentry xml:id="constant.pthreads-inherit-functions">
66-
<term>
67-
<constant>PTHREADS_INHERIT_FUNCTIONS</constant>
68-
(<type>int</type>)
69-
</term>
70-
<listitem>
71-
<simpara>
72-
新线程开始时,继承用户定义的函数。
73-
</simpara>
74-
</listitem>
75-
</varlistentry>
76-
<varlistentry xml:id="constant.pthreads-inherit-includes">
77-
<term>
78-
<constant>PTHREADS_INHERIT_INCLUDES</constant>
79-
(<type>int</type>)
80-
</term>
81-
<listitem>
82-
<simpara>
83-
新线程开始时,继承包含文件。
84-
</simpara>
85-
</listitem>
86-
</varlistentry>
87-
<varlistentry xml:id="constant.pthreads-inherit-comments">
88-
<term>
89-
<constant>PTHREADS_INHERIT_COMMENTS</constant>
90-
(<type>int</type>)
91-
</term>
92-
<listitem>
93-
<simpara>
94-
新线程开始时,继承所有的注释。
95-
</simpara>
96-
</listitem>
97-
</varlistentry>
98-
<varlistentry xml:id="constant.pthreads-allow-headers">
99-
<term>
100-
<constant>PTHREADS_ALLOW_HEADERS</constant>
101-
(<type>int</type>)
102-
</term>
103-
<listitem>
104-
<simpara>
105-
允许新线程向标准输出发送头信息(通常情况下是被禁止的)。
106-
</simpara>
107-
</listitem>
108-
</varlistentry>
109-
</variablelist>
110-
</para>
8+
<variablelist>
9+
<varlistentry xml:id="constant.pthreads-inherit-all">
10+
<term>
11+
<constant>PTHREADS_INHERIT_ALL</constant>
12+
(<type>int</type>)
13+
</term>
14+
<listitem>
15+
<simpara>
16+
线程的默认选项。线程开始的时候,pthreads 扩展会将环境复制到线程上下文中。
17+
</simpara>
18+
</listitem>
19+
</varlistentry>
20+
<varlistentry xml:id="constant.pthreads-inherit-none">
21+
<term>
22+
<constant>PTHREADS_INHERIT_NONE</constant>
23+
(<type>int</type>)
24+
</term>
25+
<listitem>
26+
<simpara>
27+
新线程开始时,不继承任何内容。
28+
</simpara>
29+
</listitem>
30+
</varlistentry>
31+
<varlistentry xml:id="constant.pthreads-inherit-ini">
32+
<term>
33+
<constant>PTHREADS_INHERIT_INI</constant>
34+
(<type>int</type>)
35+
</term>
36+
<listitem>
37+
<simpara>
38+
新线程开始时,仅继承 INI 配置。
39+
</simpara>
40+
</listitem>
41+
</varlistentry>
42+
<varlistentry xml:id="constant.pthreads-inherit-constants">
43+
<term>
44+
<constant>PTHREADS_INHERIT_CONSTANTS</constant>
45+
(<type>int</type>)
46+
</term>
47+
<listitem>
48+
<simpara>
49+
新线程开始时,继承用户定义的常量。
50+
</simpara>
51+
</listitem>
52+
</varlistentry>
53+
<varlistentry xml:id="constant.pthreads-inherit-classes">
54+
<term>
55+
<constant>PTHREADS_INHERIT_CLASSES</constant>
56+
(<type>int</type>)
57+
</term>
58+
<listitem>
59+
<simpara>
60+
新线程开始时,继承用户定义的类。
61+
</simpara>
62+
</listitem>
63+
</varlistentry>
64+
<varlistentry xml:id="constant.pthreads-inherit-functions">
65+
<term>
66+
<constant>PTHREADS_INHERIT_FUNCTIONS</constant>
67+
(<type>int</type>)
68+
</term>
69+
<listitem>
70+
<simpara>
71+
新线程开始时,继承用户定义的函数。
72+
</simpara>
73+
</listitem>
74+
</varlistentry>
75+
<varlistentry xml:id="constant.pthreads-inherit-includes">
76+
<term>
77+
<constant>PTHREADS_INHERIT_INCLUDES</constant>
78+
(<type>int</type>)
79+
</term>
80+
<listitem>
81+
<simpara>
82+
新线程开始时,继承包含文件。
83+
</simpara>
84+
</listitem>
85+
</varlistentry>
86+
<varlistentry xml:id="constant.pthreads-inherit-comments">
87+
<term>
88+
<constant>PTHREADS_INHERIT_COMMENTS</constant>
89+
(<type>int</type>)
90+
</term>
91+
<listitem>
92+
<simpara>
93+
新线程开始时,继承所有的注释。
94+
</simpara>
95+
</listitem>
96+
</varlistentry>
97+
<varlistentry xml:id="constant.pthreads-allow-headers">
98+
<term>
99+
<constant>PTHREADS_ALLOW_HEADERS</constant>
100+
(<type>int</type>)
101+
</term>
102+
<listitem>
103+
<simpara>
104+
允许新线程向标准输出发送头信息(通常情况下是被禁止的)。
105+
</simpara>
106+
</listitem>
107+
</varlistentry>
108+
</variablelist>
111109
</appendix>
112-
113110
<!-- Keep this comment at the end of the file
114111
Local variables:
115112
mode: sgml

reference/pthreads/pool/collect.xml

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 0545e305cf06937b14b3f0694d6e716c9881ffd7 Maintainer: yuanyuqiang Status: ready -->
3+
<!-- EN-Revision: 1f3517218031b663f773061056a873cf2a03f32d Maintainer: yuanyuqiang Status: ready -->
44
<!-- CREDITS: Luffy -->
5-
<refentry xml:id="pool.collect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="pool.collect">
66
<refnamediv>
77
<refname>Pool::collect</refname>
88
<refpurpose>回收已完成任务的引用</refpurpose>
@@ -43,36 +43,33 @@
4343

4444
<refsect1 role="changelog">
4545
&reftitle.changelog;
46-
<para>
47-
<informaltable>
48-
<tgroup cols="2">
49-
<thead>
50-
<row>
51-
<entry>&Version;</entry>
52-
<entry>&Description;</entry>
53-
</row>
54-
</thead>
55-
<tbody>
56-
<row>
57-
<entry>PECL pthreads 3.0.0</entry>
58-
<entry>
59-
<parameter>collector</parameter> 参数变为可选参数,
60-
并且返回值改为整数。
61-
</entry>
62-
</row>
63-
</tbody>
64-
</tgroup>
65-
</informaltable>
66-
</para>
46+
<informaltable>
47+
<tgroup cols="2">
48+
<thead>
49+
<row>
50+
<entry>&Version;</entry>
51+
<entry>&Description;</entry>
52+
</row>
53+
</thead>
54+
<tbody>
55+
<row>
56+
<entry>PECL pthreads 3.0.0</entry>
57+
<entry>
58+
<parameter>collector</parameter> 参数变为可选参数,
59+
并且返回值改为整数。
60+
</entry>
61+
</row>
62+
</tbody>
63+
</tgroup>
64+
</informaltable>
6765
</refsect1>
6866

69-
67+
7068
<refsect1 role="examples">
7169
&reftitle.examples;
72-
<para>
73-
<example>
74-
<title><methodname>Pool::collect</methodname> 基本用法示例</title>
75-
<programlisting role="php">
70+
<example>
71+
<title><methodname>Pool::collect</methodname> 基本用法示例</title>
72+
<programlisting role="php">
7673
<![CDATA[
7774
<?php
7875
$pool = new Pool(4);
@@ -85,13 +82,11 @@ while ($pool->collect()); // 直到全部的任务都完成执行之后才会继
8582
8683
$pool->shutdown();
8784
]]>
88-
</programlisting>
89-
</example>
90-
</para>
85+
</programlisting>
86+
</example>
9187
</refsect1>
9288

9389
</refentry>
94-
9590
<!-- Keep this comment at the end of the file
9691
Local variables:
9792
mode: sgml

reference/pthreads/pool/construct.xml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c44e9cb68b9b65771f9c45db2c07a06c63d71359 Maintainer: yuanyuqiang Status: ready -->
3+
<!-- EN-Revision: 1f3517218031b663f773061056a873cf2a03f32d Maintainer: yuanyuqiang Status: ready -->
44
<!-- CREDITS: mowangjuanzi -->
5-
<refentry xml:id="pool.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="pool.construct">
66
<refnamediv>
77
<refname>Pool::__construct</refname>
88
<refpurpose>创建新的 Worker 对象池</refpurpose>
@@ -56,18 +56,17 @@
5656

5757
<refsect1 role="examples">
5858
&reftitle.examples;
59-
<para>
60-
<example>
61-
<title>创建 Pool 对象</title>
62-
<programlisting role="php">
59+
<example>
60+
<title>创建 Pool 对象</title>
61+
<programlisting role="php">
6362
<![CDATA[
6463
<?php
6564
class MyWorker extends Worker {
66-
65+
6766
public function __construct(Something $something) {
6867
$this->something = $something;
6968
}
70-
69+
7170
public function run() {
7271
/** ... **/
7372
}
@@ -78,9 +77,9 @@ $pool = new Pool(8, \MyWorker::class, [new Something()]);
7877
var_dump($pool);
7978
?>
8079
]]>
81-
</programlisting>
82-
&example.outputs;
83-
<screen>
80+
</programlisting>
81+
&example.outputs;
82+
<screen>
8483
<![CDATA[
8584
object(Pool)#1 (6) {
8685
["size":protected]=>
@@ -101,13 +100,11 @@ object(Pool)#1 (6) {
101100
int(0)
102101
}
103102
]]>
104-
</screen>
105-
</example>
106-
</para>
103+
</screen>
104+
</example>
107105
</refsect1>
108106

109107
</refentry>
110-
111108
<!-- Keep this comment at the end of the file
112109
Local variables:
113110
mode: sgml

0 commit comments

Comments
 (0)