diff options
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/arg-nonnull.h | 26 | ||||
-rwxr-xr-x | build-aux/gendocs.sh | 14 | ||||
-rw-r--r-- | build-aux/link-warning.h | 29 | ||||
-rw-r--r--[-rwxr-xr-x] | build-aux/pmccabe2html | 89 | ||||
-rwxr-xr-x | build-aux/useless-if-before-free | 7 | ||||
-rwxr-xr-x | build-aux/vc-list-files | 2 |
6 files changed, 106 insertions, 61 deletions
diff --git a/build-aux/arg-nonnull.h b/build-aux/arg-nonnull.h new file mode 100644 index 0000000..7e3e2db --- /dev/null +++ b/build-aux/arg-nonnull.h @@ -0,0 +1,26 @@ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009, 2010 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 the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh index a1ed4b4..b50a6c7 100755 --- a/build-aux/gendocs.sh +++ b/build-aux/gendocs.sh @@ -1,16 +1,16 @@ -#!/bin/sh +#!/bin/sh -e # gendocs.sh -- generate a GNU manual in many formats. This script is # mentioned in maintain.texi. See the help message below for usage details. -scriptversion=2009-04-08.09 +scriptversion=2010-01-02.16 -# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. # -# This program is free software; you can redistribute it and/or modify +# 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 -# the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -268,7 +268,7 @@ else fi echo Making .tar.gz for sources... -srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` +srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz` diff --git a/build-aux/link-warning.h b/build-aux/link-warning.h index fda0194..0725e78 100644 --- a/build-aux/link-warning.h +++ b/build-aux/link-warning.h @@ -1,3 +1,20 @@ +/* A C macro for emitting link time warnings. + Copyright (C) 1995, 1997, 2000, 2002-2003, 2007, 2009-2010 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 the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + /* GL_LINK_WARNING("literal string") arranges to emit the literal string as a linker warning on most glibc systems. We use a linker warning rather than a preprocessor warning, because @@ -15,12 +32,12 @@ # define GL_LINK_WARNING2(file, line, message) \ GL_LINK_WARNING3 (file ":" #line ": warning: " message) # define GL_LINK_WARNING3(message) \ - ({ static const char warning[sizeof (message)] \ - __attribute__ ((__unused__, \ - __section__ (".gnu.warning"), \ - __aligned__ (1))) \ - = message "\n"; \ - (void)0; \ + ({ static const char warning[sizeof (message)] \ + __attribute__ ((__unused__, \ + __section__ (".gnu.warning"), \ + __aligned__ (1))) \ + = message "\n"; \ + (void)0; \ }) # else # define GL_LINK_WARNING(message) ((void) 0) diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html index 27bb8f3..3f887ad 100755..100644 --- a/build-aux/pmccabe2html +++ b/build-aux/pmccabe2html @@ -1,7 +1,6 @@ -#!/usr/bin/awk -f -# pmccabe2html - pmccabe to html converter +# pmccabe2html - AWK script to convert pmccabe output to html -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2009, 2010 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 @@ -22,16 +21,16 @@ # Typical Invocation is from a Makefile.am: # -# cyclo-libidn.html: +# 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=libidn.git;a=blob;f=%FILENAME%;hb=HEAD" \ -# -v url="http://www.gnu.org/software/libidn/" \ -# -v css=../../build-aux/pmccabe.css \ -# > tmp -# mv tmp $@ +# -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 $@ # # The variables available are: # lang output language, either 'html' or 'wiki' @@ -65,7 +64,7 @@ BEGIN { html_prolog = "<a href=\"" url "\">Back to " package_name " Homepage</a><br/><br/>" } html_epilog = "<hr color=\"black\" size=\"2\"/> \ -Copyright (c) 2007, 2008 Free Software Foundation Inc." +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() " -->" @@ -136,22 +135,22 @@ function html_fnc_table (caption, { print "<caption class=\"function_table_caption\">" caption "</caption>" } - html_fnc_header(fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, + html_fnc_header(fname_p, + mcyclo_p, + cyclo_p, + num_statements_p, + num_lines_p, + first_line_p, file_p) for (nfnc = 1; nfnc < nfuncs; nfnc++) { html_fnc(nfnc, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, + fname_p, + mcyclo_p, + cyclo_p, + num_statements_p, + num_lines_p, + first_line_p, file_p) } print "</table>" @@ -308,7 +307,7 @@ function html_fnc (nfun, if (mcyclo[nfun] > cyclo_high_max) { trclass="function_entry_untestable" - } + } else if (mcyclo[nfun] > cyclo_moderate_max) { trclass="function_entry_high" @@ -392,7 +391,7 @@ function html_fnc (nfun, { print file[nfun] } - + print "</td>" @@ -410,7 +409,7 @@ function html_fnc (nfun, if (num_lines_p) { num_columns++ } if (first_line_p) { num_columns++ } if (file_p) { num_columns++ } - + print "<td colspan=\"" num_columns "\" height=\"0\">" print "<div id=\"" fname "_src\" class=\"function_src\" style=\"position: relative; display: none;\">" print "<pre class=\"function_src\">" @@ -420,7 +419,7 @@ function html_fnc (nfun, sub(/\\</, "<", codeline) sub(/\\>/, ">", codeline) sub(/&/, "&", codeline) - + print codeline } close(fname nfun "_fn.txt") @@ -518,7 +517,7 @@ function html_function_cyclo () print "Simple module, without much risk" print "</td>" print "</tr>" - # Moderate + # Moderate print "<tr>" print "<td class=\"ranges_entry_moderate\">" print " " @@ -590,7 +589,7 @@ function wiki_function_cyclo () print "==Details for all functions==" print "Used ranges:" - + print "{| class =\"cyclo_ranges_table\"" print "|-" print "| class=\"cyclo_ranges_header_entry\" | " @@ -647,22 +646,22 @@ function wiki_fnc_table (caption, { print "|+" caption } - wiki_fnc_header(fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, + wiki_fnc_header(fname_p, + mcyclo_p, + cyclo_p, + num_statements_p, + num_lines_p, + first_line_p, file_p) for (nfnc = 1; nfnc < nfuncs; nfnc++) { wiki_fnc(nfnc, - fname_p, - mcyclo_p, - cyclo_p, - num_statements_p, - num_lines_p, - first_line_p, + fname_p, + mcyclo_p, + cyclo_p, + num_statements_p, + num_lines_p, + first_line_p, file_p) } print "|}" @@ -725,7 +724,7 @@ function wiki_fnc (nfnc, if (mcyclo[nfnc] > cyclo_high_max) { trclass="cyclo_function_entry_untestable" - } + } else if (mcyclo[nfnc] > cyclo_moderate_max) { trclass="cyclo_function_entry_high" @@ -774,7 +773,7 @@ function wiki_fnc (nfnc, href = source_file_link_tmpl sub(/%FILENAME%/, file[nfnc], href) } - + # Source file print "| class=\"cyclo_function_entry_filename\" |" \ ((href != "") ? "[" href " " file[nfnc] "]" : "[" file[nfnc] "]") @@ -839,7 +838,7 @@ END { } # Print prolog - if ((output_lang == "html") && + if ((output_lang == "html") && (html_prolog != "")) { print html_prolog @@ -885,9 +884,9 @@ END { wiki_function_cyclo() } } - + # Print epilog - if ((output_lang == "html") && + if ((output_lang == "html") && (html_epilog != "")) { print html_epilog diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index abcdef2..6aa7d39 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -1,4 +1,6 @@ -#!/usr/bin/perl -T +eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}' + & eval 'exec perl -wST "$0" $argv:q' + if 0; # Detect instances of "if (p) free (p);". # Likewise for "if (p != NULL) free (p);". And with braces. # Also detect "if (NULL != p) free (p);". @@ -10,7 +12,7 @@ my $VERSION = '2009-04-16 15:57'; # UTC # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2008-2010 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 @@ -197,6 +199,7 @@ When modifying files, refuse to process anything other than a regular file. EOF ## Local Variables: +## mode: perl ## indent-tabs-mode: nil ## eval: (add-hook 'write-file-hooks 'time-stamp) ## time-stamp-start: "my $VERSION = '" diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index cc716e9..c07576d 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -4,7 +4,7 @@ # Print a version string. scriptversion=2009-07-21.16; # UTC -# Copyright (C) 2006-2009 Free Software Foundation, Inc. +# Copyright (C) 2006-2010 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 |