summaryrefslogtreecommitdiff
path: root/build-aux/pmccabe2html
diff options
context:
space:
mode:
authorMats Erik Andersson <gnu@gisladisker.se>2013-09-19 19:47:29 +0200
committerPádraig Brady <P@draigBrady.com>2013-09-19 19:54:25 +0100
commitbacee67de2b5252075d1e54f37e934dcde62b0b4 (patch)
tree78aa82af865837b86f057a3e9bd16fae2ab1fddb /build-aux/pmccabe2html
parent0459c4ec540563e665b7ce6ded0d5be6db3504b7 (diff)
downloadgnulib-bacee67de2b5252075d1e54f37e934dcde62b0b4.tar.gz
pmccabe2html: fix portability issues
Allow awk versions other than Gawk. Correct wrong HTML tag closures.
Diffstat (limited to 'build-aux/pmccabe2html')
-rw-r--r--build-aux/pmccabe2html12
1 files changed, 8 insertions, 4 deletions
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 863c73e939..094c3e9f88 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -47,6 +47,10 @@
# Prologue & configuration
BEGIN {
+ # Portable lookup of present time.
+ "date +%s" | getline epoch_time
+ "date" | getline chronos_time
+
section_global_stats_p = 1
section_function_cyclo_p = 1
@@ -69,7 +73,7 @@ BEGIN {
Copyright (c) 2007, 2008 Free Software Foundation, Inc."
html_doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \
\"http://www.w3.org/TR/html401/loose.dtd\">"
- html_comment = "<!-- Generated by gnulib's pmccabe2html at " systime() " -->"
+ html_comment = "<!-- Generated by gnulib's pmccabe2html at " epoch_time " -->"
html_title = "Cyclomatic Complexity report for " package_name
# Wiki options
@@ -211,7 +215,7 @@ function html_header ()
print cssline
}
print "-->"
- print "</style />"
+ print "</style>"
close(css)
}
print "</head>"
@@ -852,12 +856,12 @@ END {
if (output_lang == "html")
{
print "<div class=\"page_title\">" package_name " Cyclomatic Complexity Report</div>"
- print "<p>Report generated at: <span class=\"report_timestamp\">" strftime() "</div></p>"
+ print "<p>Report generated at: <span class=\"report_timestamp\">" chronos_time "</span></p>"
}
if (output_lang == "wiki")
{
print "==" package_name " Cyclomatic Complexity Report=="
- print "Report generated at: '''" strftime() "'''"
+ print "Report generated at: '''" chronos_time "'''"
}
if (section_global_stats_p)