X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fpmccabe2html;h=c7cf3d09701b4778e5cbc61d720faf94260cc350;hb=21d1619b3010053ebe4d4eae33440f7141ae2413;hp=aa1901536590284a21065401686ada25f653b097;hpb=e54c53af08e4636fa60878103a12aeed37ee292f;p=gnulib.git diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html index aa1901536..c7cf3d097 100644 --- a/build-aux/pmccabe2html +++ b/build-aux/pmccabe2html @@ -1,6 +1,6 @@ -# pmccabe2html - AWK script to convert pmccabe output to html +# pmccabe2html - AWK script to convert pmccabe output to html -*- awk -*- -# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2007-2011 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,16 +21,19 @@ # Typical Invocation is from a Makefile.am: # -# cyclo-$(PACKAGE).html: -# $(PMCCABE) ${top_srcdir}/lib/*.[ch] \ -# | sort -nr \ -# | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \ -# -v lang=html -v name="$(PACKAGE_NAME)" \ -# -v vcurl="http://git.savannah.gnu.org/gitweb/?p=$(PACKAGE).git;a=blob;f=%FILENAME%;hb=HEAD" \ -# -v url="http://www.gnu.org/software/$(PACKAGE)/" \ -# -v css=${top_srcdir}/build-aux/pmccabe.css \ -# > $@-tmp -# mv $@-tmp $@ +# CYCLO_SOURCES = ${top_srcdir}/src/*.[ch] +# +# cyclo-$(PACKAGE).html: $(CYCLO_SOURCES) +# $(PMCCABE) $(CYCLO_SOURCES) \ +# | sort -nr \ +# | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \ +# -v lang=html -v name="$(PACKAGE_NAME)" \ +# -v vcurl="http://git.savannah.gnu.org/gitweb/?p=$(PACKAGE).git;a=blob;f=%FILENAME%;hb=HEAD" \ +# -v url="http://www.gnu.org/software/$(PACKAGE)/" \ +# -v css=${top_srcdir}/build-aux/pmccabe.css \ +# -v cut_dir=${top_srcdir}/ \ +# > $@-tmp +# mv $@-tmp $@ # # The variables available are: # lang output language, either 'html' or 'wiki' @@ -55,7 +58,6 @@ BEGIN { cyclo_simple_max = 10 cyclo_moderate_max = 20 cyclo_high_max = 50 - cut_dir = "/../" source_file_link_tmpl = vcurl # HTML options @@ -112,12 +114,12 @@ function build_stats() function html_fnc_table_complete (caption) { - html_fnc_table(caption, 1, 0, 1, 1, 1, 0, 1) + html_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1) } function html_fnc_table_abbrev (caption) { - html_fnc_table(caption, 1, 0, 1, 0, 1, 0, 0) + html_fnc_table(caption, 1, 1, 0, 0, 1, 0, 0) } @@ -142,7 +144,7 @@ function html_fnc_table (caption, num_lines_p, first_line_p, file_p) - for (nfnc = 1; nfnc < nfuncs; nfnc++) + for (nfnc = 1; nfnc <= nfuncs; nfnc++) { html_fnc(nfnc, fname_p, @@ -423,7 +425,7 @@ function html_fnc (nfun, print codeline } close(fname nfun "_fn.txt") - system("rm " fname nfun "_fn.txt") + system("rm " "'" fname "'" nfun "_fn.txt") print "" print "" print "" @@ -435,52 +437,51 @@ function html_fnc (nfun, function html_global_stats () { - print "
" + print " | " print "Total number of functions" print " | " - print "" + print " | " print num_of_functions print " | " print "
" + print " | " print "Number of low risk functions" print " | " - print "" + print " | " print num_of_simple_functions print " | " print "
" + print " | " print "Number of moderate risk functions" print " | " - print "" + print " | " print num_of_moderate_functions print " | " print "
" + print " | " print "Number of high risk functions" print " | " - print "" + print " | " print num_of_high_functions print " | " print "
" + print " | " print "Number of untestable functions" print " | " - print "" + print " | " print num_of_untestable_functions print " | " print "