gtk-doc r667 - in trunk: . tests tests/gobject/docs
- From: stefkost svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-doc r667 - in trunk: . tests tests/gobject/docs
- Date: Tue, 27 Jan 2009 14:05:19 +0000 (UTC)
Author: stefkost
Date: Tue Jan 27 14:05:19 2009
New Revision: 667
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=667&view=rev
Log:
* gtkdoc-fixxref.in:
* style.css:
Use tables like described in #536928.
* tests/tools.sh
Comment on why we do the tool check like this.
* tests/fail.sh:
Comment on test.
* tests/gobject/docs/tester-docs.xml:
Fix xml a bit.
Added:
trunk/tests/tools.sh (contents, props changed)
Modified:
trunk/ChangeLog
trunk/gtkdoc-fixxref.in
trunk/style.css
trunk/tests/fail.sh
trunk/tests/gobject/docs/tester-docs.xml
Modified: trunk/gtkdoc-fixxref.in
==============================================================================
--- trunk/gtkdoc-fixxref.in (original)
+++ trunk/gtkdoc-fixxref.in Tue Jan 27 14:05:19 2009
@@ -294,8 +294,11 @@
my ($type, $source) = @_;
# chop of leading and trailing empty lines
- $source =~ s/^[\s\n]+//gs;
+ $source =~ s/^\s*\n+//gs;
$source =~ s/[\s\n]+$//gs;
+ # cut common indent
+ $source =~ m/^(\s*)/;
+ $source =~ s/^$1//gms;
# avoid double entity replacement
$source =~ s/</</g;
$source =~ s/>/>/g;
@@ -329,15 +332,30 @@
# chop of leading and trailing empty lines
$highlighted_source =~ s/^[\s\n]+//gs;
$highlighted_source =~ s/[\s\n]+$//gs;
- # we should do own line-numbering
- $highlighted_source =~ s%^(.*)$%<li>$1</li>%gm;
- $highlighted_source =~ s%<li></li>%<li> </li>%gm;
+ # we do own line-numbering
+ my $source_lines="";
+ my $line_count = () = $highlighted_source =~ /\n/gs;
+ my $i;
+ for($i=1;$i<($line_count+2);$i++) {
+ $source_lines.="$i\n";
+ }
# remove temp file
unlink ($temp_source_file)
|| die "Can't delete $temp_source_file: $!";
- return "<div class=\"$type\"><ol class=\"code\">$highlighted_source</ol></div>";
+ return <<END_OF_HTML
+<div class="$type">
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td class="listing_lines" align="right"><pre>$source_lines</pre></td>
+ <td class="listing_code"><pre class="programlisting">$highlighted_source</pre></td>
+ </tr>
+ </tbody>
+ <table>
+</div>
+END_OF_HTML
}
Modified: trunk/style.css
==============================================================================
--- trunk/style.css (original)
+++ trunk/style.css Tue Jan 27 14:05:19 2009
@@ -197,38 +197,52 @@
/* code listings */
-.code .cbracket { color: #a40000; } /* tango: scarlet red 3 */
-.code .comment { color: #a1a39d; } /* tango: aluminium 4 */
-.code .function { color: #000000; font-weight: bold; }
-.code .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
-.code .keyword { color: #4e9a06; } /* tango: chameleon 3 */
-.code .linenum { color: #babdb6; } /* tango: aluminium 3 */
-.code .normal { color: #000000; }
-.code .number { color: #75507b; } /* tango: plum 2 */
-.code .preproc { color: #204a87; } /* tango: sky blue 3 */
-.code .string { color: #c17d11; } /* tango: chocolate 2 */
-.code .type { color: #000000; }
-.code .type a { color: #11326b; } /* tango: sky blue 4 */
-.code .symbol { color: #ce5c00; } /* tango: orange 3 */
-
-/* line numbers */
-ol.code
-{
- margin: 0;
- padding: 0em 0em 0em 2.5em;
- font-family: "Courier New", Courier, monospace;
- list-style-type: decimal-leading-zero;
+.programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */
+.programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */
+.programlisting .function { color: #000000; font-weight: bold; }
+.programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
+.programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */
+.programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */
+.programlisting .normal { color: #000000; }
+.programlisting .number { color: #75507b; } /* tango: plum 2 */
+.programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */
+.programlisting .string { color: #c17d11; } /* tango: chocolate 2 */
+.programlisting .type { color: #000000; }
+.programlisting .type a { color: #11326b; } /* tango: sky blue 4 */
+.programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */
+
+.listing_frame {
+ /* tango:sky blue 1 */
+ border: solid 1px #729fcf;
+ padding: 0px;
+}
+
+.listing_lines, .listing_code {
+ margin-top: 0px;
+ margin-bottom: 0px;
+ /*padding-right: 2px;
+ padding-left: 2px;
+ padding-top: 0px;
+ padding-bottom: 0px;*/
+ padding: 0.5em;
+}
+.listing_lines {
/* tango:sky blue 0.5 */
background: #a6c5e3;
- border: solid 1px #729fcf;
/* tango:aluminium 6 */
color: #2e3436;
}
-ol.code li
-{
- padding: 0em 0em 0em 0.5em;
+.listing_code {
/* tango:sky blue 0 */
background: #e6f3ff;
- white-space: pre;
}
+.listing_code .programlisting {
+ /* override from previous */
+ border: none 0px;
+ padding: 0px;
+}
+.listing_lines pre, .listing_code pre {
+ margin: 0px;
+}
+
Modified: trunk/tests/fail.sh
==============================================================================
--- trunk/tests/fail.sh (original)
+++ trunk/tests/fail.sh Tue Jan 27 14:05:19 2009
@@ -12,6 +12,7 @@
# tests
# check missing section description
+# we can't just check for a missing "tester_nodocs" entry
grep >/dev/null "tester_nodocs:Long_Description" $DOC_MODULE-undocumented.txt
if test $? = 1 ; then failed=$(($failed + 1)); fi
tested=$(($tested + 1))
Modified: trunk/tests/gobject/docs/tester-docs.xml
==============================================================================
--- trunk/tests/gobject/docs/tester-docs.xml (original)
+++ trunk/tests/gobject/docs/tester-docs.xml Tue Jan 27 14:05:19 2009
@@ -16,7 +16,9 @@
<ulink role="online-location" url="http://[SERVER]/tester/index.html">http://[SERVER]/tester/</ulink>.
</releaseinfo>
<legalnotice>
- This manual is published as public domain.
+ <para>
+ This manual is published as public domain.
+ </para>
</legalnotice>
</bookinfo>
@@ -32,6 +34,7 @@
<title>Overview</title>
<chapter id="Overview-building">
<title>How to build the library</title>
+ <para></para>
</chapter>
</part>
Added: trunk/tests/tools.sh
==============================================================================
--- (empty file)
+++ trunk/tests/tools.sh Tue Jan 27 14:05:19 2009
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+failed=0
+tested=0
+
+echo "Running suite(s): gtk-doc-tools";
+
+# tests
+# I had the wonderful idea to check in configure.in if the generated tools are
+# fine, like:
+# - AC_CONFIG_FILES([gtkdoc-check], [chmod +x gtkdoc-check])
+# + AC_CONFIG_FILES([gtkdoc-check], [chmod +x gtkdoc-check;$PERL -cwT gtkdoc-check])
+# unfortunately configure creates config.status, which runs these command and
+# this does not know about results of configure checks
+
+/usr/bin/perl -cwT `which gtkdoc-check`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-fixxref`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-mkdb`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-mktmpl`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-rebase`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-scan`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-scangobj`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+/usr/bin/perl -cwT `which gtkdoc-scanobj`
+if test $? = 1 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+# summary
+echo "tested : $tested, failed : $failed"
+rate=$((100*($tested - $failed)/$tested));
+echo "$rate %: Checks $tested, Failures: $failed"
+exit `test $failed = 0`;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]