diff options
author | Bruno Haible <bruno@clisp.org> | 2019-06-19 12:06:23 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-06-19 12:06:23 +0200 |
commit | a5a93a6e1f4b5e45818deb8108bd1d2c476fc776 (patch) | |
tree | 5b1d505999d764806059076ce76f7526eb308ed8 /build-aux/useless-if-before-free | |
parent | af35f056d12a30dee7a415d887b96b780e1f2ebc (diff) | |
download | gnulib-a5a93a6e1f4b5e45818deb8108bd1d2c476fc776.tar.gz |
Reorder pieces of header in perl scripts.
The desired order is
- Prologue part 1 (2 lines with #!)
- Program short description
- Copyright and license notice
- Written-by notice
- Program short description (optional)
- Program long description (optional)
- Prologue part 2
- Time stamp
- Code
Reported by Paul Eggert.
* build-aux/announce-gen: Reorder header.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/useless-if-before-free: Likewise.
* build-aux/prefix-gnulib-mk: Add copyright notice and short
description.
* build-aux/update-copyright: Likewise. Add short description. Bump
time-stamp-line-limit to 200.
Diffstat (limited to 'build-aux/useless-if-before-free')
-rwxr-xr-x | build-aux/useless-if-before-free | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index 0e479a34b4..6ac8aa9196 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -1,5 +1,26 @@ #!/bin/sh #! -*-perl-*- + +# Detect instances of "if (p) free (p);". +# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. + +# Copyright (C) 2008-2019 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 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 <https://www.gnu.org/licenses/>. +# +# Written by Jim Meyering + # This is a prologue that allows to run a perl script as an executable # on systems that are compliant to a POSIX version before POSIX:2017. # On such systems, the usual invocation of an executable through execlp() @@ -15,32 +36,12 @@ eval 'exec perl -wSx "$0" "$@"' if 0; -# Detect instances of "if (p) free (p);". -# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. - my $VERSION = '2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2019 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 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 <https://www.gnu.org/licenses/>. - -# Written by Jim Meyering - use strict; use warnings; use Getopt::Long; |