Index: openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl,v
diff -u -r1.27.8.21 -r1.27.8.22
--- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 10 Sep 2014 16:54:49 -0000 1.27.8.21
+++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 10 Sep 2014 20:19:26 -0000 1.27.8.22
@@ -217,7 +217,7 @@
# # XXX: Need to support "Returns Properties:"
# }
append out "
Location:$path\n"
- append out [::apidoc::api_format_common_elements doc_elements]
+ append out [::apidoc::format_common_elements doc_elements]
append out ""
@@ -254,7 +254,7 @@
if { [info exists doc_elements(author)] } {
append out "Author[ad_decode [llength $doc_elements(author)] 1 "" "s"]:\n"
foreach author $doc_elements(author) {
- append out "[::apidoc::api_format_author $author]\n"
+ append out "[::apidoc::format_author $author]\n"
}
}
if { [info exists doc_elements(cvs-id)] } {
@@ -319,7 +319,7 @@
}
append out \
- [::apidoc::api_format_common_elements doc_elements] \
+ [::apidoc::format_common_elements doc_elements] \
"Location:$doc_elements(script)\n" \
"\n"
@@ -524,15 +524,15 @@
append out "Error:[join $doc_elements(error) "
"]\n"
}
- append out [::apidoc::api_format_common_elements doc_elements]
+ append out [::apidoc::format_common_elements doc_elements]
if { $source_p } {
if {[parameter::get_from_package_key \
-package_key acs-api-browser \
-parameter FancySourceFormattingP \
-default 1]} {
append out [subst {Source code:
- [::apidoc::api_tcl_to_html $proc_name]
+ [::apidoc::tcl_to_html $proc_name]
}]
} else {
@@ -729,7 +729,7 @@
return [ns_quotehtml $readable_xml]
}
- ad_proc -private api_format_see { see } {
+ ad_proc -public format_see { see } {
regsub -all {proc *} $see {} see
set see [string trim $see]
if {[nsv_exists api_proc_doc $see]} {
@@ -745,7 +745,7 @@
return ${see}
}
- ad_proc -private api_format_author { author_string } {
+ ad_proc -public format_author { author_string } {
if { [regexp {^[^ \n\r\t]+$} $author_string]
&& [string first "@" $author_string] >= 0
&& [string first ":" $author_string] < 0 } {
@@ -756,24 +756,24 @@
return $author_string
}
- ad_proc -private api_format_changelog_list { changelog } {
+ ad_proc -private format_changelog_list { changelog } {
Format the change log info
} {
append out "
Changelog:\n"
foreach change $changelog {
- append out "[api_format_changelog_change $change]\n"
+ append out "[format_changelog_change $change]\n"
}
return $out
}
- ad_proc -private api_format_changelog_change { change } {
+ ad_proc -private format_changelog_change { change } {
Formats the change log line: turns email addresses in parenthesis into links.
} {
regsub {\(([^ \n\r\t]+@[^ \n\r\t]+\.[^ \n\r\t]+)\)} $change {(\1)} change
return $change
}
- ad_proc -private api_format_author_list { authors } {
+ ad_proc -private format_author_list { authors } {
Generates an HTML-formatted list of authors
(including <dt>
and
@@ -788,48 +788,48 @@
}
append out "Author[ad_decode [llength $authors] 1 "" "s"]:\n"
foreach author $authors {
- append out "[api_format_author $author]\n"
+ append out "[format_author $author]\n"
}
return $out
}
- ad_proc -private api_format_common_elements { doc_elements_var } {
+ ad_proc -private format_common_elements { doc_elements_var } {
upvar $doc_elements_var doc_elements
set out ""
if { [info exists doc_elements(author)] } {
- append out [api_format_author_list $doc_elements(author)]
+ append out [format_author_list $doc_elements(author)]
}
if { [info exists doc_elements(creation-date)] } {
append out "Created:\n[lindex $doc_elements(creation-date) 0]\n"
}
if { [info exists doc_elements(change-log)] } {
- append out [api_format_changelog_list $doc_elements(change-log)]
+ append out [format_changelog_list $doc_elements(change-log)]
}
if { [info exists doc_elements(cvs-id)] } {
append out "CVS ID:\n[ns_quotehtml [lindex $doc_elements(cvs-id) 0]]
\n"
}
if { [info exists doc_elements(see)] } {
- append out [api_format_see_list $doc_elements(see)]
+ append out [format_see_list $doc_elements(see)]
}
return $out
}
- ad_proc -private api_format_see_list { sees } {
+ ad_proc -private format_see_list { sees } {
Generate an HTML list of referenced procs and pages.
} {
append out "
See Also:\n"
foreach see $sees {
- append out "- [api_format_see $see]\n"
+ append out "
- [format_see $see]\n"
}
append out "
\n"
return $out
}
- ad_proc -private api_first_sentence { string } {
+ ad_proc -private first_sentence { string } {
Returns the first sentence of a string.
@@ -840,7 +840,7 @@
return $string
}
- ad_proc -private api_set_public {
+ ad_proc -private set_public {
version_id
{ public_p "" }
} {
@@ -922,7 +922,7 @@
return $score
}
- ad_proc -private api_is_xotcl_object {scope proc_name} {
+ ad_proc -private is_xotcl_object {scope proc_name} {
Checks, whether the specified argument is an xotcl object.
Does not cause problems when xocl is not loaded.
@return boolean value
@@ -934,7 +934,7 @@
return $result
}
- ad_proc -private api_tcl_to_html {proc_name} {
+ ad_proc -private tcl_to_html {proc_name} {
Given a proc name, formats it as HTML, including highlighting syntax in
various colors and creating hyperlinks to other proc definitions.
@@ -964,7 +964,7 @@
set proc_namespace ""
regexp {^(::)?(.*)::[^:]+$} $proc_name match colons proc_namespace
- return [api_tclcode_to_html -scope $scope -proc_namespace $proc_namespace [api_get_body $proc_name]]
+ return [tclcode_to_html -scope $scope -proc_namespace $proc_namespace [api_get_body $proc_name]]
}
@@ -1070,7 +1070,7 @@
return "$token"
}
- ad_proc -private api_tclcode_to_html {{-scope ""} {-proc_namespace ""} script} {
+ ad_proc -public tclcode_to_html {{-scope ""} {-proc_namespace ""} script} {
Given a script, this proc formats it as HTML, including highlighting syntax in
various colors and creating hyperlinks to other proc definitions.
@@ -1081,7 +1081,7 @@
} {
set script [string trimright $script]
- template::head::add_style -style $apidoc::style
+ template::head::add_style -style $::apidoc::style
# Keywords will be colored as other procs, but not hyperlinked
# to api-doc pages. Perhaps we should hyperlink them to the Tcl man pages?
@@ -1196,8 +1196,8 @@
set procl [length_proc [string range $data $i end]]
set proc_name [string range $data $i $i+$procl]
- if {$proc_name eq "*"} {
- append html *
+ if {$proc_name eq "*" || $proc_name eq "@"} {
+ append html $proc_name
} elseif {$proc_name in $::apidoc::KEYWORDS ||
([regexp {^::(.*)} $proc_name match had_colons]
&& $had_colons in $::apidoc::KEYWORDS)} {
@@ -1211,7 +1211,7 @@
} elseif {$proc_name in $XOTCL_KEYWORDS} {
append html [pretty_token keyword $proc_name]
- } elseif {[api_is_xotcl_object $scope $proc_name]} {
+ } elseif {[is_xotcl_object $scope $proc_name]} {
set url [::xotcl::api object_url \
-show_source 1 -show_methods 2 \
$scope $proc_name]
@@ -1277,7 +1277,7 @@
return [string range $html 1 end]
}
- ad_proc -private api_xql_links_list { path } {
+ ad_proc -private xql_links_list { path } {
Returns list of xql files related to tcl script file
@param path path and filename from $::acs::rootdir