gtk-doc r647 - in trunk: . tests/annotations/docs tests/bugs/docs tests/gobject/docs tests/gobject/docs-tmpl
- From: stefkost svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-doc r647 - in trunk: . tests/annotations/docs tests/bugs/docs tests/gobject/docs tests/gobject/docs-tmpl
- Date: Tue, 20 Jan 2009 11:49:53 +0000 (UTC)
Author: stefkost
Date: Tue Jan 20 11:49:53 2009
New Revision: 647
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=647&view=rev
Log:
* gtkdoc-mkdb.in:
* tests/annotations/docs/Makefile.am:
* tests/bugs/docs/Makefile.am:
* tests/bugs/docs/tester-docs.xml:
* tests/gobject/docs-tmpl/Makefile.am:
* tests/gobject/docs/Makefile.am:
Detect namespace prefix if not given.
Modified:
trunk/ChangeLog
trunk/gtkdoc-mkdb.in
trunk/tests/annotations/docs/Makefile.am
trunk/tests/bugs/docs/Makefile.am
trunk/tests/bugs/docs/tester-docs.xml
trunk/tests/gobject/docs-tmpl/Makefile.am
trunk/tests/gobject/docs/Makefile.am
Modified: trunk/gtkdoc-mkdb.in
==============================================================================
--- trunk/gtkdoc-mkdb.in (original)
+++ trunk/gtkdoc-mkdb.in Tue Jan 20 11:49:53 2009
@@ -324,6 +324,50 @@
# it can be used for Makefile dependencies).
if ($changed || ! -e "$ROOT_DIR/sgml.stamp") {
+ # try to detect the common prefix
+ # GtkWidget, GTK_WIDGET, gtk_widget -> gtk
+ if ($NAME_SPACE eq "") {
+ $NAME_SPACE="";
+ my $pos=0;
+ my $ratio=0.0;
+ do {
+ my %prefix;
+ my $letter="";
+ foreach my $symbol (keys(%IndexEntriesFull)) {
+ if(($NAME_SPACE eq "") || $symbol =~ /^$NAME_SPACE/i) {
+ $letter=substr($symbol,$pos,1);
+ if ($letter eq "_") {
+ # stop on "_"
+ last;
+ }
+ $prefix{uc($letter)}++;
+ }
+ }
+ if ($letter ne "_") {
+ my $maxletter="";
+ my $maxsymbols=0;
+ foreach $letter (keys(%prefix)) {
+ #print "$letter: $prefix{$letter}.\n";
+ if ($prefix{$letter}>$maxsymbols) {
+ $maxletter=$letter;
+ $maxsymbols=$prefix{$letter};
+ }
+ }
+ $ratio = scalar(keys(%IndexEntriesFull)) / $prefix{$maxletter};
+ #print "most symbols start with $maxletter, that is ". (100 * $ratio) ." %\n";
+ if ($ratio > 0.9) {
+ # do another round
+ $NAME_SPACE .= $maxletter;
+ }
+ $pos++;
+ }
+ else {
+ $ratio=0.0;
+ }
+ } while ($ratio > 0.9);
+ #print "most symbols start with $NAME_SPACE\n";
+ }
+
&OutputIndexFull;
&OutputDeprecatedIndex;
&OutputSinceIndexes;
@@ -2465,7 +2509,7 @@
my $sortas = "";
# make the index useful, by ommiting the namespace when sorting
- if (defined($NAME_SPACE)) {
+ if ($NAME_SPACE ne "") {
if ($symbol =~ m/^$NAME_SPACE\_?(.*)/i) {
$sortas=" sortas=\"$1\"";
}
Modified: trunk/tests/annotations/docs/Makefile.am
==============================================================================
--- trunk/tests/annotations/docs/Makefile.am (original)
+++ trunk/tests/annotations/docs/Makefile.am Tue Jan 20 11:49:53 2009
@@ -23,7 +23,7 @@
2>&1 | tee gtkdoc-scan.log
# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode --name-space=bug 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
Modified: trunk/tests/bugs/docs/Makefile.am
==============================================================================
--- trunk/tests/bugs/docs/Makefile.am (original)
+++ trunk/tests/bugs/docs/Makefile.am Tue Jan 20 11:49:53 2009
@@ -23,7 +23,7 @@
2>&1 | tee gtkdoc-scan.log
# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode --name-space=bug 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
Modified: trunk/tests/bugs/docs/tester-docs.xml
==============================================================================
--- trunk/tests/bugs/docs/tester-docs.xml (original)
+++ trunk/tests/bugs/docs/tester-docs.xml Tue Jan 20 11:49:53 2009
@@ -21,12 +21,11 @@
<index id="api-index">
<title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
<index id="deprecated-api-index" role="deprecated">
<title>Index of deprecated API</title>
+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
- <!--index id="api-index-0-9" role="0.9">
- <title>Index of new API in 0.9</title>
- </index-->
</book>
Modified: trunk/tests/gobject/docs-tmpl/Makefile.am
==============================================================================
--- trunk/tests/gobject/docs-tmpl/Makefile.am (original)
+++ trunk/tests/gobject/docs-tmpl/Makefile.am Tue Jan 20 11:49:53 2009
@@ -21,7 +21,7 @@
SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" 2>&1 | tee gtkdoc-scan.log
# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode --name-space=gtkdoc 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
Modified: trunk/tests/gobject/docs/Makefile.am
==============================================================================
--- trunk/tests/gobject/docs/Makefile.am (original)
+++ trunk/tests/gobject/docs/Makefile.am Tue Jan 20 11:49:53 2009
@@ -21,7 +21,7 @@
SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" 2>&1 | tee gtkdoc-scan.log
# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=--sgml-mode --name-space=gtkdoc 2>&1 | tee gtkdoc-mkdb.log
+MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]