mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
fix last example. Add example of adding code blocks that are not shown in docbook output.
Original commit message from CVS: * docs/manual/elements-api.xml: * docs/manual/helloworld.xml: * examples/manual/extract.pl: fix last example. Add example of adding code blocks that are not shown in docbook output.
This commit is contained in:
parent
c1ab023379
commit
5ebd92789b
6 changed files with 32 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-12-15 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* docs/manual/elements-api.xml:
|
||||||
|
* docs/manual/helloworld.xml:
|
||||||
|
* examples/manual/extract.pl:
|
||||||
|
fix last example. Add example of adding code blocks that are not
|
||||||
|
shown in docbook output.
|
||||||
|
|
||||||
2004-12-15 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-12-15 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* docs/manual/dynamic.xml:
|
* docs/manual/dynamic.xml:
|
||||||
|
|
|
@ -16,8 +16,9 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* example-begin helloworld.c */
|
<!-- example-begin helloworld.c a -->
|
||||||
#include <gst/gst.h>
|
<![CDATA[
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
|
@ -64,7 +65,8 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
/* example-end helloworld.c */
|
]]>
|
||||||
|
<!-- example-end helloworld.c a -->
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -60,6 +60,12 @@ main (int argc, char *argv[])
|
||||||
]]>
|
]]>
|
||||||
<!-- example-end elementmake.c b -->
|
<!-- example-end elementmake.c b -->
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
<!-- example-begin elementmake.c c -->
|
||||||
|
<!--
|
||||||
|
/* Hi Ronald. Block c is an example of a piece of code that will end up
|
||||||
|
* in the extracted code file, but is not shown in the docbook output */
|
||||||
|
-->
|
||||||
|
<!-- example-end elementmake.c c -->
|
||||||
<para>
|
<para>
|
||||||
<function>gst_element_factory_make</function> is actually a shorthand
|
<function>gst_element_factory_make</function> is actually a shorthand
|
||||||
for a combination of two functions.
|
for a combination of two functions.
|
||||||
|
|
|
@ -16,8 +16,9 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/* example-begin helloworld.c */
|
<!-- example-begin helloworld.c a -->
|
||||||
#include <gst/gst.h>
|
<![CDATA[
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
|
@ -64,7 +65,8 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
/* example-end helloworld.c */
|
]]>
|
||||||
|
<!-- example-end helloworld.c a -->
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
# decodes xml by translating & < > back to what they should be
|
# decodes xml by translating & < > back to what they should be
|
||||||
# and also ignore
|
# and also ignore
|
||||||
# <![CDATA[
|
# <![CDATA[ and ]]> and <!-- and -->
|
||||||
# and
|
|
||||||
# ]]>
|
|
||||||
sub
|
sub
|
||||||
xml_decode ($)
|
xml_decode ($)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +20,8 @@ xml_decode ($)
|
||||||
|
|
||||||
if ($input =~ /<!\[CDATA\[/) { $input = ""; }
|
if ($input =~ /<!\[CDATA\[/) { $input = ""; }
|
||||||
if ($input =~ /]]>/) { $input = ""; }
|
if ($input =~ /]]>/) { $input = ""; }
|
||||||
|
if ($input =~ /<!--/) { $input = ""; }
|
||||||
|
if ($input =~ /-->/) { $input = ""; }
|
||||||
|
|
||||||
#print "Returning line $input";
|
#print "Returning line $input";
|
||||||
return $input;
|
return $input;
|
||||||
|
@ -72,7 +72,7 @@ open OUTPUT, ">$output";
|
||||||
@block_ids = keys %blocks;
|
@block_ids = keys %blocks;
|
||||||
foreach $block_id (sort @block_ids)
|
foreach $block_id (sort @block_ids)
|
||||||
{
|
{
|
||||||
print "Writing block with id $block_id\n";
|
print "Writing $output block $block_id\n";
|
||||||
print OUTPUT $blocks{$block_id};
|
print OUTPUT $blocks{$block_id};
|
||||||
}
|
}
|
||||||
close OUTPUT;
|
close OUTPUT;
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
# decodes xml by translating & < > back to what they should be
|
# decodes xml by translating & < > back to what they should be
|
||||||
# and also ignore
|
# and also ignore
|
||||||
# <![CDATA[
|
# <![CDATA[ and ]]> and <!-- and -->
|
||||||
# and
|
|
||||||
# ]]>
|
|
||||||
sub
|
sub
|
||||||
xml_decode ($)
|
xml_decode ($)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +20,8 @@ xml_decode ($)
|
||||||
|
|
||||||
if ($input =~ /<!\[CDATA\[/) { $input = ""; }
|
if ($input =~ /<!\[CDATA\[/) { $input = ""; }
|
||||||
if ($input =~ /]]>/) { $input = ""; }
|
if ($input =~ /]]>/) { $input = ""; }
|
||||||
|
if ($input =~ /<!--/) { $input = ""; }
|
||||||
|
if ($input =~ /-->/) { $input = ""; }
|
||||||
|
|
||||||
#print "Returning line $input";
|
#print "Returning line $input";
|
||||||
return $input;
|
return $input;
|
||||||
|
@ -72,7 +72,7 @@ open OUTPUT, ">$output";
|
||||||
@block_ids = keys %blocks;
|
@block_ids = keys %blocks;
|
||||||
foreach $block_id (sort @block_ids)
|
foreach $block_id (sort @block_ids)
|
||||||
{
|
{
|
||||||
print "Writing block with id $block_id\n";
|
print "Writing $output block $block_id\n";
|
||||||
print OUTPUT $blocks{$block_id};
|
print OUTPUT $blocks{$block_id};
|
||||||
}
|
}
|
||||||
close OUTPUT;
|
close OUTPUT;
|
||||||
|
|
Loading…
Reference in a new issue