[gtk-doc-cn] r288 committed - update glib docs

11 views
Skip to first unread message

gtk-d...@googlecode.com

unread,
Apr 17, 2011, 11:42:51 AM4/17/11
to gtk-d...@googlegroups.com
Revision: 288
Author: yetist
Date: Sun Apr 17 08:42:19 2011
Log: update glib docs
http://code.google.com/p/gtk-doc-cn/source/detail?r=288

Deleted:
/trunk/zh_CN/glib/docs-2.26.1/building.sgml
/trunk/zh_CN/glib/docs-2.26.1/changes.sgml
/trunk/zh_CN/glib/docs-2.26.1/cross.sgml
/trunk/zh_CN/glib/docs-2.26.1/glib-docs.sgml
/trunk/zh_CN/glib/docs-2.26.1/glib-gettextize.xml
/trunk/zh_CN/glib/docs-2.26.1/gtester-report.xml
/trunk/zh_CN/glib/docs-2.26.1/gtester.xml
/trunk/zh_CN/glib/docs-2.26.1/gvariant-varargs.xml
/trunk/zh_CN/glib/docs-2.26.1/regex-syntax.sgml
Modified:
/trunk/zh_CN/glib/AUTHORS
/trunk/zh_CN/glib/glib-docs-2.26.1.po

=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/building.sgml Sun Apr 10 08:46:13 2011
+++ /dev/null
@@ -1,641 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
-]>
-<refentry id="glib-building" revision="16 Jan 2002">
-<refmeta>
-<refentrytitle>编译GLib包</refentrytitle>
-<manvolnum>3</manvolnum>
-<refmiscinfo>GLib库</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>编译GLib包</refname>
-<refpurpose>
-怎样编译GLib
-</refpurpose>
- </refnamediv>
-
- <refsect1 id="building">
- <title>在UNIX上编译GLib库</title>
- <para>
- 在UNIX上,GLib使用标准的GNU编译系统,
- 使用<application>autoconf</application>
- 来配置并解决可移植性问题,
- 使用<application>automake</application>来建立
- 符合GNU编译标准(GNU Coding Standards)的makefiles文件,
- 并使用<application>libtool</application>来建立多平台上的共享库。
- 通常,编译GLib函数库的顺序如下所示:
-
- <literallayout>
- <userinput>./configure</userinput>
- <userinput>make</userinput>
- <userinput>make install</userinput>
- </literallayout>
- </para>
-
- <para>
- 提供给<application>autoconf</application>的标准选项
- 可能会传递给<command>configure</command>脚本。
- 请查看<application>autoconf</application>文档或者
- 运行<command>./configure --help</command>命令来
- 查看标准选项。
- </para>
- <para>
- GTK+的文档包含关于构建过程以及如何影响它的一些
- 更多的
- <ulink url="../gtk/gtk-building.html">细节</ulink>
- </para>
- </refsect1>
- <refsect1 id="dependencies">
- <title>依赖</title>
- <para>
- 在编译GLib库之前,你还需要一些其它的工具和库。有两个工具在整个
- 编译期间都需要,它们是<command>pkg-config</command>和GNU make。
- 这两个工具和之前讲到的<application>autoconf</application>之类的工具
- 是不同的。
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <ulink
-
url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink>
- is a tool for tracking the compilation flags needed for
- libraries that are used by the GLib library. (For each
- library, a small <literal>.pc</literal> text file is
- installed in a standard location that contains the compilation
- flags needed for that library along with version number
- information.) The version of <command>pkg-config</command>
- needed to build GLib is mirrored in the
- <filename>dependencies</filename> directory
- on the <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.2/">GTK+ FTP
- site.</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- The GTK+ makefiles will mostly work with different versions
- of <command>make</command>, however, there tends to be
- a few incompatibilities, so the GTK+ team recommends
- installing <ulink url="http://www.gnu.org/software/make">GNU
- make</ulink> if you don't already have it on your system
- and using it. (It may be called <command>gmake</command>
- rather than <command>make</command>.)
- </para>
- </listitem>
- </itemizedlist>
- <para>
- GLib depends on a number of other libraries.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <ulink url="http://www.gnu.org/software/libiconv/">GNU
- libiconv library</ulink> is needed to build GLib if your
- system doesn't have the <function>iconv()</function>
- function for doing conversion between character
- encodings. Most modern systems should have
- <function>iconv()</function>, however many older systems lack
- an <function>iconv()</function> implementation. On such systems,
- you must install the libiconv library. This can be found at:
- <ulink
url="http://www.gnu.org/software/libiconv">http://www.gnu.org/software/libiconv</ulink>.
- </para>
- <para>
- If your system has an <function>iconv()</function> implementation but
- you want to use libiconv instead, you can pass the
- --with-libiconv option to configure. This forces
- libiconv to be used.
- </para>
- <para>
- Note that if you have libiconv installed in your default include
- search path (for instance, in <filename>/usr/local/</filename>), but
- don't enable it, you will get an error while compiling GLib because
- the <filename>iconv.h</filename> that libiconv installs hides the
- system iconv.
- </para>
- <para>
- If you are using the native iconv implementation on Solaris
- instead of libiconv, you'll need to make sure that you have
- the converters between locale encodings and UTF-8 installed.
- At a minimum you'll need the SUNWuiu8 package. You probably
- should also install the SUNWciu8, SUNWhiu8, SUNWjiu8, and
- SUNWkiu8 packages.
- </para>
- <para>
- The native iconv on Compaq Tru64 doesn't contain support for
- UTF-8, so you'll need to use GNU libiconv instead. (When
- using GNU libiconv for GLib, you'll need to use GNU libiconv
- for GNU gettext as well.) This probably applies to related
- operating systems as well.
- </para>
- </listitem>
- <listitem>
- <para>
- The libintl library from the <ulink
- url="http://www.gnu.org/software/gettext">GNU gettext
- package</ulink> is needed if your system doesn't have the
- <function>gettext()</function> functionality for handling
- message translation databases.
- </para>
- </listitem>
- <listitem>
- <para>
- A thread implementation is needed, unless you want to compile GLib
- without thread support, which is not recommended. The thread support
- in GLib can be based upon several native thread implementations,
- e.g. POSIX threads, DCE threads or Solaris threads.
- </para>
- </listitem>
- <listitem>
- <para>
- GRegex uses the <ulink url="http://www.pcre.org/">PCRE library</ulink>
- for regular expression matching. The default is to use the internal
- version of PCRE that is patched to use GLib for memory management
- and Unicode handling. If you prefer to use the system-supplied PCRE
- library you can pass the --with-pcre=system option to configure,
- but it is not recommended.
- </para>
- </listitem>
- <listitem>
- <para>
- The optional extended attribute support in GIO requires the
- getxattr() family of functions that may be provided by glibc or
- by the standalone libattr library. To build GLib without extended
- attribute support, use the <option>--disable-xattr</option>
- configure option.
- </para>
- </listitem>
- <listitem>
- <para>
- The optional SELinux support in GIO requires libselinux.
- To build GLib without SELinux support, use the
- <option>--disable-selinux</option> configure option.
- </para>
- </listitem>
- <listitem>
- <para>
- The optional support for DTrace requires the
<filename>sys/sdt.h</filename> header,
- which is provided by SystemTap on Linux. To build GLib without
DTrace, use the
- <option>--disable-dtrace</option> configure option.
- </para>
- </listitem>
- <listitem>
- <para>
- The optional support for <ulink
url="http://sourceware.org/systemtap/">SystemTap</ulink> can be disabled
with the
- <option>--disable-systemtap</option> configure option.
- </para>
- </listitem>
- </itemizedlist>
-
- </refsect1>
- <refsect1 id="extra-configuration-options">
- <title>Extra Configuration Options</title>
-
- <para>
- In addition to the normal options, the
- <command>configure</command> script in the GLib
- library supports these additional arguments:
-
- <cmdsynopsis>
- <command>configure</command>
- <group>
- <arg>--enable-debug=[no|minimum|yes]</arg>
- </group>
- <group>
- <arg>--disable-gc-friendly</arg>
- <arg>--enable-gc-friendly</arg>
- </group>
- <group>
- <arg>--disable-mem-pools</arg>
- <arg>--enable-mem-pools</arg>
- </group>
- <group>
- <arg>--disable-threads</arg>
- <arg>--enable-threads</arg>
- </group>
- <group>
- <arg>--with-threads=[none|posix|dce|win32]</arg>
- </group>
- <group>
- <arg>--disable-regex</arg>
- <arg>--enable-regex</arg>
- </group>
- <group>
- <arg>--with-pcre=[internal|system]</arg>
- </group>
- <group>
- <arg>--disable-included-printf</arg>
- <arg>--enable-included-printf</arg>
- </group>
- <group>
- <arg>--disable-visibility</arg>
- <arg>--enable-visibility</arg>
- </group>
- <group>
- <arg>--disable-gtk-doc</arg>
- <arg>--enable-gtk-doc</arg>
- </group>
- <group>
- <arg>--disable-man</arg>
- <arg>--enable-man</arg>
- </group>
- <group>
- <arg>--disable-xattr</arg>
- <arg>--enable-xattr</arg>
- </group>
- <group>
- <arg>--disable-selinux</arg>
- <arg>--enable-selinux</arg>
- </group>
- <group>
- <arg>--disable-dtrace</arg>
- <arg>--enable-dtrace</arg>
- </group>
- <group>
- <arg>--disable-systemtap</arg>
- <arg>--enable-systemtap</arg>
- </group>
- <group>
- <arg>--enable-gcov</arg>
- <arg>--disable-gcov</arg>
- </group>
- <group>
- <arg>--with-runtime-libdir=RELPATH</arg>
- </group>
- </cmdsynopsis>
- </para>
-
- <formalpara>
- <title><systemitem>--enable-debug</systemitem></title>
-
- <para>
- Turns on various amounts of debugging support. Setting this
to 'no'
- disables g_assert(), g_return_if_fail(), g_return_val_if_fail()
and
- all cast checks between different object types. Setting it
to 'minimum' disables only cast checks. Setting it to 'yes' enables
- <link linkend="GLIB-Debug-Options">runtime debugging</link>.
- The default is 'minimum'.
- Note that 'no' is fast, but dangerous as it tends to destabilize
- even mostly bug-free software by changing the effect of many bugs
- from simple warnings into fatal crashes. Thus
- <option>--enable-debug=no</option> should <emphasis>not</emphasis>
- be used for stable releases of GLib.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-gc-friendly</systemitem> and
- <systemitem>--enable-gc-friendly</systemitem></title>
-
- <para>
- By default, and with <systemitem>--disable-gc-friendly</systemitem>
- as well, Glib does not clear the memory for certain objects before they
- are freed. For example, Glib may decide to recycle GList nodes by
- putting them in a free list. However, memory profiling and debugging
tools like <ulink
- url="http://www.valgrind.org">Valgrind</ulink> work better if an
- application does not keep dangling pointers to freed memory (even
- though these pointers are no longer dereferenced), or invalid pointers
inside
- uninitialized memory. The
- <systemitem>--enable-gc-friendly</systemitem> option makes Glib clear
- memory in these situations:
- </para>
- </formalpara>
-
- <itemizedlist>
- <listitem>
- <para>
- When shrinking a GArray, Glib will clear the memory no longer
- available in the array: shrink an array from 10 bytes to 7, and
- the last 3 bytes will be cleared. This includes removals of single
and multiple elements.
- </para>
- </listitem>
- <listitem>
- <para>
- </para>
- </listitem>
- <listitem>
- <para>
- When growing a GArray, Glib will clear the new chunk of memory.
- Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will
- be cleared.
- </para>
- </listitem>
- <listitem>
- <para>
- The above applies to GPtrArray as well.
- </para>
- </listitem>
- <listitem>
- <para>
- When freeing a node from a GHashTable, Glib will first clear
- the node, which used to have pointers to the key and the value
- stored at that node.
- </para>
- </listitem>
- <listitem>
- <para>
- When destroying or removing a GTree node, Glib will clear the node,
- which used to have pointers to the node's value, and the left and
right subnodes.
- </para>
- </listitem>
- </itemizedlist>
-
- <para>
- Since clearing the memory has a cost,
- <systemitem>--disable-gc-friendly</systemitem> is the default.
- </para>
-
- <formalpara>
- <title><systemitem>--disable-mem-pools</systemitem> and
- <systemitem>--enable-mem-pools</systemitem></title>
-
- <para>
- Many small chunks of memory are often allocated via collective
pools
- in GLib and are cached after release to speed up reallocations.
- For sparse memory systems this behaviour is often inferior, so
- memory pools can be disabled to avoid excessive caching and force
- atomic maintenance of chunks through the
<function>g_malloc()</function>
- and <function>g_free()</function> functions. Code currently
affected by
- this:
- <itemizedlist>
- <listitem>
- <para>
- <structname>GList</structname>, <structname>GSList</structname>,
- <structname>GNode</structname>, <structname>GHash</structname>
- allocations. The functions g_list_push_allocator(),
- g_list_pop_allocator(), g_slist_push_allocator(),
- g_slist_pop_allocator(), g_node_push_allocator() and
- g_node_pop_allocator() are not available
- </para>
- </listitem>
- <listitem>
- <para>
- <structname>GMemChunk</structname>s become basically non-effective
- </para>
- </listitem>
- <listitem>
- <para>
- <structname>GSignal</structname> disables all caching (potentially
- very slow)
- </para>
- </listitem>
- <listitem>
- <para>
- <structname>GType</structname> doesn't honour the
- <structname>GTypeInfo</structname>
- <structfield>n_preallocs</structfield> field anymore
- </para>
- </listitem>
- <listitem>
- <para>
- the <structname>GBSearchArray</structname> flag
- <literal>G_BSEARCH_ALIGN_POWER2</literal> becomes non-functional
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-threads</systemitem> and
- <systemitem>--enable-threads</systemitem></title>
-
- <para>
- Do not compile GLib to be multi thread safe. GLib
- will be slightly faster then. This is however not
- recommended, as many programs rely on GLib being
- multi thread safe.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--with-threads</systemitem></title>
-
- <para>
- Specify a thread implementation to use.
- <itemizedlist>
- <listitem><para>
- 'posix' and 'dce' can be used interchangeable
- to mean the different versions of Posix
- threads. configure tries to find out, which
- one is installed.
- </para></listitem>
-
- <listitem><para>
- 'none' means that GLib will be thread safe,
- but does not have a default thread
- implementation. This has to be supplied to
- <function>g_thread_init()</function> by the programmer.
- </para></listitem>
- </itemizedlist>
-
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-regex</systemitem> and
- <systemitem>--enable-regex</systemitem></title>
-
- <para>
- Do not compile GLib with regular expression support.
- GLib will be smaller because it will not need the
- PCRE library. This is however not recommended, as
- programs may need GRegex.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--with-pcre</systemitem></title>
-
- <para>
- Specify whether to use the internal or the system-supplied
- PCRE library.
- <itemizedlist>
- <listitem><para>
- 'internal' means that GRegex will be compiled to use
- the internal PCRE library.
- </para></listitem>
-
- <listitem><para>
- 'system' means that GRegex will be compiled to use
- the system-supplied PCRE library.
- </para></listitem>
- </itemizedlist>
- Using the internal PCRE is the preferred solution:
- <itemizedlist>
- <listitem>
- <para>
- System-supplied PCRE has a separated copy of the big tables
- used for Unicode handling.
- </para>
- </listitem>
- <listitem>
- <para>
- Some systems have PCRE libraries compiled without some
needed
- features, such as UTF-8 and Unicode support.
- </para>
- </listitem>
- <listitem>
- <para>
- PCRE uses some global variables for memory management and
- other features. In the rare case of a program using both
- GRegex and PCRE (maybe indirectly through a library),
- this variables could lead to problems when they are
modified.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-included-printf</systemitem> and
- <systemitem>--enable-included-printf</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will try
- to auto-detect whether the C library provides a suitable set
- of <function>printf()</function> functions. In detail,
- <command>configure</command> checks that the semantics of
- <function>snprintf()</function> are as specified by C99 and
- that positional parameters as specified in the Single Unix
- Specification are supported. If this not the case, GLib will
- include an implementation of the <function>printf()</function>
- family.
- These options can be used to explicitly control whether
- an implementation fo the <function>printf()</function> family
- should be included or not.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-visibility</systemitem> and
- <systemitem>--enable-visibility</systemitem></title>
-
- <para>
- By default, GLib uses ELF visibility attributes to optimize
- PLT table entries if the compiler supports ELF visibility
- attributes. A side-effect of the way in which this is currently
- implemented is that any header change forces a full
- recompilation, and missing includes may go unnoticed.
- Therefore, it makes sense to turn this feature off while
- doing GLib development, even if the compiler supports ELF
- visibility attributes. The <option>--disable-visibility</option>
- option allows to do that.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-gtk-doc</systemitem> and
- <systemitem>--enable-gtk-doc</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will try
- to auto-detect whether the
- <application>gtk-doc</application> package is installed.
- If it is, then it will use it to extract and build the
- documentation for the GLib library. These options
- can be used to explicitly control whether
- <application>gtk-doc</application> should be
- used or not. If it is not used, the distributed,
- pre-generated HTML files will be installed instead of
- building them on your machine.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-man</systemitem> and
- <systemitem>--enable-man</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will try
- to auto-detect whether <application>xsltproc</application>
- and the necessary Docbook stylesheets are installed. If
- they are, then it will use them to rebuild the included
- man pages from the XML sources. These options can be used
- to explicitly control whether man pages should be rebuilt
- used or not. The distribution includes pre-generated man
- pages.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-xattr</systemitem> and
- <systemitem>--enable-xattr</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will try
- to auto-detect whether the getxattr() family of functions
- is available. If it is, then extended attribute support
- will be included in GIO. These options can be used to
- explicitly control whether extended attribute support
- should be included or not. getxattr() and friends can
- be provided by glibc or by the standalone libattr library.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-selinux</systemitem> and
- <systemitem>--enable-selinux</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will
- auto-detect if libselinux is available and include
- SELinux support in GIO if it is. These options can be
- used to explicitly control whether SELinux support should
- be included.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-dtrace</systemitem> and
- <systemitem>--enable-dtrace</systemitem></title>
-
- <para>
- By default the <command>configure</command> script will
- detect if DTrace support is available, and use it.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--disable-systemtap</systemitem> and
- <systemitem>--enable-systemtap</systemitem></title>
-
- <para>
- This option requires DTrace support. If it is available, then
- the <command>configure</command> script will also check for
- the presence of SystemTap.
- </para>
- </formalpara>
-
- <formalpara>
- <title><systemitem>--enable-gcov</systemitem> and
- <systemitem>--disable-gcov</systemitem></title>
-
- <para>
- Enable the generation of coverage reports for the GLib tests.
- This requires the lcov frontend to gcov from the
- <ulink url="http://ltp.sourceforge.net">Linux Test
Project</ulink>.
- To generate a coverage report, use the lcov make target. The
- report is placed in the <filename>glib-lcov</filename> directory.
- </para>
- </formalpara>
-
- <formalpara>
-
<title><systemitem>--with-runtime-libdir=RELPATH</systemitem></title>
-
- <para>
- Allows specifying a relative path to where to install the runtime
- libraries (meaning library files used for running, not
developing,
- GLib applications). This can be used in operating system setups
where
- programs using GLib needs to run before e.g.
<filename>/usr</filename>
- is mounted.
- For example, if LIBDIR is <filename>/usr/lib</filename> and
- <filename>../../lib</filename> is passed to
- <systemitem>--with-runtime-libdir</systemitem> then the
- runtime libraries are installed into <filename>/lib</filename>
rather
- than <filename>/usr/lib</filename>.
- </para>
- </formalpara>
-
- </refsect1>
-
-</refentry>
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/changes.sgml Tue Mar 29 08:19:02 2011
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
-]>
-<refentry id="glib-changes" revision="17 Jan 2002">
-<refmeta>
-<refentrytitle>GLib 的更改</refentrytitle>
-<manvolnum>3</manvolnum>
-<refmiscinfo>GLib 的更改</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>GLib 的更改</refname>
-<refpurpose>
-和先前版本的 GLib 之间不兼容的更改
-</refpurpose>
-</refnamediv>
-
-
-<refsect1>
-<title>从 2.0 到 2.2 的不兼容更改</title>
-
-<itemizedlist>
-
-<listitem>
-<para>
-GLib 更改了伪随机数生成器-赛特旋转 (Mersenne Twister,
-就是 <structname>GRand</structname> 和
-<structname>GRandom</structname> 所使用的) 的种子算法。
-这是必须的,因为一些种子可能产生很差的伪随机流。
-使用新版本的 GLib <function>g_rand*_int_range()</function>
-产生的随机整数也会有稍微好一点的公平分配。
-</para>
-
-<para>
-网页上关于赛特旋转(Mersenne Twister)伪随机数生成器的进一步信息在 <ulink
-url="http://www.math.keio.ac.jp/~matumoto/emt.html">http://www.math.keio.ac.jp/~matumoto/emt.html</ulink>.
-</para>
-
-<para>
-2.0.x 中的旧的种子和生成算法可以通过设置环境变量
<envar>G_RANDOM_VERSION</envar>
-为 '2.0',来替代新版使用。只在您有的确需要传承的 Glib-2.0 产生的数字序列时
-才使用 GLib-2.0 的算法。
-</para>
-
-</listitem>
-
-</itemizedlist>
-
-</refsect1>
-
-<refsect1>
-<title>从 1.2 到 2.0 的不兼容更改</title>
-
-<para>
-位于 <ulink
-url="http://developer.gnome.org">http://developer.gnome.org</ulink>
-的 <ulink url="http://developer.gnome.org/dotplan/porting/">GNOME 2.0
-移植指南</ulink>有更多的从 1.2 到 2.0 移植的细节讨论。请阅读 GLib 一节。
-</para>
-
-<itemizedlist>
-
-<listitem>
-<para>
-事件循环功能 <structname>GMain</structname> 已经广泛的修订,
-以支持在分离线程的多个分离的主循环。
-所有 sources (计时、空闲等函数) 都与<structname>GMainContext</structname>联
系起来了。
-</para>
-
-<para>
-仍然存在兼容函数,以使多数处理主循环的程序代码能继续工作。
-但是创建新的 sources 的自定义类型的代码需要修改。
-</para>
-
-<para>
-主要的修改是:
-
- <itemizedlist>
-
- <listitem>
- <para>
- Sources 以 <type>GSource *</type> 暴露,而不是仅仅是数字 id。
- </para>
- </listitem>
-
- <listitem>
- <para>
- "derivation" 结构 从<structname>GSource</structname>创建一个 sources 新
类型,
- 所以虚函数 <structname>GSource</structname>的
<literal>source_data</literal> 参数
- 被替换为 <type>GSource *</type>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Sources 刚刚创建,于是稍候被添加到了具体的
<structname>GMainContext</structname>。
- </para>
- </listitem>
-
- <listitem>
- <para>
- 修改了调度,以使回调和数据都可以传递给 <function>dispatch()</function>虚
函数。
- </para>
- </listitem>
-
- </itemizedlist>
- 为了顺应这一变化, <structname>GIOChannel</structname> 的 vtable 改变
了,同时
- <function>add_watch()</function> 被替换为
- <function>create_watch()</function>.
-</para>
-</listitem>
-
-<listitem>
-<para>
-更改了<function>g_list_foreach()</function> and
-<function>g_slist_foreach()</function> ,
-以使它们安全的应对移除当前条目,而不是下一条目。
-</para>
-
-<para>
-在任何情况下回调这些函数时,都不推荐变更这些链表。
-</para>
-</listitem>
-
-<listitem>
-<para>
-<structname>GDate</structname> 现在用 UTF-8,而不是当前区域设置。
-如果希望使用它处理当前区域的编码,
-您需要首先使用<function>g_locale_to_utf8()</function>转换字符串的编码。
-</para>
-</listitem>
-
-<listitem>
-<para>
-<function>g_strsplit()</function> 被更正为:
-
- <itemizedlist>
- <listitem>
- <para>
- 包含结尾的空标记,而不是剥离它们
- </para>
- </listitem>
- <listitem>
- <para>
- 最多分割为 <literal>max_tokens</literal> 节, 而不是
- <literal>max_tokens + 1</literal>
- </para>
- </listitem>
- </itemizedlist>
-
- 所有依赖于这些 bug 的代码需要更正。
-</para>
-</listitem>
-
-<listitem>
-<para>
-移除的过时函数:
-<function>g_set_error_handler()</function>,
-<function>g_set_warning_handler()</function>,
-<function>g_set_message_handler()</function>, 使用
-<function>g_log_set_handler()</function> 来替代.
-</para>
-</listitem>
-</itemizedlist>
-
-</refsect1>
-
-</refentry>
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/cross.sgml Tue Mar 29 08:19:02 2011
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
-]>
-<refentry id="glib-cross-compiling" revision="8 Apr 2003">
-<refmeta>
-<refentrytitle>交叉编译GLib软件包</refentrytitle>
-<manvolnum>3</manvolnum>
-<refmiscinfo>GLib库</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>交叉编译GLib软件包</refname>
-<refpurpose>
-如何交叉编译GLib
-</refpurpose>
-</refnamediv>
-
- <refsect1 id="cross">
- <title>在不同的体系结构中编译</title>
- <para>
- 编译出来的程序或库将在不同的平台或操作系统上运行时,
- 这种编译过程就叫做交叉编译。
- GLib和一些常见软件包的交叉编译稍微有些不同,
- 因为GLib需要隐藏不同系统之间的一些差异。
- </para>
- <para>
- 下面说明一些GLib交叉编译时的特殊之处,
- 一般的交叉编译信息请查看
- <application>autoconf</application> 信息页。
- </para>
- <para>
- GLib在编译和链接时会努力去尝试检测尽可能多的有关
- 目标系统的信息。但是,GLib需要的一些信息不是通过
- 这种方式的。这些信息通过一个"cache"文件提供给配置
- (configure)脚本或者通过设置环境变量的方式实现。
- </para>
- <para>
- 作为一份示例的cache文件,用于在Linux系统上采用"MingW32"交叉
- 编译可运行于Win32环境中的GLib。
- 创建一个名为"win32.cache"的文件,包含以下内容:
- </para>
- <programlisting>
-glib_cv_long_long_format=I64
-glib_cv_stack_grows=no
- </programlisting>
- <para>
- 接着执行以下命令:
- </para>
- <programlisting>
-PATH=/path/to/mingw32-compiler/bin:$PATH
-chmod a-w win32.cache # prevent configure from changing it
-./configure --cache-file=win32.cache --host=mingw32
- </programlisting>
- <para>
- 下面列出了cache文件的全部变量。其中一些变量通常并不需要设置。
- </para>
- </refsect1>
- <refsect1 id="cache-file-variables">
- <title>缓存文件变量</title>
- <formalpara>
- <title>glib_cv_long_long_format=[ll/q/I64]</title>
-
- <para>
- 为64位整形数而使用于<function>printf()</function>和
<function>scanf()</function>函数的格式化部分。
- "ll"是C99的标准,
- 被'trio'库使用来编译GLib,
- 如果你的<function>printf()</function>函数不能胜任的话。
- 如果你正在编译使用trio的话是不需要设置的。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_stack_grows=[yes/no]</title>
-
- <para>
- 堆栈是否向上或向下增长。大多数地方都需要设置为"no",
- 有几个体系结构,如PA-RISC等需要设置为"yes"。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_working_bcopy=[yes/no]</title>
-
- <para>
- <function>bcopy()</function>函数是否可以处理重叠的复制。
- 如果你没有<function>memmove()</function>, 就需要设置。(可能性非常小)
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_sane_realloc=[yes/np]</title>
-
- <para>
- 是否<function>realloc()</function>函数符合ANSI C标准并能够处理第一个参数
为<literal>NULL</literal>的情况。
- 默认为"yes", 你可能并不需要设定它。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_have_strlcpy=[yes/no]</title>
-
- <para>
- 是否有匹配OpenBSD的<function>strlcpy()</function>函数。
- 默认值为"no",这是安全的,因为在这种情况下GLib使用内置的版本。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_va_val_copy=[yes/no]</title>
-
- <para>
- <type>va_list</type>是否可以作为指针复制。
- 如果设置为"no",那么<function>memcopy()</function>将被使用。
- 如果你没有<function>va_copy()</function>或
<function>__va_copy()</function>会有问题。(所以,GCC不存在问题。)
- 默认为"yes",这种情况比"no"要多一些。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_rtldglobal_broken=[yes/no]</title>
-
- <para>
- 是否在OSF/1 v5.0中发现存在有bug。默认为"no"。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_uscore=[yes/no]</title>
-
- <para>
- 通过<function>dlsym()</function>函数时,
- 是否需要考虑一个下划线为前缀的符号时,
- 他们希望通过dlsym了()。
- 只需要设置如果你的系统使用
<function>dlopen()</function>/<function>dlsym()</function>。
- </para>
- </formalpara>
- <formalpara>
- <title>ac_cv_func_posix_getpwuid_r=[yes/no]</title>
-
- <para>
- 是否你的getpwuid_r函数(在你的C库,而不是线程库)遵守POSIX规范。
- 接受'struct passwd **'作为最终的参数。
- </para>
- </formalpara>
- <formalpara>
- <title>ac_cv_func_nonposix_getpwuid_r=[yes/no]</title>
-
- <para>
-是否你有一些<function>getpwuid_r()</function>函数的变量不能遵守POSIX规范,
-但是GLib有能力去使用它(或者发生段错误)。
-只有在<literal>ac_cv_func_posix_getpwuid_r</literal>
-没被设置的情况下才需要设置此变量。
-此变量可以安全地被设置为"no".
- </para>
- </formalpara>
- <formalpara>
- <title>ac_cv_func_posix_getgrgid_r=[yes/no]</title>
-
- <para>
- 是否你有一个getgrgid_r函数去遵守POSIX规范。
- </para>
- </formalpara>
- <formalpara>
- <title>glib_cv_use_pid_surrogate=[yes/no]</title>
-
- <para>
- 是否使用<function>setpriority()</function>函数在线程的PID上,
- 作为设置线程优先级的方式。
- 只有在使用POSIX线程的时候需要设置。
- </para>
- </formalpara>
- <formalpara>
- <title>ac_cv_func_printf_unix98=[yes/no]</title>
-
- <para>
- 是否你的<function>printf()</function>函数支持Unix98样式的
<literal>%N$</literal> 位置参数。
- 默认为"no"。
- </para>
- </formalpara>
- <formalpara>
- <title>ac_cv_func_vsnprintf_c99=[yes/no]</title>
-
- <para>
- 是否你有一个<function>vsnprintf()</function>函数符合C99的。
- (C99语义的意思是返回字符数,被写到输入缓存有足够的空间)。
- 默认为"no"。
- </para>
- </formalpara>
-
- </refsect1>
-
-</refentry>
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/glib-docs.sgml Sun Apr 10 08:46:13 2011
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi CDATA
#FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "version.xml">
-<!ENTITY credits SYSTEM "credits.xml">
-]>
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <bookinfo>
- <title>GLib参考手册</title>
- <releaseinfo>
- 当前版本为 &version;, 最新在线版本请浏览这里
- <ulink role="online-location"
url="http://library.gnome.org/devel/glib/unstable/">http://library.gnome.org/devel/glib/unstable/</ulink>.
- </releaseinfo>
- &credits;
- </bookinfo>
-
- <chapter id="glib">
- <title>GLib概述</title>
- <para>
- GLib是一个通用工具库,它提供了许多有用的数据类型、
- 宏、类型转换工具、字符串工具,文件工具,主循环抽象等功能。
- 它正工作在许多类UNIX、Windows、OS/2及BeOS平台上。
- GLib使用GNU库通用公共许可证(GNU LGPL)发布。
- </para>
- <para>
-GLib库提供的函数基本上都是线程安全的, 例外的情况是对数据结构操作的函数。
-这种情况下,如果同时有两个线程来处理<emphasis>相同</emphasis>的数据结构,
-就必须使用锁来同步操作。
- </para>
-
- <xi:include href="building.sgml" />
- <xi:include href="cross.sgml" />
- <xi:include href="compiling.sgml" />
- <xi:include href="running.sgml" />
- <xi:include href="changes.sgml" />
- <xi:include href="regex-syntax.sgml" />
- <xi:include href="resources.sgml" />
-
- </chapter>
-
- <chapter id="glib-fundamentals">
- <title>GLib基础</title>
- <xi:include href="xml/version.xml" />
- <xi:include href="xml/types.xml" />
- <xi:include href="xml/limits.xml" />
- <xi:include href="xml/macros.xml" />
- <xi:include href="xml/type_conversion.xml" />
- <xi:include href="xml/byte_order.xml" />
- <xi:include href="xml/numerical.xml" />
- <xi:include href="xml/macros_misc.xml" />
- <xi:include href="xml/atomic_operations.xml" />
- </chapter>
-
- <chapter id="glib-core">
- <title>GLib核心应用支持</title>
- <xi:include href="xml/main.xml" />
- <xi:include href="xml/threads.xml" />
- <xi:include href="xml/thread_pools.xml" />
- <xi:include href="xml/async_queues.xml" />
- <xi:include href="xml/modules.xml" />
- <xi:include href="xml/memory.xml" />
- <xi:include href="xml/iochannels.xml" />
- <xi:include href="xml/error_reporting.xml" />
- <xi:include href="xml/warnings.xml" />
- <xi:include href="xml/messages.xml" />
- </chapter>
-
- <chapter id="glib-utilities">
- <title>GLib实用函数集</title>
- <xi:include href="xml/string_utils.xml" />
- <xi:include href="xml/conversions.xml" />
- <xi:include href="xml/unicode.xml" />
- <xi:include href="xml/base64.xml" />
- <xi:include href="xml/checksum.xml" />
- <xi:include href="xml/i18n.xml" />
- <xi:include href="xml/date.xml" />
- <xi:include href="xml/timezone.xml" />
- <xi:include href="xml/date-time.xml" />
- <xi:include href="xml/random_numbers.xml" />
- <xi:include href="xml/hooks.xml" />
- <xi:include href="xml/misc_utils.xml" />
- <xi:include href="xml/scanner.xml" />
- <xi:include href="xml/completion.xml" />
- <xi:include href="xml/timers.xml" />
- <xi:include href="xml/spawn.xml" />
- <xi:include href="xml/fileutils.xml" />
- <xi:include href="xml/gurifuncs.xml" />
- <xi:include href="xml/ghostutils.xml" />
- <xi:include href="xml/shell.xml" />
- <xi:include href="xml/option.xml" />
- <xi:include href="xml/patterns.xml" />
- <xi:include href="xml/gregex.xml" />
- <xi:include href="xml/markup.xml" />
- <xi:include href="xml/keyfile.xml" />
- <xi:include href="xml/bookmarkfile.xml" />
- <xi:include href="xml/testing.xml" />
- <xi:include href="xml/windows.xml" />
- </chapter>
-
- <chapter id="glib-data-types">
- <title>GLib数据类型</title>
- <xi:include href="xml/memory_slices.xml" />
- <xi:include href="xml/memory_chunks.xml" />
- <xi:include href="xml/linked_lists_double.xml" />
- <xi:include href="xml/linked_lists_single.xml" />
- <xi:include href="xml/queue.xml" />
- <xi:include href="xml/sequence.xml" />
- <xi:include href="xml/trash_stack.xml" />
- <xi:include href="xml/hash_tables.xml" />
- <xi:include href="xml/strings.xml" />
- <xi:include href="xml/string_chunks.xml" />
- <xi:include href="xml/arrays.xml" />
- <xi:include href="xml/arrays_pointer.xml" />
- <xi:include href="xml/arrays_byte.xml" />
- <xi:include href="xml/trees-binary.xml" />
- <xi:include href="xml/trees-nary.xml" />
- <xi:include href="xml/quarks.xml" />
- <xi:include href="xml/datalist.xml" />
- <xi:include href="xml/datasets.xml" />
- <xi:include href="xml/relations.xml" />
- <xi:include href="xml/caches.xml" />
- <xi:include href="xml/allocators.xml" />
- <xi:include href="xml/gvarianttype.xml"/>
- <xi:include href="xml/gvariant.xml"/>
- <xi:include href="gvariant-varargs.xml"/>
- </chapter>
-
- <chapter id="tools">
- <title>GLib工具</title>
- <xi:include href="glib-gettextize.xml" />
- <xi:include href="gtester.xml" />
- <xi:include href="gtester-report.xml" />
- </chapter>
-
- <index>
- <title>索引</title>
- <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-deprecated" role="deprecated">
- <title>已过时的符号索引</title>
- <xi:include href="xml/api-index-deprecated.xml"><xi:fallback
/></xi:include>
- </index>
- <index id="api-index-2-2" role="2.2">
- <title>2.2中的新符号索引</title>
- <xi:include href="xml/api-index-2.2.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-4" role="2.4">
- <title>2.4中的新符号索引</title>
- <xi:include href="xml/api-index-2.4.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-6" role="2.6">
- <title>2.6中的新符号索引</title>
- <xi:include href="xml/api-index-2.6.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-8" role="2.8">
- <title>2.8中的新符号索引</title>
- <xi:include href="xml/api-index-2.8.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-10" role="2.10">
- <title>2.10中的新符号索引</title>
- <xi:include href="xml/api-index-2.10.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-12" role="2.12">
- <title>2.12中的新符号索引</title>
- <xi:include href="xml/api-index-2.12.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-14" role="2.14">
- <title>2.14中的新符号索引</title>
- <xi:include href="xml/api-index-2.14.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-16" role="2.16">
- <title>2.16中的新符号索引</title>
- <xi:include href="xml/api-index-2.16.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-18" role="2.18">
- <title>2.18中的新符号索引</title>
- <xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-20" role="2.20">
- <title>2.20中的新符号索引</title>
- <xi:include href="xml/api-index-2.20.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-22" role="2.22">
- <title>2.22中的新符号索引</title>
- <xi:include href="xml/api-index-2.22.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-24" role="2.24">
- <title>2.24中的新符号索引</title>
- <xi:include href="xml/api-index-2.24.xml"><xi:fallback /></xi:include>
- </index>
- <index id="api-index-2-26" role="2.26">
- <title>2.26中的新符号索引</title>
- <xi:include href="xml/api-index-2.26.xml"><xi:fallback /></xi:include>
- </index>
-
- <xi:include href="xml/annotation-glossary.xml"><xi:fallback
/></xi:include>
-
-</book>
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/glib-gettextize.xml Tue Mar 29 08:19:02
2011
+++ /dev/null
@@ -1,77 +0,0 @@
-<refentry id="glib-gettextize" lang="en">
-
-<refmeta>
-<refentrytitle>glib-gettextize</refentrytitle>
-<manvolnum>1</manvolnum>
-<refmiscinfo class="manual">User Commands</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>glib-gettextize</refname>
-<refpurpose>gettext internationalization utility</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
-<cmdsynopsis>
-<command>glib-gettextize</command>
-<arg choice="opt" rep="repeat">option</arg>
-<arg choice="opt">directory</arg>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-<refsect1><title>Description</title>
-<para><command>glib-gettextize</command> helps to prepare a source package
for being
-internationalized through <application>gettext</application>.
-It is a variant of the <command>gettextize</command> that ships with
-<application>gettext</application>.
-</para>
-
-<para><command>glib-gettextize</command> differs
-from <command>gettextize</command> in that it doesn't create an
-<filename>intl/</filename> subdirectory and doesn't modify
-<filename>po/ChangeLog</filename> (note that newer versions of
-<command>gettextize</command> behave like this when called with the
-<option>--no-changelog</option> option).
-</para>
-<refsect2><title>Options</title>
-<variablelist>
-
-<varlistentry>
-<term><option>--help</option></term>
-<listitem><para>
-print help and exit
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>--version</option></term>
-<listitem><para>
-print version information and exit
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-c</option>, <option>--copy</option></term>
-<listitem><para>
-copy files instead of making symlinks
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-f</option>, <option>--force</option></term>
-<listitem><para>
-force writing of new files even if old ones exist
-</para></listitem>
-</varlistentry>
-</variablelist>
-</refsect2>
-</refsect1>
-
-<refsect1><title>See also</title>
-<para>
-<citerefentry><refentrytitle>gettextize</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-</para>
-</refsect1>
-</refentry>
-
-
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/gtester-report.xml Tue Mar 29 08:19:02
2011
+++ /dev/null
@@ -1,58 +0,0 @@
-<refentry id="gtester-report">
-
-<refmeta>
-<refentrytitle>gtester-report</refentrytitle>
-<manvolnum>1</manvolnum>
-<refmiscinfo class="manual">User Commands</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>gtester-report</refname>
-<refpurpose>test report formatting utility</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
-<cmdsynopsis>
-<command>gtester-report</command>
-<arg choice="opt" rep="repeat">option</arg>
-<arg>gtester-log</arg>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-<refsect1><title>Description</title>
-<para><command>gtester-report</command> is a script which converts
-the XML output generated by gtester into HTML.
-</para>
-
-<refsect2><title>Options</title>
-<variablelist>
-
-<varlistentry>
-<term><option>-h</option>, <option>--help</option></term>
-<listitem><para>
-print help and exit
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-v</option>, <option>--version</option></term>
-<listitem><para>
-print version information and exit
-</para></listitem>
-</varlistentry>
-
-</variablelist>
-</refsect2>
-</refsect1>
-
-<refsect1><title>See also</title>
-<para>
-<citerefentry>
-<refentrytitle>gtester</refentrytitle>
-<manvolnum>1</manvolnum>
-</citerefentry>
-</para>
-</refsect1>
-</refentry>
-
-
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/gtester.xml Tue Mar 29 08:19:02 2011
+++ /dev/null
@@ -1,124 +0,0 @@
-<refentry id="gtester">
-
-<refmeta>
-<refentrytitle>gtester</refentrytitle>
-<manvolnum>1</manvolnum>
-<refmiscinfo class="manual">User Commands</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>gtester</refname>
-<refpurpose>test running utility</refpurpose>
-</refnamediv>
-
-<refsynopsisdiv>
-<cmdsynopsis>
-<command>gtester</command>
-<arg choice="opt" rep="repeat">option</arg>
-<arg>testprogram</arg>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-<refsect1><title>Description</title>
-<para><command>gtester</command> is a utility to run unit tests that have
-been written using the GLib test framework.
-</para>
-<para>
-When called with the <option>-o</option> option, <command>gtester</command>
-writes an XML report of the test results, which can be converted
-into HTML using the <command>gtester-report</command> utility.
-</para>
-
-<refsect2><title>Options</title>
-<variablelist>
-
-<varlistentry>
-<term><option>-h</option>, <option>--help</option></term>
-<listitem><para>
-print help and exit
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-v</option>, <option>--version</option></term>
-<listitem><para>
-print version information and exit
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>--g-fatal-warnings</option></term>
-<listitem><para>
-make warnings fatal
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-k</option>, <option>--keep-going</option></term>
-<listitem><para>
-continue running after tests failed
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-l</option></term>
-<listitem><para>
-list paths of available test cases
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-m=<replaceable>MODE</replaceable></option></term>
-<listitem><para>
-run test cases in <replaceable>MODE</replaceable>, which can be perf,
slow, thorough or quick. The default mode is quick.
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-p=<replaceable>TESTPATH</replaceable></option></term>
-<listitem><para>
-only run test cases matching <replaceable>TESTPATH</replaceable>
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>--seed=<replaceable>SEEDSTRING</replaceable></option></term>
-<listitem><para>
-run all test cases with random number seed
<replaceable>SEEDSTRING</replaceable>
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-o=<replaceable>LOGFILE</replaceable></option></term>
-<listitem><para>
-write the test log to <replaceable>LOGFILE</replaceable>
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>-q</option>, <option>--quiet</option></term>
-<listitem><para>
-suppress per test binary output
-</para></listitem>
-</varlistentry>
-
-<varlistentry>
-<term><option>--verbose</option></term>
-<listitem><para>
-report success per testcase
-</para></listitem>
-</varlistentry>
-
-</variablelist>
-</refsect2>
-</refsect1>
-
-<refsect1><title>See also</title>
-<para>
-<citerefentry>
-<refentrytitle>gtester-report</refentrytitle>
-<manvolnum>1</manvolnum>
-</citerefentry>
-</para>
-</refsect1>
-</refentry>
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/gvariant-varargs.xml Tue Mar 29 08:19:02
2011
+++ /dev/null
@@ -1,1091 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<refentry id='gvariant-format-strings'>
- <refmeta>
- <refentrytitle>GVariant Format Strings</refentrytitle>
- </refmeta>
-
- <refsect1>
- <title>Variable Argument Conversions</title>
-
- <para>
- This page attempts to document how to perform variable argument
conversions with GVariant.
- </para>
- <para>
- Conversions occur according to format strings. A format string is a
two-way mapping between a single
- <link linkend='GVariant'>GVariant</link> value and one or more C values.
- </para>
- <para>
- A conversion from C values into a <link
linkend='GVariant'>GVariant</link> value is made using the
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link>
function. A conversion from a
- <link linkend='GVariant'>GVariant</link> into C values is made using the
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link>
function.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Syntax</title>
-
- <para>
- This section exhaustively describes all possibilities for GVariant
format strings. There are no valid forms of
- format strings other than those described here. Please note that the
format string syntax is likely to expand in the
- future.
- </para>
- <para>
- Valid format strings have one of the following forms:
- </para>
- <itemizedlist>
- <listitem>
- <para>any type string</para>
- </listitem>
- <listitem>
- <para>
- a type string prefixed with a '<literal>@</literal>'
- </para>
- </listitem>
- <listitem>
- <para>
- '<literal>&amp;s</literal>' '<literal>&amp;o</literal>', '<literal>&amp;g</literal>', '<literal>^as</literal>',
- '<literal>^a&amp;s</literal>', '<literal>^ay</literal>', '<literal>^&amp;ay</literal>', '<literal>^aay</literal>'
- or '<literal>^a&amp;ay</literal>'.
- </para>
- </listitem>
- <listitem>
- <para>
- any format string, prefixed with an '<literal>m</literal>'
- </para>
- </listitem>
- <listitem>
- <para>
- a sequence of zero or more format strings strings, concatenated and
enclosed in parentheses
- </para>
- </listitem>
- <listitem>
- <para>
- an opening brace, followed by two format strings, followed by a
closing brace (subject to the constraint that the
- first format string correspond to a type valid for use as the key
type of a dictionary)
- </para>
- </listitem>
- </itemizedlist>
- </refsect1>
- <refsect1>
- <title>Symbols</title>
-
- <para>
- The following table describes the rough meaning of symbols that may
appear inside a GVariant format string. Each
- symbol is described in detail in its own section, including usage
examples.
- </para>
-
- <informaltable>
- <tgroup cols='2'>
- <colspec colname='col_0'/>
- <colspec colname='col_1'/>
- <tbody>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>Symbol</emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>Meaning</emphasis>
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>b</literal>, <literal>y</literal>, <literal>n</literal>,
<literal>q</literal>, <literal>i</literal>,
- <literal>u</literal>, <literal>x</literal>, <literal>t</literal>,
<literal>h</literal>, <literal>d</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing boolean, byte and numeric
types. See
- <link linkend='gvariant-format-strings-numeric-types'>Numeric
Types</link> below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>s</literal>, <literal>o</literal>, <literal>g</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing string types. See
- <link linkend='gvariant-format-strings-strings'>Strings</link>
below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'><literal>v</literal></emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing variant types. See
- <link linkend='gvariant-format-strings-variant'>Variants</link>
below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>a</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing arrays. See
- <link linkend='gvariant-format-strings-arrays'>Arrays</link> below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>m</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing maybe types. See
- <link linkend='gvariant-format-strings-maybe-types'>Maybe
Types</link> below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>()</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing tuples. See
- <link linkend='gvariant-format-strings-tuples'>Tuples</link>
below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>{}</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used for building or deconstructing dictionary entries. See
- <link
linkend='gvariant-format-strings-dictionaries'>Dictionaries</link> below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>@</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used as a prefix on a GVariant type string (not format string).
Denotes that a pointer to a
- <link linkend='GVariant'>GVariant</link> should be used in place
of the normal C type or types. For
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> this
means that you must pass a
- non-<link linkend='NULL--CAPS'><literal>NULL</literal></link>
<code>(<link linkend='GVariant'>GVariant</link>
- *)</code>; if it is a floating reference, ownership will be taken,
as
- if by using <link
linkend="g-variant-ref-sink"><function>g_variant_ref_sink()</function></link>.
- For <link
linkend='g-variant-get'><function>g_variant_get()</function></link> this
means that you
- must pass a pointer to a <code>(<link
linkend='GVariant'>GVariant</link> *)</code> for the value to be returned
- by reference or <link
linkend='NULL--CAPS'><literal>NULL</literal></link> to ignore the value.
See
- <link linkend='gvariant-format-strings-gvariant'><code>GVariant
*</code></link> below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>*</literal>, <literal>?</literal>, <literal>r</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Exactly equivalent to <literal>@*</literal>, <literal>@?</literal>
and <literal>@r</literal>. Provided only for
- completeness so that all GVariant type strings can be used also as
format strings. See <link
- linkend='gvariant-format-strings-gvariant'><code>GVariant
*</code></link> below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'><literal>&amp;</literal></emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used as a prefix on a GVariant type string (not format string).
Denotes that a C pointer to serialised data
- should be used in place of the normal C type. See
- <link linkend='gvariant-format-strings-pointers'>Pointers</link>
below.
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'><literal>^</literal></emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- Used as a prefix on some specific types of format strings. See
- <link linkend='gvariant-format-strings-convenience'>Convenience
Conversions</link> below.
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
-
- <refsect2 id='gvariant-format-strings-numeric-types'>
- <title>Numeric Types</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>b</literal>, <literal>y</literal>,
<literal>n</literal>, <literal>q</literal>,
- <literal>i</literal>, <literal>u</literal>, <literal>x</literal>,
<literal>t</literal>, <literal>h</literal>,
- <literal>d</literal>
- </emphasis>
- </para>
-
- <para>
- Variable argument conversions from numeric types work in the most
obvious way possible. Upon encountering one of
- these characters, <link
linkend='g-variant-new'><function>g_variant_new()</function></link> takes
the equivalent C
- type as an argument. <link
linkend='g-variant-get'><function>g_variant_get()</function></link> takes a
pointer to
- the equivalent C type (or <link
linkend='NULL--CAPS'><literal>NULL</literal></link> to ignore the value).
- </para>
-
- <para>
- The equivalent C types are as follows:
- </para>
-
- <informaltable>
- <tgroup cols='2'>
- <colspec colname='col_0'/><colspec colname='col_1'/>
- <tbody>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>Character</emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>Equivalent C type</emphasis>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>b</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='gboolean'><type>gboolean</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>y</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='guchar'><type>guchar</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>n</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='gint16'><type>gint16</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>q</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='guint16'><type>guint16</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>i</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='gint32'><type>gint32</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>u</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='guint32'><type>guint32</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>x</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='gint64'><type>gint64</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>t</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='guint64'><type>guint64</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>h</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='gint32'><type>gint32</type></link>
- </para>
- </entry>
- </row>
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>d</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <link linkend='gdouble'><type>gdouble</type></link>
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- Note that in C, small integer types in variable argument lists are
promoted up to <link
- linkend='gint'><type>int</type></link> or <link
linkend='guint'><type>unsigned int</type></link> as appropriate, and
- read back accordingly. <link linkend='gint'><type>int</type></link>
is 32 bits on every platform on which GLib is
- currently suported. This means that you can use C expressions of type
<link linkend='gint'><type>int</type></link>
- with <link
linkend='g-variant-new'><function>g_variant_new()</function></link> and
format characters
- '<literal>b</literal>', '<literal>y</literal>', '<literal>n</literal>', '<literal>q</literal>',
- '<literal>i</literal>', '<literal>u</literal>'
and '<literal>h</literal>'. Specifically, you can use integer
- literals with these characters.
- </para>
-
- <para>
- When using the '<literal>x</literal>' and '<literal>t</literal>'
characters, you must ensure that the value that you
- provide is 64 bit. This means that you should use a cast or make use
of the
- <link
linkend='G-GINT64-CONSTANT--CAPS'><literal>G_GINT64_CONSTANT</literal></link>
or
- <link
linkend='G-GUINT64-CONSTANT--CAPS'><literal>G_GUINT64_CONSTANT</literal></link>
macros.
- </para>
-
- <para>
- No type promotion occurs when using <link
linkend='g-variant-get'><function>g_variant_get()</function></link> since
- it operates with pointers. The pointers must always point to a memory
region of exactly the correct size.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariant *value1, *value2, *value3, *value4;
-
-value1 = g_variant_new ("y", 200);
-value2 = g_variant_new ("b", TRUE);
-value3 = g_variant_new ("d", 37.5):
-value4 = g_variant_new ("x", G_GINT64_CONSTANT (998877665544332211));
-
-{
- gdouble floating;
- gboolean truth;
- gint64 bignum;
-
-
- g_variant_get (value1, "y", NULL); /* ignore the value. */
- g_variant_get (value2, "b", &truth);
- g_variant_get (value3, "d", &floating);
- g_variant_get (value4, "x", &bignum);
-}]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-strings'>
- <title>Strings</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>s</literal>, <literal>o</literal>,
<literal>g</literal>
- </emphasis>
- </para>
-
- <para>
- String conversions occur to and from standard nul-terminated C
strings. Upon encountering an
- '<literal>s</literal>', '<literal>o</literal>'
or '<literal>g</literal>' in a format string,
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> takes a
<code>(const
- <link linkend='gchar'>gchar</link> *)</code> and makes a copy of it.
- <link linkend='NULL--CAPS'><literal>NULL</literal></link> is not a
valid string. If the '<literal>o</literal>' or
- '<literal>g</literal>' characters are used, care must be taken to
ensure that the passed string is a valid DBus
- object path or DBus type signature, respectively.
- </para>
- <para>
- Upon encounting '<literal>s</literal>', '<literal>o</literal>'
or '<literal>g</literal>', <link
- linkend='g-variant-get'><function>g_variant_get()</function></link>
takes a pointer to a
- <code>(<link linkend='gchar'>gchar</link> *)</code> (ie: <code>(<link
linkend='gchar'>gchar</link> **)</code>) and
- sets it to a newly-allocated copy of the string. It is appropriate to
free this copy using
- <link linkend='g-free'><function>g_free()</function></link>.
- <link linkend='NULL--CAPS'><literal>NULL</literal></link> may also be
passed to indicate that the value of the
- string should be ignored (in which case no copy is made).
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariant *value1, *value2, *value3;
-
-value1 = g_variant_new ("s", "hello world!");
-value2 = g_variant_new ("o", "/must/be/a/valid/path");
-value3 = g_variant_new ("g", "iias");
-
-#if 0
- g_variant_new ("s", NULL); /* not valid: NULL is not a string. */
-#endif
-
-{
- gchar *result;
-
- g_variant_get (value1, "s", &result);
- g_print ("It was '%s'\n", result);
- g_free (result);
-}]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-variants'>
- <title>Variants</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>v</literal>
- </emphasis>
- </para>
-
- <para>
- Upon encountering a '<literal>v</literal>',
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> takes a
<code>(<link
- linkend='GVariant'>GVariant</link> *)</code>. The value of the
- <link linkend='GVariant'><type>GVariant</type></link> is used as the
contents of the variant value.
- </para>
- <para>
- Upon encountering a '<literal>v</literal>', <link
- linkend='g-variant-get'><function>g_variant_get()</function></link>
takes a pointer to a
- <code>(<link linkend='GVariant'>GVariant</link> *)</code> (ie:
<code>(<link linkend='GVariant'>GVariant</link> **)
- </code>). It is set to a new reference to a <link
linkend='GVariant'><type>GVariant</type></link> instance
- containing the contents of the variant value. It is appropriate to
free this reference using
- <link
linkend='g-variant-unref'><function>g_variant_unref()</function></link>.
- <link linkend='NULL--CAPS'><literal>NULL</literal></link> may also be
passed to indicate that the value should be
- ignored (in which case no new reference is created).
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariant *x, *y;
-
-/* the following two lines are equivalent: */
-x = g_variant_new ("v", y);
-x = g_variant_new_variant (y);
-
-/* as are these: */
-g_variant_get (x, "v", &y);
-y = g_variant_get_variant (x);]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
-
- <refsect2 id='gvariant-format-strings-arrays'>
- <title>Arrays</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>a</literal>
- </emphasis>
- </para>
-
- <para>
- Upon encountering an '<literal>a</literal>' character followed by a
type string,
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> will
take a
- <code>(<link linkend='GVariantBuilder'>GVariantBuilder</link>
*)</code> that has been created as an array builder
- for an array of the type given in the type string. The builder will
have
- <link
linkend='g-variant-builder-end'><function>g_variant_builder_end()</function></link>
called on it and the
- result will be used as the value. As a special exception, if the
given type string is a definite type, then
- <link linkend='NULL--CAPS'><literal>NULL</literal></link> may be given
to mean an empty array of that type.
- </para>
-
- <para>
- Upon encountering an '<literal>a</literal>' character followed by a
type string,
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link> will
take a pointer to a
- <code>(<link linkend='GVariantIter'>GVariantIter</link> *)</code> (ie:
- <code>(<link linkend='GVariantIter'>GVariantIter</link> **)</code>).
- A new heap-allocated iterator is created and returned, initialised for
iterating over the elements of the array.
- This iterator should be freed when you are done with it, using
- <link
linkend='g-variant-iter-free'><function>g_variant_iter_free()</function></link>.
- <link linkend='NULL--CAPS'><literal>NULL</literal></link> may also be
given to indicate that the value of the array
- should be ignored.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariantBuilder *builder;
-GVariant *value;
-
-builder = g_variant_builder_new (G_VARIANT_TYPE ("as"));
-g_variant_builder_add (builder, "s", "when");
-g_variant_builder_add (builder, "s", "in");
-g_variant_builder_add (builder, "s", "the");
-g_variant_builder_add (builder, "s", "course");
-value = g_variant_new ("as", builder);
-g_variant_builder_unref (builder);
-
-{
- GVariantIter *iter;
- gchar *str;
-
- g_variant_get (value, "as", &iter);
- while (g_variant_iter_loop (iter, "s", &str))
- g_print ("%s\n", str);
- g_variant_iter_free (iter);
-}
-
-g_variant_unref (value);]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-maybe-types'>
- <title>Maybe Types</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>m</literal>
- </emphasis>
- </para>
- <para>
- Maybe types are handled in two separate ways depending on the format
string that follows the
- '<literal>m</literal>'. The method that is used currently depends
entirely on the character immediately following the
- '<literal>m</literal>'.
- </para>
-
- <para>
- The first way is used with format strings starting
with '<literal>s</literal>', '<literal>o</literal>',
- '<literal>g</literal>', '<literal>v</literal>', '<literal>@</literal>', '<literal>*</literal>',
- '<literal>?</literal>', '<literal>r</literal>', '<literal>&amp;</literal>',
or '<literal>^</literal>'.
In all of
- these cases, for non-maybe types, <link
linkend='g-variant-new'><function>g_variant_new()</function></link> takes
- a pointer to a non-<link
linkend='NULL--CAPS'><literal>NULL</literal></link> value and
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link> returns
(by reference) a
- non-<link linkend='NULL--CAPS'><literal>NULL</literal></link>
pointer. When any of these format strings are
- prefixed with an '<literal>m</literal>', the type of arguments that
are collected does not change in any way, but
- <link linkend='NULL--CAPS'><literal>NULL</literal></link> becomes a
permissable value, to indicate the Nothing case.
- </para>
- <para>
- The second way is used with all other format strings. For
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> an
additional
- <link linkend='gboolean'><type>gboolean</type></link> argument is
collected and for
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link> an
additional
- <code>(<link linkend='gboolean'>gboolean</link> *)</code>. Following
this argument, the arguments that are normally
- collected for the equivalent non-maybe type will be collected.
- </para>
- <para>
- If <link linkend='FALSE--CAPS'><literal>FALSE</literal></link> is
given to
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> then
the Nothing value is constructed and
- the collected arguments are ignored. Otherwise (if <link
linkend='TRUE--CAPS'><literal>TRUE</literal></link> was
- given), the arguments are used in the normal way to create the Just
value.
- </para>
- <para>
- If <link linkend='NULL--CAPS'><literal>NULL</literal></link> is given
to
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link> then
the value is ignored. If a
- non-<link linkend='NULL--CAPS'><literal>NULL</literal></link> pointer
is given then it is used to return by reference
- whether the value was Just. In the case that the value was Just, the
- <link linkend='gboolean'><type>gboolean</type></link> will be set to
- <link linkend='TRUE--CAPS'><literal>TRUE</literal></link> and the
value will be stored in the arguments in the usual
- way. In the case that the value was Nothing, the <link
linkend='gboolean'><type>gboolean</type></link> will be set to
- <link linkend='FALSE--CAPS'><literal>FALSE</literal></link> and the
arguments will be collected in the normal way
- but have their values set to binary zero.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariant *value1, *value2, *value3, *value4, *value5, *value6;
-value1 = g_variant_new ("ms", "Hello world");
-value2 = g_variant_new ("ms", NULL);
-value3 = g_variant_new ("(m(ii)s)", TRUE, 123, 456, "Done");
-value4 = g_variant_new ("(m(ii)s)", FALSE, -1, -1, "Done"); /*
both '-1' are ignored. */
-value5 = g_variant_new ("(m@(ii)s)", NULL, "Done");
-
-{
- GVariant *contents;
- const gchar *cstr;
- gboolean just;
- gint32 x, y;
- gchar *str;
-
- g_variant_get (value1, "ms", &str);
- if (str != NULL)
- g_print ("str: %s\n", str);
- else
- g_print ("it was null\n");
- g_free (str);
-
-
- g_variant_get (value2, "m&s", &cstr);
- if (cstr != NULL)
- g_print ("str: %s\n", cstr);
- else
- g_print ("it was null\n");
- /* don't free 'cstr' */
-
-
- /* NULL passed for the gboolean *, but two 'gint32 *' still collected */
- g_variant_get (value3, "(m(ii)s)", NULL, NULL, NULL, &str);
- g_print ("string is %s\n", str);
- g_free (str);
-
- /* note: &s used, so g_free() not needed */
- g_variant_get (value4, "(m(ii)&s)", &just, &x, &y, &cstr);
- if (just)
- g_print ("it was (%d, %d)\n", x, y);
- else
- g_print ("it was null\n");
- g_print ("string is %s\n", cstr);
- /* don't free 'cstr' */
-
-
- g_variant_get (value5, "(m*s)", &contents, NULL); /* ignore the string.
*/
- if (contents != NULL)
- {
- g_variant_get (contents, "(ii)", &x, &y);
- g_print ("it was (%d, %d)\n", x, y);
- g_variant_unref (contents);
- }
- else
- g_print ("it was null\n");
-}]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-tuples'>
- <title>Tuples</title>
- <para>
- <emphasis role='strong'>
- Characters: <code>()</code>
- </emphasis>
- </para>
-
- <para>
- Tuples are handled by handling each item in the tuple, in sequence.
Each item is handled in the usual way.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariant *value1, *value2;
-
-value1 = g_variant_new ("(s(ii))", "Hello", 55, 77);
-value2 = g_variant_new ("()");
-
-{
- gchar *string;
- gint x, y;
-
- g_variant_get (value1, "(s(ii))", &string, &x, &y);
- g_print ("%s, %d, %d\n", string, x, y);
- g_free (string);
-
- g_variant_get (value2, "()"); /* do nothing... */
-}]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-dictionaries'>
- <title>Dictionaries</title>
- <para>
- <emphasis role='strong'>
- Characters: <code>{}</code>
- </emphasis>
- </para>
-
- <para>
- Dictionary entries are handled by handling first the key, then the
value. Each is handled in the usual way.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariantBuilder *b;
-GVariant *dict;
-
-b = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
-g_variant_builder_add (b, "{sv}", "name", g_variant_new_string ("foo"));
-g_variant_builder_add (b, "{sv}", "timeout", g_variant_new_int32 (10));
-dict = g_variant_builder_end (b);]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-gvariant'>
- <title>GVariant *</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>@</literal>, <literal>*</literal>,
<literal>?</literal>, <literal>r</literal>
- </emphasis>
-
- </para>
- <para>
- Upon encountering a '<literal>@</literal>' in front of a type string,
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> takes a
- non-<link linkend='NULL--CAPS'><literal>NULL</literal></link> pointer
to a
- <link linkend='GVariant'><type>GVariant</type></link> and uses its
value directly instead of collecting arguments to
- create the value. The provided <link
linkend='GVariant'><type>GVariant</type></link> must have a type that
matches the
- type string following
the '<literal>@</literal>'. '<literal>*</literal>' is
- the same as '<literal>@*</literal>' (ie: take a <link
linkend='GVariant'><type>GVariant</type></link> of any type).
- '<literal>?</literal>' is the same as '<literal>@?</literal>' (ie:
take a
- <link linkend='GVariant'><type>GVariant</type></link> of any basic
type). '<literal>r</literal>' is the same as
- '<literal>@r</literal>' (ie: take a <link
linkend='GVariant'><type>GVariant</type></link> of any tuple type).
- </para>
- <para>
- Upon encountering a '<literal>@</literal>' in front of a type string,
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link>
- takes a pointer to a <code>(<link linkend='GVariant'>GVariant</link>
*)</code> (ie: a
- <code>(<link linkend='GVariant'>GVariant</link> **)</code>) and sets
it to a new reference to a
- <link linkend='GVariant'><type>GVariant</type></link> containing the
value (instead of deconstructing the value into
- C types in the usual way). <link
linkend='NULL--CAPS'><literal>NULL</literal></link> can be given to ignore
the
- value. '<literal>*</literal>', '<literal>?</literal>'
and '<literal>r</literal>' are handled in a way analogous to
- what is stated above.
- </para>
- <para>
- You can always use '<literal>*</literal>' as an alternative
to '<literal>?</literal>', '<literal>r</literal>' or any
- use of '<literal>@</literal>'. Using the other characters where
possible is recommended, however, due to the
- improvements in type safety and code self-documentation.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[GVariant *value1, *value2;
-
-value1 = g_variant_new ("(i@ii)", 44, g_variant_new_int32 (55), 66);
-
-/* note: consumes floating reference count on 'value1' */
-value2 = g_variant_new ("(@(iii)*)", value1, g_variant_new_string ("foo"));
-
-{
- const gchar *string;
- GVariant *tmp;
- gsize length;
- gint x, y, z;
-
- g_variant_get (value2, "((iii)*)", &x, &y, &z, &tmp);
- string = g_variant_get_string (tmp, &length);
- g_print ("it is %d %d %d %s (length=%d)\n", x, y, z, string, (int)
length);
- g_variant_unref (tmp);
-
- /* quick way to skip all the values in a tuple */
- g_variant_get (value2, "(rs)", NULL, &string); /* or "(@(iii)s)" */
- g_print ("i only got the string: %s\n", string);
- g_free (string);
-}]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-pointers'>
- <title>Pointers</title>
- <para>
- <emphasis role='strong'>
- Characters: <code>&amp;</code>
- </emphasis>
- </para>
-
- <para>
- The '<code>&amp;</code>' character is used to indicate that serialised
data should be directly exchanged via a
- pointer.
- </para>
- <para>
- Currently, the only use for this character is when it is applied to a
string (ie: '<literal>&amp;s</literal>',
- '<literal>&amp;o</literal>' or '<code>&amp;g</code>'). For
- <link
linkend='g-variant-new'><function>g_variant_new()</function></link> this
has absolutely no effect. The string
- is collected and duplicated normally. For <link
linkend='g-variant-get'><function>g_variant_get()</function></link>
- it means that instead of creating a newly allocated copy of the
string, a pointer to the serialised data is
- returned. This pointer should not be freed. Validity checks are
performed to ensure that the string data will
- always be properly nul-terminated.
- </para>
-
- <refsect3>
- <title>Examples</title>
- <informalexample><programlisting>
-<![CDATA[{
- const gchar *str;
- GVariant *value;
-
- value = g_variant_new ("&s", "hello world");
- str = g_variant_get ("&s", &str);
- g_print ("string is: %s\n", str);
- /* no need to free str */
-}]]></programlisting></informalexample>
- </refsect3>
- </refsect2>
-
- <refsect2 id='gvariant-format-strings-convenience'>
- <title>Convenience Conversions</title>
- <para>
- <emphasis role='strong'>
- Characters: <literal>^</literal>
- </emphasis>
- </para>
-
- <para>
- The '<literal>^</literal>' character currently supports conversion to
and from bytestrings or to and from arrays
- of strings or bytestrings. It has a number of forms.
- </para>
-
- <para>
- In all forms, when used with <link
linkend='g-variant-new'><function>g_variant_new()</function></link> one
- pointer value is collected from the variable arguments and passed to a
function (as given in the table below).
- The result of that function is used as the value for this position.
When used with
- <link
linkend='g-variant-get'><function>g_variant_get()</function></link> one
pointer value is produced by using
- the function (given in the table) and returned by reference.
- </para>
-
- <informaltable>
- <tgroup cols='2'>
- <colspec colname='col_0'/>
- <colspec colname='col_1'/>
- <colspec colname='col_2'/>
- <tbody>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>Conversion</emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- Used with <link
linkend='g-variant-new'><function>g_variant_new()</function></link>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- Used with <link
linkend='g-variant-get'><function>g_variant_get()</function></link>
- </emphasis>
- </para>
- </entry>
- </row>
-
- <row rowsep='1'>
- <entry colsep='1' rowsep='1'>
- <para>
- <emphasis role='strong'>
- <literal>^as</literal>
- </emphasis>
- </para>
- </entry>
- <entry colsep='1' rowsep='1' morerows='1'>
- <para>
- equivalent to <link
linkend='g-variant-new-strv'><function>g_variant_new_strv()</function></link>
- </para>
- </entry>
- <entry colsep='1' rowsep='1'>
- <para>
- equivalent to <link
linkend='g-variant-dup-strv'><function>g_variant_dup_strv()</function></link>
- </para>
- </entry>
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/zh_CN/glib/docs-2.26.1/regex-syntax.sgml Tue Mar 29 08:19:02 2011
+++ /dev/null
@@ -1,2525 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
-]>
-<refentry id="glib-regex-syntax" revision="11 Jul 2006">
-<refmeta>
-<refentrytitle>正则表达式语法</refentrytitle>
-</refmeta>
-
-<!--
-Based on the man page for pcrepattern.
-
-Remember to sync this document with the file docs/pcrepattern.3 in the
-pcre package when upgrading to a newer version of pcre.
-
-In sync with PCRE 7.0
--->
-
-<refnamediv>
-<refname>正则表达式语法</refname>
-<refpurpose>
-GRegex支持的正则表达式语法及语义
-</refpurpose>
-</refnamediv>
-
-<refsect1>
-<title>GRegex正则表达式详述</title>
-<para>
-A regular expression is a pattern that is matched against a
-string from left to right. Most characters stand for themselves in a
-pattern, and match the corresponding characters in the string. As a
-trivial example, the pattern
-</para>
-
-<programlisting>
-The quick brown fox
-</programlisting>
-
-<para>
-matches a portion of a string that is identical to itself. When
-caseless matching is specified (the <varname>G_REGEX_CASELESS</varname>
flag), letters are
-matched independently of case.
-</para>
-
-<para>
-The power of regular expressions comes from the ability to include
-alternatives and repetitions in the pattern. These are encoded in the
-pattern by the use of metacharacters, which do not stand for themselves
-but instead are interpreted in some special way.
-</para>
-
-<para>
-There are two different sets of metacharacters: those that are recognized
-anywhere in the pattern except within square brackets, and those
-that are recognized in square brackets. Outside square brackets, the
-metacharacters are as follows:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Metacharacters outside square brackets</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Character</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\</entry>
- <entry>general escape character with several uses</entry>
- </row>
- <row>
- <entry>^</entry>
- <entry>assert start of string (or line, in multiline mode)</entry>
- </row>
- <row>
- <entry>$</entry>
- <entry>assert end of string (or line, in multiline mode)</entry>
- </row>
- <row>
- <entry>.</entry>
- <entry>match any character except newline (by default)</entry>
- </row>
- <row>
- <entry>[</entry>
- <entry>start character class definition</entry>
- </row>
- <row>
- <entry>|</entry>
- <entry>start of alternative branch</entry>
- </row>
- <row>
- <entry>(</entry>
- <entry>start subpattern</entry>
- </row>
- <row>
- <entry>)</entry>
- <entry>end subpattern</entry>
- </row>
- <row>
- <entry>?</entry>
- <entry>extends the meaning of (, or 0/1 quantifier, or quantifier
minimizer</entry>
- </row>
- <row>
- <entry>*</entry>
- <entry>0 or more quantifier</entry>
- </row>
- <row>
- <entry>+</entry>
- <entry>1 or more quantifier, also "possessive quantifier"</entry>
- </row>
- <row>
- <entry>{</entry>
- <entry>start min/max quantifier</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-Part of a pattern that is in square brackets is called a "character
-class". In a character class the only metacharacters are:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Metacharacters inside square brackets</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Character</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\</entry>
- <entry>general escape character</entry>
- </row>
- <row>
- <entry>^</entry>
- <entry>negate the class, but only if the first character</entry>
- </row>
- <row>
- <entry>-</entry>
- <entry>indicates character range</entry>
- </row>
- <row>
- <entry>[</entry>
- <entry>POSIX character class (only if followed by POSIX syntax)</entry>
- </row>
- <row>
- <entry>]</entry>
- <entry>terminates the character class</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-</refsect1>
-
-<refsect1>
-<title>Backslash</title>
-<para>
-The backslash character has several uses. Firstly, if it is followed by
-a non-alphanumeric character, it takes away any special meaning that
-character may have. This use of backslash as an escape character
-applies both inside and outside character classes.
-</para>
-
-<para>
-For example, if you want to match a * character, you write \* in the
-pattern. This escaping action applies whether or not the following
-character would otherwise be interpreted as a metacharacter, so it is
-always safe to precede a non-alphanumeric with backslash to specify
-that it stands for itself. In particular, if you want to match a
-backslash, you write \\.
-</para>
-
-<para>
-If a pattern is compiled with the <varname>G_REGEX_EXTENDED</varname>
-option, whitespace in the pattern (other than in a character class) and
-characters between a # outside a character class and the next newline
-are ignored.
-An escaping backslash can be used to include a whitespace or # character
-as part of the pattern.
-</para>
-
-<para>
-Note that the C compiler interprets backslash in strings itself, therefore
-you need to duplicate all \ characters when you put a regular expression
-in a C string, like "\\d{3}".
-</para>
-
-<para>
-If you want to remove the special meaning from a sequence of characters,
-you can do so by putting them between \Q and \E.
-The \Q...\E sequence is recognized both inside and outside character
-classes.
-</para>
-
-<refsect2>
-<title>Non-printing characters</title>
-<para>
-A second use of backslash provides a way of encoding non-printing
-characters in patterns in a visible manner. There is no restriction on the
-appearance of non-printing characters, apart from the binary zero that
-terminates a pattern, but when a pattern is being prepared by text
-editing, it is usually easier to use one of the following escape
-sequences than the binary character it represents:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Non-printing characters</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Escape</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\a</entry>
- <entry>alarm, that is, the BEL character (hex 07)</entry>
- </row>
- <row>
- <entry>\cx</entry>
- <entry>"control-x", where x is any character</entry>
- </row>
- <row>
- <entry>\e</entry>
- <entry>escape (hex 1B)</entry>
- </row>
- <row>
- <entry>\f</entry>
- <entry>formfeed (hex 0C)</entry>
- </row>
- <row>
- <entry>\n</entry>
- <entry>newline (hex 0A)</entry>
- </row>
- <row>
- <entry>\r</entry>
- <entry>carriage return (hex 0D)</entry>
- </row>
- <row>
- <entry>\t</entry>
- <entry>tab (hex 09)</entry>
- </row>
- <row>
- <entry>\ddd</entry>
- <entry>character with octal code ddd, or backreference</entry>
- </row>
- <row>
- <entry>\xhh</entry>
- <entry>character with hex code hh</entry>
- </row>
- <row>
- <entry>\x{hhh..}</entry>
- <entry>character with hex code hhh..</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-The precise effect of \cx is as follows: if x is a lower case letter,
-it is converted to upper case. Then bit 6 of the character (hex 40) is
-inverted. Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c;
-becomes hex 7B.
-</para>
-
-<para>
-After \x, from zero to two hexadecimal digits are read (letters can be
-in upper or lower case). Any number of hexadecimal digits may appear
-between \x{ and }, but the value of the character code
-must be less than 2**31 (that is, the maximum hexadecimal value is
-7FFFFFFF). If characters other than hexadecimal digits appear between
-\x{ and }, or if there is no terminating }, this form of escape is not
-recognized. Instead, the initial \x will be interpreted as a basic
hexadecimal
-escape, with no following digits, giving a character whose
-value is zero.
-</para>
-
-<para>
-Characters whose value is less than 256 can be defined by either of the
-two syntaxes for \x. There is no difference
-in the way they are handled. For example, \xdc is exactly the same as
-\x{dc}.
-</para>
-
-<para>
-After \0 up to two further octal digits are read. If there are fewer
-than two digits, just those that are present are used.
-Thus the sequence \0\x\07 specifies two binary zeros followed by a BEL
-character (code value 7). Make sure you supply two digits after the
-initial zero if the pattern character that follows is itself an octal
-digit.
-</para>
-
-<para>
-The handling of a backslash followed by a digit other than 0 is
complicated.
-Outside a character class, GRegex reads it and any following digits as a
-decimal number. If the number is less than 10, or if there
-have been at least that many previous capturing left parentheses in the
-expression, the entire sequence is taken as a back reference. A
-description of how this works is given later, following the discussion
-of parenthesized subpatterns.
-</para>
-
-<para>
-Inside a character class, or if the decimal number is greater than 9
-and there have not been that many capturing subpatterns, GRegex re-reads
-up to three octal digits following the backslash, and uses them to generate
-a data character. Any subsequent digits stand for themselves. For example:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Non-printing characters</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Escape</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\040</entry>
- <entry>is another way of writing a space</entry>
- </row>
- <row>
- <entry>\40</entry>
- <entry>is the same, provided there are fewer than 40 previous
capturing subpatterns</entry>
- </row>
- <row>
- <entry>\7</entry>
- <entry>is always a back reference</entry>
- </row>
- <row>
- <entry>\11</entry>
- <entry>might be a back reference, or another way of writing a
tab</entry>
- </row>
- <row>
- <entry>\011</entry>
- <entry>is always a tab</entry>
- </row>
- <row>
- <entry>\0113</entry>
- <entry>is a tab followed by the character "3"</entry>
- </row>
- <row>
- <entry>\113</entry>
- <entry>might be a back reference, otherwise the character with octal
code 113</entry>
- </row>
- <row>
- <entry>\377</entry>
- <entry>might be a back reference, otherwise the byte consisting
entirely of 1 bits</entry>
- </row>
- <row>
- <entry>\81</entry>
- <entry>is either a back reference, or a binary zero followed by the
two characters "8" and "1"</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-Note that octal values of 100 or greater must not be introduced by a
-leading zero, because no more than three octal digits are ever read.
-</para>
-
-<para>
-All the sequences that define a single character can be used both inside
-and outside character classes. In addition, inside a character class, the
-sequence \b is interpreted as the backspace character (hex 08), and the
-sequences \R and \X are interpreted as the characters "R" and "X",
respectively.
-Outside a character class, these sequences have different meanings (see
below).
-</para>
-</refsect2>
-
-<refsect2>
-<title>Absolute and relative back references</title>
-<para>
-The sequence \g followed by a positive or negative number, optionally
enclosed
-in braces, is an absolute or relative back reference. Back references are
-discussed later, following the discussion of parenthesized subpatterns.
-</para>
-</refsect2>
-
-<refsect2>
-<title>Generic character types</title>
-
-<para>
-Another use of backslash is for specifying generic character types.
-The following are always recognized:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Generic characters</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Escape</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\d</entry>
- <entry>any decimal digit</entry>
- </row>
- <row>
- <entry>\D</entry>
- <entry>any character that is not a decimal digit</entry>
- </row>
- <row>
- <entry>\s</entry>
- <entry>any whitespace character</entry>
- </row>
- <row>
- <entry>\S</entry>
- <entry>any character that is not a whitespace character</entry>
- </row>
- <row>
- <entry>\w</entry>
- <entry>any "word" character</entry>
- </row>
- <row>
- <entry>\W</entry>
- <entry>any "non-word" character</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-Each pair of escape sequences partitions the complete set of characters
-into two disjoint sets. Any given character matches one, and only one,
-of each pair.
-</para>
-
-<para>
-These character type sequences can appear both inside and outside character
-classes. They each match one character of the appropriate type.
-If the current matching point is at the end of the passed string, all
-of them fail, since there is no character to match.
-</para>
-
-<para>
-For compatibility with Perl, \s does not match the VT character (code
-11). This makes it different from the the POSIX "space" class. The \s
-characters are HT (9), LF (10), FF (12), CR (13), and space (32).
-</para>
-
-<para>
-A "word" character is an underscore or any character less than 256 that
-is a letter or digit.</para>
-
-<para>
-Characters with values greater than 128 never match \d,
-\s, or \w, and always match \D, \S, and \W.
-</para>
-</refsect2>
-
-<refsect2>
-<title>Newline sequences</title>
-<para>Outside a character class, the escape sequence \R matches any Unicode
-newline sequence.
-This particular group matches either the two-character sequence CR
followed by
-LF, or one of the single characters LF (linefeed, U+000A), VT (vertical
tab,
-U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), NEL (next
-line, U+0085), LS (line separator, U+2028), or PS (paragraph separator,
U+2029).
-The two-character sequence is treated as a single unit that
-cannot be split. Inside a character class, \R matches the
letter "R".</para>
-</refsect2>
-
-<refsect2>
-<title>Unicode character properties</title>
-<para>
-To support generic character types there are three additional escape
-sequences, they are:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Generic character types</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Escape</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\p{xx}</entry>
- <entry>a character with the xx property</entry>
- </row>
- <row>
- <entry>\P{xx}</entry>
- <entry>a character without the xx property</entry>
- </row>
- <row>
- <entry>\X</entry>
- <entry>an extended Unicode sequence</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-The property names represented by xx above are limited to the Unicode
-script names, the general category properties, and "Any", which matches
-any character (including newline). Other properties such
as "InMusicalSymbols"
-are not currently supported. Note that \P{Any} does not match any
characters,
-so always causes a match failure.
-</para>
-
-<para>
-Sets of Unicode characters are defined as belonging to certain scripts. A
-character from one of these sets can be matched using a script name. For
-example, \p{Greek} or \P{Han}.
-</para>
-
-<para>
-Those that are not part of an identified script are lumped together as
-"Common". The current list of scripts is:
-</para>
-
-<para>
-Each character has exactly one general category property, specified by a
-two-letter abbreviation. For compatibility with Perl, negation can be
specified
-by including a circumflex between the opening brace and the property name.
For
-example, \p{^Lu} is the same as \P{Lu}.
-</para>
-
-<para>
-If only one letter is specified with \p or \P, it includes all the general
-category properties that start with that letter. In this case, in the
absence
-of negation, the curly brackets in the escape sequence are optional; these
two
-examples have the same effect:
-</para>
-
-<programlisting>
-\p{L}
-\pL
-</programlisting>
-
-<para>
-The following general category property codes are supported:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Property codes</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Code</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>C</entry>
- <entry>Other</entry>
- </row>
- <row>
- <entry>L</entry>
- <entry>Letter</entry>
- </row>
- <row>
- <entry>M</entry>
- <entry>Mark</entry>
- </row>
- <row>
- <entry>N</entry>
- <entry>Number</entry>
- </row>
- <row>
- <entry>P</entry>
- <entry>Punctuation</entry>
- </row>
- <row>
- <entry>S</entry>
- <entry>Symbol</entry>
- </row>
- <row>
- <entry>Z</entry>
- <entry>Separator</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-The special property L&amp; is also supported: it matches a character that
has
-the Lu, Ll, or Lt property, in other words, a letter that is not
classified as
-a modifier or "other".
-</para>
-
-<para>
-The long synonyms for these properties that Perl supports (such as
\ep{Letter})
-are not supported by GRegex, nor is it permitted to prefix any of these
-properties with "Is".
-</para>
-
-<para>
-No character that is in the Unicode table has the Cn (unassigned) property.
-Instead, this property is assumed for any code point that is not in the
-Unicode table.
-</para>
-
-<para>
-Specifying caseless matching does not affect these escape sequences.
-For example, \p{Lu} always matches only upper case letters.
-</para>
-
-<para>
-The \X escape matches any number of Unicode characters that form an
-extended Unicode sequence. \X is equivalent to
-</para>
-
-<programlisting>
-(?&gt;\PM\pM*)
-</programlisting>
-
-<para>
-That is, it matches a character without the "mark" property, followed
-by zero or more characters with the "mark" property, and treats the
-sequence as an atomic group (see below). Characters with the "mark"
-property are typically accents that affect the preceding character.
-</para>
-
-<para>
-Matching characters by Unicode property is not fast, because GRegex has
-to search a structure that contains data for over fifteen thousand
-characters. That is why the traditional escape sequences such as \d and
-\w do not use Unicode properties.
-</para>
-</refsect2>
-
-<refsect2>
-<title>Simple assertions</title>
-<para>
-The final use of backslash is for certain simple assertions. An
-assertion specifies a condition that has to be met at a particular point in
-a match, without consuming any characters from the string. The
-use of subpatterns for more complicated assertions is described below.
-The backslashed assertions are:
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Simple assertions</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Escape</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>\b</entry>
- <entry>matches at a word boundary</entry>
- </row>
- <row>
- <entry>\B</entry>
- <entry>matches when not at a word boundary</entry>
- </row>
- <row>
- <entry>\A</entry>
- <entry>matches at the start of the string</entry>
- </row>
- <row>
- <entry>\Z</entry>
- <entry>matches at the end of the string or before a newline at the end
of the string</entry>
- </row>
- <row>
- <entry>\z</entry>
- <entry>matches only at the end of the string</entry>
- </row>
- <row>
- <entry>\G</entry>
- <entry>matches at first matching position in the string</entry>
- </row>
-</tbody>
-</tgroup>
-</table>
-
-<para>
-These assertions may not appear in character classes (but note that \b
-has a different meaning, namely the backspace character, inside a
-character class).
-</para>
-
-<para>
-A word boundary is a position in the string where the current
-character and the previous character do not both match \w or \W (i.e.
-one matches \w and the other matches \W), or the start or end of the
-string if the first or last character matches \w, respectively.
-</para>
-
-<para>
-The \A, \Z, and \z assertions differ from the traditional circumflex
-and dollar (described in the next section) in that they only ever match
-at the very start and end of the string, whatever options are
-set. Thus, they are independent of multiline mode. These three assertions
-are not affected by the <varname>G_REGEX_MATCH_NOTBOL</varname> or
<varname>G_REGEX_MATCH_NOTEOL</varname> options,
-which affect only the behaviour of the circumflex and dollar
metacharacters.
-However, if the start_position argument of a matching function is non-zero,
-indicating that matching is to start at a point other than the beginning of
-the string, \A can never match. The difference between \Z and \z is
-that \Z matches before a newline at the end of the string as well at the
-very end, whereas \z matches only at the end.
-</para>
-
-<para>
-The \G assertion is true only when the current matching position is at
-the start point of the match, as specified by the start_position argument
-to the matching functions. It differs from \A when the value of
startoffset is
-non-zero.
-</para>
-
-<para>
-Note, however, that the interpretation of \G, as the start of the
-current match, is subtly different from Perl’s, which defines it as the
-end of the previous match. In Perl, these can be different when the
-previously matched string was empty.
-</para>
-
-<para>
-If all the alternatives of a pattern begin with \G, the expression is
-anchored to the starting match position, and the "anchored" flag is set
-in the compiled regular expression.
-</para>
-</refsect2>
-</refsect1>
-
-<refsect1>
-<title>Circumflex and dollar</title>
-<para>
-Outside a character class, in the default matching mode, the circumflex
-character is an assertion that is true only if the current matching
-point is at the start of the string. If the start_position argument to
-the matching functions is non-zero, circumflex can never match if the
-<varname>G_REGEX_MULTILINE</varname> option is unset. Inside a character
class, circumflex
-has an entirely different meaning (see below).
-</para>
-
-<para>
-Circumflex need not be the first character of the pattern if a number
-of alternatives are involved, but it should be the first thing in each
-alternative in which it appears if the pattern is ever to match that
-branch. If all possible alternatives start with a circumflex, that is,
-if the pattern is constrained to match only at the start of the string,
-it is said to be an "anchored" pattern. (There are also other
-constructs that can cause a pattern to be anchored.)
-</para>
-
-<para>
-A dollar character is an assertion that is true only if the current
-matching point is at the end of the string, or immediately
-before a newline at the end of the string (by default). Dollar need not
-be the last character of the pattern if a number of alternatives are
-involved, but it should be the last item in any branch in which it
-appears. Dollar has no special meaning in a character class.
-</para>
-
-<para>
-The meaning of dollar can be changed so that it matches only at the
-very end of the string, by setting the
<varname>G_REGEX_DOLLAR_ENDONLY</varname> option at
-compile time. This does not affect the \Z assertion.
-</para>
-
-<para>
-The meanings of the circumflex and dollar characters are changed if the
-<varname>G_REGEX_MULTILINE</varname> option is set. When this is the case,
-a circumflex matches immediately after internal newlines as well as at the
-start of the string. It does not match after a newline that ends the
string.
-A dollar matches before any newlines in the string, as well as at the very
-end, when <varname>G_REGEX_MULTILINE</varname> is set. When newline is
-specified as the two-character sequence CRLF, isolated CR and LF characters
-do not indicate newlines.
-</para>
-
-<para>
-For example, the pattern /^abc$/ matches the string "def\nabc" (where
-\n represents a newline) in multiline mode, but not otherwise.
Consequently,
-patterns that are anchored in single line mode because all branches start
with
-^ are not anchored in multiline mode, and a match for circumflex is
possible
-when the <varname>start_position</varname> argument of a matching function
-is non-zero. The <varname>G_REGEX_DOLLAR_ENDONLY</varname> option is
ignored
-if <varname>G_REGEX_MULTILINE</varname> is set.
-</para>
-
-<para>
-Note that the sequences \A, \Z, and \z can be used to match the start and
-end of the string in both modes, and if all branches of a pattern start
with
-\A it is always anchored, whether or not
<varname>G_REGEX_MULTILINE</varname>
-is set.
-</para>
-</refsect1>
-
-<refsect1>
-<title>Full stop (period, dot)</title>
-<para>
-Outside a character class, a dot in the pattern matches any one character
-in the string, including a non-printing character, but not (by
-default) newline. In UTF-8 a character might be more than one byte long.
-</para>
-
-<para>
-When a line ending is defined as a single character, dot never matches that
-character; when the two-character sequence CRLF is used, dot does not
match CR
-if it is immediately followed by LF, but otherwise it matches all
characters
-(including isolated CRs and LFs). When any Unicode line endings are being
-recognized, dot does not match CR or LF or any of the other line ending
-characters.
-</para>
-
-<para>
-If the <varname>G_REGEX_DOTALL</varname> flag is set, dots match newlines
-as well. The handling of dot is entirely independent of the handling of
circumflex
-and dollar, the only relationship being that they both involve newline
-characters. Dot has no special meaning in a character class.
-</para>
-
-<para>
-The behaviour of dot with regard to newlines can be changed. If the
-<varname>G_REGEX_DOTALL</varname> option is set, a dot matches any one
-character, without exception. If newline is defined as the two-character
-sequence CRLF, it takes two dots to match it.
-</para>
-
-<para>
-The handling of dot is entirely independent of the handling of circumflex
and
-dollar, the only relationship being that they both involve newlines. Dot
has no
-special meaning in a character class.
-</para>
-</refsect1>
-
-<refsect1>
-<title>Matching a single byte</title>
-<para>
-Outside a character class, the escape sequence \C matches any one byte,
-both in and out of UTF-8 mode. Unlike a dot, it always matches any line
-ending characters.
-The feature is provided in Perl in order to match individual bytes in
-UTF-8 mode. Because it breaks up UTF-8 characters into individual
-bytes, what remains in the string may be a malformed UTF-8 string. For
-this reason, the \C escape sequence is best avoided.
-</para>
-
-<para>
-GRegex does not allow \C to appear in lookbehind assertions (described
-below), because in UTF-8 mode this would make it impossible to calculate
-the length of the lookbehind.
-</para>
-</refsect1>
-
-<refsect1>
-<title>Square brackets and character classes</title>
-<para>
-An opening square bracket introduces a character class, terminated by a
-closing square bracket. A closing square bracket on its own is not
special. If a closing square bracket is required as a member of the class,
-it should be the first data character in the class (after an initial
-circumflex, if present) or escaped with a backslash.
-</para>
-
-<para>
-A character class matches a single character in the string. A matched
character
-must be in the set of characters defined by the class, unless the first
-character in the class definition is a circumflex, in which case the
-string character must not be in the set defined by the class. If a
-circumflex is actually required as a member of the class, ensure it is
-not the first character, or escape it with a backslash.
-</para>
-
-<para>
-For example, the character class [aeiou] matches any lower case vowel,
-while [^aeiou] matches any character that is not a lower case vowel.
-Note that a circumflex is just a convenient notation for specifying the
-characters that are in the class by enumerating those that are not. A
-class that starts with a circumflex is not an assertion: it still consumes
-a character from the string, and therefore it fails if the current pointer
-is at the end of the string.
-</para>
-
-<para>
-In UTF-8 mode, characters with values greater than 255 can be included
-in a class as a literal string of bytes, or by using the \x{ escaping
-mechanism.
-</para>
-
-<para>
-When caseless matching is set, any letters in a class represent both
-their upper case and lower case versions, so for example, a caseless
-[aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
-match "A", whereas a caseful version would.
-</para>
-
-<para>
-Characters that might indicate line breaks are never treated
-in any special way when matching character classes, whatever line-ending
-sequence is in use, and whatever setting of the
<varname>G_REGEX_DOTALL</varname>
-and <varname>G_REGEX_MULTILINE</varname> options is used. A class such as
[^a]
-always matches one of these characters.
-</para>
-
-<para>
-The minus (hyphen) character can be used to specify a range of characters
in
-a character class. For example, [d-m] matches any letter
-between d and m, inclusive. If a minus character is required in a
-class, it must be escaped with a backslash or appear in a position
-where it cannot be interpreted as indicating a range, typically as the
-first or last character in the class.
-</para>
-
-<para>
-It is not possible to have the literal character "]" as the end character
-of a range. A pattern such as [W-]46] is interpreted as a class of
-two characters ("W" and "-") followed by a literal string "46]", so it
-would match "W46]" or "-46]". However, if the "]" is escaped with a
-backslash it is interpreted as the end of range, so [W-\]46] is interpreted
-as a class containing a range followed by two other characters.
-The octal or hexadecimal representation of "]" can also be used to end
-a range.
-</para>
-
-<para>
-Ranges operate in the collating sequence of character values. They can
-also be used for characters specified numerically, for example
-[\000-\037]. In UTF-8 mode, ranges can include characters whose values
-are greater than 255, for example [\x{100}-\x{2ff}].
-</para>
-
-<para>
-The character types \d, \D, \p, \P, \s, \S, \w, and \W may also appear
-in a character class, and add the characters that they match to the
-class. For example, [\dABCDEF] matches any hexadecimal digit. A
-circumflex can conveniently be used with the upper case character types to
-specify a more restricted set of characters than the matching lower
-case type. For example, the class [^\W_] matches any letter or digit,
-but not underscore.
-</para>
-
-<para>
-The only metacharacters that are recognized in character classes are
-backslash, hyphen (only where it can be interpreted as specifying a
-range), circumflex (only at the start), opening square bracket (only
-when it can be interpreted as introducing a POSIX class name - see the
-next section), and the terminating closing square bracket. However,
-escaping other non-alphanumeric characters does no harm.
-</para>
-</refsect1>
-
-<refsect1>
-<title>Posix character classes</title>
-<para>
-GRegex supports the POSIX notation for character classes. This uses names
-enclosed by [: and :] within the enclosing square brackets. For example,
-</para>
-
-<programlisting>
-[01[:alpha:]%]
-</programlisting>
-
-<para>
-matches "0", "1", any alphabetic character, or "%". The supported class
-names are
-</para>
-
-<table frame="all" colsep="1" rowsep="1">
-<title>Posix classes</title>
-<tgroup cols="2">
-<colspec colnum="1" align="center"/>
-<thead>
- <row>
- <entry>Name</entry>
- <entry>Meaning</entry>
- </row>
-</thead>
-<tbody>
- <row>
- <entry>alnum</entry>
- <entry>letters and digits</entry>
- </row>
- <row>
- <entry>alpha</entry>
- <entry>letters</entry>
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/zh_CN/glib/AUTHORS Sun Apr 17 06:04:36 2011
+++ /trunk/zh_CN/glib/AUTHORS Sun Apr 17 08:42:19 2011
@@ -87,7 +87,7 @@
#作者名为unknown表示计划翻译,但目前还无人认领
#作者名为finished表示内容已经翻译完成。
########已经和正在翻译的文档###############
-yetist yet...@gmail.com xmlpo_files=(glib-docs.po) po_files=()
+yetist yet...@gmail.com xmlpo_files=(regex-syntax.po) po_files=()
lerosua ler...@gmail.com xmlpo_files=(compiling.po,running.po) po_files=()
wzssyqa wzs...@gmail.com xmlpo_files=(changes.po) po_files=()
kovchou kov...@gmail.com xmlpo_files=(regex-syntax.po) po_files=()
=======================================
--- /trunk/zh_CN/glib/glib-docs-2.26.1.po Sun Apr 17 06:30:31 2011
+++ /trunk/zh_CN/glib/glib-docs-2.26.1.po Sun Apr 17 08:42:19 2011
@@ -1,21 +1,24 @@
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: gtk+ 3.0.8\n"
"POT-Creation-Date: 2011-04-14 14:21+0800\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"PO-Revision-Date: 2011-04-17 23:39+0800\n"
+"Last-Translator: yetist <yet...@gmail.com>\n"
"Language-Team: LANGUAGE <L...@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Chinese\n"
+"X-Poedit-Country: CHINA\n"
+"X-Poedit-SourceCharset: utf-8\n"

#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2
#: building.sgml:0(None) changes.sgml:0(None) compiling.sgml:0(None)
#: cross.sgml:0(None) glib-docs.sgml:0(None) gvariant-varargs.xml:0(None)
#: regex-syntax.sgml:0(None) resources.sgml:0(None) running.sgml:0(None)
msgid "translator-credits"
-msgstr ""
+msgstr "translator-credits"

#: building.sgml:107(para)
msgid ""
@@ -51,7 +54,7 @@

#: building.sgml:13(refname)
msgid "Compiling the GLib Package"
-msgstr ""
+msgstr "编译GLib包"

#: building.sgml:137(para)
msgid ""
@@ -63,7 +66,7 @@

#: building.sgml:14(refpurpose)
msgid "How to compile GLib itself"
-msgstr ""
+msgstr "如何自行编译GLib"

#: building.sgml:146(para)
msgid ""
@@ -140,7 +143,7 @@

#: building.sgml:20(title)
msgid "Building the Library on UNIX"
-msgstr ""
+msgstr "怎样在UNIX环境中建立库"

#: building.sgml:21(para)
msgid ""
@@ -156,10 +159,19 @@
" <userinput>make install</userinput>\n"
" </literallayout>"
msgstr ""
+"在UNIX上,GLib使用标准的GNU编译系统, 使用
<application>autoconf</application>"
+"来配置并解决可移植性问题, 使用<application>automake</application>来建立
符合"
+"GNU编译标准(GNU Coding Standards)的makefiles文件, 并使用"
+"<application>libtool</application>来建立多平台上的共享库。 通常,编译
GLib函数"
+"库的顺序如下所示:<literallayout>\n"
+" <userinput>./configure</userinput>\n"
+" <userinput>make</userinput>\n"
+" <userinput>make install</userinput>\n"
+" </literallayout> "

#: building.sgml:273(systemitem)
msgid "--enable-debug"
-msgstr ""
+msgstr "--enable-debug"

#: building.sgml:275(para)
msgid ""
@@ -269,6 +281,9 @@
"<application>autoconf</application> documentation or run <command>./"
"configure --help</command> for information about the standard options."
msgstr ""
+"提供给<application>GNU autoconf</application>的标准选项可能会传递给"
+"<command>configure</command>脚本。 请查看
<application>autoconf</application>"
+"文档或者运行<command>./configure --help</command>命令来 查看标准选项。"

#: building.sgml:385(para)
msgid ""
@@ -297,7 +312,7 @@

#: building.sgml:414(systemitem)
msgid "--with-threads"
-msgstr ""
+msgstr "--with-threads"

#: building.sgml:416(para)
msgid "Specify a thread implementation to use. <placeholder-1/>"
@@ -331,7 +346,7 @@

#: building.sgml:450(systemitem)
msgid "--with-pcre"
-msgstr ""
+msgstr "--with-pcre"

#: building.sgml:452(para)
msgid ""
@@ -351,6 +366,8 @@
"The GTK+ documentation contains <ulink url=\"../gtk/gtk-building.html"
"\">further details</ulink> about the build process and ways to influence
it."
msgstr ""
+"GTK+的文档包含关于构建过程以及如何影响它的一些 更多的<ulink
url=\"../gtk/gtk-"
+"building.html\"> 细节</ulink>。"

#: building.sgml:461(para)
msgid ""
@@ -416,7 +433,7 @@

#: building.sgml:53(title)
msgid "Dependencies"
-msgstr ""
+msgstr "依赖"

#: building.sgml:530(title)
msgid ""
@@ -436,6 +453,7 @@
msgstr ""

#: building.sgml:54(para)
+#, fuzzy
msgid ""
"Before you can compile the GLib library, you need to have various other "
"tools and libraries installed on your system. The two tools needed
during "
@@ -443,6 +461,9 @@
"GLib mentioned above such as <application>autoconf</application>) are "
"<command>pkg-config</command> and GNU make."
msgstr ""
+"在编译GLib库之前,你还需要一些其它的工具和库。有两个工具在整个编译期间都
需"
+"要,它们是pkg-config和GNU make。 这两个工具和之前讲到的autoconf之类的工具
是"
+"不同的。"

#: building.sgml:548(title)
msgid ""
@@ -532,7 +553,7 @@

#: building.sgml:626(systemitem)
msgid "--with-runtime-libdir=RELPATH"
-msgstr ""
+msgstr "--with-runtime-libdir=RELPATH"

#: building.sgml:628(para)
msgid ""
@@ -560,13 +581,13 @@

#: building.sgml:7(refentrytitle)
msgid "Compiling the GLib package"
-msgstr ""
+msgstr "编译GLib包"

#: building.sgml:8(manvolnum) changes.sgml:8(manvolnum)
#: compiling.sgml:8(manvolnum) cross.sgml:8(manvolnum)
#: resources.sgml:8(manvolnum) running.sgml:8(manvolnum)
msgid "3"
-msgstr ""
+msgstr "3"

#: building.sgml:80(para)
msgid ""
@@ -581,7 +602,7 @@
#: building.sgml:9(refmiscinfo) compiling.sgml:9(refmiscinfo)
#: cross.sgml:9(refmiscinfo) running.sgml:9(refmiscinfo)
msgid "GLib Library"
-msgstr ""
+msgstr "GLib库"

#: building.sgml:91(para)
msgid "GLib depends on a number of other libraries."
@@ -604,12 +625,15 @@
"Sources are first created, then later added to a specific "
"<structname>GMainContext</structname>."
msgstr ""
+"Sources 刚刚创建,于是稍候被添加到了具体的<structname>GMainContext</"
+"structname>。"

#: changes.sgml:112(para)
msgid ""
"Dispatching has been modified so both the callback and data are passed in
to "
"the <function>dispatch()</function> virtual function."
msgstr ""
+"修改了调度,以使回调和数据都可以传递给<function>dispatch()</function>虚函
数。"

#: changes.sgml:127(para)
msgid ""
@@ -617,17 +641,19 @@
"function> have been changed so they are now safe against removal of the "
"current item, not the next item."
msgstr ""
+"更改了<function>g_list_foreach()</function>和
<function>g_slist_foreach()</"
+"function>,以使它们安全的应对移除当前条目,而不是下一条目。"

#: changes.sgml:13(refname) changes.sgml:7(refentrytitle)
#: changes.sgml:9(refmiscinfo)
msgid "Changes to GLib"
-msgstr ""
+msgstr "GLib 的更改"

#: changes.sgml:133(para)
msgid ""
"It's not recommended to mutate the list in the callback to these
functions "
"in any case."
-msgstr ""
+msgstr "在任何情况下回调这些函数时,都不推荐变更这些链表。 "

#: changes.sgml:14(refpurpose)
msgid "Incompatible changes made between successing versions of GLib"
@@ -639,22 +665,29 @@
"locale. If you want to use it with the encoding of the locale, you need
to "
"convert strings using <function>g_locale_to_utf8()</function> first."
msgstr ""
+"<structname>GDate</structname>现在用 UTF-8,而不是当前区域设置。如果希望使
用"
+"它处理当前区域的编码,您需要首先使用
<function>g_locale_to_utf8()</function>转"
+"换字符串的编码。 "

#: changes.sgml:148(para)
msgid ""
"<function>g_strsplit()</function> has been fixed to: <placeholder-1/>
Code "
"depending on either of these bugs will need to be fixed."
msgstr ""
+"<function>g_strsplit()</function>被更正为:<placeholder-1/>所有依赖于这
些 "
+"bug 的代码需要更正。 "

#: changes.sgml:153(para)
msgid "include trailing empty tokens, rather than stripping them"
-msgstr ""
+msgstr "包含结尾的空标记,而不是剥离它们 "

#: changes.sgml:158(para)
msgid ""
"split into a maximum of <literal>max_tokens</literal> tokens, rather
than "
"<literal>max_tokens + 1</literal>"
msgstr ""
+"最多分割为<literal>max_tokens</literal>节, 而不是<literal>max_tokens +
1</"
+"literal>"

#: changes.sgml:170(para)
msgid ""
@@ -663,10 +696,13 @@
"<function>g_set_message_handler()</function>, use
<function>g_log_set_handler"
"()</function> instead."
msgstr ""
+"移除的过时函数: <function>g_set_error_handler()</function>, "
+"<function>g_set_warning_handler()</function>,
<function>g_set_message_handler"
+"()</function>, 使用<function>g_log_set_handler()</function>来替代. "

#: changes.sgml:21(title)
msgid "Incompatible changes from 2.0 to 2.2"
-msgstr ""
+msgstr "从 2.0 到 2.2 的不兼容更改"

#: changes.sgml:26(para)
msgid ""
@@ -677,6 +713,11 @@
"generated by <function>g_rand*_int_range()</function> will have a
slightly "
"better equal distribution with the new version of GLib."
msgstr ""
+"GLib 更改了伪随机数生成器-赛特旋转 (Mersenne Twister,就是
<structname>GRand</"
+"structname>和 <structname>GRandom</structname>所使用的) 的种子算法。 这是
必须"
+"的,因为一些种子可能产生很差的伪随机流。使用新版本的"
+"<function>g_rand*_int_range()</function>产生的随机整数也会有稍微好一点的公
平"
+"分配。"

#: changes.sgml:36(para)
msgid ""
@@ -684,6 +725,9 @@
"random number generator at <ulink
url=\"http://www.math.keio.ac.jp/~matumoto/"
"emt.html\">http://www.math.keio.ac.jp/~matumoto/emt.html</ulink>."
msgstr ""
+"网页上关于赛特旋转(Mersenne Twister)伪随机数生成器的进一步信息在<ulink
url="
+"\"http://www.math.keio.ac.jp/~matumoto/emt.html\">http://www.math.keio.ac.jp/"
+"~matumoto/emt.html</ulink>. "

#: changes.sgml:42(para)
msgid ""
@@ -693,10 +737,13 @@
"algorithms only if you have sequences of numbers generated with Glib-2.0 "
"that you need to reproduce exactly."
msgstr ""
+"2.0.x 中的旧的种子和生成算法可以通过设置环境变量<envar>G_RANDOM_VERSION</"
+"envar>为 '2.0',来替代新版使用。只在您有的确需要传承的 Glib-2.0 产生的数字
序列"
+"时才使用 GLib-2.0 的算法。"

#: changes.sgml:57(title)
msgid "Incompatible changes from 1.2 to 2.0"
-msgstr ""
+msgstr "从 1.2 到 2.0 的不兼容更改"

#: changes.sgml:59(para)
msgid ""
@@ -705,6 +752,9 @@
"developer.gnome.org</ulink> has some more detailed discussion of porting "
"from 1.2 to 2.0. See the section on GLib."
msgstr ""
+"位于<ulink
url=\"http://developer.gnome.org\">http://developer.gnome.org</"
+"ulink>的<ulink url=\"http://developer.gnome.org/dotplan/porting/\">GNOME
2.0 "
+"移植指南</ulink> 有更多的从 1.2 到 2.0 移植的细节讨论。请阅读 GLib 一节。"

#: changes.sgml:70(para)
msgid ""
@@ -713,6 +763,9 @@
"All sources (timeouts, idle functions, etc.) are associated with a "
"<structname>GMainContext</structname>."
msgstr ""
+"事件循环功能<structname>GMain</structname>已经广泛的修订,以支持在分离线程
的"
+"多个分离的主循环。所有 sources (计时、空闲等函数) 都与"
+"<structname>GMainContext</structname>联系起来了。"

#: changes.sgml:77(para)
msgid ""
@@ -720,6 +773,8 @@
"main loop will continue to work. However, code that creates new custom
types "
"of sources will require modification."
msgstr ""
+"仍然存在兼容函数,以使多数处理主循环的程序代码能继续工作。但是创建新的 "
+"sources 的自定义类型的代码需要修改。 "

#: changes.sgml:83(para)
msgid ""
@@ -728,12 +783,15 @@
"<function>add_watch()</function> has been replaced by
<function>create_watch"
"()</function>."
msgstr ""
+"主要的修改是:<placeholder-1/> 为了顺应这一变化,<structname>GIOChannel</"
+"structname>的 vtable 改变了,同时 <function>add_watch()</function>被替换
为"
+"<function>create_watch()</function>. "

#: changes.sgml:89(para)
msgid ""
"Sources are now exposed as <type>GSource *</type>, rather than simply as "
"numeric ids."
-msgstr ""
+msgstr "Sources 以<type>GSource *</type>暴露,而不是仅仅是数字 id。 "

#: changes.sgml:96(para)
msgid ""
@@ -742,6 +800,9 @@
"parameter to the <structname>GSource</structname> virtual functions has
been "
"replaced with a <type>GSource *</type>."
msgstr ""
+"\"derivation\" 结构 从 <structname>GSource</structname>创建一个 sources 新
类"
+"型, 所以虚函数<structname>GSource</structname>的<literal>source_data</"
+"literal>参数 被替换为<type>GSource *</type>. "

#: compiling.sgml:13(refname) compiling.sgml:7(refentrytitle)
msgid "Compiling GLib Applications"
@@ -858,7 +919,7 @@

#: cross.sgml:104(title)
msgid "glib_cv_have_strlcpy=[yes/no]"
-msgstr ""
+msgstr "glib_cv_have_strlcpy=[yes/no]"

#: cross.sgml:106(para)
msgid ""
@@ -866,10 +927,12 @@
"Defaults to \"no\", which is safe, since GLib uses a built-in version in "
"that case."
msgstr ""
+"是否有匹配OpenBSD的<function>strlcpy()</function>函数。 默认值为\"no\",这
是"
+"安全的,因为在这种情况下GLib使用内置的版本。 "

#: cross.sgml:113(title)
msgid "glib_cv_va_val_copy=[yes/no]"
-msgstr ""
+msgstr "glib_cv_va_val_copy=[yes/no]"

#: cross.sgml:115(para)
msgid ""
@@ -879,37 +942,45 @@
"(So, doesn't matter for GCC.) Defaults to \"yes\" which is slightly more "
"common than \"no\"."
msgstr ""
+"<type>va_list</type>是否可以作为指针复制。 如果设置为\"no\",那么"
+"<function>memcopy()</function>将被使用。 如果你没有<function>va_copy()</"
+"function>或<function>__va_copy()</function>会有问题。(所以,GCC不存在问"
+"题。) 默认为\"yes\",这种情况比\"no\"要多一些。"

#: cross.sgml:124(title)
msgid "glib_cv_rtldglobal_broken=[yes/no]"
-msgstr ""
+msgstr "glib_cv_rtldglobal_broken=[yes/no]"

#: cross.sgml:126(para)
msgid "Whether you have a bug found in OSF/1 v5.0. Defaults to \"no\"."
-msgstr ""
+msgstr "是否在OSF/1 v5.0中发现存在有bug。默认为\"no\"。"

#: cross.sgml:13(refname)
msgid "Cross-compiling the GLib Package"
-msgstr ""
+msgstr "交叉编译GLib软件包"

#: cross.sgml:131(title)
msgid "glib_cv_uscore=[yes/no]"
-msgstr ""
+msgstr "glib_cv_uscore=[yes/no]"

#: cross.sgml:133(para)
+#, fuzzy
msgid ""
"Whether an underscore needs to be prepended to symbols when looking them
up "
"via <function>dlsym()</function>. Only needs to be set if your system
uses "
"<function>dlopen()</function>/<function>dlsym()</function>."
msgstr ""
+"通过<function>dlsym()</function>函数时, 是否需要考虑一个下划线为前缀的符
号"
+"时, 他们希望通过dlsym了()。 只需要设置如果你的系统使用
<function>dlopen()</"
+"function>/<function>dlsym()</function>。 "

#: cross.sgml:14(refpurpose)
msgid "How to cross-compile GLib"
-msgstr ""
+msgstr "如何交叉编译GLib"

#: cross.sgml:141(title)
msgid "ac_cv_func_posix_getpwuid_r=[yes/no]"
-msgstr ""
+msgstr "ac_cv_func_posix_getpwuid_r=[yes/no]"

#: cross.sgml:143(para)
msgid ""
@@ -917,10 +988,12 @@
"library) that conforms to the POSIX spec. (Takes a 'struct passwd **' as
the "
"final argument)"
msgstr ""
+"是否你的getpwuid_r函数(在你的C库,而不是线程库)遵守POSIX规范。 接
受'struct "
+"passwd **'作为最终的参数。"

#: cross.sgml:150(title)
msgid "ac_cv_func_nonposix_getpwuid_r=[yes/no]"
-msgstr ""
+msgstr "ac_cv_func_nonposix_getpwuid_r=[yes/no]"

#: cross.sgml:152(para)
msgid ""
@@ -930,18 +1003,22 @@
"<literal>ac_cv_func_posix_getpwuid_r</literal> is not set. It's safest
to "
"set this to \"no\"."
msgstr ""
+"是否你有一些<function>getpwuid_r()</function>函数的变量不能遵守POSIX规
范,但"
+"是GLib有能力去使用它(或者发生段错误)。只有在"
+"<literal>ac_cv_func_posix_getpwuid_r</literal>没被设置的情况下才需要设置此
变"
+"量。此变量可以安全地被设置为\"no\"."

#: cross.sgml:161(title)
msgid "ac_cv_func_posix_getgrgid_r=[yes/no]"
-msgstr ""
+msgstr "ac_cv_func_posix_getgrgid_r=[yes/no]"

#: cross.sgml:163(para)
msgid "Whether you have a getgrgid_r function that conforms to the POSIX
spec."
-msgstr ""
+msgstr "是否你有一个getgrgid_r函数去遵守POSIX规范。"

#: cross.sgml:169(title)
msgid "glib_cv_use_pid_surrogate=[yes/no]"
-msgstr ""
+msgstr "glib_cv_use_pid_surrogate=[yes/no]"

#: cross.sgml:171(para)
msgid ""
@@ -949,20 +1026,24 @@
"as a method for setting the priority of threads. This only needs to be
set "
"when using POSIX threads."
msgstr ""
+"是否使用<function>setpriority()</function>函数在线程的PID上, 作为设置线程
优"
+"先级的方式。 只有在使用POSIX线程的时候需要设置。"

#: cross.sgml:178(title)
msgid "ac_cv_func_printf_unix98=[yes/no]"
-msgstr ""
+msgstr "ac_cv_func_printf_unix98=[yes/no]"

#: cross.sgml:180(para)
msgid ""
"Whether your <function>printf()</function> family supports Unix98 style "
"<literal>%N$</literal> positional parameters. Defaults to \"no\"."
msgstr ""
+"是否你的<function>printf()</function>函数支持Unix98样式的<literal>%N$</"
+"literal>位置参数。 默认为\"no\"。"

#: cross.sgml:187(title)
msgid "ac_cv_func_vsnprintf_c99=[yes/no]"
-msgstr ""
+msgstr "ac_cv_func_vsnprintf_c99=[yes/no]"

#: cross.sgml:189(para)
msgid ""
@@ -970,10 +1051,12 @@
"semantics means returning the number of bytes that would have been
written "
"had the output buffer had enough space.) Defaults to \"no\"."
msgstr ""
+"是否你有一个<function>vsnprintf()</function>函数符合C99的。 (C99语义的意思
是"
+"返回字符数,被写到输入缓存有足够的空间)。 默认为\"no\"。"

#: cross.sgml:20(title)
msgid "Building the Library for a different architecture"
-msgstr ""
+msgstr "在不同的体系结构中编译在不同的体系结构中编译"

#: cross.sgml:21(para)
msgid ""
@@ -982,6 +1065,9 @@
"slightly more difficult to cross-compile than many packages because much
of "
"GLib is about hiding differences between different systems."
msgstr ""
+"编译出来的程序或库将在不同的平台或操作系统上运行时, 这种编译过程就叫做交
叉编"
+"译。 GLib和一些常见软件包的交叉编译稍微有些不同, 因为GLib需要隐藏不同系统
之"
+"间的一些差异。"

#: cross.sgml:28(para)
msgid ""
@@ -989,6 +1075,8 @@
"information about cross-compilation, see the <application>autoconf</"
"application> info pages."
msgstr ""
+"下面说明一些GLib交叉编译时的特殊之处, 一般的交叉编译信息请查看"
+"<application>autoconf</application>信息页。"

#: cross.sgml:33(para)
msgid ""
@@ -998,6 +1086,9 @@
"information needs to be provided to the configure script via a \"cache
file"
"\" or by setting the cache variables in your environment."
msgstr ""
+"GLib在编译和链接时会努力去尝试检测尽可能多的有关 目标系统的信息。但
是,GLib需"
+"要的一些信息不是通过 这种方式的。这些信息通过一个\"cache文件\"提供给配置 "
+"(configure)脚本或者通过设置环境变量的方式实现。"

#: cross.sgml:41(para)
msgid ""
@@ -1005,6 +1096,8 @@
"Win32 runtine environment on a Linux system, create a file 'win32.cache' "
"with the following contents:"
msgstr ""
+"作为一份示例的cache文件,用于在Linux系统上采用\"MingW32\"交叉 编译可运行
于"
+"Win32环境中的GLib。 创建一个名为'win32.cache'的文件,包含以下内容: "

#: cross.sgml:46(programlisting)
#, no-wrap
@@ -1014,10 +1107,14 @@
"glib_cv_stack_grows=no\n"
" "
msgstr ""
+" \n"
+"glib_cv_long_long_format=I64\n"
+"glib_cv_stack_grows=no\n"
+" "

#: cross.sgml:50(para)
msgid "Then execute the following commands:"
-msgstr ""
+msgstr "接着执行以下命令: "

#: cross.sgml:53(programlisting)
#, no-wrap
@@ -1028,20 +1125,25 @@
"./configure --cache-file=win32.cache --host=mingw32\n"
" "
msgstr ""
+"\n"
+"PATH=/path/to/mingw32-compiler/bin:$PATH\n"
+"chmod a-w win32.cache # prevent configure from changing it\n"
+"./configure --cache-file=win32.cache --host=mingw32\n"
+" "

#: cross.sgml:58(para)
msgid ""
"The complete list of cache file variables follows. Most of these won't
need "
"to be set in most cases."
-msgstr ""
+msgstr "下面列出了cache文件的全部变量。其中一些变量通常并不需要设置。"

#: cross.sgml:64(title)
msgid "Cache file variables"
-msgstr ""
+msgstr "缓存文件变量"

#: cross.sgml:66(title)
msgid "glib_cv_long_long_format=[ll/q/I64]"
-msgstr ""
+msgstr "glib_cv_long_long_format=[ll/q/I64]"

#: cross.sgml:68(para)
msgid ""
@@ -1051,24 +1153,30 @@
"is insufficiently capable. Doesn't need to be set if you are compiling
using "
"trio."
msgstr ""
+"为64位整形数而使用于<function>printf()</function>和<function>scanf()</"
+"function>函数的格式化部分。 \"ll\" 是C99的标准, 被'trio'库使用来编译
GLib, 如"
+"果你的<function>printf()</function>函数不能胜任的话。 如果你正在编译使用
trio"
+"的话是不需要设置的。"

#: cross.sgml:7(refentrytitle)
msgid "Cross-compiling the GLib package"
-msgstr ""
+msgstr "交叉编译GLib软件包"

#: cross.sgml:78(title)
msgid "glib_cv_stack_grows=[yes/no]"
-msgstr ""
+msgstr "glib_cv_stack_grows=[yes/no]"

#: cross.sgml:80(para)
msgid ""
"Whether the stack grows up or down. Most places will want \"no\", A few "
"architectures, such as PA-RISC need \"yes\"."
msgstr ""
+"堆栈是否向上或向下增长。大多数地方都需要设置为\"no\", 有几个体系结构,如
PA-"
+"RISC等需要设置为\"yes\"。"

#: cross.sgml:86(title)
msgid "glib_cv_working_bcopy=[yes/no]"
-msgstr ""
+msgstr "glib_cv_working_bcopy=[yes/no]"

#: cross.sgml:88(para)
msgid ""
@@ -1076,10 +1184,12 @@
"Only needs to be set if you don't have <function>memmove()</function>.
(Very "
"unlikely)"
msgstr ""
+"<function>bcopy()</function>函数是否可以处理重叠的复制。 如果你没有"
+"<function>memmove()</function>, 就需要设置。(可能性非常小) "

#: cross.sgml:95(title)
msgid "glib_cv_sane_realloc=[yes/np]"
-msgstr ""
+msgstr "glib_cv_sane_realloc=[yes/np]"

#: cross.sgml:97(para)
msgid ""
@@ -1087,6 +1197,8 @@
"handle <literal>NULL</literal> as the first argument. Defaults to
\"yes\" "
"and probably doesn't need to be set."
msgstr ""
+"是否<function>realloc()</function>函数符合ANSI C标准并能够处理第一个参数
为"
+"<literal>NULL</literal>的情况。 默认为\"yes\", 你可能并不需要设定它。 "

#: glib-docs.sgml:10(releaseinfo)
msgid ""
@@ -1094,70 +1206,73 @@
"line at <ulink role=\"online-location\"
url=\"http://library.gnome.org/devel/"
"glib/unstable/\">http://library.gnome.org/devel/glib/unstable/</ulink>."
msgstr ""
+"GLib 当前版本为2.26.1, 最新在线版本请浏览这里<ulink
role=\"online-location\" "
+"url=\"http://library.gnome.org/devel/glib/unstable/\">http://library.gnome."
+"org/devel/glib/unstable/</ulink>."

#: glib-docs.sgml:103(title)
msgid "GLib Data Types"
-msgstr ""
+msgstr "GLib 数据类型"

#: glib-docs.sgml:131(title)
msgid "GLib Tools"
-msgstr ""
+msgstr "GLib 工具"

#: glib-docs.sgml:138(title)
msgid "Index"
-msgstr ""
+msgstr "索引"

#: glib-docs.sgml:142(title)
msgid "Index of deprecated symbols"
-msgstr ""
+msgstr "已过时符号索引"

#: glib-docs.sgml:146(title)
msgid "Index of new symbols in 2.2"
-msgstr ""
+msgstr "2.2版本中的新符号索引"

#: glib-docs.sgml:150(title)
msgid "Index of new symbols in 2.4"
-msgstr ""
+msgstr "2.4版本中的新符号索引"

#: glib-docs.sgml:154(title)
msgid "Index of new symbols in 2.6"
-msgstr ""
+msgstr "2.6版本中的新符号索引"

#: glib-docs.sgml:158(title)
msgid "Index of new symbols in 2.8"
-msgstr ""
+msgstr "2.8版本中的新符号索引"

#: glib-docs.sgml:162(title)
msgid "Index of new symbols in 2.10"
-msgstr ""
+msgstr "2.10版本中的新符号索引"

#: glib-docs.sgml:166(title)
msgid "Index of new symbols in 2.12"
-msgstr ""
+msgstr "2.12版本中的新符号索引"

#: glib-docs.sgml:170(title)
msgid "Index of new symbols in 2.14"
-msgstr ""
+msgstr "2.14版本中的新符号索引"

#: glib-docs.sgml:174(title)
msgid "Index of new symbols in 2.16"
-msgstr ""
+msgstr "2.16版本中的新符号索引"

#: glib-docs.sgml:178(title)
msgid "Index of new symbols in 2.18"
-msgstr ""
+msgstr "2.18版本中的新符号索引"

#: glib-docs.sgml:18(title)
msgid "GLib Overview"
-msgstr ""
+msgstr "GLib概述"

#: glib-docs.sgml:182(title)
msgid "Index of new symbols in 2.20"
-msgstr ""
+msgstr "2.20版本中的新符号索引"

#: glib-docs.sgml:186(title)
msgid "Index of new symbols in 2.22"
-msgstr ""
+msgstr "2.22版本中的新符号索引"

#: glib-docs.sgml:19(para)
msgid ""
@@ -1167,14 +1282,17 @@
"OS/2 and BeOS. GLib is released under the GNU Library General Public
License "
"(GNU LGPL)."
msgstr ""
+"GLib是一个通用工具库,它提供了许多有用的数据类型、宏、类型转换工具、字符串
工"
+"具,文件工具,主循环抽象等功能。它正工作在许多类UNIX、Windows、OS/2及
BeOS平台"
+"上。GLib使用GNU库通用公共许可证(GNU LGPL)发布。"

#: glib-docs.sgml:190(title)
msgid "Index of new symbols in 2.24"
-msgstr ""
+msgstr "2.24版本中的新符号索引"

#: glib-docs.sgml:194(title)
msgid "Index of new symbols in 2.26"
-msgstr ""
+msgstr "2.26版本中的新符号索引"

#: glib-docs.sgml:26(para)
msgid ""
@@ -1183,22 +1301,25 @@
"have two threads manipulating the <emphasis>same</emphasis> data
structure, "
"they must use a lock to synchronize their operation."
msgstr ""
+"GLib库提供的函数基本上都是线程安全的, 例外的情况是对数据结构操作的函数。这
种"
+"情况下,如果同时有两个线程来处理<emphasis>相同</emphasis>的数据结构,就必
须使"
+"用锁来同步操作。"

#: glib-docs.sgml:44(title)
msgid "GLib Fundamentals"
-msgstr ""
+msgstr "GLib基础"

#: glib-docs.sgml:57(title)
msgid "GLib Core Application Support"
-msgstr ""
+msgstr "GLib核心应用支持"

#: glib-docs.sgml:71(title)
msgid "GLib Utilities"
-msgstr ""
+msgstr "GLib工具"

#: glib-docs.sgml:9(title)
msgid "GLib Reference Manual"
-msgstr ""
+msgstr "GLib 参考手册"

#: gvariant-varargs.xml:1005(literal)
msgid "^a&amp;s"
@@ -3405,7 +3526,7 @@

#: regex-syntax.sgml:20(refname) regex-syntax.sgml:7(refentrytitle)
msgid "Regular expression syntax"
-msgstr ""
+msgstr "正则表达式语法"

#: regex-syntax.sgml:2003(title)
msgid "Using multiple assertions"
@@ -3552,7 +3673,7 @@

#: regex-syntax.sgml:21(refpurpose)
msgid "Syntax and semantics of the regular expressions supported by GRegex"
-msgstr ""
+msgstr "GRegex支持的正则表达式语法及语义"

#: regex-syntax.sgml:2100(para)
msgid ""
@@ -4106,7 +4227,7 @@

#: regex-syntax.sgml:27(title)
msgid "GRegex regular expression details"
-msgstr ""
+msgstr "GRegex正则表达式详述"

#: regex-syntax.sgml:276(para)
msgid ""
Reply all
Reply to author
Forward
0 new messages